next up previous contents
Next: Options and Built-In Predicates Up: Semantics Previous: Addition and removal of

Executing Propagation and simpagation rules

Consider the following propagation rule:

p(X), q(Y) ==> <Body>.

:- p(X).

The execution of this rule, started by calling p(X), will try to match all q(Y) in the constraint store, and thus it can be satisfied, with <Body> executed, multiple number of times with different q(Y). <Body> for a particular q(Y) will be executed first, before trying to match the next q(Y). The execution of <Body> may however cause the removal of p(X). In this case, no further matching with q(Y) will be performed.

Note that there is no commitment with propagation and simpagation rule if the constraint being matched is not removed:

p(X), q(Y) ==> <Body1>.
p(X), r(Y) ==> <Body2>.

:- p(X).

Both rules will always be executed.



Joachim Schimpf
Sun Jul 19 22:34:17 BST 1998