Did you know ... | Search Documentation: |
![]() | Pack pac -- prolog/pac/expand-pac.pl |
?- regex(w(".*"), "abc", R). ?- regex(w("."), "abc", R). ?- regex(wl(".*"), "abc", R). ?- regex(wl(".*", A), "abc", R).
Simples usage:
?- pac:expand_goal((call(pred([a]), X), write(X)), user, G, L, [])
.
G = (user:'pred#2'(X), user:write(X)
),
L = [ (user:'pred#2'(a) :- true)]
Simplest usage:
?- expand_core(pred([X, Y] :- X\==Y), user, G, P, [])
.
G = user:'pred#1',
P = [ (user:'pred#1'(X, Y) :- user: (X\==Y))]
Simplest usage:
?- expand_phrase((pred([X, f(X)]), pred(U, g(U))), user, G, L, [])
.
G = (user:'pred#3', user:'pred#4'(U)),
L = [ (user:'pred#3'(X, f(X)
) :- true), (user:'pred#4'(U, g(U)
):-true)] .
True if G is a goal such that execution of G
unifies a term U with the value of expression E,
where H is the helper predidates for G generated as
a difference list P with a tail Q, i.e, append(H, Q, P)
is true.
Typically atomic subgoals of G are of the form M:S(A, B).
expand_exp/7 is used when compiling an equations in a kind,
a set of equations, to a clause of the predicate M:S/2.
Simplest usage:
?- expand_exp(f(a), k, V, m, G, P, [])
.
G = m:k(f(a), V)
,
P = [].
?- expand_exp(f(a), call, V, m, G, P, [])
.
G = m:f(a, V)
,
P = [].
?- expand_exp(=(hello), call, V, user, G, P, [])
.
G = user: (hello=V),
P = [].
Features:
The following predicates are exported, but not or incorrectly documented.