Content deleted Content added
substitution of variables + types of constraints + book |
m X->Y (the example makes more sense this way) |
||
Line 1:
'''Constraint logic programming''' is a variant of [[logic programming]] that incorporates constraints as used in [[constraint satisfaction]]. A constraint logic program is a logic program that includes constraints in the body of clauses.
An example of a clause including a constraint is <code>A(X,Y) :- X+Y>0, B(X), C(
When the interpreter scans the body of a clause, it [[Backtracking|backtrack]]s if a constraint is not satisfied or a literal cannot be proved. There is a difference in how constrains and literals are handled: literals are proved by recursively evaluating other clauses; constraints are placed them in a set called ''constraint store''. This constraint store contains all constraints assumed satisfiable during execution. Evaluating a literal may also involve adding constraints to the constraint store.
|