Backtracking fixed
This commit is contained in:
parent
a85169dced
commit
fd16c4cedc
18 changed files with 213 additions and 39 deletions
|
@ -1,14 +1,18 @@
|
|||
package prolog.ast.terms
|
||||
|
||||
import prolog.Substitutions
|
||||
import prolog.ast.arithmetic.Float
|
||||
import prolog.ast.arithmetic.Integer
|
||||
import prolog.logic.compare
|
||||
|
||||
/**
|
||||
* 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> {
|
||||
override fun compareTo(other: Term): Int = compare(this, other, emptyMap())
|
||||
fun applySubstitution(subs: Substitutions): Term
|
||||
}
|
||||
|
|
Reference in a new issue