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
,
!
).
p
:-
p
.
q
:-
','
(
!
,
failure
(a)).
q
.
failure
(b).
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 | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: ','(q, !_1) | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: ','(q, !_1), SCOPE: 2, CLAUSE: 2 | ','(q, !_1), SCOPE: 2, CLAUSE: 3 | ?_2 | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: ','(','(!_2, failure(a)), !_1) | ','(q, !_1), SCOPE: 2, CLAUSE: 3 | ?_2 | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: ','(failure(a), !_1) | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: ','(failure(a), !_1), SCOPE: 3, CLAUSE: 4 | ?_3 | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: ?_3 | p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: p, SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="10: p\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, !_1).\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 :- ','(!_2, failure(a)).\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 14 [arrowhead = none ]; 14 -> 5; 15 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 15 [arrowhead = none ]; 15 -> 6; 16 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 6 -> 16 [arrowhead = none ]; 16 -> 7; 17 [label="BACKTRACK\nfor clause: failure(b)because of non-unification", fontsize=14, style = filled, fillcolor = lightgreen]; 7 -> 17 [arrowhead = none ]; 17 -> 8; 18 [label="FAILURE", fontsize=14, style = filled, fillcolor = lightgreen]; 8 -> 18 [arrowhead = none ]; 18 -> 9; 19 [label="ONLY EVAL with clause\np :- p.\nand substitution", fontsize=14, style = filled, fillcolor = lightblue]; 9 -> 19 [arrowhead = none ]; 19 -> 10; 20 [label="INSTANCE", fontsize=14, style = filled, fillcolor = lightgrey]; 10 -> 20 [arrowhead = none , style=dashed]; 20 -> 1[style=dashed]; }
(2)
YES