WORST_CASE(?,O(n^1)) proof of input_8oXXrNLpax.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (10) CpxRNTS (11) InliningProof [UPPER BOUND(ID), 92 ms] (12) CpxRNTS (13) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRNTS (15) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRNTS (17) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 116 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 58 ms] (22) CpxRNTS (23) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 1315 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 397 ms] (28) CpxRNTS (29) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 150 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 43 ms] (34) CpxRNTS (35) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 140 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 43 ms] (40) CpxRNTS (41) FinalProof [FINISHED, 0 ms] (42) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) ifappend(l1, l2, true) -> l2 ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> l [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> l [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] The TRS has the following type information: is_empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: hd -> nil:cons -> nil:cons false :: true:false hd :: nil:cons -> hd tl :: nil:cons -> nil:cons append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) 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: hd_1 append_2 ifappend_3 (c) The following functions are completely defined: is_empty_1 tl_1 Due to the following rules being added: tl(v0) -> nil [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: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> l [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] tl(v0) -> nil [0] The TRS has the following type information: is_empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: hd -> nil:cons -> nil:cons false :: true:false hd :: nil:cons -> hd tl :: nil:cons -> nil:cons append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons const :: hd Rewrite Strategy: INNERMOST ---------------------------------------- (7) NarrowingProof (BOTH BOUNDS(ID, ID)) 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: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> l [1] append(nil, l2) -> ifappend(nil, l2, true) [2] append(cons(x', l'), l2) -> ifappend(cons(x', l'), l2, false) [2] ifappend(l1, l2, true) -> l2 [1] ifappend(cons(x'', l''), l2, false) -> cons(hd(cons(x'', l'')), append(l'', l2)) [2] ifappend(l1, l2, false) -> cons(hd(l1), append(nil, l2)) [1] tl(v0) -> nil [0] The TRS has the following type information: is_empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: hd -> nil:cons -> nil:cons false :: true:false hd :: nil:cons -> hd tl :: nil:cons -> nil:cons append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons const :: hd Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 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: append(z, z') -{ 2 }-> ifappend(0, l2, 1) :|: z' = l2, z = 0, l2 >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', l2, 0) :|: x' >= 0, l' >= 0, z' = l2, l2 >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> l2 :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1 ifappend(z, z', z'') -{ 1 }-> 1 + hd(l1) + append(0, l2) :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0 ifappend(z, z', z'') -{ 2 }-> 1 + hd(1 + x'' + l'') + append(l'', l2) :|: z'' = 0, l'' >= 0, z' = l2, x'' >= 0, l2 >= 0, z = 1 + x'' + l'' is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ---------------------------------------- (11) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, l2, 1) :|: z' = l2, z = 0, l2 >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', l2, 0) :|: x' >= 0, l' >= 0, z' = l2, l2 >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> l2 :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', l2) :|: z'' = 0, l'' >= 0, z' = l2, x'' >= 0, l2 >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, l2) :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0, x >= 0, l >= 0, l1 = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ---------------------------------------- (13) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 ---------------------------------------- (15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { is_empty } { ifappend, append } { tl } { hd } ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd} ---------------------------------------- (17) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd} ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: is_empty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: ?, size: O(1) [1] ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: is_empty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (23) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: ifappend after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: z + z^2 + z' Computed SIZE bound using KoAT for: append after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 2 + 6*z + 4*z^2 + 2*z' ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: ?, size: O(n^2) [z + z^2 + z'] append: runtime: ?, size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] ---------------------------------------- (27) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: ifappend after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 11 + 5*z Computed RUNTIME bound using CoFloCo for: append after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 13 + 5*z ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 3 }-> 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] ---------------------------------------- (29) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 13 }-> s :|: s >= 0, s <= 0 + 0 * 0 + z', z = 0, z' >= 0 append(z, z') -{ 18 + 5*l' + 5*x' }-> s' :|: s' >= 0, s' <= 1 + x' + l' + (1 + x' + l') * (1 + x' + l') + z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 16 + 5*l'' }-> 1 + x + s'' :|: s'' >= 0, s'' <= 6 * l'' + 4 * (l'' * l'') + 2 * z' + 2, z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 15 }-> 1 + x + s1 :|: s1 >= 0, s1 <= 6 * 0 + 4 * (0 * 0) + 2 * z' + 2, z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: tl after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 13 }-> s :|: s >= 0, s <= 0 + 0 * 0 + z', z = 0, z' >= 0 append(z, z') -{ 18 + 5*l' + 5*x' }-> s' :|: s' >= 0, s' <= 1 + x' + l' + (1 + x' + l') * (1 + x' + l') + z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 16 + 5*l'' }-> 1 + x + s'' :|: s'' >= 0, s'' <= 6 * l'' + 4 * (l'' * l'') + 2 * z' + 2, z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 15 }-> 1 + x + s1 :|: s1 >= 0, s1 <= 6 * 0 + 4 * (0 * 0) + 2 * z' + 2, z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] tl: runtime: ?, size: O(n^1) [z] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: tl after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 13 }-> s :|: s >= 0, s <= 0 + 0 * 0 + z', z = 0, z' >= 0 append(z, z') -{ 18 + 5*l' + 5*x' }-> s' :|: s' >= 0, s' <= 1 + x' + l' + (1 + x' + l') * (1 + x' + l') + z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 16 + 5*l'' }-> 1 + x + s'' :|: s'' >= 0, s'' <= 6 * l'' + 4 * (l'' * l'') + 2 * z' + 2, z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 15 }-> 1 + x + s1 :|: s1 >= 0, s1 <= 6 * 0 + 4 * (0 * 0) + 2 * z' + 2, z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] tl: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (35) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 13 }-> s :|: s >= 0, s <= 0 + 0 * 0 + z', z = 0, z' >= 0 append(z, z') -{ 18 + 5*l' + 5*x' }-> s' :|: s' >= 0, s' <= 1 + x' + l' + (1 + x' + l') * (1 + x' + l') + z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 16 + 5*l'' }-> 1 + x + s'' :|: s'' >= 0, s'' <= 6 * l'' + 4 * (l'' * l'') + 2 * z' + 2, z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 15 }-> 1 + x + s1 :|: s1 >= 0, s1 <= 6 * 0 + 4 * (0 * 0) + 2 * z' + 2, z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] tl: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: hd after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 13 }-> s :|: s >= 0, s <= 0 + 0 * 0 + z', z = 0, z' >= 0 append(z, z') -{ 18 + 5*l' + 5*x' }-> s' :|: s' >= 0, s' <= 1 + x' + l' + (1 + x' + l') * (1 + x' + l') + z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 16 + 5*l'' }-> 1 + x + s'' :|: s'' >= 0, s'' <= 6 * l'' + 4 * (l'' * l'') + 2 * z' + 2, z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 15 }-> 1 + x + s1 :|: s1 >= 0, s1 <= 6 * 0 + 4 * (0 * 0) + 2 * z' + 2, z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] tl: runtime: O(1) [1], size: O(n^1) [z] hd: runtime: ?, size: O(n^1) [z] ---------------------------------------- (39) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: hd after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 13 }-> s :|: s >= 0, s <= 0 + 0 * 0 + z', z = 0, z' >= 0 append(z, z') -{ 18 + 5*l' + 5*x' }-> s' :|: s' >= 0, s' <= 1 + x' + l' + (1 + x' + l') * (1 + x' + l') + z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 16 + 5*l'' }-> 1 + x + s'' :|: s'' >= 0, s'' <= 6 * l'' + 4 * (l'' * l'') + 2 * z' + 2, z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l ifappend(z, z', z'') -{ 15 }-> 1 + x + s1 :|: s1 >= 0, s1 <= 6 * 0 + 4 * (0 * 0) + 2 * z' + 2, z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [11 + 5*z], size: O(n^2) [z + z^2 + z'] append: runtime: O(n^1) [13 + 5*z], size: O(n^2) [2 + 6*z + 4*z^2 + 2*z'] tl: runtime: O(1) [1], size: O(n^1) [z] hd: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (41) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (42) BOUNDS(1, n^1)