/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 4 ms] (6) CpxTypedWeightedCompleteTrs (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (10) CpxRNTS (11) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxRNTS (13) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRNTS (15) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) IntTrsBoundProof [UPPER BOUND(ID), 371 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 137 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 655 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 207 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 588 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) FinalProof [FINISHED, 0 ms] (34) BOUNDS(1, n^2) (35) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (36) CpxTRS (37) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (38) typed CpxTrs (39) OrderProof [LOWER BOUND(ID), 0 ms] (40) typed CpxTrs (41) RewriteLemmaProof [LOWER BOUND(ID), 268 ms] (42) BEST (43) proven lower bound (44) LowerBoundPropagationProof [FINISHED, 0 ms] (45) BOUNDS(n^1, INF) (46) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) select(Cons(x, xs)) -> selects(x, Nil, xs) revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) select(Nil) -> Nil revapp(Nil, rest) -> rest S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, 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^2). The TRS R consists of the following rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] select(Cons(x, xs)) -> selects(x, Nil, xs) [1] revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] select(Nil) -> Nil [1] revapp(Nil, rest) -> rest [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: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] select(Cons(x, xs)) -> selects(x, Nil, xs) [1] revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] select(Nil) -> Nil [1] revapp(Nil, rest) -> rest [1] The TRS has the following type information: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil 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: selects_3 select_1 revapp_2 (c) The following functions are completely defined: none Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (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: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] select(Cons(x, xs)) -> selects(x, Nil, xs) [1] revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] select(Nil) -> Nil [1] revapp(Nil, rest) -> rest [1] The TRS has the following type information: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil 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: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] select(Cons(x, xs)) -> selects(x, Nil, xs) [1] revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] select(Nil) -> Nil [1] revapp(Nil, rest) -> rest [1] The TRS has the following type information: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil 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 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 1 }-> rest :|: z' = rest, rest >= 0, z = 0 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + rest) :|: z = 1 + x + xs, xs >= 0, z' = rest, x >= 0, rest >= 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + x + revapp(revprefix, 0)) + 0 :|: z'' = 0, z' = revprefix, x >= 0, revprefix >= 0, z = x selects(z, z', z'') -{ 1 }-> 1 + (1 + x' + revapp(revprefix, 1 + x + xs)) + selects(x, 1 + x' + revprefix, xs) :|: xs >= 0, z' = revprefix, x' >= 0, x >= 0, z'' = 1 + x + xs, revprefix >= 0, z = x' ---------------------------------------- (11) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + z') :|: z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 0)) + 0 :|: z'' = 0, z >= 0, z' >= 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 1 + x + xs)) + selects(x, 1 + z + z', xs) :|: xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 ---------------------------------------- (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { revapp } { selects } { select } ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + z') :|: z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 0)) + 0 :|: z'' = 0, z >= 0, z' >= 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 1 + x + xs)) + selects(x, 1 + z + z', xs) :|: xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 Function symbols to be analyzed: {revapp}, {selects}, {select} ---------------------------------------- (15) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + z') :|: z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 0)) + 0 :|: z'' = 0, z >= 0, z' >= 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 1 + x + xs)) + selects(x, 1 + z + z', xs) :|: xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 Function symbols to be analyzed: {revapp}, {selects}, {select} ---------------------------------------- (17) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: revapp after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + z') :|: z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 0)) + 0 :|: z'' = 0, z >= 0, z' >= 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 1 + x + xs)) + selects(x, 1 + z + z', xs) :|: xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 Function symbols to be analyzed: {revapp}, {selects}, {select} Previous analysis results are: revapp: runtime: ?, size: O(n^1) [z + z'] ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: revapp after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + z') :|: z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 0)) + 0 :|: z'' = 0, z >= 0, z' >= 0 selects(z, z', z'') -{ 1 }-> 1 + (1 + z + revapp(z', 1 + x + xs)) + selects(x, 1 + z + z', xs) :|: xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 Function symbols to be analyzed: {selects}, {select} Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 2 + xs }-> s' :|: s' >= 0, s' <= xs + (1 + x + z'), z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s) + selects(x, 1 + z + z', xs) :|: s >= 0, s <= z' + (1 + x + xs), xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s'') + 0 :|: s'' >= 0, s'' <= z' + 0, z'' = 0, z >= 0, z' >= 0 Function symbols to be analyzed: {selects}, {select} Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: selects after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 2 + z + z*z'' + z' + z'*z'' + 3*z'' + z''^2 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 2 + xs }-> s' :|: s' >= 0, s' <= xs + (1 + x + z'), z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s) + selects(x, 1 + z + z', xs) :|: s >= 0, s <= z' + (1 + x + xs), xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s'') + 0 :|: s'' >= 0, s'' <= z' + 0, z'' = 0, z >= 0, z' >= 0 Function symbols to be analyzed: {selects}, {select} Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] selects: runtime: ?, size: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 3*z'' + z''^2] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: selects after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 2 + z + z*z'' + z' + z'*z'' + 2*z'' + z''^2 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 2 + xs }-> s' :|: s' >= 0, s' <= xs + (1 + x + z'), z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s) + selects(x, 1 + z + z', xs) :|: s >= 0, s <= z' + (1 + x + xs), xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s'') + 0 :|: s'' >= 0, s'' <= z' + 0, z'' = 0, z >= 0, z' >= 0 Function symbols to be analyzed: {select} Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] selects: runtime: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 2*z'' + z''^2], size: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 3*z'' + z''^2] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 2 + xs }-> s' :|: s' >= 0, s' <= xs + (1 + x + z'), z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 select(z) -{ 3 + x + x*xs + 2*xs + xs^2 }-> s2 :|: s2 >= 0, s2 <= x + 0 + 2 + 3 * xs + x * xs + 0 * xs + xs * xs, z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 5 + x + x*xs + 3*xs + xs*z + xs*z' + xs^2 + z + 2*z' }-> 1 + (1 + z + s) + s1 :|: s1 >= 0, s1 <= x + (1 + z + z') + 2 + 3 * xs + x * xs + (1 + z + z') * xs + xs * xs, s >= 0, s <= z' + (1 + x + xs), xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s'') + 0 :|: s'' >= 0, s'' <= z' + 0, z'' = 0, z >= 0, z' >= 0 Function symbols to be analyzed: {select} Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] selects: runtime: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 2*z'' + z''^2], size: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 3*z'' + z''^2] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: select after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 2 + xs }-> s' :|: s' >= 0, s' <= xs + (1 + x + z'), z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 select(z) -{ 3 + x + x*xs + 2*xs + xs^2 }-> s2 :|: s2 >= 0, s2 <= x + 0 + 2 + 3 * xs + x * xs + 0 * xs + xs * xs, z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 5 + x + x*xs + 3*xs + xs*z + xs*z' + xs^2 + z + 2*z' }-> 1 + (1 + z + s) + s1 :|: s1 >= 0, s1 <= x + (1 + z + z') + 2 + 3 * xs + x * xs + (1 + z + z') * xs + xs * xs, s >= 0, s <= z' + (1 + x + xs), xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s'') + 0 :|: s'' >= 0, s'' <= z' + 0, z'' = 0, z >= 0, z' >= 0 Function symbols to be analyzed: {select} Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] selects: runtime: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 2*z'' + z''^2], size: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 3*z'' + z''^2] select: runtime: ?, size: INF ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: select after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 4 + 3*z + 2*z^2 ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: revapp(z, z') -{ 2 + xs }-> s' :|: s' >= 0, s' <= xs + (1 + x + z'), z = 1 + x + xs, xs >= 0, x >= 0, z' >= 0 revapp(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 select(z) -{ 3 + x + x*xs + 2*xs + xs^2 }-> s2 :|: s2 >= 0, s2 <= x + 0 + 2 + 3 * xs + x * xs + 0 * xs + xs * xs, z = 1 + x + xs, xs >= 0, x >= 0 select(z) -{ 1 }-> 0 :|: z = 0 selects(z, z', z'') -{ 5 + x + x*xs + 3*xs + xs*z + xs*z' + xs^2 + z + 2*z' }-> 1 + (1 + z + s) + s1 :|: s1 >= 0, s1 <= x + (1 + z + z') + 2 + 3 * xs + x * xs + (1 + z + z') * xs + xs * xs, s >= 0, s <= z' + (1 + x + xs), xs >= 0, z >= 0, x >= 0, z'' = 1 + x + xs, z' >= 0 selects(z, z', z'') -{ 2 + z' }-> 1 + (1 + z + s'') + 0 :|: s'' >= 0, s'' <= z' + 0, z'' = 0, z >= 0, z' >= 0 Function symbols to be analyzed: Previous analysis results are: revapp: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] selects: runtime: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 2*z'' + z''^2], size: O(n^2) [2 + z + z*z'' + z' + z'*z'' + 3*z'' + z''^2] select: runtime: O(n^2) [4 + 3*z + 2*z^2], size: INF ---------------------------------------- (33) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (34) BOUNDS(1, n^2) ---------------------------------------- (35) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (36) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) select(Cons(x, xs)) -> selects(x, Nil, xs) revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) select(Nil) -> Nil revapp(Nil, rest) -> rest S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (37) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (38) Obligation: Innermost TRS: Rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) select(Cons(x, xs)) -> selects(x, Nil, xs) revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) select(Nil) -> Nil revapp(Nil, rest) -> rest Types: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil ---------------------------------------- (39) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: selects, revapp They will be analysed ascendingly in the following order: revapp < selects ---------------------------------------- (40) Obligation: Innermost TRS: Rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) select(Cons(x, xs)) -> selects(x, Nil, xs) revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) select(Nil) -> Nil revapp(Nil, rest) -> rest Types: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil Generator Equations: gen_Cons:Nil2_0(0) <=> Nil gen_Cons:Nil2_0(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil2_0(x)) The following defined symbols remain to be analysed: revapp, selects They will be analysed ascendingly in the following order: revapp < selects ---------------------------------------- (41) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: revapp(gen_Cons:Nil2_0(n4_0), gen_Cons:Nil2_0(b)) -> gen_Cons:Nil2_0(+(n4_0, b)), rt in Omega(1 + n4_0) Induction Base: revapp(gen_Cons:Nil2_0(0), gen_Cons:Nil2_0(b)) ->_R^Omega(1) gen_Cons:Nil2_0(b) Induction Step: revapp(gen_Cons:Nil2_0(+(n4_0, 1)), gen_Cons:Nil2_0(b)) ->_R^Omega(1) revapp(gen_Cons:Nil2_0(n4_0), Cons(Nil, gen_Cons:Nil2_0(b))) ->_IH gen_Cons:Nil2_0(+(+(b, 1), c5_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (42) Complex Obligation (BEST) ---------------------------------------- (43) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) select(Cons(x, xs)) -> selects(x, Nil, xs) revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) select(Nil) -> Nil revapp(Nil, rest) -> rest Types: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil Generator Equations: gen_Cons:Nil2_0(0) <=> Nil gen_Cons:Nil2_0(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil2_0(x)) The following defined symbols remain to be analysed: revapp, selects They will be analysed ascendingly in the following order: revapp < selects ---------------------------------------- (44) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (45) BOUNDS(n^1, INF) ---------------------------------------- (46) Obligation: Innermost TRS: Rules: selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) select(Cons(x, xs)) -> selects(x, Nil, xs) revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) select(Nil) -> Nil revapp(Nil, rest) -> rest Types: selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil select :: Cons:Nil -> Cons:Nil Nil :: Cons:Nil hole_Cons:Nil1_0 :: Cons:Nil gen_Cons:Nil2_0 :: Nat -> Cons:Nil Lemmas: revapp(gen_Cons:Nil2_0(n4_0), gen_Cons:Nil2_0(b)) -> gen_Cons:Nil2_0(+(n4_0, b)), rt in Omega(1 + n4_0) Generator Equations: gen_Cons:Nil2_0(0) <=> Nil gen_Cons:Nil2_0(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil2_0(x)) The following defined symbols remain to be analysed: selects