26.44/8.27 WORST_CASE(Omega(n^2), O(n^2)) 26.44/8.28 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 26.44/8.28 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 26.44/8.28 26.44/8.28 26.44/8.28 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). 26.44/8.28 26.44/8.28 (0) CpxTRS 26.44/8.28 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 26.44/8.28 (2) CpxWeightedTrs 26.44/8.28 (3) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 26.44/8.28 (4) CpxWeightedTrs 26.44/8.28 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 26.44/8.28 (6) CpxTypedWeightedTrs 26.44/8.28 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 26.44/8.28 (8) CpxTypedWeightedCompleteTrs 26.44/8.28 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 26.44/8.28 (10) CpxRNTS 26.44/8.28 (11) CompleteCoflocoProof [FINISHED, 277 ms] 26.44/8.28 (12) BOUNDS(1, n^2) 26.44/8.28 (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 26.44/8.28 (14) CpxTRS 26.44/8.28 (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 26.44/8.28 (16) typed CpxTrs 26.44/8.28 (17) OrderProof [LOWER BOUND(ID), 0 ms] 26.44/8.28 (18) typed CpxTrs 26.44/8.28 (19) RewriteLemmaProof [LOWER BOUND(ID), 293 ms] 26.44/8.28 (20) BEST 26.44/8.28 (21) proven lower bound 26.44/8.28 (22) LowerBoundPropagationProof [FINISHED, 0 ms] 26.44/8.28 (23) BOUNDS(n^1, INF) 26.44/8.28 (24) typed CpxTrs 26.44/8.28 (25) RewriteLemmaProof [LOWER BOUND(ID), 802 ms] 26.44/8.28 (26) proven lower bound 26.44/8.28 (27) LowerBoundPropagationProof [FINISHED, 0 ms] 26.44/8.28 (28) BOUNDS(n^2, INF) 26.44/8.28 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (0) 26.44/8.28 Obligation: 26.44/8.28 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). 26.44/8.28 26.44/8.28 26.44/8.28 The TRS R consists of the following rules: 26.44/8.28 26.44/8.28 f(0) -> 1 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0, y) -> y 26.44/8.28 g(s(x), y) -> g(x, +(y, s(x))) 26.44/8.28 +(x, 0) -> x 26.44/8.28 +(x, s(y)) -> s(+(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+(y, x))) 26.44/8.28 26.44/8.28 S is empty. 26.44/8.28 Rewrite Strategy: INNERMOST 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 26.44/8.28 Transformed relative TRS to weighted TRS 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (2) 26.44/8.28 Obligation: 26.44/8.28 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 26.44/8.28 26.44/8.28 26.44/8.28 The TRS R consists of the following rules: 26.44/8.28 26.44/8.28 f(0) -> 1 [1] 26.44/8.28 f(s(x)) -> g(x, s(x)) [1] 26.44/8.28 g(0, y) -> y [1] 26.44/8.28 g(s(x), y) -> g(x, +(y, s(x))) [1] 26.44/8.28 +(x, 0) -> x [1] 26.44/8.28 +(x, s(y)) -> s(+(x, y)) [1] 26.44/8.28 g(s(x), y) -> g(x, s(+(y, x))) [1] 26.44/8.28 26.44/8.28 Rewrite Strategy: INNERMOST 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) 26.44/8.28 Renamed defined symbols to avoid conflicts with arithmetic symbols: 26.44/8.28 26.44/8.28 + => plus 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (4) 26.44/8.28 Obligation: 26.44/8.28 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 26.44/8.28 26.44/8.28 26.44/8.28 The TRS R consists of the following rules: 26.44/8.28 26.44/8.28 f(0) -> 1 [1] 26.44/8.28 f(s(x)) -> g(x, s(x)) [1] 26.44/8.28 g(0, y) -> y [1] 26.44/8.28 g(s(x), y) -> g(x, plus(y, s(x))) [1] 26.44/8.28 plus(x, 0) -> x [1] 26.44/8.28 plus(x, s(y)) -> s(plus(x, y)) [1] 26.44/8.28 g(s(x), y) -> g(x, s(plus(y, x))) [1] 26.44/8.28 26.44/8.28 Rewrite Strategy: INNERMOST 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 26.44/8.28 Infered types. 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (6) 26.44/8.28 Obligation: 26.44/8.28 Runtime Complexity Weighted TRS with Types. 26.44/8.28 The TRS R consists of the following rules: 26.44/8.28 26.44/8.28 f(0) -> 1 [1] 26.44/8.28 f(s(x)) -> g(x, s(x)) [1] 26.44/8.28 g(0, y) -> y [1] 26.44/8.28 g(s(x), y) -> g(x, plus(y, s(x))) [1] 26.44/8.28 plus(x, 0) -> x [1] 26.44/8.28 plus(x, s(y)) -> s(plus(x, y)) [1] 26.44/8.28 g(s(x), y) -> g(x, s(plus(y, x))) [1] 26.44/8.28 26.44/8.28 The TRS has the following type information: 26.44/8.28 f :: 0:1:s -> 0:1:s 26.44/8.28 0 :: 0:1:s 26.44/8.28 1 :: 0:1:s 26.44/8.28 s :: 0:1:s -> 0:1:s 26.44/8.28 g :: 0:1:s -> 0:1:s -> 0:1:s 26.44/8.28 plus :: 0:1:s -> 0:1:s -> 0:1:s 26.44/8.28 26.44/8.28 Rewrite Strategy: INNERMOST 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (7) CompletionProof (UPPER BOUND(ID)) 26.44/8.28 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 26.44/8.28 26.44/8.28 f(v0) -> null_f [0] 26.44/8.28 g(v0, v1) -> null_g [0] 26.44/8.28 plus(v0, v1) -> null_plus [0] 26.44/8.28 26.44/8.28 And the following fresh constants: null_f, null_g, null_plus 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (8) 26.44/8.28 Obligation: 26.44/8.28 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 26.44/8.28 26.44/8.28 Runtime Complexity Weighted TRS with Types. 26.44/8.28 The TRS R consists of the following rules: 26.44/8.28 26.44/8.28 f(0) -> 1 [1] 26.44/8.28 f(s(x)) -> g(x, s(x)) [1] 26.44/8.28 g(0, y) -> y [1] 26.44/8.28 g(s(x), y) -> g(x, plus(y, s(x))) [1] 26.44/8.28 plus(x, 0) -> x [1] 26.44/8.28 plus(x, s(y)) -> s(plus(x, y)) [1] 26.44/8.28 g(s(x), y) -> g(x, s(plus(y, x))) [1] 26.44/8.28 f(v0) -> null_f [0] 26.44/8.28 g(v0, v1) -> null_g [0] 26.44/8.28 plus(v0, v1) -> null_plus [0] 26.44/8.28 26.44/8.28 The TRS has the following type information: 26.44/8.28 f :: 0:1:s:null_f:null_g:null_plus -> 0:1:s:null_f:null_g:null_plus 26.44/8.28 0 :: 0:1:s:null_f:null_g:null_plus 26.44/8.28 1 :: 0:1:s:null_f:null_g:null_plus 26.44/8.28 s :: 0:1:s:null_f:null_g:null_plus -> 0:1:s:null_f:null_g:null_plus 26.44/8.28 g :: 0:1:s:null_f:null_g:null_plus -> 0:1:s:null_f:null_g:null_plus -> 0:1:s:null_f:null_g:null_plus 26.44/8.28 plus :: 0:1:s:null_f:null_g:null_plus -> 0:1:s:null_f:null_g:null_plus -> 0:1:s:null_f:null_g:null_plus 26.44/8.28 null_f :: 0:1:s:null_f:null_g:null_plus 26.44/8.28 null_g :: 0:1:s:null_f:null_g:null_plus 26.44/8.28 null_plus :: 0:1:s:null_f:null_g:null_plus 26.44/8.28 26.44/8.28 Rewrite Strategy: INNERMOST 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 26.44/8.28 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 26.44/8.28 The constant constructors are abstracted as follows: 26.44/8.28 26.44/8.28 0 => 0 26.44/8.28 1 => 1 26.44/8.28 null_f => 0 26.44/8.28 null_g => 0 26.44/8.28 null_plus => 0 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (10) 26.44/8.28 Obligation: 26.44/8.28 Complexity RNTS consisting of the following rules: 26.44/8.28 26.44/8.28 f(z) -{ 1 }-> g(x, 1 + x) :|: x >= 0, z = 1 + x 26.44/8.28 f(z) -{ 1 }-> 1 :|: z = 0 26.44/8.28 f(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 26.44/8.28 g(z, z') -{ 1 }-> y :|: y >= 0, z = 0, z' = y 26.44/8.28 g(z, z') -{ 1 }-> g(x, plus(y, 1 + x)) :|: x >= 0, y >= 0, z = 1 + x, z' = y 26.44/8.28 g(z, z') -{ 1 }-> g(x, 1 + plus(y, x)) :|: x >= 0, y >= 0, z = 1 + x, z' = y 26.44/8.28 g(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 26.44/8.28 plus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 26.44/8.28 plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 26.44/8.28 plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = x 26.44/8.28 26.44/8.28 Only complete derivations are relevant for the runtime complexity. 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (11) CompleteCoflocoProof (FINISHED) 26.44/8.28 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 26.44/8.28 26.44/8.28 eq(start(V, V2),0,[f(V, Out)],[V >= 0]). 26.44/8.28 eq(start(V, V2),0,[g(V, V2, Out)],[V >= 0,V2 >= 0]). 26.44/8.28 eq(start(V, V2),0,[plus(V, V2, Out)],[V >= 0,V2 >= 0]). 26.44/8.28 eq(f(V, Out),1,[],[Out = 1,V = 0]). 26.44/8.28 eq(f(V, Out),1,[g(V1, 1 + V1, Ret)],[Out = Ret,V1 >= 0,V = 1 + V1]). 26.44/8.28 eq(g(V, V2, Out),1,[],[Out = V3,V3 >= 0,V = 0,V2 = V3]). 26.44/8.28 eq(g(V, V2, Out),1,[plus(V5, 1 + V4, Ret1),g(V4, Ret1, Ret2)],[Out = Ret2,V4 >= 0,V5 >= 0,V = 1 + V4,V2 = V5]). 26.44/8.28 eq(plus(V, V2, Out),1,[],[Out = V6,V6 >= 0,V = V6,V2 = 0]). 26.44/8.28 eq(plus(V, V2, Out),1,[plus(V7, V8, Ret11)],[Out = 1 + Ret11,V2 = 1 + V8,V7 >= 0,V8 >= 0,V = V7]). 26.44/8.28 eq(g(V, V2, Out),1,[plus(V10, V9, Ret111),g(V9, 1 + Ret111, Ret3)],[Out = Ret3,V9 >= 0,V10 >= 0,V = 1 + V9,V2 = V10]). 26.44/8.28 eq(f(V, Out),0,[],[Out = 0,V11 >= 0,V = V11]). 26.44/8.28 eq(g(V, V2, Out),0,[],[Out = 0,V13 >= 0,V12 >= 0,V = V13,V2 = V12]). 26.44/8.28 eq(plus(V, V2, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V = V15,V2 = V14]). 26.44/8.28 input_output_vars(f(V,Out),[V],[Out]). 26.44/8.28 input_output_vars(g(V,V2,Out),[V,V2],[Out]). 26.44/8.28 input_output_vars(plus(V,V2,Out),[V,V2],[Out]). 26.44/8.28 26.44/8.28 26.44/8.28 CoFloCo proof output: 26.44/8.28 Preprocessing Cost Relations 26.44/8.28 ===================================== 26.44/8.28 26.44/8.28 #### Computed strongly connected components 26.44/8.28 0. recursive : [plus/3] 26.44/8.28 1. recursive : [g/3] 26.44/8.28 2. non_recursive : [f/2] 26.44/8.28 3. non_recursive : [start/2] 26.44/8.28 26.44/8.28 #### Obtained direct recursion through partial evaluation 26.44/8.28 0. SCC is partially evaluated into plus/3 26.44/8.28 1. SCC is partially evaluated into g/3 26.44/8.28 2. SCC is partially evaluated into f/2 26.44/8.28 3. SCC is partially evaluated into start/2 26.44/8.28 26.44/8.28 Control-Flow Refinement of Cost Relations 26.44/8.28 ===================================== 26.44/8.28 26.44/8.28 ### Specialization of cost equations plus/3 26.44/8.28 * CE 13 is refined into CE [14] 26.44/8.28 * CE 11 is refined into CE [15] 26.44/8.28 * CE 12 is refined into CE [16] 26.44/8.28 26.44/8.28 26.44/8.28 ### Cost equations --> "Loop" of plus/3 26.44/8.28 * CEs [16] --> Loop 11 26.44/8.28 * CEs [14] --> Loop 12 26.44/8.28 * CEs [15] --> Loop 13 26.44/8.28 26.44/8.28 ### Ranking functions of CR plus(V,V2,Out) 26.44/8.28 * RF of phase [11]: [V2] 26.44/8.28 26.44/8.28 #### Partial ranking functions of CR plus(V,V2,Out) 26.44/8.28 * Partial RF of phase [11]: 26.44/8.28 - RF of loop [11:1]: 26.44/8.28 V2 26.44/8.28 26.44/8.28 26.44/8.28 ### Specialization of cost equations g/3 26.44/8.28 * CE 10 is refined into CE [17] 26.44/8.28 * CE 7 is refined into CE [18] 26.44/8.28 * CE 8 is refined into CE [19,20,21] 26.44/8.28 * CE 9 is refined into CE [22,23,24,25] 26.44/8.28 26.44/8.28 26.44/8.28 ### Cost equations --> "Loop" of g/3 26.44/8.28 * CEs [21,23,25] --> Loop 14 26.44/8.28 * CEs [19] --> Loop 15 26.44/8.28 * CEs [20,22,24] --> Loop 16 26.44/8.28 * CEs [17] --> Loop 17 26.44/8.28 * CEs [18] --> Loop 18 26.44/8.28 26.44/8.28 ### Ranking functions of CR g(V,V2,Out) 26.44/8.28 * RF of phase [14,15,16]: [V] 26.44/8.28 26.44/8.28 #### Partial ranking functions of CR g(V,V2,Out) 26.44/8.28 * Partial RF of phase [14,15,16]: 26.44/8.28 - RF of loop [14:1,15:1,16:1]: 26.44/8.28 V 26.44/8.28 26.44/8.28 26.44/8.28 ### Specialization of cost equations f/2 26.44/8.28 * CE 5 is refined into CE [26,27,28] 26.44/8.28 * CE 6 is refined into CE [29] 26.44/8.28 * CE 4 is refined into CE [30] 26.44/8.28 26.44/8.28 26.44/8.28 ### Cost equations --> "Loop" of f/2 26.44/8.28 * CEs [28] --> Loop 19 26.44/8.28 * CEs [27,29] --> Loop 20 26.44/8.28 * CEs [26] --> Loop 21 26.44/8.28 * CEs [30] --> Loop 22 26.44/8.28 26.44/8.28 ### Ranking functions of CR f(V,Out) 26.44/8.28 26.44/8.28 #### Partial ranking functions of CR f(V,Out) 26.44/8.28 26.44/8.28 26.44/8.28 ### Specialization of cost equations start/2 26.44/8.28 * CE 1 is refined into CE [31,32,33,34] 26.44/8.28 * CE 2 is refined into CE [35,36,37] 26.44/8.28 * CE 3 is refined into CE [38,39,40,41] 26.44/8.28 26.44/8.28 26.44/8.28 ### Cost equations --> "Loop" of start/2 26.44/8.28 * CEs [38] --> Loop 23 26.44/8.28 * CEs [32] --> Loop 24 26.44/8.28 * CEs [31,33,34,35,36,37,39,40,41] --> Loop 25 26.44/8.28 26.44/8.28 ### Ranking functions of CR start(V,V2) 26.44/8.28 26.44/8.28 #### Partial ranking functions of CR start(V,V2) 26.44/8.28 26.44/8.28 26.44/8.28 Computing Bounds 26.44/8.28 ===================================== 26.44/8.28 26.44/8.28 #### Cost of chains of plus(V,V2,Out): 26.44/8.28 * Chain [[11],13]: 1*it(11)+1 26.44/8.28 Such that:it(11) =< V2 26.44/8.28 26.44/8.28 with precondition: [V+V2=Out,V>=0,V2>=1] 26.44/8.28 26.44/8.28 * Chain [[11],12]: 1*it(11)+0 26.44/8.28 Such that:it(11) =< Out 26.44/8.28 26.44/8.28 with precondition: [V>=0,Out>=1,V2>=Out] 26.44/8.28 26.44/8.28 * Chain [13]: 1 26.44/8.28 with precondition: [V2=0,V=Out,V>=0] 26.44/8.28 26.44/8.28 * Chain [12]: 0 26.44/8.28 with precondition: [Out=0,V>=0,V2>=0] 26.44/8.28 26.44/8.28 26.44/8.28 #### Cost of chains of g(V,V2,Out): 26.44/8.28 * Chain [[14,15,16],18]: 4*it(14)+2*s(9)+1*s(11)+1*s(12)+1 26.44/8.28 Such that:aux(7) =< V 26.44/8.28 it(14) =< aux(7) 26.44/8.28 aux(4) =< aux(7)-1 26.44/8.28 aux(3) =< aux(7) 26.44/8.28 s(10) =< it(14)*aux(7) 26.44/8.28 s(12) =< it(14)*aux(4) 26.44/8.28 s(11) =< it(14)*aux(3) 26.44/8.28 s(9) =< s(10) 26.44/8.28 26.44/8.28 with precondition: [V>=1,V2>=0,Out>=0] 26.44/8.28 26.44/8.28 * Chain [[14,15,16],17]: 4*it(14)+2*s(9)+1*s(11)+1*s(12)+0 26.44/8.28 Such that:aux(8) =< V 26.44/8.28 it(14) =< aux(8) 26.44/8.28 aux(4) =< aux(8)-1 26.44/8.28 aux(3) =< aux(8) 26.44/8.28 s(10) =< it(14)*aux(8) 26.44/8.28 s(12) =< it(14)*aux(4) 26.44/8.28 s(11) =< it(14)*aux(3) 26.44/8.28 s(9) =< s(10) 26.44/8.28 26.44/8.28 with precondition: [Out=0,V>=1,V2>=0] 26.44/8.28 26.44/8.28 * Chain [18]: 1 26.44/8.28 with precondition: [V=0,V2=Out,V2>=0] 26.44/8.28 26.44/8.28 * Chain [17]: 0 26.44/8.28 with precondition: [Out=0,V>=0,V2>=0] 26.44/8.28 26.44/8.28 26.44/8.28 #### Cost of chains of f(V,Out): 26.44/8.28 * Chain [22]: 1 26.44/8.28 with precondition: [V=0,Out=1] 26.44/8.28 26.44/8.28 * Chain [21]: 2 26.44/8.28 with precondition: [V=1,Out=1] 26.44/8.28 26.44/8.28 * Chain [20]: 4*s(22)+1*s(26)+1*s(27)+2*s(28)+1 26.44/8.28 Such that:s(21) =< V 26.44/8.28 s(22) =< s(21) 26.44/8.28 s(23) =< s(21)-1 26.44/8.28 s(24) =< s(21) 26.44/8.28 s(25) =< s(22)*s(21) 26.44/8.28 s(26) =< s(22)*s(23) 26.44/8.28 s(27) =< s(22)*s(24) 26.44/8.28 s(28) =< s(25) 26.44/8.28 26.44/8.28 with precondition: [Out=0,V>=0] 26.44/8.28 26.44/8.28 * Chain [19]: 4*s(30)+1*s(34)+1*s(35)+2*s(36)+2 26.44/8.28 Such that:s(29) =< V 26.44/8.28 s(30) =< s(29) 26.44/8.28 s(31) =< s(29)-1 26.44/8.28 s(32) =< s(29) 26.44/8.28 s(33) =< s(30)*s(29) 26.44/8.28 s(34) =< s(30)*s(31) 26.44/8.28 s(35) =< s(30)*s(32) 26.44/8.28 s(36) =< s(33) 26.44/8.28 26.44/8.28 with precondition: [V>=2,Out>=0] 26.44/8.28 26.44/8.28 26.44/8.28 #### Cost of chains of start(V,V2): 26.44/8.28 * Chain [25]: 16*s(38)+4*s(42)+4*s(43)+8*s(44)+2*s(69)+2 26.44/8.28 Such that:aux(9) =< V 26.44/8.28 aux(10) =< V2 26.44/8.28 s(69) =< aux(10) 26.44/8.28 s(38) =< aux(9) 26.44/8.28 s(39) =< aux(9)-1 26.44/8.28 s(40) =< aux(9) 26.44/8.28 s(41) =< s(38)*aux(9) 26.44/8.28 s(42) =< s(38)*s(39) 26.44/8.28 s(43) =< s(38)*s(40) 26.44/8.28 s(44) =< s(41) 26.44/8.28 26.44/8.28 with precondition: [V>=0] 26.44/8.28 26.44/8.28 * Chain [24]: 2 26.44/8.28 with precondition: [V=1] 26.44/8.28 26.44/8.28 * Chain [23]: 1 26.44/8.28 with precondition: [V2=0,V>=0] 26.44/8.28 26.44/8.28 26.44/8.28 Closed-form bounds of start(V,V2): 26.44/8.28 ------------------------------------- 26.44/8.28 * Chain [25] with precondition: [V>=0] 26.44/8.28 - Upper bound: 16*V+2+12*V*V+4*V*nat(V-1)+nat(V2)*2 26.44/8.28 - Complexity: n^2 26.44/8.28 * Chain [24] with precondition: [V=1] 26.44/8.28 - Upper bound: 2 26.44/8.28 - Complexity: constant 26.44/8.28 * Chain [23] with precondition: [V2=0,V>=0] 26.44/8.28 - Upper bound: 1 26.44/8.28 - Complexity: constant 26.44/8.28 26.44/8.28 ### Maximum cost of start(V,V2): max([1,16*V+1+12*V*V+4*V*nat(V-1)+nat(V2)*2])+1 26.44/8.28 Asymptotic class: n^2 26.44/8.28 * Total analysis performed in 207 ms. 26.44/8.28 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (12) 26.44/8.28 BOUNDS(1, n^2) 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (13) RenamingProof (BOTH BOUNDS(ID, ID)) 26.44/8.28 Renamed function symbols to avoid clashes with predefined symbol. 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (14) 26.44/8.28 Obligation: 26.44/8.28 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 26.44/8.28 26.44/8.28 26.44/8.28 The TRS R consists of the following rules: 26.44/8.28 26.44/8.28 f(0') -> 1' 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0', y) -> y 26.44/8.28 g(s(x), y) -> g(x, +'(y, s(x))) 26.44/8.28 +'(x, 0') -> x 26.44/8.28 +'(x, s(y)) -> s(+'(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+'(y, x))) 26.44/8.28 26.44/8.28 S is empty. 26.44/8.28 Rewrite Strategy: INNERMOST 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 26.44/8.28 Infered types. 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (16) 26.44/8.28 Obligation: 26.44/8.28 Innermost TRS: 26.44/8.28 Rules: 26.44/8.28 f(0') -> 1' 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0', y) -> y 26.44/8.28 g(s(x), y) -> g(x, +'(y, s(x))) 26.44/8.28 +'(x, 0') -> x 26.44/8.28 +'(x, s(y)) -> s(+'(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+'(y, x))) 26.44/8.28 26.44/8.28 Types: 26.44/8.28 f :: 0':1':s -> 0':1':s 26.44/8.28 0' :: 0':1':s 26.44/8.28 1' :: 0':1':s 26.44/8.28 s :: 0':1':s -> 0':1':s 26.44/8.28 g :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 +' :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 hole_0':1':s1_0 :: 0':1':s 26.44/8.28 gen_0':1':s2_0 :: Nat -> 0':1':s 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (17) OrderProof (LOWER BOUND(ID)) 26.44/8.28 Heuristically decided to analyse the following defined symbols: 26.44/8.28 g, +' 26.44/8.28 26.44/8.28 They will be analysed ascendingly in the following order: 26.44/8.28 +' < g 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (18) 26.44/8.28 Obligation: 26.44/8.28 Innermost TRS: 26.44/8.28 Rules: 26.44/8.28 f(0') -> 1' 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0', y) -> y 26.44/8.28 g(s(x), y) -> g(x, +'(y, s(x))) 26.44/8.28 +'(x, 0') -> x 26.44/8.28 +'(x, s(y)) -> s(+'(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+'(y, x))) 26.44/8.28 26.44/8.28 Types: 26.44/8.28 f :: 0':1':s -> 0':1':s 26.44/8.28 0' :: 0':1':s 26.44/8.28 1' :: 0':1':s 26.44/8.28 s :: 0':1':s -> 0':1':s 26.44/8.28 g :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 +' :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 hole_0':1':s1_0 :: 0':1':s 26.44/8.28 gen_0':1':s2_0 :: Nat -> 0':1':s 26.44/8.28 26.44/8.28 26.44/8.28 Generator Equations: 26.44/8.28 gen_0':1':s2_0(0) <=> 0' 26.44/8.28 gen_0':1':s2_0(+(x, 1)) <=> s(gen_0':1':s2_0(x)) 26.44/8.28 26.44/8.28 26.44/8.28 The following defined symbols remain to be analysed: 26.44/8.28 +', g 26.44/8.28 26.44/8.28 They will be analysed ascendingly in the following order: 26.44/8.28 +' < g 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (19) RewriteLemmaProof (LOWER BOUND(ID)) 26.44/8.28 Proved the following rewrite lemma: 26.44/8.28 +'(gen_0':1':s2_0(a), gen_0':1':s2_0(n4_0)) -> gen_0':1':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 26.44/8.28 26.44/8.28 Induction Base: 26.44/8.28 +'(gen_0':1':s2_0(a), gen_0':1':s2_0(0)) ->_R^Omega(1) 26.44/8.28 gen_0':1':s2_0(a) 26.44/8.28 26.44/8.28 Induction Step: 26.44/8.28 +'(gen_0':1':s2_0(a), gen_0':1':s2_0(+(n4_0, 1))) ->_R^Omega(1) 26.44/8.28 s(+'(gen_0':1':s2_0(a), gen_0':1':s2_0(n4_0))) ->_IH 26.44/8.28 s(gen_0':1':s2_0(+(a, c5_0))) 26.44/8.28 26.44/8.28 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (20) 26.44/8.28 Complex Obligation (BEST) 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (21) 26.44/8.28 Obligation: 26.44/8.28 Proved the lower bound n^1 for the following obligation: 26.44/8.28 26.44/8.28 Innermost TRS: 26.44/8.28 Rules: 26.44/8.28 f(0') -> 1' 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0', y) -> y 26.44/8.28 g(s(x), y) -> g(x, +'(y, s(x))) 26.44/8.28 +'(x, 0') -> x 26.44/8.28 +'(x, s(y)) -> s(+'(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+'(y, x))) 26.44/8.28 26.44/8.28 Types: 26.44/8.28 f :: 0':1':s -> 0':1':s 26.44/8.28 0' :: 0':1':s 26.44/8.28 1' :: 0':1':s 26.44/8.28 s :: 0':1':s -> 0':1':s 26.44/8.28 g :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 +' :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 hole_0':1':s1_0 :: 0':1':s 26.44/8.28 gen_0':1':s2_0 :: Nat -> 0':1':s 26.44/8.28 26.44/8.28 26.44/8.28 Generator Equations: 26.44/8.28 gen_0':1':s2_0(0) <=> 0' 26.44/8.28 gen_0':1':s2_0(+(x, 1)) <=> s(gen_0':1':s2_0(x)) 26.44/8.28 26.44/8.28 26.44/8.28 The following defined symbols remain to be analysed: 26.44/8.28 +', g 26.44/8.28 26.44/8.28 They will be analysed ascendingly in the following order: 26.44/8.28 +' < g 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (22) LowerBoundPropagationProof (FINISHED) 26.44/8.28 Propagated lower bound. 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (23) 26.44/8.28 BOUNDS(n^1, INF) 26.44/8.28 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (24) 26.44/8.28 Obligation: 26.44/8.28 Innermost TRS: 26.44/8.28 Rules: 26.44/8.28 f(0') -> 1' 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0', y) -> y 26.44/8.28 g(s(x), y) -> g(x, +'(y, s(x))) 26.44/8.28 +'(x, 0') -> x 26.44/8.28 +'(x, s(y)) -> s(+'(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+'(y, x))) 26.44/8.28 26.44/8.28 Types: 26.44/8.28 f :: 0':1':s -> 0':1':s 26.44/8.28 0' :: 0':1':s 26.44/8.28 1' :: 0':1':s 26.44/8.28 s :: 0':1':s -> 0':1':s 26.44/8.28 g :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 +' :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 hole_0':1':s1_0 :: 0':1':s 26.44/8.28 gen_0':1':s2_0 :: Nat -> 0':1':s 26.44/8.28 26.44/8.28 26.44/8.28 Lemmas: 26.44/8.28 +'(gen_0':1':s2_0(a), gen_0':1':s2_0(n4_0)) -> gen_0':1':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 26.44/8.28 26.44/8.28 26.44/8.28 Generator Equations: 26.44/8.28 gen_0':1':s2_0(0) <=> 0' 26.44/8.28 gen_0':1':s2_0(+(x, 1)) <=> s(gen_0':1':s2_0(x)) 26.44/8.28 26.44/8.28 26.44/8.28 The following defined symbols remain to be analysed: 26.44/8.28 g 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (25) RewriteLemmaProof (LOWER BOUND(ID)) 26.44/8.28 Proved the following rewrite lemma: 26.44/8.28 g(gen_0':1':s2_0(n513_0), gen_0':1':s2_0(b)) -> *3_0, rt in Omega(n513_0 + n513_0^2) 26.44/8.28 26.44/8.28 Induction Base: 26.44/8.28 g(gen_0':1':s2_0(0), gen_0':1':s2_0(b)) 26.44/8.28 26.44/8.28 Induction Step: 26.44/8.28 g(gen_0':1':s2_0(+(n513_0, 1)), gen_0':1':s2_0(b)) ->_R^Omega(1) 26.44/8.28 g(gen_0':1':s2_0(n513_0), +'(gen_0':1':s2_0(b), s(gen_0':1':s2_0(n513_0)))) ->_L^Omega(2 + n513_0) 26.44/8.28 g(gen_0':1':s2_0(n513_0), gen_0':1':s2_0(+(+(n513_0, 1), b))) ->_IH 26.44/8.28 *3_0 26.44/8.28 26.44/8.28 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (26) 26.44/8.28 Obligation: 26.44/8.28 Proved the lower bound n^2 for the following obligation: 26.44/8.28 26.44/8.28 Innermost TRS: 26.44/8.28 Rules: 26.44/8.28 f(0') -> 1' 26.44/8.28 f(s(x)) -> g(x, s(x)) 26.44/8.28 g(0', y) -> y 26.44/8.28 g(s(x), y) -> g(x, +'(y, s(x))) 26.44/8.28 +'(x, 0') -> x 26.44/8.28 +'(x, s(y)) -> s(+'(x, y)) 26.44/8.28 g(s(x), y) -> g(x, s(+'(y, x))) 26.44/8.28 26.44/8.28 Types: 26.44/8.28 f :: 0':1':s -> 0':1':s 26.44/8.28 0' :: 0':1':s 26.44/8.28 1' :: 0':1':s 26.44/8.28 s :: 0':1':s -> 0':1':s 26.44/8.28 g :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 +' :: 0':1':s -> 0':1':s -> 0':1':s 26.44/8.28 hole_0':1':s1_0 :: 0':1':s 26.44/8.28 gen_0':1':s2_0 :: Nat -> 0':1':s 26.44/8.28 26.44/8.28 26.44/8.28 Lemmas: 26.44/8.28 +'(gen_0':1':s2_0(a), gen_0':1':s2_0(n4_0)) -> gen_0':1':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 26.44/8.28 26.44/8.28 26.44/8.28 Generator Equations: 26.44/8.28 gen_0':1':s2_0(0) <=> 0' 26.44/8.28 gen_0':1':s2_0(+(x, 1)) <=> s(gen_0':1':s2_0(x)) 26.44/8.28 26.44/8.28 26.44/8.28 The following defined symbols remain to be analysed: 26.44/8.28 g 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (27) LowerBoundPropagationProof (FINISHED) 26.44/8.28 Propagated lower bound. 26.44/8.28 ---------------------------------------- 26.44/8.28 26.44/8.28 (28) 26.44/8.28 BOUNDS(n^2, INF) 26.85/8.93 EOF