This commit is contained in:
Tibo De Peuter 2025-05-05 00:18:38 +02:00
parent a85169dced
commit a937b1bc44
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
15 changed files with 93 additions and 30 deletions

View file

@ -1,14 +1,19 @@
package prolog.ast.terms
import prolog.Substitutions
import prolog.logic.compare
import prolog.ast.arithmetic.Integer
import prolog.ast.arithmetic.Float
/**
* Value in Prolog.
*
* A [Term] is either a [Variable], [Atom], [Integer][prolog.ast.arithmetic.Integer],
* [Float][prolog.ast.arithmetic.Float] or [CompoundTerm].
* A [Term] is either a [Variable], [Atom], [Integer],
* [Float] or [CompoundTerm].
* In addition, SWI-Prolog also defines the type TODO string.
*/
interface Term : Comparable<Term> {
interface Term : Comparable<Term>, Cloneable {
override fun compareTo(other: Term): Int = compare(this, other, emptyMap())
fun applySubstitution(subs: Substitutions): Term
public override fun clone(): Term
}