/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 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), 0 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), 2 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 151 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 57 ms] (22) CpxRNTS (23) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 668 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 240 ms] (28) CpxRNTS (29) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 139 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 42 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) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (44) TRS for Loop Detection (45) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (46) BEST (47) proven lower bound (48) LowerBoundPropagationProof [FINISHED, 0 ms] (49) BOUNDS(n^1, INF) (50) TRS for Loop Detection ---------------------------------------- (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) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (44) Obligation: Analyzing the following TRS for decreasing loops: 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 ---------------------------------------- (45) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence append(cons(x3_0, l4_0), l2) ->^+ cons(x3_0, append(l4_0, l2)) gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. The pumping substitution is [l4_0 / cons(x3_0, l4_0)]. The result substitution is [ ]. ---------------------------------------- (46) Complex Obligation (BEST) ---------------------------------------- (47) Obligation: Proved the lower bound n^1 for the following 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 ---------------------------------------- (48) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (49) BOUNDS(n^1, INF) ---------------------------------------- (50) Obligation: Analyzing the following TRS for decreasing loops: 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