This library collects utilities to reason about terms commonly needed for reasoning about Prolog code. Note that many related facilities can be found in the core as well as other libraries:
This predicate is typically used to reason about Prolog conjunctions (disjunctions) as many operations are easier on lists than on binary trees over some operator.
true
(mkconj/2) and false
(mkdisj/2). Note that a false
encountered in a conjunction does not cause the conjunction to
be false
, i.e. semantics under side effects are preserved.
The Prolog `, and
;` operators are of type xfy
, i.e. right
associative. These predicates preserve this grouping. For example,
?- mkconj((a,b), c, Conj) Conj = (a,b,c)
call(Goal0, ...)
is returned.user
and built-in
predicates. This predicate is intended for reporting predicate
information to the user, for example in the profiler.
First PI is converted to a head and the hook user:prolog_predicate_name/2 is tried.
When a variable is called, this is normally returned in Goal.
Currently if a variable is called with additional arguments, e.g.,
call(Var, a1)
, this call is reported as call(Var, a1)
.
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
true
(mkconj/2) and false
(mkdisj/2). Note that a false
encountered in a conjunction does not cause the conjunction to
be false
, i.e. semantics under side effects are preserved.
The Prolog `, and
;` operators are of type xfy
, i.e. right
associative. These predicates preserve this grouping. For example,
?- mkconj((a,b), c, Conj) Conj = (a,b,c)
This predicate is typically used to reason about Prolog conjunctions (disjunctions) as many operations are easier on lists than on binary trees over some operator.