Determinacy
of the query pattern
p()
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
p
:-
q
(
','
(
r
,
!
)).
q
(
X
) :-
X
.
r
.
r
:-
r
.
Query: p()
(1) PrologDeterminacyProcessorProof (EQUIVALENT transformation)
The root node satisfies the determinacy criterion.
digraph dp_graph { node [outthreshold=100, inthreshold=100]; 1 [label="1: p\n\n", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: p, SCOPE: 1, CLAUSE: 0\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: q(','(r, !))\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: q(','(r, !)), SCOPE: 2, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: call(','(r, !))\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: ','(r, !_3)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: ','(r, !_3), SCOPE: 4, CLAUSE: 2 | ','(r, !_3), SCOPE: 4, CLAUSE: 3\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: !_3 | ','(r, !_3), SCOPE: 4, CLAUSE: 3\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="10: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 11 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 11 [arrowhead = none ]; 11 -> 2; 12 [label="ONLY EVAL with clause\np :- q(','(r, !)).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 12 [arrowhead = none ]; 12 -> 3; 13 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 13 [arrowhead = none ]; 13 -> 4; 14 [label="ONLY EVAL with clause\nq(X3) :- call(X3).\nand substitutionX3 -> ','(r, !)", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 14 [arrowhead = none ]; 14 -> 5; 15 [label="CALL", fontsize=14, style = filled, fillcolor = lightcyan]; 5 -> 15 [arrowhead = none ]; 15 -> 6; 16 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 6 -> 16 [arrowhead = none ]; 16 -> 7; 17 [label="ONLY EVAL with clause\nr.\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 7 -> 17 [arrowhead = none ]; 17 -> 8; 18 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 8 -> 18 [arrowhead = none ]; 18 -> 9; 19 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 9 -> 19 [arrowhead = none ]; 19 -> 10; }
(2)
YES