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
,
Y
).
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, X2)\n\nX1 is free\nX2 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: p(X1, X2), SCOPE: 2, CLAUSE: 1 | p(X1, X2), SCOPE: 2, CLAUSE: 2\n\nX1 is free\nX2 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: !_2 | p(X1, X2), SCOPE: 2, CLAUSE: 2\n\nX1 is free\nX2 is free", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: \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\nq :- p(X1, X2).\nand substitution", 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="ONLY EVAL with clause\np(a, b) :- !_2.\nand substitutionX1 -> a,\nX2 -> b", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 11 [arrowhead = none ]; 11 -> 5; 12 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 12 [arrowhead = none ]; 12 -> 6; 13 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 6 -> 13 [arrowhead = none ]; 13 -> 7; }
(2)
YES