Determinacy
of the query pattern
q()
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
q
:-
p
(
X
,
X
).
p
(a, b) :-
!
.
p
(a, a) :-
p
(a, a).
Query: q()
(1) PrologDeterminacyProcessorProof (EQUIVALENT transformation)
The root node satisfies the determinacy criterion.
digraph dp_graph { node [outthreshold=100, inthreshold=100]; 1 [label="1: q\n\n", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: q, SCOPE: 1, CLAUSE: 0\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: p(X1, X1)\n\nX1 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: p(X1, X1), SCOPE: 2, CLAUSE: 1 | p(X1, X1), SCOPE: 2, CLAUSE: 2\n\nX1 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: p(X1, X1), SCOPE: 2, CLAUSE: 2\n\nX1 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: p(a, a)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: p(a, a), SCOPE: 3, CLAUSE: 1 | p(a, a), SCOPE: 3, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: p(a, a), SCOPE: 3, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: p(a, a)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 10 [arrowhead = none ]; 10 -> 2; 11 [label="ONLY EVAL with clause\nq :- p(X1, X1).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 11 [arrowhead = none ]; 11 -> 3; 12 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 12 [arrowhead = none ]; 12 -> 4; 13 [label="BACKTRACK\nfor clause: p(a, b) :- !because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 4 -> 13 [arrowhead = none ]; 13 -> 5; 14 [label="ONLY EVAL with clause\np(a, a) :- p(a, a).\nand substitutionX1 -> a", fontsize=14, style = filled, fillcolor = lightblue]; 5 -> 14 [arrowhead = none ]; 14 -> 6; 15 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 6 -> 15 [arrowhead = none ]; 15 -> 7; 16 [label="BACKTRACK\nfor clause: p(a, b) :- !because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 7 -> 16 [arrowhead = none ]; 16 -> 8; 17 [label="ONLY EVAL with clause\np(a, a) :- p(a, a).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 8 -> 17 [arrowhead = none ]; 17 -> 9; 18 [label="INSTANCE", fontsize=14, style = filled, fillcolor = lightgrey]; 9 -> 18 [arrowhead = none , style=dashed]; 18 -> 6[style=dashed]; }
(2)
YES