Bindings Preservation in Universal Quantifier Success Set Semantics

Determine whether, under the success set semantics of universal quantification applied to Prolog goals, successful variable bindings should be preserved across backtracking.

Background

The paper distinguishes between the traditional provability semantics of Prolog—under which meta-predicates like bagof/setof/findall were originally defined—and the answer constraint semantics used in constraint logic programming with attributed variables. In introducing bounded quantification meta-predicates (e.g., for_all/2), the authors highlight semantic ambiguities that arise when combining universal quantification with Prolog's backtracking.

Specifically, when considering the success set semantics of universal quantification over goals, the treatment of bindings encountered during iteration/backtracking becomes unclear. The authors note this ambiguity and contrast it with the answer constraint semantics, where computed answer constraints should be added conjunctively to the constraint store—a behavior their for_all/2 meta-predicate enforces by generating instances through iteration rather than backtracking.

References

In the success set semantics of a universal quantifier for goals, it is not clear whether the successfull bindings should be kept across backtracking.

A Constraint-based Mathematical Modeling Library in Prolog with Answer Constraint Semantics  (2402.17286 - Fages, 2024) in Section 4.2, "Bounded Quantification Meta-Predicates in quantifiers.pl"