/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxWeightedTrs (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxTypedWeightedTrs (7) CompletionProof [UPPER BOUND(ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 1 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), 142 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 55 ms] (22) CpxRNTS (23) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 602 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 182 ms] (28) CpxRNTS (29) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 170 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), 128 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 44 ms] (40) CpxRNTS (41) FinalProof [FINISHED, 0 ms] (42) BOUNDS(1, n^1) (43) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CpxTRS (45) SlicingProof [LOWER BOUND(ID), 0 ms] (46) CpxTRS (47) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (48) typed CpxTrs (49) OrderProof [LOWER BOUND(ID), 0 ms] (50) typed CpxTrs (51) RewriteLemmaProof [LOWER BOUND(ID), 235 ms] (52) BEST (53) proven lower bound (54) LowerBoundPropagationProof [FINISHED, 0 ms] (55) BOUNDS(n^1, INF) (56) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^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, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS does not nest defined symbols, we have rc = irc. ---------------------------------------- (2) Obligation: The Runtime Complexity (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, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (4) 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, l1) [1] ifappend(l1, l2, nil) -> l2 [1] ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) 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, l1) [1] ifappend(l1, l2, nil) -> l2 [1] ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, 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 -> nil:cons -> nil:cons Rewrite Strategy: INNERMOST ---------------------------------------- (7) 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: is_empty_1 hd_1 tl_1 append_2 ifappend_3 (c) The following functions are completely defined: none Due to the following rules being added: none And the following fresh constants: const ---------------------------------------- (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(l1, l2) -> ifappend(l1, l2, l1) [1] ifappend(l1, l2, nil) -> l2 [1] ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, 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 -> nil:cons -> nil:cons const :: hd Rewrite Strategy: INNERMOST ---------------------------------------- (9) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (10) 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, l1) [1] ifappend(l1, l2, nil) -> l2 [1] ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, 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 -> nil:cons -> nil:cons const :: hd Rewrite Strategy: INNERMOST ---------------------------------------- (11) 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 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 1 }-> ifappend(l1, l2, l1) :|: z = l1, z' = l2, l1 >= 0, l2 >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> l2 :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, l2) :|: z'' = 1 + x + l, z = l1, x >= 0, l >= 0, z' = l2, l1 >= 0, l2 >= 0 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 ---------------------------------------- (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') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 ---------------------------------------- (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') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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^1) with polynomial bound: z' + z'' Computed SIZE bound using CoFloCo for: append after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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^1) [z' + z''] append: runtime: ?, size: O(n^1) [z + 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: 3 + 2*z'' Computed RUNTIME bound using CoFloCo for: append after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 4 + 2*z ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 1 }-> ifappend(z, z', z) :|: z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + x + append(l, z') :|: z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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') -{ 4 + 2*z }-> s :|: s >= 0, s <= z' + z, z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 5 + 2*l }-> 1 + x + s' :|: s' >= 0, s' <= l + z', z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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') -{ 4 + 2*z }-> s :|: s >= 0, s <= z' + z, z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 5 + 2*l }-> 1 + x + s' :|: s' >= 0, s' <= l + z', z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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') -{ 4 + 2*z }-> s :|: s >= 0, s <= z' + z, z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 5 + 2*l }-> 1 + x + s' :|: s' >= 0, s' <= l + z', z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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') -{ 4 + 2*z }-> s :|: s >= 0, s <= z' + z, z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 5 + 2*l }-> 1 + x + s' :|: s' >= 0, s' <= l + z', z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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') -{ 4 + 2*z }-> s :|: s >= 0, s <= z' + z, z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 5 + 2*l }-> 1 + x + s' :|: s' >= 0, s' <= l + z', z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 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) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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') -{ 4 + 2*z }-> s :|: s >= 0, s <= z' + z, z >= 0, z' >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z'' = 0, z >= 0, z' >= 0 ifappend(z, z', z'') -{ 5 + 2*l }-> 1 + x + s' :|: s' >= 0, s' <= l + z', z'' = 1 + x + l, x >= 0, l >= 0, z >= 0, z' >= 0 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 Function symbols to be analyzed: Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: O(n^1) [3 + 2*z''], size: O(n^1) [z' + z''] append: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z + 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) ---------------------------------------- (43) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (44) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 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, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (45) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: ifappend/0 ---------------------------------------- (46) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 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(l2, l1) ifappend(l2, nil) -> l2 ifappend(l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (47) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (48) Obligation: TRS: 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(l2, l1) ifappend(l2, nil) -> l2 ifappend(l2, cons(x, l)) -> cons(x, append(l, l2)) Types: 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 -> nil:cons hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_hd3_0 :: hd gen_nil:cons4_0 :: Nat -> nil:cons ---------------------------------------- (49) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: append, ifappend They will be analysed ascendingly in the following order: append = ifappend ---------------------------------------- (50) Obligation: TRS: 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(l2, l1) ifappend(l2, nil) -> l2 ifappend(l2, cons(x, l)) -> cons(x, append(l, l2)) Types: 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 -> nil:cons hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_hd3_0 :: hd gen_nil:cons4_0 :: Nat -> nil:cons Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(hole_hd3_0, gen_nil:cons4_0(x)) The following defined symbols remain to be analysed: ifappend, append They will be analysed ascendingly in the following order: append = ifappend ---------------------------------------- (51) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ifappend(gen_nil:cons4_0(a), gen_nil:cons4_0(n6_0)) -> gen_nil:cons4_0(+(n6_0, a)), rt in Omega(1 + n6_0) Induction Base: ifappend(gen_nil:cons4_0(a), gen_nil:cons4_0(0)) ->_R^Omega(1) gen_nil:cons4_0(a) Induction Step: ifappend(gen_nil:cons4_0(a), gen_nil:cons4_0(+(n6_0, 1))) ->_R^Omega(1) cons(hole_hd3_0, append(gen_nil:cons4_0(n6_0), gen_nil:cons4_0(a))) ->_R^Omega(1) cons(hole_hd3_0, ifappend(gen_nil:cons4_0(a), gen_nil:cons4_0(n6_0))) ->_IH cons(hole_hd3_0, gen_nil:cons4_0(+(a, c7_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (52) Complex Obligation (BEST) ---------------------------------------- (53) Obligation: Proved the lower bound n^1 for the following obligation: TRS: 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(l2, l1) ifappend(l2, nil) -> l2 ifappend(l2, cons(x, l)) -> cons(x, append(l, l2)) Types: 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 -> nil:cons hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_hd3_0 :: hd gen_nil:cons4_0 :: Nat -> nil:cons Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(hole_hd3_0, gen_nil:cons4_0(x)) The following defined symbols remain to be analysed: ifappend, append They will be analysed ascendingly in the following order: append = ifappend ---------------------------------------- (54) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (55) BOUNDS(n^1, INF) ---------------------------------------- (56) Obligation: TRS: 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(l2, l1) ifappend(l2, nil) -> l2 ifappend(l2, cons(x, l)) -> cons(x, append(l, l2)) Types: 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 -> nil:cons hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_hd3_0 :: hd gen_nil:cons4_0 :: Nat -> nil:cons Lemmas: ifappend(gen_nil:cons4_0(a), gen_nil:cons4_0(n6_0)) -> gen_nil:cons4_0(+(n6_0, a)), rt in Omega(1 + n6_0) Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(hole_hd3_0, gen_nil:cons4_0(x)) The following defined symbols remain to be analysed: append They will be analysed ascendingly in the following order: append = ifappend