32.25/10.83 WORST_CASE(Omega(n^1), O(n^1)) 32.25/10.84 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 32.25/10.84 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 32.25/10.84 32.25/10.84 32.25/10.84 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 32.25/10.84 32.25/10.84 (0) CpxTRS 32.25/10.84 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 32.25/10.84 (2) CpxWeightedTrs 32.25/10.84 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 32.25/10.84 (4) CpxTypedWeightedTrs 32.25/10.84 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 32.25/10.84 (6) CpxTypedWeightedCompleteTrs 32.25/10.84 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 32.25/10.84 (8) CpxRNTS 32.25/10.84 (9) CompleteCoflocoProof [FINISHED, 662 ms] 32.25/10.84 (10) BOUNDS(1, n^1) 32.25/10.84 (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 32.25/10.84 (12) TRS for Loop Detection 32.25/10.84 (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 32.25/10.84 (14) BEST 32.25/10.84 (15) proven lower bound 32.25/10.84 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 32.25/10.84 (17) BOUNDS(n^1, INF) 32.25/10.84 (18) TRS for Loop Detection 32.25/10.84 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (0) 32.25/10.84 Obligation: 32.25/10.84 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 32.25/10.84 32.25/10.84 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 32.25/10.84 half(s(0)) -> 0 32.25/10.84 half(s(s(x))) -> s(half(x)) 32.25/10.84 lastbit(0) -> 0 32.25/10.84 lastbit(s(0)) -> s(0) 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) 32.25/10.84 zero(0) -> true 32.25/10.84 zero(s(x)) -> false 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) 32.25/10.84 if(true, x, l) -> l 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) 32.25/10.84 32.25/10.84 S is empty. 32.25/10.84 Rewrite Strategy: INNERMOST 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 32.25/10.84 Transformed relative TRS to weighted TRS 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (2) 32.25/10.84 Obligation: 32.25/10.84 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 32.25/10.84 32.25/10.84 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 [1] 32.25/10.84 half(s(0)) -> 0 [1] 32.25/10.84 half(s(s(x))) -> s(half(x)) [1] 32.25/10.84 lastbit(0) -> 0 [1] 32.25/10.84 lastbit(s(0)) -> s(0) [1] 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) [1] 32.25/10.84 zero(0) -> true [1] 32.25/10.84 zero(s(x)) -> false [1] 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) [1] 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) [1] 32.25/10.84 if(true, x, l) -> l [1] 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) [1] 32.25/10.84 32.25/10.84 Rewrite Strategy: INNERMOST 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 32.25/10.84 Infered types. 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (4) 32.25/10.84 Obligation: 32.25/10.84 Runtime Complexity Weighted TRS with Types. 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 [1] 32.25/10.84 half(s(0)) -> 0 [1] 32.25/10.84 half(s(s(x))) -> s(half(x)) [1] 32.25/10.84 lastbit(0) -> 0 [1] 32.25/10.84 lastbit(s(0)) -> s(0) [1] 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) [1] 32.25/10.84 zero(0) -> true [1] 32.25/10.84 zero(s(x)) -> false [1] 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) [1] 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) [1] 32.25/10.84 if(true, x, l) -> l [1] 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) [1] 32.25/10.84 32.25/10.84 The TRS has the following type information: 32.25/10.84 half :: 0:s -> 0:s 32.25/10.84 0 :: 0:s 32.25/10.84 s :: 0:s -> 0:s 32.25/10.84 lastbit :: 0:s -> 0:s 32.25/10.84 zero :: 0:s -> true:false 32.25/10.84 true :: true:false 32.25/10.84 false :: true:false 32.25/10.84 conv :: 0:s -> nil:cons 32.25/10.84 conviter :: 0:s -> nil:cons -> nil:cons 32.25/10.84 cons :: 0:s -> nil:cons -> nil:cons 32.25/10.84 nil :: nil:cons 32.25/10.84 if :: true:false -> 0:s -> nil:cons -> nil:cons 32.25/10.84 32.25/10.84 Rewrite Strategy: INNERMOST 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (5) CompletionProof (UPPER BOUND(ID)) 32.25/10.84 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 32.25/10.84 none 32.25/10.84 32.25/10.84 And the following fresh constants: none 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (6) 32.25/10.84 Obligation: 32.25/10.84 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 32.25/10.84 32.25/10.84 Runtime Complexity Weighted TRS with Types. 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 [1] 32.25/10.84 half(s(0)) -> 0 [1] 32.25/10.84 half(s(s(x))) -> s(half(x)) [1] 32.25/10.84 lastbit(0) -> 0 [1] 32.25/10.84 lastbit(s(0)) -> s(0) [1] 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) [1] 32.25/10.84 zero(0) -> true [1] 32.25/10.84 zero(s(x)) -> false [1] 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) [1] 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) [1] 32.25/10.84 if(true, x, l) -> l [1] 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) [1] 32.25/10.84 32.25/10.84 The TRS has the following type information: 32.25/10.84 half :: 0:s -> 0:s 32.25/10.84 0 :: 0:s 32.25/10.84 s :: 0:s -> 0:s 32.25/10.84 lastbit :: 0:s -> 0:s 32.25/10.84 zero :: 0:s -> true:false 32.25/10.84 true :: true:false 32.25/10.84 false :: true:false 32.25/10.84 conv :: 0:s -> nil:cons 32.25/10.84 conviter :: 0:s -> nil:cons -> nil:cons 32.25/10.84 cons :: 0:s -> nil:cons -> nil:cons 32.25/10.84 nil :: nil:cons 32.25/10.84 if :: true:false -> 0:s -> nil:cons -> nil:cons 32.25/10.84 32.25/10.84 Rewrite Strategy: INNERMOST 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 32.25/10.84 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 32.25/10.84 The constant constructors are abstracted as follows: 32.25/10.84 32.25/10.84 0 => 0 32.25/10.84 true => 1 32.25/10.84 false => 0 32.25/10.84 nil => 0 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (8) 32.25/10.84 Obligation: 32.25/10.84 Complexity RNTS consisting of the following rules: 32.25/10.84 32.25/10.84 conv(z) -{ 1 }-> conviter(x, 1 + 0 + 0) :|: x >= 0, z = x 32.25/10.84 conviter(z, z') -{ 1 }-> if(zero(x), x, l) :|: z' = l, x >= 0, l >= 0, z = x 32.25/10.84 half(z) -{ 1 }-> 0 :|: z = 0 32.25/10.84 half(z) -{ 1 }-> 0 :|: z = 1 + 0 32.25/10.84 half(z) -{ 1 }-> 1 + half(x) :|: x >= 0, z = 1 + (1 + x) 32.25/10.84 if(z, z', z'') -{ 1 }-> l :|: z' = x, z = 1, x >= 0, l >= 0, z'' = l 32.25/10.84 if(z, z', z'') -{ 1 }-> conviter(half(x), 1 + lastbit(x) + l) :|: z' = x, x >= 0, l >= 0, z = 0, z'' = l 32.25/10.84 lastbit(z) -{ 1 }-> lastbit(x) :|: x >= 0, z = 1 + (1 + x) 32.25/10.84 lastbit(z) -{ 1 }-> 0 :|: z = 0 32.25/10.84 lastbit(z) -{ 1 }-> 1 + 0 :|: z = 1 + 0 32.25/10.84 zero(z) -{ 1 }-> 1 :|: z = 0 32.25/10.84 zero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x 32.25/10.84 32.25/10.84 Only complete derivations are relevant for the runtime complexity. 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (9) CompleteCoflocoProof (FINISHED) 32.25/10.84 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 32.25/10.84 32.25/10.84 eq(start(V, V5, V8),0,[half(V, Out)],[V >= 0]). 32.25/10.84 eq(start(V, V5, V8),0,[lastbit(V, Out)],[V >= 0]). 32.25/10.84 eq(start(V, V5, V8),0,[zero(V, Out)],[V >= 0]). 32.25/10.84 eq(start(V, V5, V8),0,[conv(V, Out)],[V >= 0]). 32.25/10.84 eq(start(V, V5, V8),0,[conviter(V, V5, Out)],[V >= 0,V5 >= 0]). 32.25/10.84 eq(start(V, V5, V8),0,[if(V, V5, V8, Out)],[V >= 0,V5 >= 0,V8 >= 0]). 32.25/10.84 eq(half(V, Out),1,[],[Out = 0,V = 0]). 32.25/10.84 eq(half(V, Out),1,[],[Out = 0,V = 1]). 32.25/10.84 eq(half(V, Out),1,[half(V1, Ret1)],[Out = 1 + Ret1,V1 >= 0,V = 2 + V1]). 32.25/10.84 eq(lastbit(V, Out),1,[],[Out = 0,V = 0]). 32.25/10.84 eq(lastbit(V, Out),1,[],[Out = 1,V = 1]). 32.25/10.84 eq(lastbit(V, Out),1,[lastbit(V2, Ret)],[Out = Ret,V2 >= 0,V = 2 + V2]). 32.25/10.84 eq(zero(V, Out),1,[],[Out = 1,V = 0]). 32.25/10.84 eq(zero(V, Out),1,[],[Out = 0,V3 >= 0,V = 1 + V3]). 32.25/10.84 eq(conv(V, Out),1,[conviter(V4, 1 + 0 + 0, Ret2)],[Out = Ret2,V4 >= 0,V = V4]). 32.25/10.84 eq(conviter(V, V5, Out),1,[zero(V6, Ret0),if(Ret0, V6, V7, Ret3)],[Out = Ret3,V5 = V7,V6 >= 0,V7 >= 0,V = V6]). 32.25/10.84 eq(if(V, V5, V8, Out),1,[],[Out = V10,V5 = V9,V = 1,V9 >= 0,V10 >= 0,V8 = V10]). 32.25/10.84 eq(if(V, V5, V8, Out),1,[half(V11, Ret01),lastbit(V11, Ret101),conviter(Ret01, 1 + Ret101 + V12, Ret4)],[Out = Ret4,V5 = V11,V11 >= 0,V12 >= 0,V = 0,V8 = V12]). 32.25/10.84 input_output_vars(half(V,Out),[V],[Out]). 32.25/10.84 input_output_vars(lastbit(V,Out),[V],[Out]). 32.25/10.84 input_output_vars(zero(V,Out),[V],[Out]). 32.25/10.84 input_output_vars(conv(V,Out),[V],[Out]). 32.25/10.84 input_output_vars(conviter(V,V5,Out),[V,V5],[Out]). 32.25/10.84 input_output_vars(if(V,V5,V8,Out),[V,V5,V8],[Out]). 32.25/10.84 32.25/10.84 32.25/10.84 CoFloCo proof output: 32.25/10.84 Preprocessing Cost Relations 32.25/10.84 ===================================== 32.25/10.84 32.25/10.84 #### Computed strongly connected components 32.25/10.84 0. recursive : [half/2] 32.25/10.84 1. recursive : [lastbit/2] 32.25/10.84 2. non_recursive : [zero/2] 32.25/10.84 3. recursive : [conviter/3,if/4] 32.25/10.84 4. non_recursive : [conv/2] 32.25/10.84 5. non_recursive : [start/3] 32.25/10.84 32.25/10.84 #### Obtained direct recursion through partial evaluation 32.25/10.84 0. SCC is partially evaluated into half/2 32.25/10.84 1. SCC is partially evaluated into lastbit/2 32.25/10.84 2. SCC is partially evaluated into zero/2 32.25/10.84 3. SCC is partially evaluated into conviter/3 32.25/10.84 4. SCC is completely evaluated into other SCCs 32.25/10.84 5. SCC is partially evaluated into start/3 32.25/10.84 32.25/10.84 Control-Flow Refinement of Cost Relations 32.25/10.84 ===================================== 32.25/10.84 32.25/10.84 ### Specialization of cost equations half/2 32.25/10.84 * CE 10 is refined into CE [18] 32.25/10.84 * CE 9 is refined into CE [19] 32.25/10.84 * CE 8 is refined into CE [20] 32.25/10.84 32.25/10.84 32.25/10.84 ### Cost equations --> "Loop" of half/2 32.25/10.84 * CEs [19] --> Loop 13 32.25/10.84 * CEs [20] --> Loop 14 32.25/10.84 * CEs [18] --> Loop 15 32.25/10.84 32.25/10.84 ### Ranking functions of CR half(V,Out) 32.25/10.84 * RF of phase [15]: [V-1] 32.25/10.84 32.25/10.84 #### Partial ranking functions of CR half(V,Out) 32.25/10.84 * Partial RF of phase [15]: 32.25/10.84 - RF of loop [15:1]: 32.25/10.84 V-1 32.25/10.84 32.25/10.84 32.25/10.84 ### Specialization of cost equations lastbit/2 32.25/10.84 * CE 13 is refined into CE [21] 32.25/10.84 * CE 12 is refined into CE [22] 32.25/10.84 * CE 11 is refined into CE [23] 32.25/10.84 32.25/10.84 32.25/10.84 ### Cost equations --> "Loop" of lastbit/2 32.25/10.84 * CEs [22] --> Loop 16 32.25/10.84 * CEs [23] --> Loop 17 32.25/10.84 * CEs [21] --> Loop 18 32.25/10.84 32.25/10.84 ### Ranking functions of CR lastbit(V,Out) 32.25/10.84 * RF of phase [18]: [V-1] 32.25/10.84 32.25/10.84 #### Partial ranking functions of CR lastbit(V,Out) 32.25/10.84 * Partial RF of phase [18]: 32.25/10.84 - RF of loop [18:1]: 32.25/10.84 V-1 32.25/10.84 32.25/10.84 32.25/10.84 ### Specialization of cost equations zero/2 32.25/10.84 * CE 17 is refined into CE [24] 32.25/10.84 * CE 16 is refined into CE [25] 32.25/10.84 32.25/10.84 32.25/10.84 ### Cost equations --> "Loop" of zero/2 32.25/10.84 * CEs [24] --> Loop 19 32.25/10.84 * CEs [25] --> Loop 20 32.25/10.84 32.25/10.84 ### Ranking functions of CR zero(V,Out) 32.25/10.84 32.25/10.84 #### Partial ranking functions of CR zero(V,Out) 32.25/10.84 32.25/10.84 32.25/10.84 ### Specialization of cost equations conviter/3 32.25/10.84 * CE 15 is refined into CE [26] 32.25/10.84 * CE 14 is refined into CE [27,28,29,30,31] 32.25/10.84 32.25/10.84 32.25/10.84 ### Cost equations --> "Loop" of conviter/3 32.25/10.84 * CEs [30] --> Loop 21 32.25/10.84 * CEs [31] --> Loop 22 32.25/10.84 * CEs [28] --> Loop 23 32.25/10.84 * CEs [29] --> Loop 24 32.25/10.84 * CEs [27] --> Loop 25 32.25/10.84 * CEs [26] --> Loop 26 32.25/10.84 32.25/10.84 ### Ranking functions of CR conviter(V,V5,Out) 32.25/10.84 * RF of phase [21,22,23,24]: [V-1,2*V+V5-3] 32.25/10.84 32.25/10.84 #### Partial ranking functions of CR conviter(V,V5,Out) 32.25/10.84 * Partial RF of phase [21,22,23,24]: 32.25/10.84 - RF of loop [21:1,22:1]: 32.25/10.84 V/2-1 32.25/10.84 - RF of loop [23:1]: 32.25/10.84 V-1 32.25/10.84 - RF of loop [24:1]: 32.25/10.84 2/3*V-5/3 32.25/10.84 32.25/10.84 32.25/10.84 ### Specialization of cost equations start/3 32.25/10.84 * CE 2 is refined into CE [32] 32.25/10.84 * CE 1 is refined into CE [33,34,35,36,37,38,39,40,41] 32.25/10.84 * CE 3 is refined into CE [42,43,44,45] 32.25/10.84 * CE 4 is refined into CE [46,47,48,49] 32.25/10.84 * CE 5 is refined into CE [50,51] 32.25/10.84 * CE 6 is refined into CE [52,53,54] 32.25/10.84 * CE 7 is refined into CE [55,56,57] 32.25/10.84 32.25/10.84 32.25/10.84 ### Cost equations --> "Loop" of start/3 32.25/10.84 * CEs [32,43,44,45,47,48,49,51,53,54,56,57] --> Loop 27 32.25/10.84 * CEs [33,34,35,36,37,38,39,40,41,42,46,50,52,55] --> Loop 28 32.25/10.84 32.25/10.84 ### Ranking functions of CR start(V,V5,V8) 32.25/10.84 32.25/10.84 #### Partial ranking functions of CR start(V,V5,V8) 32.25/10.84 32.25/10.84 32.25/10.84 Computing Bounds 32.25/10.84 ===================================== 32.25/10.84 32.25/10.84 #### Cost of chains of half(V,Out): 32.25/10.84 * Chain [[15],14]: 1*it(15)+1 32.25/10.84 Such that:it(15) =< 2*Out 32.25/10.84 32.25/10.84 with precondition: [V=2*Out,V>=2] 32.25/10.84 32.25/10.84 * Chain [[15],13]: 1*it(15)+1 32.25/10.84 Such that:it(15) =< 2*Out 32.25/10.84 32.25/10.84 with precondition: [V=2*Out+1,V>=3] 32.25/10.84 32.25/10.84 * Chain [14]: 1 32.25/10.84 with precondition: [V=0,Out=0] 32.25/10.84 32.25/10.84 * Chain [13]: 1 32.25/10.84 with precondition: [V=1,Out=0] 32.25/10.84 32.25/10.84 32.25/10.84 #### Cost of chains of lastbit(V,Out): 32.25/10.84 * Chain [[18],17]: 1*it(18)+1 32.25/10.84 Such that:it(18) =< V 32.25/10.84 32.25/10.84 with precondition: [Out=0,V>=2] 32.25/10.84 32.25/10.84 * Chain [[18],16]: 1*it(18)+1 32.25/10.84 Such that:it(18) =< V 32.25/10.84 32.25/10.84 with precondition: [Out=1,V>=3] 32.25/10.84 32.25/10.84 * Chain [17]: 1 32.25/10.84 with precondition: [V=0,Out=0] 32.25/10.84 32.25/10.84 * Chain [16]: 1 32.25/10.84 with precondition: [V=1,Out=1] 32.25/10.84 32.25/10.84 32.25/10.84 #### Cost of chains of zero(V,Out): 32.25/10.84 * Chain [20]: 1 32.25/10.84 with precondition: [V=0,Out=1] 32.25/10.84 32.25/10.84 * Chain [19]: 1 32.25/10.84 with precondition: [Out=0,V>=1] 32.25/10.84 32.25/10.84 32.25/10.84 #### Cost of chains of conviter(V,V5,Out): 32.25/10.84 * Chain [[21,22,23,24],25,26]: 5*it(21)+5*it(22)+5*it(23)+5*it(24)+2*s(17)+2*s(18)+4*s(21)+8 32.25/10.84 Such that:aux(6) =< 2*V+V5 32.25/10.84 aux(7) =< 2*V+V5-Out 32.25/10.84 aux(10) =< 3*V 32.25/10.84 aux(9) =< 3*V+6 32.25/10.84 aux(12) =< 4*V 32.25/10.84 aux(11) =< 4*V+8 32.25/10.84 it(24) =< 2/3*V 32.25/10.84 aux(15) =< V 32.25/10.84 aux(16) =< 2*V 32.25/10.84 aux(17) =< V/2 32.25/10.84 it(21) =< aux(15) 32.25/10.84 it(22) =< aux(15) 32.25/10.84 it(23) =< aux(15) 32.25/10.84 it(24) =< aux(15) 32.25/10.84 it(24) =< aux(16) 32.25/10.84 it(21) =< aux(6) 32.25/10.84 it(22) =< aux(6) 32.25/10.84 it(23) =< aux(6) 32.25/10.84 it(24) =< aux(6) 32.25/10.84 it(21) =< aux(7) 32.25/10.84 it(22) =< aux(7) 32.25/10.84 it(23) =< aux(7) 32.25/10.84 it(24) =< aux(7) 32.25/10.84 it(22) =< aux(9) 32.25/10.84 it(23) =< aux(9) 32.25/10.84 it(24) =< aux(9) 32.25/10.84 s(18) =< aux(9) 32.25/10.84 it(22) =< aux(10) 32.25/10.84 it(23) =< aux(10) 32.25/10.84 it(24) =< aux(10) 32.25/10.84 s(18) =< aux(10) 32.25/10.84 it(22) =< aux(11) 32.25/10.84 it(23) =< aux(11) 32.25/10.84 it(24) =< aux(11) 32.25/10.84 s(17) =< aux(11) 32.25/10.84 it(22) =< aux(12) 32.25/10.84 it(23) =< aux(12) 32.25/10.84 it(24) =< aux(12) 32.25/10.84 s(17) =< aux(12) 32.25/10.84 it(21) =< aux(17) 32.25/10.84 it(22) =< aux(17) 32.25/10.84 s(21) =< aux(16) 32.25/10.84 32.25/10.84 with precondition: [V5>=0,Out>=V5+3,V+2*V5+6>=2*Out,V+V5+1>=Out] 32.25/10.84 32.25/10.84 * Chain [26]: 3 32.25/10.84 with precondition: [V=0,V5=Out,V5>=0] 32.25/10.84 32.25/10.84 * Chain [25,26]: 8 32.25/10.84 with precondition: [V=1,Out=V5+2,Out>=2] 32.25/10.84 32.25/10.84 32.25/10.84 #### Cost of chains of start(V,V5,V8): 32.25/10.84 * Chain [28]: 4*s(25)+24*s(27)+5*s(35)+10*s(39)+5*s(40)+5*s(41)+4*s(42)+4*s(43)+5*s(53)+5*s(57)+5*s(58)+5*s(59)+2*s(64)+5*s(73)+5*s(77)+5*s(78)+5*s(79)+4*s(80)+4*s(81)+5*s(93)+5*s(98)+5*s(99)+11 32.25/10.84 Such that:s(67) =< V5+V8 32.25/10.84 s(47) =< V5+V8+2 32.25/10.84 aux(23) =< 2 32.25/10.84 aux(24) =< 3 32.25/10.84 aux(25) =< V5 32.25/10.84 aux(26) =< V5+V8+1 32.25/10.84 aux(27) =< 2*V5 32.25/10.84 aux(28) =< 2*V5+6 32.25/10.84 aux(29) =< 2*V5+8 32.25/10.84 aux(30) =< V5/2 32.25/10.84 aux(31) =< V5/3 32.25/10.84 aux(32) =< V5/4 32.25/10.84 aux(33) =< 3/2*V5 32.25/10.84 aux(34) =< 3/2*V5+6 32.25/10.84 aux(35) =< 3/2*V5+9/2 32.25/10.84 s(25) =< aux(23) 32.25/10.84 s(64) =< aux(24) 32.25/10.84 s(35) =< aux(31) 32.25/10.84 s(53) =< aux(31) 32.25/10.84 s(73) =< aux(31) 32.25/10.84 s(93) =< aux(31) 32.25/10.84 s(27) =< aux(25) 32.25/10.84 s(77) =< aux(30) 32.25/10.84 s(78) =< aux(30) 32.25/10.84 s(79) =< aux(30) 32.25/10.84 s(73) =< aux(30) 32.25/10.84 s(73) =< aux(25) 32.25/10.84 s(77) =< s(67) 32.25/10.84 s(78) =< s(67) 32.25/10.84 s(79) =< s(67) 32.25/10.84 s(73) =< s(67) 32.25/10.84 s(77) =< aux(25) 32.25/10.84 s(78) =< aux(25) 32.25/10.84 s(79) =< aux(25) 32.25/10.84 s(78) =< aux(35) 32.25/10.84 s(79) =< aux(35) 32.25/10.84 s(73) =< aux(35) 32.25/10.84 s(80) =< aux(35) 32.25/10.84 s(78) =< aux(33) 32.25/10.84 s(79) =< aux(33) 32.25/10.84 s(73) =< aux(33) 32.25/10.84 s(80) =< aux(33) 32.25/10.84 s(78) =< aux(28) 32.25/10.84 s(79) =< aux(28) 32.25/10.84 s(73) =< aux(28) 32.25/10.84 s(81) =< aux(28) 32.25/10.84 s(78) =< aux(27) 32.25/10.84 s(79) =< aux(27) 32.25/10.84 s(73) =< aux(27) 32.25/10.84 s(81) =< aux(27) 32.25/10.84 s(77) =< aux(32) 32.25/10.84 s(78) =< aux(32) 32.25/10.84 s(39) =< aux(30) 32.25/10.84 s(40) =< aux(30) 32.25/10.84 s(41) =< aux(30) 32.25/10.84 s(35) =< aux(30) 32.25/10.84 s(35) =< aux(25) 32.25/10.84 s(39) =< aux(26) 32.25/10.84 s(40) =< aux(26) 32.25/10.84 s(41) =< aux(26) 32.25/10.84 s(35) =< aux(26) 32.25/10.84 s(39) =< aux(25) 32.25/10.84 s(40) =< aux(25) 32.25/10.84 s(41) =< aux(25) 32.25/10.84 s(40) =< aux(34) 32.25/10.84 s(41) =< aux(34) 32.25/10.84 s(35) =< aux(34) 32.25/10.84 s(42) =< aux(34) 32.25/10.84 s(40) =< aux(33) 32.25/10.84 s(41) =< aux(33) 32.25/10.84 s(35) =< aux(33) 32.25/10.84 s(42) =< aux(33) 32.25/10.84 s(40) =< aux(29) 32.25/10.84 s(41) =< aux(29) 32.25/10.84 s(35) =< aux(29) 32.25/10.84 s(43) =< aux(29) 32.25/10.84 s(40) =< aux(27) 32.25/10.84 s(41) =< aux(27) 32.25/10.84 s(35) =< aux(27) 32.25/10.84 s(43) =< aux(27) 32.25/10.84 s(39) =< aux(32) 32.25/10.84 s(40) =< aux(32) 32.25/10.84 s(98) =< aux(30) 32.25/10.84 s(99) =< aux(30) 32.25/10.84 s(93) =< aux(30) 32.25/10.84 s(93) =< aux(25) 32.25/10.84 s(98) =< aux(26) 32.25/10.84 s(99) =< aux(26) 32.25/10.84 s(93) =< aux(26) 32.25/10.84 s(98) =< aux(25) 32.25/10.84 s(99) =< aux(25) 32.25/10.84 s(98) =< aux(35) 32.25/10.84 s(99) =< aux(35) 32.25/10.84 s(93) =< aux(35) 32.25/10.84 s(98) =< aux(33) 32.25/10.84 s(99) =< aux(33) 32.25/10.84 s(93) =< aux(33) 32.25/10.84 s(98) =< aux(28) 32.25/10.84 s(99) =< aux(28) 32.25/10.84 s(93) =< aux(28) 32.25/10.84 s(98) =< aux(27) 32.25/10.84 s(99) =< aux(27) 32.25/10.84 s(93) =< aux(27) 32.25/10.84 s(98) =< aux(32) 32.25/10.84 s(57) =< aux(30) 32.25/10.84 s(58) =< aux(30) 32.25/10.84 s(59) =< aux(30) 32.25/10.84 s(53) =< aux(30) 32.25/10.84 s(53) =< aux(25) 32.25/10.84 s(57) =< s(47) 32.25/10.84 s(58) =< s(47) 32.25/10.84 s(59) =< s(47) 32.25/10.84 s(53) =< s(47) 32.25/10.84 s(57) =< aux(25) 32.25/10.84 s(58) =< aux(25) 32.25/10.84 s(59) =< aux(25) 32.25/10.84 s(58) =< aux(34) 32.25/10.84 s(59) =< aux(34) 32.25/10.84 s(53) =< aux(34) 32.25/10.84 s(58) =< aux(33) 32.25/10.84 s(59) =< aux(33) 32.25/10.84 s(53) =< aux(33) 32.25/10.84 s(58) =< aux(29) 32.25/10.84 s(59) =< aux(29) 32.25/10.84 s(53) =< aux(29) 32.25/10.84 s(58) =< aux(27) 32.25/10.84 s(59) =< aux(27) 32.25/10.84 s(53) =< aux(27) 32.25/10.84 s(57) =< aux(32) 32.25/10.84 s(58) =< aux(32) 32.25/10.84 32.25/10.84 with precondition: [V=0] 32.25/10.84 32.25/10.84 * Chain [27]: 4*s(103)+5*s(113)+5*s(117)+5*s(118)+5*s(119)+4*s(120)+4*s(121)+8*s(122)+5*s(129)+5*s(133)+5*s(134)+5*s(135)+9 32.25/10.84 Such that:s(107) =< 2*V+1 32.25/10.84 s(123) =< 2*V+V5 32.25/10.84 aux(38) =< V 32.25/10.84 aux(39) =< 2*V 32.25/10.84 aux(40) =< 3*V 32.25/10.84 aux(41) =< 3*V+6 32.25/10.84 aux(42) =< 4*V 32.25/10.84 aux(43) =< 4*V+8 32.25/10.84 aux(44) =< V/2 32.25/10.84 aux(45) =< 2/3*V 32.25/10.84 s(103) =< aux(38) 32.25/10.84 s(113) =< aux(45) 32.25/10.84 s(129) =< aux(45) 32.25/10.84 s(117) =< aux(38) 32.25/10.84 s(118) =< aux(38) 32.25/10.84 s(119) =< aux(38) 32.25/10.84 s(113) =< aux(38) 32.25/10.84 s(113) =< aux(39) 32.25/10.84 s(117) =< s(107) 32.25/10.84 s(118) =< s(107) 32.25/10.84 s(119) =< s(107) 32.25/10.84 s(113) =< s(107) 32.25/10.84 s(117) =< aux(39) 32.25/10.84 s(118) =< aux(39) 32.25/10.84 s(119) =< aux(39) 32.25/10.84 s(118) =< aux(41) 32.25/10.84 s(119) =< aux(41) 32.25/10.84 s(113) =< aux(41) 32.25/10.84 s(120) =< aux(41) 32.25/10.84 s(118) =< aux(40) 32.25/10.84 s(119) =< aux(40) 32.25/10.84 s(113) =< aux(40) 32.25/10.84 s(120) =< aux(40) 32.25/10.84 s(118) =< aux(43) 32.25/10.84 s(119) =< aux(43) 32.25/10.84 s(113) =< aux(43) 32.25/10.84 s(121) =< aux(43) 32.25/10.84 s(118) =< aux(42) 32.25/10.84 s(119) =< aux(42) 32.25/10.84 s(113) =< aux(42) 32.25/10.84 s(121) =< aux(42) 32.25/10.84 s(117) =< aux(44) 32.25/10.84 s(118) =< aux(44) 32.25/10.84 s(122) =< aux(39) 32.25/10.84 s(133) =< aux(38) 32.25/10.84 s(134) =< aux(38) 32.25/10.84 s(135) =< aux(38) 32.25/10.84 s(129) =< aux(38) 32.25/10.84 s(129) =< aux(39) 32.25/10.84 s(133) =< s(123) 32.25/10.84 s(134) =< s(123) 32.25/10.84 s(135) =< s(123) 32.25/10.84 s(129) =< s(123) 32.25/10.84 s(133) =< aux(39) 32.25/10.84 s(134) =< aux(39) 32.25/10.84 s(135) =< aux(39) 32.25/10.84 s(134) =< aux(41) 32.25/10.84 s(135) =< aux(41) 32.25/10.84 s(129) =< aux(41) 32.25/10.84 s(134) =< aux(40) 32.25/10.84 s(135) =< aux(40) 32.25/10.84 s(129) =< aux(40) 32.25/10.84 s(134) =< aux(43) 32.25/10.84 s(135) =< aux(43) 32.25/10.84 s(129) =< aux(43) 32.25/10.84 s(134) =< aux(42) 32.25/10.84 s(135) =< aux(42) 32.25/10.84 s(129) =< aux(42) 32.25/10.84 s(133) =< aux(44) 32.25/10.84 s(134) =< aux(44) 32.25/10.84 32.25/10.84 with precondition: [V>=1] 32.25/10.84 32.25/10.84 32.25/10.84 Closed-form bounds of start(V,V5,V8): 32.25/10.84 ------------------------------------- 32.25/10.84 * Chain [28] with precondition: [V=0] 32.25/10.84 - Upper bound: nat(V5)*24+25+nat(2*V5+6)*4+nat(2*V5+8)*4+nat(3/2*V5+6)*4+nat(3/2*V5+9/2)*4+nat(V5/2)*60+nat(V5/3)*20 32.25/10.84 - Complexity: n 32.25/10.84 * Chain [27] with precondition: [V>=1] 32.25/10.84 - Upper bound: 254/3*V+65 32.25/10.84 - Complexity: n 32.25/10.84 32.25/10.84 ### Maximum cost of start(V,V5,V8): max([254/3*V+56,nat(V5)*24+16+nat(2*V5+6)*4+nat(2*V5+8)*4+nat(3/2*V5+6)*4+nat(3/2*V5+9/2)*4+nat(V5/2)*60+nat(V5/3)*20])+9 32.25/10.84 Asymptotic class: n 32.25/10.84 * Total analysis performed in 535 ms. 32.25/10.84 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (10) 32.25/10.84 BOUNDS(1, n^1) 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 32.25/10.84 Transformed a relative TRS into a decreasing-loop problem. 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (12) 32.25/10.84 Obligation: 32.25/10.84 Analyzing the following TRS for decreasing loops: 32.25/10.84 32.25/10.84 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 32.25/10.84 32.25/10.84 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 32.25/10.84 half(s(0)) -> 0 32.25/10.84 half(s(s(x))) -> s(half(x)) 32.25/10.84 lastbit(0) -> 0 32.25/10.84 lastbit(s(0)) -> s(0) 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) 32.25/10.84 zero(0) -> true 32.25/10.84 zero(s(x)) -> false 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) 32.25/10.84 if(true, x, l) -> l 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) 32.25/10.84 32.25/10.84 S is empty. 32.25/10.84 Rewrite Strategy: INNERMOST 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (13) DecreasingLoopProof (LOWER BOUND(ID)) 32.25/10.84 The following loop(s) give(s) rise to the lower bound Omega(n^1): 32.25/10.84 32.25/10.84 The rewrite sequence 32.25/10.84 32.25/10.84 lastbit(s(s(x))) ->^+ lastbit(x) 32.25/10.84 32.25/10.84 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 32.25/10.84 32.25/10.84 The pumping substitution is [x / s(s(x))]. 32.25/10.84 32.25/10.84 The result substitution is [ ]. 32.25/10.84 32.25/10.84 32.25/10.84 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (14) 32.25/10.84 Complex Obligation (BEST) 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (15) 32.25/10.84 Obligation: 32.25/10.84 Proved the lower bound n^1 for the following obligation: 32.25/10.84 32.25/10.84 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 32.25/10.84 32.25/10.84 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 32.25/10.84 half(s(0)) -> 0 32.25/10.84 half(s(s(x))) -> s(half(x)) 32.25/10.84 lastbit(0) -> 0 32.25/10.84 lastbit(s(0)) -> s(0) 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) 32.25/10.84 zero(0) -> true 32.25/10.84 zero(s(x)) -> false 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) 32.25/10.84 if(true, x, l) -> l 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) 32.25/10.84 32.25/10.84 S is empty. 32.25/10.84 Rewrite Strategy: INNERMOST 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (16) LowerBoundPropagationProof (FINISHED) 32.25/10.84 Propagated lower bound. 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (17) 32.25/10.84 BOUNDS(n^1, INF) 32.25/10.84 32.25/10.84 ---------------------------------------- 32.25/10.84 32.25/10.84 (18) 32.25/10.84 Obligation: 32.25/10.84 Analyzing the following TRS for decreasing loops: 32.25/10.84 32.25/10.84 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 32.25/10.84 32.25/10.84 32.25/10.84 The TRS R consists of the following rules: 32.25/10.84 32.25/10.84 half(0) -> 0 32.25/10.84 half(s(0)) -> 0 32.25/10.84 half(s(s(x))) -> s(half(x)) 32.25/10.84 lastbit(0) -> 0 32.25/10.84 lastbit(s(0)) -> s(0) 32.25/10.84 lastbit(s(s(x))) -> lastbit(x) 32.25/10.84 zero(0) -> true 32.25/10.84 zero(s(x)) -> false 32.25/10.84 conv(x) -> conviter(x, cons(0, nil)) 32.25/10.84 conviter(x, l) -> if(zero(x), x, l) 32.25/10.84 if(true, x, l) -> l 32.25/10.84 if(false, x, l) -> conviter(half(x), cons(lastbit(x), l)) 32.25/10.84 32.25/10.84 S is empty. 32.25/10.84 Rewrite Strategy: INNERMOST 32.48/10.88 EOF