Determinacy
of the query pattern
p(g)
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
p
(b).
p
(a) :-
p1
(
X
).
p1
(b) :-
!
.
p1
(a) :-
p1
(
X
).
Query: p(g)
(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\nT1 is ground", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: p(T1), SCOPE: 1, CLAUSE: 0 | p(T1), SCOPE: 1, CLAUSE: 1\n\nT1 is ground", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: true | p(b), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: p(T1), SCOPE: 1, CLAUSE: 1\n\nT1 is ground\np(T1) !=? p(b)", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: p(b), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: p1(X1)\n\nX1 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: p1(X1), SCOPE: 2, CLAUSE: 2 | p1(X1), SCOPE: 2, CLAUSE: 3\n\nX1 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="10: !_2 | p1(X1), SCOPE: 2, CLAUSE: 3\n\nX1 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 11 [label="11: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 12 [label="12: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 13 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 13 [arrowhead = none ]; 13 -> 2; 14 [label="EVAL with clause\np(b).\nand substitutionT1 -> b", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 14 [arrowhead = none ]; 14 -> 3; 15 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 2 -> 15 [arrowhead = none ]; 15 -> 4; 16 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 3 -> 16 [arrowhead = none ]; 16 -> 5; 17 [label="EVAL with clause\np(a) :- p1(X1).\nand substitutionT1 -> a", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 17 [arrowhead = none ]; 17 -> 7; 18 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 4 -> 18 [arrowhead = none ]; 18 -> 8; 19 [label="BACKTRACK\nfor clause: p(a) :- p1(X)because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 19 [arrowhead = none ]; 19 -> 6; 20 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 7 -> 20 [arrowhead = none ]; 20 -> 9; 21 [label="ONLY EVAL with clause\np1(b) :- !_2.\nand substitutionX1 -> b", fontsize=14, style = filled, fillcolor = lightblue]; 9 -> 21 [arrowhead = none ]; 21 -> 10; 22 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 10 -> 22 [arrowhead = none ]; 22 -> 11; 23 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 11 -> 23 [arrowhead = none ]; 23 -> 12; }
(2)
YES