18 lines
515 B
Kotlin
18 lines
515 B
Kotlin
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],
|
|
* [Float] or [CompoundTerm].
|
|
* In addition, SWI-Prolog also defines the type TODO string.
|
|
*/
|
|
interface Term : Comparable<Term>, Cloneable {
|
|
override fun compareTo(other: Term): Int = compare(this, other, emptyMap())
|
|
fun applySubstitution(subs: Substitutions): Term
|
|
}
|