(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

null(nil) → true
null(add(n, x)) → false
tail(add(n, x)) → x
tail(nil) → nil
head(add(n, x)) → n
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
reverse(nil) → nil
reverse(add(n, x)) → app(reverse(x), add(n, nil))
shuffle(x) → shuff(x, nil)
shuff(x, y) → if(null(x), x, y, app(y, add(head(x), nil)))
if(true, x, y, z) → y
if(false, x, y, z) → shuff(reverse(tail(x)), z)

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

null(nil) → true [1]
null(add(n, x)) → false [1]
tail(add(n, x)) → x [1]
tail(nil) → nil [1]
head(add(n, x)) → n [1]
app(nil, y) → y [1]
app(add(n, x), y) → add(n, app(x, y)) [1]
reverse(nil) → nil [1]
reverse(add(n, x)) → app(reverse(x), add(n, nil)) [1]
shuffle(x) → shuff(x, nil) [1]
shuff(x, y) → if(null(x), x, y, app(y, add(head(x), nil))) [1]
if(true, x, y, z) → y [1]
if(false, x, y, z) → shuff(reverse(tail(x)), z) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

null(nil) → true [1]
null(add(n, x)) → false [1]
tail(add(n, x)) → x [1]
tail(nil) → nil [1]
head(add(n, x)) → n [1]
app(nil, y) → y [1]
app(add(n, x), y) → add(n, app(x, y)) [1]
reverse(nil) → nil [1]
reverse(add(n, x)) → app(reverse(x), add(n, nil)) [1]
shuffle(x) → shuff(x, nil) [1]
shuff(x, y) → if(null(x), x, y, app(y, add(head(x), nil))) [1]
if(true, x, y, z) → y [1]
if(false, x, y, z) → shuff(reverse(tail(x)), z) [1]

The TRS has the following type information:
null :: nil:add → true:false
nil :: nil:add
true :: true:false
add :: head → nil:add → nil:add
false :: true:false
tail :: nil:add → nil:add
head :: nil:add → head
app :: nil:add → nil:add → nil:add
reverse :: nil:add → nil:add
shuffle :: nil:add → nil:add
shuff :: nil:add → nil:add → nil:add
if :: true:false → nil:add → nil:add → nil:add → nil:add

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


shuffle
shuff
if

(c) The following functions are completely defined:

null
app
head
reverse
tail

Due to the following rules being added:

head(v0) → const [0]

And the following fresh constants:

const

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

null(nil) → true [1]
null(add(n, x)) → false [1]
tail(add(n, x)) → x [1]
tail(nil) → nil [1]
head(add(n, x)) → n [1]
app(nil, y) → y [1]
app(add(n, x), y) → add(n, app(x, y)) [1]
reverse(nil) → nil [1]
reverse(add(n, x)) → app(reverse(x), add(n, nil)) [1]
shuffle(x) → shuff(x, nil) [1]
shuff(x, y) → if(null(x), x, y, app(y, add(head(x), nil))) [1]
if(true, x, y, z) → y [1]
if(false, x, y, z) → shuff(reverse(tail(x)), z) [1]
head(v0) → const [0]

The TRS has the following type information:
null :: nil:add → true:false
nil :: nil:add
true :: true:false
add :: const → nil:add → nil:add
false :: true:false
tail :: nil:add → nil:add
head :: nil:add → const
app :: nil:add → nil:add → nil:add
reverse :: nil:add → nil:add
shuffle :: nil:add → nil:add
shuff :: nil:add → nil:add → nil:add
if :: true:false → nil:add → nil:add → nil:add → nil:add
const :: const

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

null(nil) → true [1]
null(add(n, x)) → false [1]
tail(add(n, x)) → x [1]
tail(nil) → nil [1]
head(add(n, x)) → n [1]
app(nil, y) → y [1]
app(add(n, x), y) → add(n, app(x, y)) [1]
reverse(nil) → nil [1]
reverse(add(n, nil)) → app(nil, add(n, nil)) [2]
reverse(add(n, add(n', x'))) → app(app(reverse(x'), add(n', nil)), add(n, nil)) [2]
shuffle(x) → shuff(x, nil) [1]
shuff(nil, y) → if(true, nil, y, app(y, add(const, nil))) [2]
shuff(add(n'', x''), y) → if(false, add(n'', x''), y, app(y, add(n'', nil))) [3]
shuff(add(n'', x''), y) → if(false, add(n'', x''), y, app(y, add(const, nil))) [2]
if(true, x, y, z) → y [1]
if(false, add(n1, x1), y, z) → shuff(reverse(x1), z) [2]
if(false, nil, y, z) → shuff(reverse(nil), z) [2]
head(v0) → const [0]

The TRS has the following type information:
null :: nil:add → true:false
nil :: nil:add
true :: true:false
add :: const → nil:add → nil:add
false :: true:false
tail :: nil:add → nil:add
head :: nil:add → const
app :: nil:add → nil:add → nil:add
reverse :: nil:add → nil:add
shuffle :: nil:add → nil:add
shuff :: nil:add → nil:add → nil:add
if :: true:false → nil:add → nil:add → nil:add → nil:add
const :: const

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

nil => 0
true => 1
false => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, y) :|: n >= 0, z'' = y, z' = 1 + n + x, x >= 0, y >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: v0 >= 0, z' = v0
if(z', z'', z1, z2) -{ 1 }→ y :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z) :|: z1 = y, x1 >= 0, z >= 0, z2 = z, y >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z) :|: z'' = 0, z1 = y, z >= 0, z2 = z, y >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + n + 0) :|: n >= 0, z' = 1 + n + 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, y, app(y, 1 + 0 + 0)) :|: z'' = y, y >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', y, app(y, 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' = y, y >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', y, app(y, 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' = y, y >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(x, 0) :|: z' = x, x >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

(11) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(12) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

(13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ head }
{ app }
{ null }
{ tail }
{ reverse }
{ shuff, if }
{ shuffle }

(14) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {head}, {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle}

(15) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: head
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(16) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {head}, {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: ?, size: O(n1) [z']

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: head
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(18) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']

(19) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(20) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']

(21) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: app
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z' + z''

(22) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: ?, size: O(n1) [z' + z'']

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: app
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z'

(24) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 1 }→ 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 2 }→ app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 2 }→ if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0
shuff(z', z'') -{ 3 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 2 }→ if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

(25) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(26) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

(27) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: null
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(28) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {null}, {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: ?, size: O(1) [1]

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: null
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(30) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]

(31) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(32) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]

(33) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: tail
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(34) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {tail}, {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: ?, size: O(n1) [z']

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: tail
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(36) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']

(37) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(38) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']

(39) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: reverse
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(40) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {reverse}, {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: ?, size: O(n1) [z']

(41) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: reverse
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 4 + 3·z' + 2·z'2

(42) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 2 }→ app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']

(43) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(44) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 6 + 3·x1 + 2·x12 }→ shuff(s6, z2) :|: s6 >= 0, s6 <= 1 * x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 6 }→ shuff(s7, z2) :|: s7 >= 0, s7 <= 1 * 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 8 + s3 + s4 + 3·x' + 2·x'2 }→ s5 :|: s3 >= 0, s3 <= 1 * x', s4 >= 0, s4 <= 1 * s3 + 1 * (1 + n' + 0), s5 >= 0, s5 <= 1 * s4 + 1 * (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']

(45) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: shuff
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: z'2 + z''

Computed SIZE bound using KoAT for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: z''2 + z1 + 2·z2

(46) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 6 + 3·x1 + 2·x12 }→ shuff(s6, z2) :|: s6 >= 0, s6 <= 1 * x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 6 }→ shuff(s7, z2) :|: s7 >= 0, s7 <= 1 * 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 8 + s3 + s4 + 3·x' + 2·x'2 }→ s5 :|: s3 >= 0, s3 <= 1 * x', s4 >= 0, s4 <= 1 * s3 + 1 * (1 + n' + 0), s5 >= 0, s5 <= 1 * s4 + 1 * (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {shuff,if}, {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']
shuff: runtime: ?, size: O(n2) [z'2 + z'']
if: runtime: ?, size: O(n2) [z''2 + z1 + 2·z2]

(47) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: shuff
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 20 + 47·z' + 6·z'·z'' + 26·z'2 + 16·z'3 + 3·z''

Computed RUNTIME bound using KoAT for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 53 + 50·z'' + 6·z''·z2 + 28·z''2 + 16·z''3 + 6·z2

(48) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1, z2) -{ 6 + 3·x1 + 2·x12 }→ shuff(s6, z2) :|: s6 >= 0, s6 <= 1 * x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 6 }→ shuff(s7, z2) :|: s7 >= 0, s7 <= 1 * 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 8 + s3 + s4 + 3·x' + 2·x'2 }→ s5 :|: s3 >= 0, s3 <= 1 * x', s4 >= 0, s4 <= 1 * s3 + 1 * (1 + n' + 0), s5 >= 0, s5 <= 1 * s4 + 1 * (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 3 + z'' }→ if(1, 0, z'', s'') :|: s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuff(z', z'') -{ 4 + z'' }→ if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 3 + z'' }→ if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuffle(z') -{ 1 }→ shuff(z', 0) :|: z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']
shuff: runtime: O(n3) [20 + 47·z' + 6·z'·z'' + 26·z'2 + 16·z'3 + 3·z''], size: O(n2) [z'2 + z'']
if: runtime: O(n3) [53 + 50·z'' + 6·z''·z2 + 28·z''2 + 16·z''3 + 6·z2], size: O(n2) [z''2 + z1 + 2·z2]

(49) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(50) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 26 + 47·s6 + 6·s6·z2 + 26·s62 + 16·s63 + 3·x1 + 2·x12 + 3·z2 }→ s12 :|: s12 >= 0, s12 <= 1 * (s6 * s6) + 1 * z2, s6 >= 0, s6 <= 1 * x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 26 + 47·s7 + 6·s7·z2 + 26·s72 + 16·s73 + 3·z2 }→ s13 :|: s13 >= 0, s13 <= 1 * (s7 * s7) + 1 * z2, s7 >= 0, s7 <= 1 * 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 8 + s3 + s4 + 3·x' + 2·x'2 }→ s5 :|: s3 >= 0, s3 <= 1 * x', s4 >= 0, s4 <= 1 * s3 + 1 * (1 + n' + 0), s5 >= 0, s5 <= 1 * s4 + 1 * (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 151 + 154·n'' + 6·n''·s1 + 152·n''·x'' + 48·n''·x''2 + 76·n''2 + 48·n''2·x'' + 16·n''3 + 12·s1 + 6·s1·x'' + 154·x'' + 76·x''2 + 16·x''3 + z'' }→ s10 :|: s10 >= 0, s10 <= 2 * s1 + 1 * ((1 + n'' + x'') * (1 + n'' + x'')) + 1 * z'', s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 150 + 154·n'' + 6·n''·s2 + 152·n''·x'' + 48·n''·x''2 + 76·n''2 + 48·n''2·x'' + 16·n''3 + 12·s2 + 6·s2·x'' + 154·x'' + 76·x''2 + 16·x''3 + z'' }→ s11 :|: s11 >= 0, s11 <= 2 * s2 + 1 * ((1 + n'' + x'') * (1 + n'' + x'')) + 1 * z'', s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 56 + 6·s'' + z'' }→ s9 :|: s9 >= 0, s9 <= 2 * s'' + 1 * (0 * 0) + 1 * z'', s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuffle(z') -{ 21 + 47·z' + 26·z'2 + 16·z'3 }→ s8 :|: s8 >= 0, s8 <= 1 * (z' * z') + 1 * 0, z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']
shuff: runtime: O(n3) [20 + 47·z' + 6·z'·z'' + 26·z'2 + 16·z'3 + 3·z''], size: O(n2) [z'2 + z'']
if: runtime: O(n3) [53 + 50·z'' + 6·z''·z2 + 28·z''2 + 16·z''3 + 6·z2], size: O(n2) [z''2 + z1 + 2·z2]

(51) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: shuffle
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: z'2

(52) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 26 + 47·s6 + 6·s6·z2 + 26·s62 + 16·s63 + 3·x1 + 2·x12 + 3·z2 }→ s12 :|: s12 >= 0, s12 <= 1 * (s6 * s6) + 1 * z2, s6 >= 0, s6 <= 1 * x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 26 + 47·s7 + 6·s7·z2 + 26·s72 + 16·s73 + 3·z2 }→ s13 :|: s13 >= 0, s13 <= 1 * (s7 * s7) + 1 * z2, s7 >= 0, s7 <= 1 * 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 8 + s3 + s4 + 3·x' + 2·x'2 }→ s5 :|: s3 >= 0, s3 <= 1 * x', s4 >= 0, s4 <= 1 * s3 + 1 * (1 + n' + 0), s5 >= 0, s5 <= 1 * s4 + 1 * (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 151 + 154·n'' + 6·n''·s1 + 152·n''·x'' + 48·n''·x''2 + 76·n''2 + 48·n''2·x'' + 16·n''3 + 12·s1 + 6·s1·x'' + 154·x'' + 76·x''2 + 16·x''3 + z'' }→ s10 :|: s10 >= 0, s10 <= 2 * s1 + 1 * ((1 + n'' + x'') * (1 + n'' + x'')) + 1 * z'', s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 150 + 154·n'' + 6·n''·s2 + 152·n''·x'' + 48·n''·x''2 + 76·n''2 + 48·n''2·x'' + 16·n''3 + 12·s2 + 6·s2·x'' + 154·x'' + 76·x''2 + 16·x''3 + z'' }→ s11 :|: s11 >= 0, s11 <= 2 * s2 + 1 * ((1 + n'' + x'') * (1 + n'' + x'')) + 1 * z'', s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 56 + 6·s'' + z'' }→ s9 :|: s9 >= 0, s9 <= 2 * s'' + 1 * (0 * 0) + 1 * z'', s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuffle(z') -{ 21 + 47·z' + 26·z'2 + 16·z'3 }→ s8 :|: s8 >= 0, s8 <= 1 * (z' * z') + 1 * 0, z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed: {shuffle}
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']
shuff: runtime: O(n3) [20 + 47·z' + 6·z'·z'' + 26·z'2 + 16·z'3 + 3·z''], size: O(n2) [z'2 + z'']
if: runtime: O(n3) [53 + 50·z'' + 6·z''·z2 + 28·z''2 + 16·z''3 + 6·z2], size: O(n2) [z''2 + z1 + 2·z2]
shuffle: runtime: ?, size: O(n2) [z'2]

(53) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: shuffle
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 21 + 47·z' + 26·z'2 + 16·z'3

(54) Obligation:

Complexity RNTS consisting of the following rules:

app(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
app(z', z'') -{ 2 + x }→ 1 + n + s :|: s >= 0, s <= 1 * x + 1 * z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0
head(z') -{ 1 }→ n :|: n >= 0, z' = 1 + n + x, x >= 0
head(z') -{ 0 }→ 0 :|: z' >= 0
if(z', z'', z1, z2) -{ 26 + 47·s6 + 6·s6·z2 + 26·s62 + 16·s63 + 3·x1 + 2·x12 + 3·z2 }→ s12 :|: s12 >= 0, s12 <= 1 * (s6 * s6) + 1 * z2, s6 >= 0, s6 <= 1 * x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 26 + 47·s7 + 6·s7·z2 + 26·s72 + 16·s73 + 3·z2 }→ s13 :|: s13 >= 0, s13 <= 1 * (s7 * s7) + 1 * z2, s7 >= 0, s7 <= 1 * 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 1 }→ z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: n >= 0, z' = 1 + n + x, x >= 0
reverse(z') -{ 3 }→ s' :|: s' >= 0, s' <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
reverse(z') -{ 8 + s3 + s4 + 3·x' + 2·x'2 }→ s5 :|: s3 >= 0, s3 <= 1 * x', s4 >= 0, s4 <= 1 * s3 + 1 * (1 + n' + 0), s5 >= 0, s5 <= 1 * s4 + 1 * (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x')
reverse(z') -{ 1 }→ 0 :|: z' = 0
shuff(z', z'') -{ 151 + 154·n'' + 6·n''·s1 + 152·n''·x'' + 48·n''·x''2 + 76·n''2 + 48·n''2·x'' + 16·n''3 + 12·s1 + 6·s1·x'' + 154·x'' + 76·x''2 + 16·x''3 + z'' }→ s10 :|: s10 >= 0, s10 <= 2 * s1 + 1 * ((1 + n'' + x'') * (1 + n'' + x'')) + 1 * z'', s1 >= 0, s1 <= 1 * z'' + 1 * (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 150 + 154·n'' + 6·n''·s2 + 152·n''·x'' + 48·n''·x''2 + 76·n''2 + 48·n''2·x'' + 16·n''3 + 12·s2 + 6·s2·x'' + 154·x'' + 76·x''2 + 16·x''3 + z'' }→ s11 :|: s11 >= 0, s11 <= 2 * s2 + 1 * ((1 + n'' + x'') * (1 + n'' + x'')) + 1 * z'', s2 >= 0, s2 <= 1 * z'' + 1 * (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0
shuff(z', z'') -{ 56 + 6·s'' + z'' }→ s9 :|: s9 >= 0, s9 <= 2 * s'' + 1 * (0 * 0) + 1 * z'', s'' >= 0, s'' <= 1 * z'' + 1 * (1 + 0 + 0), z'' >= 0, z' = 0
shuffle(z') -{ 21 + 47·z' + 26·z'2 + 16·z'3 }→ s8 :|: s8 >= 0, s8 <= 1 * (z' * z') + 1 * 0, z' >= 0
tail(z') -{ 1 }→ x :|: n >= 0, z' = 1 + n + x, x >= 0
tail(z') -{ 1 }→ 0 :|: z' = 0

Function symbols to be analyzed:
Previous analysis results are:
head: runtime: O(1) [1], size: O(n1) [z']
app: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
tail: runtime: O(1) [1], size: O(n1) [z']
reverse: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']
shuff: runtime: O(n3) [20 + 47·z' + 6·z'·z'' + 26·z'2 + 16·z'3 + 3·z''], size: O(n2) [z'2 + z'']
if: runtime: O(n3) [53 + 50·z'' + 6·z''·z2 + 28·z''2 + 16·z''3 + 6·z2], size: O(n2) [z''2 + z1 + 2·z2]
shuffle: runtime: O(n3) [21 + 47·z' + 26·z'2 + 16·z'3], size: O(n2) [z'2]

(55) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(56) BOUNDS(1, n^3)