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
(a),
!
).
p
(
X
) :-
p
(
X
).
q
(b).
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 | p(T1), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: ','(q(a), !_1) | p(T1), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: ','(q(a), !_1), SCOPE: 2, CLAUSE: 2 | ?_2 | p(T1), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: ?_2 | p(T1), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: p(T1), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: p(T9)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 8 [arrowhead = none ]; 8 -> 2; 9 [label="ONLY EVAL with clause\np(X2) :- ','(q(a), !_1).\nand substitutionT1 -> T3,\nX2 -> T3", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 9 [arrowhead = none ]; 9 -> 3; 10 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 10 [arrowhead = none ]; 10 -> 4; 11 [label="BACKTRACK\nfor clause: q(b)because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 4 -> 11 [arrowhead = none ]; 11 -> 5; 12 [label="FAILURE", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 12 [arrowhead = none ]; 12 -> 6; 13 [label="ONLY EVAL with clause\np(X6) :- p(X6).\nand substitutionT1 -> T9,\nX6 -> T9,\nT8 -> T9", fontsize=14, style = filled, fillcolor = lightblue]; 6 -> 13 [arrowhead = none ]; 13 -> 7; 14 [label="INSTANCE with matching:\nT1 -> T9", fontsize=14, style = filled, fillcolor = lightgrey]; 7 -> 14 [arrowhead = none , style=dashed]; 14 -> 1[style=dashed]; }
(2)
YES