10.35.7 Answer Constraints

By default, the answer constraint only shows the projection of the store onto the variables that occur in the query, but not any constraints that may be attached to these variables, nor any domains or constraints attached to other variables. This is a conscious decision, as no efficient algorithm for projecting answer constraints onto the query variables is known for this constraint system.

It is possible, however, to get a complete answer constraint including all variables that took part in the computation and their domains and attached constraints. This is done by asserting a clause for the following predicate:

clpfd:full_answer   hook,volatile
If false (the default), the answer constraint, as well as constraints projected by copy_term/3, clpfd:project_attributes/2, clpfd:attribute_goal/2 and their callers, only contain the domains of the query variables. If true, those constraints contain the domains and any attached constraints of all variables. Initially defined as a dynamic, volatile predicate with no clauses.

Send feedback on this subject.