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
:-
r
.
r
:-
','
(
q
,
!
).
r
:-
q
.
q
.
q
:-
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: r\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: r, SCOPE: 2, CLAUSE: 1 | r, SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: ','(q, !_2) | r, SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: ','(q, !_2), SCOPE: 3, CLAUSE: 3 | ','(q, !_2), SCOPE: 3, CLAUSE: 4 | ?_3 | r, SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: !_2 | ','(q, !_2), SCOPE: 3, CLAUSE: 4 | ?_3 | r, SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: \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\np :- r.\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="ONLY EVAL with clause\nr :- ','(q, !_2).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 13 [arrowhead = none ]; 13 -> 5; 14 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 5 -> 14 [arrowhead = none ]; 14 -> 6; 15 [label="ONLY EVAL with clause\nq.\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 6 -> 15 [arrowhead = none ]; 15 -> 7; 16 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 7 -> 16 [arrowhead = none ]; 16 -> 8; 17 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 8 -> 17 [arrowhead = none ]; 17 -> 9; }
(2)
YES