351.19/291.50 WORST_CASE(Omega(n^1), O(n^2)) 351.21/291.51 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 351.21/291.51 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 351.21/291.51 351.21/291.51 351.21/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 351.21/291.51 351.21/291.51 (0) CpxTRS 351.21/291.51 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 351.21/291.51 (2) CpxWeightedTrs 351.21/291.51 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 351.21/291.51 (4) CpxTypedWeightedTrs 351.21/291.51 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 351.21/291.51 (6) CpxTypedWeightedCompleteTrs 351.21/291.51 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 351.21/291.51 (8) CpxRNTS 351.21/291.51 (9) CompleteCoflocoProof [FINISHED, 278 ms] 351.21/291.51 (10) BOUNDS(1, n^2) 351.21/291.51 (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 351.21/291.51 (12) TRS for Loop Detection 351.21/291.51 (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 351.21/291.51 (14) BEST 351.21/291.51 (15) proven lower bound 351.21/291.51 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 351.21/291.51 (17) BOUNDS(n^1, INF) 351.21/291.51 (18) TRS for Loop Detection 351.21/291.51 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (0) 351.21/291.51 Obligation: 351.21/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 351.21/291.51 351.21/291.51 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) 351.21/291.51 select(Nil) -> Nil 351.21/291.51 revapp(Nil, rest) -> rest 351.21/291.51 351.21/291.51 S is empty. 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 351.21/291.51 Transformed relative TRS to weighted TRS 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (2) 351.21/291.51 Obligation: 351.21/291.51 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 351.21/291.51 351.21/291.51 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) [1] 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] 351.21/291.51 select(Nil) -> Nil [1] 351.21/291.51 revapp(Nil, rest) -> rest [1] 351.21/291.51 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 351.21/291.51 Infered types. 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (4) 351.21/291.51 Obligation: 351.21/291.51 Runtime Complexity Weighted TRS with Types. 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) [1] 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] 351.21/291.51 select(Nil) -> Nil [1] 351.21/291.51 revapp(Nil, rest) -> rest [1] 351.21/291.51 351.21/291.51 The TRS has the following type information: 351.21/291.51 selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil 351.21/291.51 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil 351.21/291.51 revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil 351.21/291.51 select :: Cons:Nil -> Cons:Nil 351.21/291.51 Nil :: Cons:Nil 351.21/291.51 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (5) CompletionProof (UPPER BOUND(ID)) 351.21/291.51 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 351.21/291.51 none 351.21/291.51 351.21/291.51 And the following fresh constants: none 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (6) 351.21/291.51 Obligation: 351.21/291.51 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 351.21/291.51 351.21/291.51 Runtime Complexity Weighted TRS with Types. 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) [1] 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) [1] 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) [1] 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) [1] 351.21/291.51 select(Nil) -> Nil [1] 351.21/291.51 revapp(Nil, rest) -> rest [1] 351.21/291.51 351.21/291.51 The TRS has the following type information: 351.21/291.51 selects :: Cons:Nil -> Cons:Nil -> Cons:Nil -> Cons:Nil 351.21/291.51 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil 351.21/291.51 revapp :: Cons:Nil -> Cons:Nil -> Cons:Nil 351.21/291.51 select :: Cons:Nil -> Cons:Nil 351.21/291.51 Nil :: Cons:Nil 351.21/291.51 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 351.21/291.51 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 351.21/291.51 The constant constructors are abstracted as follows: 351.21/291.51 351.21/291.51 Nil => 0 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (8) 351.21/291.51 Obligation: 351.21/291.51 Complexity RNTS consisting of the following rules: 351.21/291.51 351.21/291.51 revapp(z, z') -{ 1 }-> rest :|: z' = rest, rest >= 0, z = 0 351.21/291.51 revapp(z, z') -{ 1 }-> revapp(xs, 1 + x + rest) :|: z = 1 + x + xs, xs >= 0, z' = rest, x >= 0, rest >= 0 351.21/291.51 select(z) -{ 1 }-> selects(x, 0, xs) :|: z = 1 + x + xs, xs >= 0, x >= 0 351.21/291.51 select(z) -{ 1 }-> 0 :|: z = 0 351.21/291.51 selects(z, z', z'') -{ 1 }-> 1 + (1 + x + revapp(revprefix, 0)) + 0 :|: z'' = 0, z' = revprefix, x >= 0, revprefix >= 0, z = x 351.21/291.51 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' 351.21/291.51 351.21/291.51 Only complete derivations are relevant for the runtime complexity. 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (9) CompleteCoflocoProof (FINISHED) 351.21/291.51 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 351.21/291.51 351.21/291.51 eq(start(V2, V1, V3),0,[selects(V2, V1, V3, Out)],[V2 >= 0,V1 >= 0,V3 >= 0]). 351.21/291.51 eq(start(V2, V1, V3),0,[select(V2, Out)],[V2 >= 0]). 351.21/291.51 eq(start(V2, V1, V3),0,[revapp(V2, V1, Out)],[V2 >= 0,V1 >= 0]). 351.21/291.51 eq(selects(V2, V1, V3, Out),1,[revapp(V, 1 + V6 + V4, Ret011),selects(V6, 1 + V5 + V, V4, Ret1)],[Out = 2 + Ret011 + Ret1 + V5,V4 >= 0,V1 = V,V5 >= 0,V6 >= 0,V3 = 1 + V4 + V6,V >= 0,V2 = V5]). 351.21/291.51 eq(select(V2, Out),1,[selects(V7, 0, V8, Ret)],[Out = Ret,V2 = 1 + V7 + V8,V8 >= 0,V7 >= 0]). 351.21/291.51 eq(revapp(V2, V1, Out),1,[revapp(V10, 1 + V9 + V11, Ret2)],[Out = Ret2,V2 = 1 + V10 + V9,V10 >= 0,V1 = V11,V9 >= 0,V11 >= 0]). 351.21/291.51 eq(selects(V2, V1, V3, Out),1,[revapp(V13, 0, Ret0111)],[Out = 2 + Ret0111 + V12,V3 = 0,V1 = V13,V12 >= 0,V13 >= 0,V2 = V12]). 351.21/291.51 eq(select(V2, Out),1,[],[Out = 0,V2 = 0]). 351.21/291.51 eq(revapp(V2, V1, Out),1,[],[Out = V14,V1 = V14,V14 >= 0,V2 = 0]). 351.21/291.51 input_output_vars(selects(V2,V1,V3,Out),[V2,V1,V3],[Out]). 351.21/291.51 input_output_vars(select(V2,Out),[V2],[Out]). 351.21/291.51 input_output_vars(revapp(V2,V1,Out),[V2,V1],[Out]). 351.21/291.51 351.21/291.51 351.21/291.51 CoFloCo proof output: 351.21/291.51 Preprocessing Cost Relations 351.21/291.51 ===================================== 351.21/291.51 351.21/291.51 #### Computed strongly connected components 351.21/291.51 0. recursive : [revapp/3] 351.21/291.51 1. recursive : [selects/4] 351.21/291.51 2. non_recursive : [select/2] 351.21/291.51 3. non_recursive : [start/3] 351.21/291.51 351.21/291.51 #### Obtained direct recursion through partial evaluation 351.21/291.51 0. SCC is partially evaluated into revapp/3 351.21/291.51 1. SCC is partially evaluated into selects/4 351.21/291.51 2. SCC is partially evaluated into select/2 351.21/291.51 3. SCC is partially evaluated into start/3 351.21/291.51 351.21/291.51 Control-Flow Refinement of Cost Relations 351.21/291.51 ===================================== 351.21/291.51 351.21/291.51 ### Specialization of cost equations revapp/3 351.21/291.51 * CE 9 is refined into CE [10] 351.21/291.51 * CE 8 is refined into CE [11] 351.21/291.51 351.21/291.51 351.21/291.51 ### Cost equations --> "Loop" of revapp/3 351.21/291.51 * CEs [11] --> Loop 8 351.21/291.51 * CEs [10] --> Loop 9 351.21/291.51 351.21/291.51 ### Ranking functions of CR revapp(V2,V1,Out) 351.21/291.51 * RF of phase [8]: [V2] 351.21/291.51 351.21/291.51 #### Partial ranking functions of CR revapp(V2,V1,Out) 351.21/291.51 * Partial RF of phase [8]: 351.21/291.51 - RF of loop [8:1]: 351.21/291.51 V2 351.21/291.51 351.21/291.51 351.21/291.51 ### Specialization of cost equations selects/4 351.21/291.51 * CE 5 is refined into CE [12,13] 351.21/291.51 * CE 4 is refined into CE [14,15] 351.21/291.51 351.21/291.51 351.21/291.51 ### Cost equations --> "Loop" of selects/4 351.21/291.51 * CEs [15] --> Loop 10 351.21/291.51 * CEs [14] --> Loop 11 351.21/291.51 * CEs [13] --> Loop 12 351.21/291.51 * CEs [12] --> Loop 13 351.21/291.51 351.21/291.51 ### Ranking functions of CR selects(V2,V1,V3,Out) 351.21/291.51 * RF of phase [10]: [V2+V3,V3] 351.21/291.51 351.21/291.51 #### Partial ranking functions of CR selects(V2,V1,V3,Out) 351.21/291.51 * Partial RF of phase [10]: 351.21/291.51 - RF of loop [10:1]: 351.21/291.51 V2+V3 351.21/291.51 V3 351.21/291.51 351.21/291.51 351.21/291.51 ### Specialization of cost equations select/2 351.21/291.51 * CE 6 is refined into CE [16,17,18] 351.21/291.51 * CE 7 is refined into CE [19] 351.21/291.51 351.21/291.51 351.21/291.51 ### Cost equations --> "Loop" of select/2 351.21/291.51 * CEs [18] --> Loop 14 351.21/291.51 * CEs [17] --> Loop 15 351.21/291.51 * CEs [16] --> Loop 16 351.21/291.51 * CEs [19] --> Loop 17 351.21/291.51 351.21/291.51 ### Ranking functions of CR select(V2,Out) 351.21/291.51 351.21/291.51 #### Partial ranking functions of CR select(V2,Out) 351.21/291.51 351.21/291.51 351.21/291.51 ### Specialization of cost equations start/3 351.21/291.51 * CE 1 is refined into CE [20,21,22,23,24] 351.21/291.51 * CE 2 is refined into CE [25,26,27,28] 351.21/291.51 * CE 3 is refined into CE [29,30] 351.21/291.51 351.21/291.51 351.21/291.51 ### Cost equations --> "Loop" of start/3 351.21/291.51 * CEs [26,27,28,30] --> Loop 18 351.21/291.51 * CEs [24] --> Loop 19 351.21/291.51 * CEs [23] --> Loop 20 351.21/291.51 * CEs [21,22] --> Loop 21 351.21/291.51 * CEs [20] --> Loop 22 351.21/291.51 * CEs [25,29] --> Loop 23 351.21/291.51 351.21/291.51 ### Ranking functions of CR start(V2,V1,V3) 351.21/291.51 351.21/291.51 #### Partial ranking functions of CR start(V2,V1,V3) 351.21/291.51 351.21/291.51 351.21/291.51 Computing Bounds 351.21/291.51 ===================================== 351.21/291.51 351.21/291.51 #### Cost of chains of revapp(V2,V1,Out): 351.21/291.51 * Chain [[8],9]: 1*it(8)+1 351.21/291.51 Such that:it(8) =< -V1+Out 351.21/291.51 351.21/291.51 with precondition: [V1+V2=Out,V2>=1,V1>=0] 351.21/291.51 351.21/291.51 * Chain [9]: 1 351.21/291.51 with precondition: [V2=0,V1=Out,V1>=0] 351.21/291.51 351.21/291.51 351.21/291.51 #### Cost of chains of selects(V2,V1,V3,Out): 351.21/291.51 * Chain [[10],12]: 2*it(10)+1*s(1)+1*s(4)+2 351.21/291.51 Such that:it(10) =< V3 351.21/291.51 aux(2) =< V2+V1+V3 351.21/291.51 s(1) =< aux(2) 351.21/291.51 s(4) =< it(10)*aux(2) 351.21/291.51 351.21/291.51 with precondition: [V2>=0,V1>=1,V3>=1,Out>=2*V1+2*V2+2*V3+4] 351.21/291.51 351.21/291.51 * Chain [13]: 2 351.21/291.51 with precondition: [V1=0,V3=0,V2+2=Out,V2>=0] 351.21/291.51 351.21/291.51 * Chain [12]: 1*s(1)+2 351.21/291.51 Such that:s(1) =< V1 351.21/291.51 351.21/291.51 with precondition: [V3=0,V1+V2+2=Out,V2>=0,V1>=1] 351.21/291.51 351.21/291.51 * Chain [11,[10],12]: 2*it(10)+1*s(1)+1*s(4)+4 351.21/291.51 Such that:aux(2) =< V2+V3 351.21/291.51 it(10) =< V3 351.21/291.51 s(1) =< aux(2) 351.21/291.51 s(4) =< it(10)*aux(2) 351.21/291.51 351.21/291.51 with precondition: [V1=0,V2>=0,V3>=2,Out>=3*V2+3*V3+6] 351.21/291.51 351.21/291.51 * Chain [11,12]: 1*s(1)+4 351.21/291.51 Such that:s(1) =< -V3+Out/2 351.21/291.51 351.21/291.51 with precondition: [V1=0,2*V2+2*V3+4=Out,V3>=1,Out>=2*V3+4] 351.21/291.51 351.21/291.51 351.21/291.51 #### Cost of chains of select(V2,Out): 351.21/291.51 * Chain [17]: 1 351.21/291.51 with precondition: [V2=0,Out=0] 351.21/291.51 351.21/291.51 * Chain [16]: 3 351.21/291.51 with precondition: [V2+1=Out,V2>=1] 351.21/291.51 351.21/291.51 * Chain [15]: 1*s(5)+5 351.21/291.51 Such that:s(5) =< V2 351.21/291.51 351.21/291.51 with precondition: [2*V2+2=Out,V2>=2] 351.21/291.51 351.21/291.51 * Chain [14]: 3*s(7)+1*s(9)+5 351.21/291.51 Such that:aux(3) =< V2 351.21/291.51 s(7) =< aux(3) 351.21/291.51 s(9) =< s(7)*aux(3) 351.21/291.51 351.21/291.51 with precondition: [V2>=3,Out>=3*V2+3] 351.21/291.51 351.21/291.51 351.21/291.51 #### Cost of chains of start(V2,V1,V3): 351.21/291.51 * Chain [23]: 1 351.21/291.51 with precondition: [V2=0] 351.21/291.51 351.21/291.51 * Chain [22]: 2 351.21/291.51 with precondition: [V1=0,V3=0,V2>=0] 351.21/291.51 351.21/291.51 * Chain [21]: 1*s(10)+2*s(12)+1*s(13)+1*s(14)+4 351.21/291.51 Such that:s(10) =< V2+2 351.21/291.51 s(11) =< V2+V3 351.21/291.51 s(12) =< V3 351.21/291.51 s(13) =< s(11) 351.21/291.51 s(14) =< s(12)*s(11) 351.21/291.51 351.21/291.51 with precondition: [V1=0,V2>=0,V3>=1] 351.21/291.51 351.21/291.51 * Chain [20]: 1*s(15)+2 351.21/291.51 Such that:s(15) =< V1 351.21/291.51 351.21/291.51 with precondition: [V3=0,V2>=0,V1>=1] 351.21/291.51 351.21/291.51 * Chain [19]: 2*s(16)+1*s(18)+1*s(19)+2 351.21/291.51 Such that:s(17) =< V2+V1+V3 351.21/291.51 s(16) =< V3 351.21/291.51 s(18) =< s(17) 351.21/291.51 s(19) =< s(16)*s(17) 351.21/291.51 351.21/291.51 with precondition: [V2>=0,V1>=1,V3>=1] 351.21/291.51 351.21/291.51 * Chain [18]: 5*s(20)+1*s(23)+5 351.21/291.51 Such that:aux(4) =< V2 351.21/291.51 s(20) =< aux(4) 351.21/291.51 s(23) =< s(20)*aux(4) 351.21/291.51 351.21/291.51 with precondition: [V2>=1] 351.21/291.51 351.21/291.51 351.21/291.51 Closed-form bounds of start(V2,V1,V3): 351.21/291.51 ------------------------------------- 351.21/291.51 * Chain [23] with precondition: [V2=0] 351.21/291.51 - Upper bound: 1 351.21/291.51 - Complexity: constant 351.21/291.51 * Chain [22] with precondition: [V1=0,V3=0,V2>=0] 351.21/291.51 - Upper bound: 2 351.21/291.51 - Complexity: constant 351.21/291.51 * Chain [21] with precondition: [V1=0,V2>=0,V3>=1] 351.21/291.51 - Upper bound: 2*V3+4+(V2+V3)*V3+(V2+V3)+(V2+2) 351.21/291.51 - Complexity: n^2 351.21/291.51 * Chain [20] with precondition: [V3=0,V2>=0,V1>=1] 351.21/291.51 - Upper bound: V1+2 351.21/291.51 - Complexity: n 351.21/291.51 * Chain [19] with precondition: [V2>=0,V1>=1,V3>=1] 351.21/291.51 - Upper bound: 2*V3+2+(V2+V1+V3)*V3+(V2+V1+V3) 351.21/291.51 - Complexity: n^2 351.21/291.51 * Chain [18] with precondition: [V2>=1] 351.21/291.51 - Upper bound: 5*V2+5+V2*V2 351.21/291.51 - Complexity: n^2 351.21/291.51 351.21/291.51 ### Maximum cost of start(V2,V1,V3): max([max([1,nat(V1)+1,5*V2+4+V2*V2]),nat(V3)*2+1+max([nat(V2+V1+V3)*nat(V3)+nat(V2+V1+V3),nat(V2+V3)*nat(V3)+2+nat(V2+V3)+(V2+2)])])+1 351.21/291.51 Asymptotic class: n^2 351.21/291.51 * Total analysis performed in 195 ms. 351.21/291.51 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (10) 351.21/291.51 BOUNDS(1, n^2) 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 351.21/291.51 Transformed a relative TRS into a decreasing-loop problem. 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (12) 351.21/291.51 Obligation: 351.21/291.51 Analyzing the following TRS for decreasing loops: 351.21/291.51 351.21/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 351.21/291.51 351.21/291.51 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) 351.21/291.51 select(Nil) -> Nil 351.21/291.51 revapp(Nil, rest) -> rest 351.21/291.51 351.21/291.51 S is empty. 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (13) DecreasingLoopProof (LOWER BOUND(ID)) 351.21/291.51 The following loop(s) give(s) rise to the lower bound Omega(n^1): 351.21/291.51 351.21/291.51 The rewrite sequence 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) ->^+ Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) 351.21/291.51 351.21/291.51 gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. 351.21/291.51 351.21/291.51 The pumping substitution is [xs / Cons(x, xs)]. 351.21/291.51 351.21/291.51 The result substitution is [x' / x, revprefix / Cons(x', revprefix)]. 351.21/291.51 351.21/291.51 351.21/291.51 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (14) 351.21/291.51 Complex Obligation (BEST) 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (15) 351.21/291.51 Obligation: 351.21/291.51 Proved the lower bound n^1 for the following obligation: 351.21/291.51 351.21/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 351.21/291.51 351.21/291.51 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) 351.21/291.51 select(Nil) -> Nil 351.21/291.51 revapp(Nil, rest) -> rest 351.21/291.51 351.21/291.51 S is empty. 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (16) LowerBoundPropagationProof (FINISHED) 351.21/291.51 Propagated lower bound. 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (17) 351.21/291.51 BOUNDS(n^1, INF) 351.21/291.51 351.21/291.51 ---------------------------------------- 351.21/291.51 351.21/291.51 (18) 351.21/291.51 Obligation: 351.21/291.51 Analyzing the following TRS for decreasing loops: 351.21/291.51 351.21/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 351.21/291.51 351.21/291.51 351.21/291.51 The TRS R consists of the following rules: 351.21/291.51 351.21/291.51 selects(x', revprefix, Cons(x, xs)) -> Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs)) 351.21/291.51 select(Cons(x, xs)) -> selects(x, Nil, xs) 351.21/291.51 revapp(Cons(x, xs), rest) -> revapp(xs, Cons(x, rest)) 351.21/291.51 selects(x, revprefix, Nil) -> Cons(Cons(x, revapp(revprefix, Nil)), Nil) 351.21/291.51 select(Nil) -> Nil 351.21/291.51 revapp(Nil, rest) -> rest 351.21/291.51 351.21/291.51 S is empty. 351.21/291.51 Rewrite Strategy: INNERMOST 351.21/291.55 EOF