Constraint logic programming: Difference between revisions

Content deleted Content added
m WikiCleaner 0.99 - Repairing link to disambiguation page - You can help!
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 (computing)|unification]]:
 
A constraint <code>t1=t2</code> can be simplified if both terms are function symbols applied to other terms. If the two function symbols are the same and the number of subterms is also the same, this constraint can be replaced with the pairwise equality of subterms. If the terms are composed of different function symbols or the same functor but on different number of terms, the constraint is unsatisfiable.