(0) Obligation:
Clauses:
prefix(Xs, Ys) :- app(Xs, X1, Ys).
app([], X, X).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
Query: prefix(g,a)
(1) LPReorderTransformerProof (EQUIVALENT transformation)
Reordered facts before rules in definite LP [PROLOG].
(2) Obligation:
Clauses:
app([], X, X).
prefix(Xs, Ys) :- app(Xs, X1, Ys).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
Query: prefix(g,a)
(3) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)
Built complexity over-approximating cdt problems from derivation graph.
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
f1_in(z0) → U1(f7_in(z0), z0)
U1(f7_out1, z0) → f1_out1
f7_in([]) → f7_out1
f7_in(.(z0, z1)) → U2(f7_in(z1), .(z0, z1))
U2(f7_out1, .(z0, z1)) → f7_out1
Tuples:
F1_IN(z0) → c(U1'(f7_in(z0), z0), F7_IN(z0))
F7_IN(.(z0, z1)) → c3(U2'(f7_in(z1), .(z0, z1)), F7_IN(z1))
S tuples:
F1_IN(z0) → c(U1'(f7_in(z0), z0), F7_IN(z0))
F7_IN(.(z0, z1)) → c3(U2'(f7_in(z1), .(z0, z1)), F7_IN(z1))
K tuples:none
Defined Rule Symbols:
f1_in, U1, f7_in, U2
Defined Pair Symbols:
F1_IN, F7_IN
Compound Symbols:
c, c3
(5) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)
Split RHS of tuples not part of any SCC
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
f1_in(z0) → U1(f7_in(z0), z0)
U1(f7_out1, z0) → f1_out1
f7_in([]) → f7_out1
f7_in(.(z0, z1)) → U2(f7_in(z1), .(z0, z1))
U2(f7_out1, .(z0, z1)) → f7_out1
Tuples:
F7_IN(.(z0, z1)) → c3(U2'(f7_in(z1), .(z0, z1)), F7_IN(z1))
F1_IN(z0) → c1(U1'(f7_in(z0), z0))
F1_IN(z0) → c1(F7_IN(z0))
S tuples:
F7_IN(.(z0, z1)) → c3(U2'(f7_in(z1), .(z0, z1)), F7_IN(z1))
F1_IN(z0) → c1(U1'(f7_in(z0), z0))
F1_IN(z0) → c1(F7_IN(z0))
K tuples:none
Defined Rule Symbols:
f1_in, U1, f7_in, U2
Defined Pair Symbols:
F7_IN, F1_IN
Compound Symbols:
c3, c1
(7) CdtGraphRemoveTrailingTuplepartsProof (BOTH BOUNDS(ID, ID) transformation)
Removed 2 trailing tuple parts
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
f1_in(z0) → U1(f7_in(z0), z0)
U1(f7_out1, z0) → f1_out1
f7_in([]) → f7_out1
f7_in(.(z0, z1)) → U2(f7_in(z1), .(z0, z1))
U2(f7_out1, .(z0, z1)) → f7_out1
Tuples:
F1_IN(z0) → c1(F7_IN(z0))
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
F1_IN(z0) → c1
S tuples:
F1_IN(z0) → c1(F7_IN(z0))
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
F1_IN(z0) → c1
K tuples:none
Defined Rule Symbols:
f1_in, U1, f7_in, U2
Defined Pair Symbols:
F1_IN, F7_IN
Compound Symbols:
c1, c3, c1
(9) CdtKnowledgeProof (EQUIVALENT transformation)
The following tuples could be moved from S to K by knowledge propagation:
F1_IN(z0) → c1(F7_IN(z0))
F1_IN(z0) → c1
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
f1_in(z0) → U1(f7_in(z0), z0)
U1(f7_out1, z0) → f1_out1
f7_in([]) → f7_out1
f7_in(.(z0, z1)) → U2(f7_in(z1), .(z0, z1))
U2(f7_out1, .(z0, z1)) → f7_out1
Tuples:
F1_IN(z0) → c1(F7_IN(z0))
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
F1_IN(z0) → c1
S tuples:
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
K tuples:
F1_IN(z0) → c1(F7_IN(z0))
F1_IN(z0) → c1
Defined Rule Symbols:
f1_in, U1, f7_in, U2
Defined Pair Symbols:
F1_IN, F7_IN
Compound Symbols:
c1, c3, c1
(11) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
We considered the (Usable) Rules:none
And the Tuples:
F1_IN(z0) → c1(F7_IN(z0))
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
F1_IN(z0) → c1
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(.(x1, x2)) = [1] + x2
POL(F1_IN(x1)) = [1] + x1
POL(F7_IN(x1)) = x1
POL(c1) = 0
POL(c1(x1)) = x1
POL(c3(x1)) = x1
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
f1_in(z0) → U1(f7_in(z0), z0)
U1(f7_out1, z0) → f1_out1
f7_in([]) → f7_out1
f7_in(.(z0, z1)) → U2(f7_in(z1), .(z0, z1))
U2(f7_out1, .(z0, z1)) → f7_out1
Tuples:
F1_IN(z0) → c1(F7_IN(z0))
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
F1_IN(z0) → c1
S tuples:none
K tuples:
F1_IN(z0) → c1(F7_IN(z0))
F1_IN(z0) → c1
F7_IN(.(z0, z1)) → c3(F7_IN(z1))
Defined Rule Symbols:
f1_in, U1, f7_in, U2
Defined Pair Symbols:
F1_IN, F7_IN
Compound Symbols:
c1, c3, c1
(13) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(14) BOUNDS(O(1), O(1))
(15) PrologToCdtProblemTransformerProof (UPPER BOUND (ID) transformation)
Built complexity over-approximating cdt problems from derivation graph.
(16) Obligation:
Complexity Dependency Tuples Problem
Rules:
f2_in(z0) → U1(f5_in(z0), z0)
U1(f5_out1, z0) → f2_out1
f5_in([]) → f5_out1
f5_in(.(z0, z1)) → U2(f5_in(z1), .(z0, z1))
U2(f5_out1, .(z0, z1)) → f5_out1
Tuples:
F2_IN(z0) → c(U1'(f5_in(z0), z0), F5_IN(z0))
F5_IN(.(z0, z1)) → c3(U2'(f5_in(z1), .(z0, z1)), F5_IN(z1))
S tuples:
F2_IN(z0) → c(U1'(f5_in(z0), z0), F5_IN(z0))
F5_IN(.(z0, z1)) → c3(U2'(f5_in(z1), .(z0, z1)), F5_IN(z1))
K tuples:none
Defined Rule Symbols:
f2_in, U1, f5_in, U2
Defined Pair Symbols:
F2_IN, F5_IN
Compound Symbols:
c, c3
(17) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)
Split RHS of tuples not part of any SCC
(18) Obligation:
Complexity Dependency Tuples Problem
Rules:
f2_in(z0) → U1(f5_in(z0), z0)
U1(f5_out1, z0) → f2_out1
f5_in([]) → f5_out1
f5_in(.(z0, z1)) → U2(f5_in(z1), .(z0, z1))
U2(f5_out1, .(z0, z1)) → f5_out1
Tuples:
F5_IN(.(z0, z1)) → c3(U2'(f5_in(z1), .(z0, z1)), F5_IN(z1))
F2_IN(z0) → c1(U1'(f5_in(z0), z0))
F2_IN(z0) → c1(F5_IN(z0))
S tuples:
F5_IN(.(z0, z1)) → c3(U2'(f5_in(z1), .(z0, z1)), F5_IN(z1))
F2_IN(z0) → c1(U1'(f5_in(z0), z0))
F2_IN(z0) → c1(F5_IN(z0))
K tuples:none
Defined Rule Symbols:
f2_in, U1, f5_in, U2
Defined Pair Symbols:
F5_IN, F2_IN
Compound Symbols:
c3, c1
(19) CdtGraphRemoveTrailingTuplepartsProof (BOTH BOUNDS(ID, ID) transformation)
Removed 2 trailing tuple parts
(20) Obligation:
Complexity Dependency Tuples Problem
Rules:
f2_in(z0) → U1(f5_in(z0), z0)
U1(f5_out1, z0) → f2_out1
f5_in([]) → f5_out1
f5_in(.(z0, z1)) → U2(f5_in(z1), .(z0, z1))
U2(f5_out1, .(z0, z1)) → f5_out1
Tuples:
F2_IN(z0) → c1(F5_IN(z0))
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
F2_IN(z0) → c1
S tuples:
F2_IN(z0) → c1(F5_IN(z0))
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
F2_IN(z0) → c1
K tuples:none
Defined Rule Symbols:
f2_in, U1, f5_in, U2
Defined Pair Symbols:
F2_IN, F5_IN
Compound Symbols:
c1, c3, c1
(21) CdtKnowledgeProof (EQUIVALENT transformation)
The following tuples could be moved from S to K by knowledge propagation:
F2_IN(z0) → c1(F5_IN(z0))
F2_IN(z0) → c1
(22) Obligation:
Complexity Dependency Tuples Problem
Rules:
f2_in(z0) → U1(f5_in(z0), z0)
U1(f5_out1, z0) → f2_out1
f5_in([]) → f5_out1
f5_in(.(z0, z1)) → U2(f5_in(z1), .(z0, z1))
U2(f5_out1, .(z0, z1)) → f5_out1
Tuples:
F2_IN(z0) → c1(F5_IN(z0))
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
F2_IN(z0) → c1
S tuples:
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
K tuples:
F2_IN(z0) → c1(F5_IN(z0))
F2_IN(z0) → c1
Defined Rule Symbols:
f2_in, U1, f5_in, U2
Defined Pair Symbols:
F2_IN, F5_IN
Compound Symbols:
c1, c3, c1
(23) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
We considered the (Usable) Rules:none
And the Tuples:
F2_IN(z0) → c1(F5_IN(z0))
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
F2_IN(z0) → c1
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(.(x1, x2)) = [1] + x2
POL(F2_IN(x1)) = [1] + x1
POL(F5_IN(x1)) = x1
POL(c1) = 0
POL(c1(x1)) = x1
POL(c3(x1)) = x1
(24) Obligation:
Complexity Dependency Tuples Problem
Rules:
f2_in(z0) → U1(f5_in(z0), z0)
U1(f5_out1, z0) → f2_out1
f5_in([]) → f5_out1
f5_in(.(z0, z1)) → U2(f5_in(z1), .(z0, z1))
U2(f5_out1, .(z0, z1)) → f5_out1
Tuples:
F2_IN(z0) → c1(F5_IN(z0))
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
F2_IN(z0) → c1
S tuples:none
K tuples:
F2_IN(z0) → c1(F5_IN(z0))
F2_IN(z0) → c1
F5_IN(.(z0, z1)) → c3(F5_IN(z1))
Defined Rule Symbols:
f2_in, U1, f5_in, U2
Defined Pair Symbols:
F2_IN, F5_IN
Compound Symbols:
c1, c3, c1