Determinacy
of the query pattern
p(a,a,a)
w.r.t. the given
Prolog program
could successfully be
proven
:
0 Prolog
↳
1 PrologDeterminacyProcessorProof (⇔, 0 ms)
↳
2 YES
(0)
Obligation:
Clauses:
p
(
X
,
X
, a) :-
!
.
p
(
X
,
Y
,
Z
) :-
','
(
eq
(
Z
, a),
','
(
eq
(
X
,
Y
),
p
(
X
,
Y
,
Z
))).
eq
(
X
,
X
).
Query: p(a,a,a)
(1) PrologDeterminacyProcessorProof (EQUIVALENT transformation)
The root node satisfies the determinacy criterion.
digraph dp_graph { node [outthreshold=100, inthreshold=100]; 1 [label="1: p(T1, T2, T3)\n\n", fontsize=16, style=filled, fillcolor=lightyellow, color=red]; 2 [label="2: p(T1, T2, T3), SCOPE: 1, CLAUSE: 0 | p(T1, T2, T3), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 3 [label="3: !_1 | p(T1, T2, T3), SCOPE: 1, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 4 [label="4: p(T1, T2, T3), SCOPE: 1, CLAUSE: 1\n\nX2 is free\np(T1, T2, T3) !=? p(X2, X2, a)", fontsize=16, style=filled, fillcolor=lightyellow]; 5 [label="5: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 6 [label="6: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 7 [label="7: ','(eq(T12, a), ','(eq(T13, T14), p(T13, T14, T12)))\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 8 [label="8: ','(eq(T12, a), ','(eq(T13, T14), p(T13, T14, T12))), SCOPE: 2, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 9 [label="9: ','(eq(T18, T19), p(T18, T19, a))\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 10 [label="10: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 11 [label="11: ','(eq(T18, T19), p(T18, T19, a)), SCOPE: 3, CLAUSE: 2\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 12 [label="12: p(T24, T24, a)\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 13 [label="13: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 14 [label="14: p(T24, T24, a), SCOPE: 4, CLAUSE: 0 | p(T24, T24, a), SCOPE: 4, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 15 [label="15: !_4 | p(T24, T24, a), SCOPE: 4, CLAUSE: 1\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 16 [label="16: true\n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 17 [label="17: \n\n", fontsize=16, style=filled, fillcolor=lightyellow]; 18 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 1 -> 18 [arrowhead = none ]; 18 -> 2; 19 [label="EVAL with clause\np(X2, X2, a) :- !_1.\nand substitutionT1 -> T5,\nX2 -> T5,\nT2 -> T5,\nT3 -> a", fontsize=14, style = filled, fillcolor = lightblue]; 2 -> 19 [arrowhead = none ]; 19 -> 3; 20 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 2 -> 20 [arrowhead = none ]; 20 -> 4; 21 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 3 -> 21 [arrowhead = none ]; 21 -> 5; 22 [label="ONLY EVAL with clause\np(X6, X7, X8) :- ','(eq(X8, a), ','(eq(X6, X7), p(X6, X7, X8))).\nand substitutionT1 -> T13,\nX6 -> T13,\nT2 -> T14,\nX7 -> T14,\nT3 -> T12,\nX8 -> T12,\nT11 -> T12,\nT9 -> T13,\nT10 -> T14", fontsize=14, style = filled, fillcolor = lightblue]; 4 -> 22 [arrowhead = none ]; 22 -> 7; 23 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 5 -> 23 [arrowhead = none ]; 23 -> 6; 24 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 7 -> 24 [arrowhead = none ]; 24 -> 8; 25 [label="EVAL with clause\neq(X11, X11).\nand substitutionT12 -> a,\nX11 -> a,\nT17 -> a,\nT13 -> T18,\nT14 -> T19", fontsize=14, style = filled, fillcolor = lightblue]; 8 -> 25 [arrowhead = none ]; 25 -> 9; 26 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 8 -> 26 [arrowhead = none ]; 26 -> 10; 27 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 9 -> 27 [arrowhead = none ]; 27 -> 11; 28 [label="EVAL with clause\neq(X15, X15).\nand substitutionT18 -> T24,\nX15 -> T24,\nT19 -> T24,\nT23 -> T24", fontsize=14, style = filled, fillcolor = lightblue]; 11 -> 28 [arrowhead = none ]; 28 -> 12; 29 [label="EVAL-BACKTRACK", fontsize=14, style = filled, fillcolor = lightgreen]; 11 -> 29 [arrowhead = none ]; 29 -> 13; 30 [label="CASE", fontsize=14, style = filled, fillcolor = lightcyan]; 12 -> 30 [arrowhead = none ]; 30 -> 14; 31 [label="ONLY EVAL with clause\np(X19, X19, a) :- !_4.\nand substitutionT24 -> T28,\nX19 -> T28", fontsize=14, style = filled, fillcolor = lightblue]; 14 -> 31 [arrowhead = none ]; 31 -> 15; 32 [label="CUT", fontsize=14, style = filled, fillcolor = lightgreen]; 15 -> 32 [arrowhead = none ]; 32 -> 16; 33 [label="SUCCESS", fontsize=14, style = filled, fillcolor = lightgreen]; 16 -> 33 [arrowhead = none ]; 33 -> 17; }
(2)
YES