This module provides a couple of primitives for hypothetical
reasoning. The primitives come in two flavours. The first flavour
is the continuation variant where the effect of the primitive
per-sists for the continuation. The second flavour is the
temporary variant where the effect of the primitive only persist
for the duration of a given goal.
<verb>(<arguments>) % Continuation Variant
<verb>(<arguments>, <goal>) % Temporary Variant
Since the temporary variant uses an additional goal argument, given the continuation variant the temporary variant can be easily invoked with the help of call/2. The clause primitives are implemented with the help of clause references and the module assume. The other primitives extend some logical meta-predicates to the temporary variant.Examples:
?- assumez(p), p.
?- assumez(p), retire(p), p.
The continuation variants of true/1, fail/1, (',')/3 and (;)/3 are already defined in the runtime library. By default the assume predicate will create a thread local predicate, if the predicate of the head of the given clause was not yet defined. Further the retire predicate will silently fail if the predicate of the head of the given clause was not yet defined.
The following hypothetical reasoning predicates are provided: