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
(
!
).
p
(
X
) :-
','
(
X
,
failure
(a)).
p
(
X
) :-
p
(
X
).
failure
(b).
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(!)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: p(!), SCOPE: 2, CLAUSE: 1 | p(!), SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: p(!), SCOPE: 2, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: p(!), SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: ','(call(!), failure(a))\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: ','(!_3, failure(a))\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: failure(a)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="10: failure(a), SCOPE: 4, CLAUSE: 3\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 11 [label="11: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 12 [label="12: p(!)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 13 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 13 [arrowhead = none ]; 13 -> 2; 14 [label="ONLY EVAL with clause\nq :- p(!).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 14 [arrowhead = none ]; 14 -> 3; 15 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 15 [arrowhead = none ]; 15 -> 4; 16 [label="PARALLEL", fontsize=14, style = filled, fillcolor = violet]; 4 -> 16 [arrowhead = none ]; 16 -> 5; 17 [label="PARALLEL", fontsize=14, style = filled, fillcolor = violet]; 4 -> 17 [arrowhead = none ]; 17 -> 6; 18 [label="ONLY EVAL with clause\np(X5) :- ','(call(X5), failure(a)).\nand substitutionX5 -> !", fontsize=14, style = filled, fillcolor = lightblue]; 5 -> 18 [arrowhead = none ]; 18 -> 7; 19 [label="ONLY EVAL with clause\np(X9) :- p(X9).\nand substitutionX9 -> !", fontsize=14, style = filled, fillcolor = lightblue]; 6 -> 19 [arrowhead = none ]; 19 -> 12; 20 [label="CALL", fontsize=14, style = filled, fillcolor = lightcyan]; 7 -> 20 [arrowhead = none ]; 20 -> 8; 21 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 8 -> 21 [arrowhead = none ]; 21 -> 9; 22 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 9 -> 22 [arrowhead = none ]; 22 -> 10; 23 [label="BACKTRACK\nfor clause: failure(b)because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 10 -> 23 [arrowhead = none ]; 23 -> 11; 24 [label="INSTANCE", fontsize=14, style = filled, fillcolor = lightgrey]; 12 -> 24 [arrowhead = none , style=dashed]; 24 -> 3[style=dashed]; }
(2)
YES