This module implements thread-safe aggregation predicates. Its use and results should be the same as those in the aggregates library, but several goals can use them concurrently without the interference and wrong results (due to implementation reasons) aggregates might lead to. This particular implementation is completely based on the one used in the aggregates library (whose original authors were Richard A. O'Keefe and David H.D. Warren).
A special case of bagof, where all free variables in the Generator are taken to be existentially quantified. Safe in concurrent applications.
Finds the Set of instances of the Template satisfying the Generator. The set is in ascending order (see compare/3 for a definition of this order) without duplicates, and is non-empty. If there are no solutions, setof/3 fails. setof/3 may succeed in more than one way, binding free variables in the Generator to different values. This can be avoided by using existential quantifiers on the free variables in front of the Generator, using ^/2. E.g., in A^p(A,B), A is existentially quantified. Safe in concurrent apllications.
Finds all the instances of the Template produced by the Generator, and returns them in the Bag in the order in which they were found. If the Generator contains free variables which are not bound in the Template, it assumes that this is like any other Prolog question and that you want bindings for those variables. This can be avoided by using existential quantifiers on the free variables in front of the Generator, using ^/2. Safe in concurrent applications.