Determinacy
of the query pattern
p(a)
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
p
(
X
) :-
','
(
q
(f(
Y
)),
p
(
Y
)).
q
(g(
Y
)).
Query: p(a)
(1) PrologDeterminacyProcessorProof (EQUIVALENT transformation)
The root node satisfies the determinacy criterion.
digraph dp_graph { node [outthreshold=100, inthreshold=100]; 1 [label="1: p(T1)\n\n", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: p(T1), SCOPE: 1, CLAUSE: 0\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: ','(q(f(X3)), p(X3))\n\nX3 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: ','(q(f(X3)), p(X3)), SCOPE: 2, CLAUSE: 1\n\nX3 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 6 [arrowhead = none ]; 6 -> 2; 7 [label="ONLY EVAL with clause\np(X2) :- ','(q(f(X3)), p(X3)).\nand substitutionT1 -> T3,\nX2 -> T3", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 7 [arrowhead = none ]; 7 -> 3; 8 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 8 [arrowhead = none ]; 8 -> 4; 9 [label="BACKTRACK\nfor clause: q(g(Y))because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 4 -> 9 [arrowhead = none ]; 9 -> 5; }
(2)
YES