Determinacy
of the query pattern
p2(a)
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
p1
(f(
X
)) :-
p1
(
X
).
p2
(f(
X
)) :-
p2
(
X
).
Query: p2(a)
(1) PrologDeterminacyProcessorProof (EQUIVALENT transformation)
The root node satisfies the determinacy criterion.
digraph dp_graph { node [outthreshold=100, inthreshold=100]; 1 [label="1: p2(T1)\n\n", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: p2(T1), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: p2(T4)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: p2(T4), SCOPE: 2, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: p2(T8)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 8 [arrowhead = none ]; 8 -> 2; 9 [label="EVAL with clause\np2(f(X2)) :- p2(X2).\nand substitutionX2 -> T4,\nT1 -> f(T4),\nT3 -> T4", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 9 [arrowhead = none ]; 9 -> 3; 10 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 2 -> 10 [arrowhead = none ]; 10 -> 4; 11 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 3 -> 11 [arrowhead = none ]; 11 -> 5; 12 [label="EVAL with clause\np2(f(X5)) :- p2(X5).\nand substitutionX5 -> T8,\nT4 -> f(T8),\nT7 -> T8", fontsize=14, style = filled, fillcolor = lightblue]; 5 -> 12 [arrowhead = none ]; 12 -> 6; 13 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 13 [arrowhead = none ]; 13 -> 7; 14 [label="INSTANCE with matching:\nT1 -> T8", fontsize=14, style = filled, fillcolor = lightgrey]; 6 -> 14 [arrowhead = none , style=dashed]; 14 -> 1[style=dashed]; }
(2)
YES