Determinacy
of the query pattern
thief(g)
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
thief
(john).
thief
(
X
) :-
','
(
thief
(
X
),
!
).
Query: thief(g)
(1) PrologDeterminacyProcessorProof (EQUIVALENT transformation)
The root node satisfies the determinacy criterion.
digraph dp_graph { node [outthreshold=100, inthreshold=100]; 1 [label="1: thief(T1)\n\nT1 is ground", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: thief(T1), SCOPE: 1, CLAUSE: 0 | thief(T1), SCOPE: 1, CLAUSE: 1\n\nT1 is ground", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: true | thief(john), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: thief(T1), SCOPE: 1, CLAUSE: 1\n\nT1 is ground\nthief(T1) !=? thief(john)", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: thief(john), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: ','(thief(john), !_1)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: ','(thief(john), !_1), SCOPE: 2, CLAUSE: 0 | ','(thief(john), !_1), SCOPE: 2, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: !_1 | ','(thief(john), !_1), SCOPE: 2, CLAUSE: 1\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="11: ','(thief(T3), !_1)\n\nT3 is ground\nthief(T3) !=? thief(john)", fontsize=16, style=filled, fillcolor=lightyellow]; 12 [label="12: ','(thief(T3), !_1), SCOPE: 3, CLAUSE: 0 | ','(thief(T3), !_1), SCOPE: 3, CLAUSE: 1\n\nT3 is ground\nthief(T3) !=? thief(john)", fontsize=16, style=filled, fillcolor=lightyellow]; 13 [label="13: ','(thief(T3), !_1), SCOPE: 3, CLAUSE: 1\n\nT3 is ground\nthief(T3) !=? thief(john)", fontsize=16, style=filled, fillcolor=lightyellow]; 14 [label="14: ','(','(thief(T7), !_3), !_1)\n\nT7 is ground\nthief(T7) !=? thief(john)", fontsize=16, style=filled, fillcolor=lightyellow]; 15 [label="15: thief(T7)\n\nT7 is ground\nthief(T7) !=? thief(john)", fontsize=16, style=filled, fillcolor=lightyellow]; 16 [label="16: ','(!_3, !_1)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 17 [label="17: !_1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 18 [label="18: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 19 [label="19: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 20 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 20 [arrowhead = none ]; 20 -> 2; 21 [label="EVAL with clause\nthief(john).\nand substitutionT1 -> john", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 21 [arrowhead = none ]; 21 -> 3; 22 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 2 -> 22 [arrowhead = none ]; 22 -> 4; 23 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 3 -> 23 [arrowhead = none ]; 23 -> 5; 24 [label="ONLY EVAL with clause\nthief(X4) :- ','(thief(X4), !_1).\nand substitutionT1 -> T3,\nX4 -> T3", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 24 [arrowhead = none ]; 24 -> 11; 25 [label="ONLY EVAL with clause\nthief(X2) :- ','(thief(X2), !_1).\nand substitutionX2 -> john", fontsize=14, style = filled, fillcolor = lightblue]; 5 -> 25 [arrowhead = none ]; 25 -> 6; 26 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 6 -> 26 [arrowhead = none ]; 26 -> 7; 27 [label="ONLY EVAL with clause\nthief(john).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 7 -> 27 [arrowhead = none ]; 27 -> 8; 28 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 8 -> 28 [arrowhead = none ]; 28 -> 9; 29 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 9 -> 29 [arrowhead = none ]; 29 -> 10; 30 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 11 -> 30 [arrowhead = none ]; 30 -> 12; 31 [label="BACKTRACK\nfor clause: thief(john)\nwith clash: (thief(T3), thief(john))", fontsize=14, style = filled, fillcolor = lightgreen]; 12 -> 31 [arrowhead = none ]; 31 -> 13; 32 [label="ONLY EVAL with clause\nthief(X8) :- ','(thief(X8), !_3).\nand substitutionT3 -> T7,\nX8 -> T7", fontsize=14, style = filled, fillcolor = lightblue]; 13 -> 32 [arrowhead = none ]; 32 -> 14; 33 [label="SPLIT 1", fontsize=14, style = filled, fillcolor = violet]; 14 -> 33 [arrowhead = none ]; 33 -> 15; 34 [label="SPLIT 2\nnew knowledge:\nT7 is ground", fontsize=14, style = filled, fillcolor = violet]; 14 -> 34 [arrowhead = none ]; 34 -> 16; 35 [label="INSTANCE with matching:\nT1 -> T7", fontsize=14, style = filled, fillcolor = lightgrey]; 15 -> 35 [arrowhead = none , style=dashed]; 35 -> 1[style=dashed]; 36 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 16 -> 36 [arrowhead = none ]; 36 -> 17; 37 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 17 -> 37 [arrowhead = none ]; 37 -> 18; 38 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 18 -> 38 [arrowhead = none ]; 38 -> 19; }
(2)
YES