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
:-
thief
(john).
thief
(john).
thief
(
X
) :-
','
(
thief
(
X
),
!
).
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: thief(john)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: thief(john), SCOPE: 2, CLAUSE: 1 | thief(john), SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: true | thief(john), SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: thief(john), SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: ','(thief(john), !_2)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: ','(thief(john), !_2), SCOPE: 3, CLAUSE: 1 | ','(thief(john), !_2), SCOPE: 3, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: !_2 | ','(thief(john), !_2), SCOPE: 3, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="10: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 11 [label="11: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 12 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 12 [arrowhead = none ]; 12 -> 2; 13 [label="ONLY EVAL with clause\np :- thief(john).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 13 [arrowhead = none ]; 13 -> 3; 14 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 14 [arrowhead = none ]; 14 -> 4; 15 [label="ONLY EVAL with clause\nthief(john).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 15 [arrowhead = none ]; 15 -> 5; 16 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 16 [arrowhead = none ]; 16 -> 6; 17 [label="ONLY EVAL with clause\nthief(X3) :- ','(thief(X3), !_2).\nand substitutionX3 -> john", fontsize=14, style = filled, fillcolor = lightblue]; 6 -> 17 [arrowhead = none ]; 17 -> 7; 18 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 7 -> 18 [arrowhead = none ]; 18 -> 8; 19 [label="ONLY EVAL with clause\nthief(john).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 8 -> 19 [arrowhead = none ]; 19 -> 9; 20 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 9 -> 20 [arrowhead = none ]; 20 -> 10; 21 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 10 -> 21 [arrowhead = none ]; 21 -> 11; }
(2)
YES