Content deleted Content added
François Bry (talk | contribs) m →Tree terms: "functors", a Prolog-specific and misleading denomination, replaced by "function symbol" |
François Bry (talk | contribs) m →Tree terms: "functors", a Prolog-specific and misleading denomination, replaced by "function symbol" |
||
Line 53:
===Tree terms===
Constraint logic programming with tree terms emulates regular logic programming by storing substitutions as constraints in the constraint store. Terms are variables, constants, and function symbols applied to other terms. The only considered constraints are equalities and disequalities between terms. Equality is particularly important, as constraints link <code>t1=t2</code> are often generated by the interpreter. Equality constraints on terms can be simplified, that is solved, via [[unification]]:
A constraint <code>t1=t2</code> can be simplified if both terms are
If one of the two terms is a variable, the only allowed value the variable can take is the other term. As a result, the other term can replace the variable in the current goal and constraint store, thus practically removing the variable from consideration. In the particular case of equality of a variable with itself, the constraint can be removed as always satisfied.
|