| Did you know ... | Search Documentation: |
| expand.pl -- Prolog source-code transformation |
This module specifies, together with dcg.pl, the transformation of terms as they are read from a file before they are processed by the compiler.
The toplevel is expand_term/2. This uses three other translators:
Note that this ordering implies that conditional compilation directives cannot be generated by term_expansion/2 rules: they must literally appear in the source-code.
Term-expansion may choose to overrule DCG expansion. If the result of term-expansion is a DCG rule, the rule is subject to translation into a predicate.
Next, the result is passed to expand_bodies/2, which performs goal expansion.
expand_term(+Input, -Output) is det
expand_term(+Input, +Pos0, -Output, -Pos) is det
var_property(+Var, ?Property)true indicate that the variable appears once in the source.
Note this doesn't mean it is a semantic singleton.
expand_goal(+BodyTerm, +Pos0, -Out, -Pos) is det
expand_goal(+BodyTerm, -Out) is det
$expand_closure(+BodyIn, +ExtraArgs, -BodyOut) is semidet
$expand_closure(+BodyIn, +PIn, +ExtraArgs, -BodyOut, -POut) is semidet
function(?Term, +Context)[multifile]The following predicates are exported, but not or incorrectly documented.