1112.86/291.69 WORST_CASE(Omega(n^1), O(n^2)) 1112.86/291.70 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 1112.86/291.70 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1112.86/291.70 1112.86/291.70 1112.86/291.70 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1112.86/291.70 1112.86/291.70 (0) CpxTRS 1112.86/291.70 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 1112.86/291.70 (2) CpxWeightedTrs 1112.86/291.70 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1112.86/291.70 (4) CpxTypedWeightedTrs 1112.86/291.70 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 1112.86/291.70 (6) CpxTypedWeightedCompleteTrs 1112.86/291.70 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 5 ms] 1112.86/291.70 (8) CpxRNTS 1112.86/291.70 (9) CompleteCoflocoProof [FINISHED, 570 ms] 1112.86/291.70 (10) BOUNDS(1, n^2) 1112.86/291.70 (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 1112.86/291.70 (12) TRS for Loop Detection 1112.86/291.70 (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 1112.86/291.70 (14) BEST 1112.86/291.70 (15) proven lower bound 1112.86/291.70 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 1112.86/291.70 (17) BOUNDS(n^1, INF) 1112.86/291.70 (18) TRS for Loop Detection 1112.86/291.70 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (0) 1112.86/291.70 Obligation: 1112.86/291.70 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1112.86/291.70 1112.86/291.70 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) 1112.86/291.70 trunc(0) -> 0 1112.86/291.70 trunc(s(0)) -> 0 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) 1112.86/291.70 gt(0, v) -> false 1112.86/291.70 gt(s(u), 0) -> true 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) 1112.86/291.70 1112.86/291.70 S is empty. 1112.86/291.70 Rewrite Strategy: INNERMOST 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 1112.86/291.70 Transformed relative TRS to weighted TRS 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (2) 1112.86/291.70 Obligation: 1112.86/291.70 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 1112.86/291.70 1112.86/291.70 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) [1] 1112.86/291.70 trunc(0) -> 0 [1] 1112.86/291.70 trunc(s(0)) -> 0 [1] 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) [1] 1112.86/291.70 gt(0, v) -> false [1] 1112.86/291.70 gt(s(u), 0) -> true [1] 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) [1] 1112.86/291.70 1112.86/291.70 Rewrite Strategy: INNERMOST 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1112.86/291.70 Infered types. 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (4) 1112.86/291.70 Obligation: 1112.86/291.70 Runtime Complexity Weighted TRS with Types. 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) [1] 1112.86/291.70 trunc(0) -> 0 [1] 1112.86/291.70 trunc(s(0)) -> 0 [1] 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) [1] 1112.86/291.70 gt(0, v) -> false [1] 1112.86/291.70 gt(s(u), 0) -> true [1] 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) [1] 1112.86/291.70 1112.86/291.70 The TRS has the following type information: 1112.86/291.70 f :: true:false -> s:0 -> s:0 -> f 1112.86/291.70 true :: true:false 1112.86/291.70 gt :: s:0 -> s:0 -> true:false 1112.86/291.70 trunc :: s:0 -> s:0 1112.86/291.70 s :: s:0 -> s:0 1112.86/291.70 0 :: s:0 1112.86/291.70 false :: true:false 1112.86/291.70 1112.86/291.70 Rewrite Strategy: INNERMOST 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (5) CompletionProof (UPPER BOUND(ID)) 1112.86/291.70 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 1112.86/291.70 1112.86/291.70 f(v0, v1, v2) -> null_f [0] 1112.86/291.70 1112.86/291.70 And the following fresh constants: null_f 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (6) 1112.86/291.70 Obligation: 1112.86/291.70 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 1112.86/291.70 1112.86/291.70 Runtime Complexity Weighted TRS with Types. 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) [1] 1112.86/291.70 trunc(0) -> 0 [1] 1112.86/291.70 trunc(s(0)) -> 0 [1] 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) [1] 1112.86/291.70 gt(0, v) -> false [1] 1112.86/291.70 gt(s(u), 0) -> true [1] 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) [1] 1112.86/291.70 f(v0, v1, v2) -> null_f [0] 1112.86/291.70 1112.86/291.70 The TRS has the following type information: 1112.86/291.70 f :: true:false -> s:0 -> s:0 -> null_f 1112.86/291.70 true :: true:false 1112.86/291.70 gt :: s:0 -> s:0 -> true:false 1112.86/291.70 trunc :: s:0 -> s:0 1112.86/291.70 s :: s:0 -> s:0 1112.86/291.70 0 :: s:0 1112.86/291.70 false :: true:false 1112.86/291.70 null_f :: null_f 1112.86/291.70 1112.86/291.70 Rewrite Strategy: INNERMOST 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 1112.86/291.70 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 1112.86/291.70 The constant constructors are abstracted as follows: 1112.86/291.70 1112.86/291.70 true => 1 1112.86/291.70 0 => 0 1112.86/291.70 false => 0 1112.86/291.70 null_f => 0 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (8) 1112.86/291.70 Obligation: 1112.86/291.70 Complexity RNTS consisting of the following rules: 1112.86/291.70 1112.86/291.70 f(z, z', z'') -{ 1 }-> f(gt(x, y), trunc(x), 1 + y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 1112.86/291.70 f(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 1112.86/291.70 gt(z, z') -{ 1 }-> gt(u, v) :|: v >= 0, z' = 1 + v, z = 1 + u, u >= 0 1112.86/291.70 gt(z, z') -{ 1 }-> 1 :|: z = 1 + u, z' = 0, u >= 0 1112.86/291.70 gt(z, z') -{ 1 }-> 0 :|: v >= 0, z' = v, z = 0 1112.86/291.70 trunc(z) -{ 1 }-> 0 :|: z = 0 1112.86/291.70 trunc(z) -{ 1 }-> 0 :|: z = 1 + 0 1112.86/291.70 trunc(z) -{ 1 }-> 1 + (1 + trunc(x)) :|: x >= 0, z = 1 + (1 + x) 1112.86/291.70 1112.86/291.70 Only complete derivations are relevant for the runtime complexity. 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (9) CompleteCoflocoProof (FINISHED) 1112.86/291.70 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 1112.86/291.70 1112.86/291.70 eq(start(V1, V, V2),0,[f(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). 1112.86/291.70 eq(start(V1, V, V2),0,[trunc(V1, Out)],[V1 >= 0]). 1112.86/291.70 eq(start(V1, V, V2),0,[gt(V1, V, Out)],[V1 >= 0,V >= 0]). 1112.86/291.70 eq(f(V1, V, V2, Out),1,[gt(V4, V3, Ret0),trunc(V4, Ret1),f(Ret0, Ret1, 1 + V3, Ret)],[Out = Ret,V = V4,V2 = V3,V1 = 1,V4 >= 0,V3 >= 0]). 1112.86/291.70 eq(trunc(V1, Out),1,[],[Out = 0,V1 = 0]). 1112.86/291.70 eq(trunc(V1, Out),1,[],[Out = 0,V1 = 1]). 1112.86/291.70 eq(trunc(V1, Out),1,[trunc(V5, Ret11)],[Out = 2 + Ret11,V5 >= 0,V1 = 2 + V5]). 1112.86/291.70 eq(gt(V1, V, Out),1,[],[Out = 0,V6 >= 0,V = V6,V1 = 0]). 1112.86/291.70 eq(gt(V1, V, Out),1,[],[Out = 1,V1 = 1 + V7,V = 0,V7 >= 0]). 1112.86/291.70 eq(gt(V1, V, Out),1,[gt(V8, V9, Ret2)],[Out = Ret2,V9 >= 0,V = 1 + V9,V1 = 1 + V8,V8 >= 0]). 1112.86/291.70 eq(f(V1, V, V2, Out),0,[],[Out = 0,V11 >= 0,V2 = V12,V10 >= 0,V1 = V11,V = V10,V12 >= 0]). 1112.86/291.70 input_output_vars(f(V1,V,V2,Out),[V1,V,V2],[Out]). 1112.86/291.70 input_output_vars(trunc(V1,Out),[V1],[Out]). 1112.86/291.70 input_output_vars(gt(V1,V,Out),[V1,V],[Out]). 1112.86/291.70 1112.86/291.70 1112.86/291.70 CoFloCo proof output: 1112.86/291.70 Preprocessing Cost Relations 1112.86/291.70 ===================================== 1112.86/291.70 1112.86/291.70 #### Computed strongly connected components 1112.86/291.70 0. recursive : [gt/3] 1112.86/291.70 1. recursive : [trunc/2] 1112.86/291.70 2. recursive : [f/4] 1112.86/291.70 3. non_recursive : [start/3] 1112.86/291.70 1112.86/291.70 #### Obtained direct recursion through partial evaluation 1112.86/291.70 0. SCC is partially evaluated into gt/3 1112.86/291.70 1. SCC is partially evaluated into trunc/2 1112.86/291.70 2. SCC is partially evaluated into f/4 1112.86/291.70 3. SCC is partially evaluated into start/3 1112.86/291.70 1112.86/291.70 Control-Flow Refinement of Cost Relations 1112.86/291.70 ===================================== 1112.86/291.70 1112.86/291.70 ### Specialization of cost equations gt/3 1112.86/291.70 * CE 11 is refined into CE [12] 1112.86/291.70 * CE 10 is refined into CE [13] 1112.86/291.70 * CE 9 is refined into CE [14] 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Cost equations --> "Loop" of gt/3 1112.86/291.70 * CEs [13] --> Loop 10 1112.86/291.70 * CEs [14] --> Loop 11 1112.86/291.70 * CEs [12] --> Loop 12 1112.86/291.70 1112.86/291.70 ### Ranking functions of CR gt(V1,V,Out) 1112.86/291.70 * RF of phase [12]: [V,V1] 1112.86/291.70 1112.86/291.70 #### Partial ranking functions of CR gt(V1,V,Out) 1112.86/291.70 * Partial RF of phase [12]: 1112.86/291.70 - RF of loop [12:1]: 1112.86/291.70 V 1112.86/291.70 V1 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Specialization of cost equations trunc/2 1112.86/291.70 * CE 8 is refined into CE [15] 1112.86/291.70 * CE 7 is refined into CE [16] 1112.86/291.70 * CE 6 is refined into CE [17] 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Cost equations --> "Loop" of trunc/2 1112.86/291.70 * CEs [16] --> Loop 13 1112.86/291.70 * CEs [17] --> Loop 14 1112.86/291.70 * CEs [15] --> Loop 15 1112.86/291.70 1112.86/291.70 ### Ranking functions of CR trunc(V1,Out) 1112.86/291.70 * RF of phase [15]: [V1-1] 1112.86/291.70 1112.86/291.70 #### Partial ranking functions of CR trunc(V1,Out) 1112.86/291.70 * Partial RF of phase [15]: 1112.86/291.70 - RF of loop [15:1]: 1112.86/291.70 V1-1 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Specialization of cost equations f/4 1112.86/291.70 * CE 5 is refined into CE [18] 1112.86/291.70 * CE 4 is refined into CE [19,20,21,22,23,24,25,26,27] 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Cost equations --> "Loop" of f/4 1112.86/291.70 * CEs [26] --> Loop 16 1112.86/291.70 * CEs [27] --> Loop 17 1112.86/291.70 * CEs [25] --> Loop 18 1112.86/291.70 * CEs [24] --> Loop 19 1112.86/291.70 * CEs [22] --> Loop 20 1112.86/291.70 * CEs [21] --> Loop 21 1112.86/291.70 * CEs [23] --> Loop 22 1112.86/291.70 * CEs [20] --> Loop 23 1112.86/291.70 * CEs [19] --> Loop 24 1112.86/291.70 * CEs [18] --> Loop 25 1112.86/291.70 1112.86/291.70 ### Ranking functions of CR f(V1,V,V2,Out) 1112.86/291.70 * RF of phase [16,17]: [V-V2] 1112.86/291.70 1112.86/291.70 #### Partial ranking functions of CR f(V1,V,V2,Out) 1112.86/291.70 * Partial RF of phase [16,17]: 1112.86/291.70 - RF of loop [16:1]: 1112.86/291.70 V-V2 1112.86/291.70 - RF of loop [17:1]: 1112.86/291.70 V-2 1112.86/291.70 V/2-V2/2 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Specialization of cost equations start/3 1112.86/291.70 * CE 1 is refined into CE [28,29,30,31,32,33] 1112.86/291.70 * CE 2 is refined into CE [34,35,36,37] 1112.86/291.70 * CE 3 is refined into CE [38,39,40,41] 1112.86/291.70 1112.86/291.70 1112.86/291.70 ### Cost equations --> "Loop" of start/3 1112.86/291.70 * CEs [36,37,41] --> Loop 26 1112.86/291.70 * CEs [40] --> Loop 27 1112.86/291.70 * CEs [28] --> Loop 28 1112.86/291.70 * CEs [39] --> Loop 29 1112.86/291.70 * CEs [29,30,31,32,33,35] --> Loop 30 1112.86/291.70 * CEs [34,38] --> Loop 31 1112.86/291.70 1112.86/291.70 ### Ranking functions of CR start(V1,V,V2) 1112.86/291.70 1112.86/291.70 #### Partial ranking functions of CR start(V1,V,V2) 1112.86/291.70 1112.86/291.70 1112.86/291.70 Computing Bounds 1112.86/291.70 ===================================== 1112.86/291.70 1112.86/291.70 #### Cost of chains of gt(V1,V,Out): 1112.86/291.70 * Chain [[12],11]: 1*it(12)+1 1112.86/291.70 Such that:it(12) =< V1 1112.86/291.70 1112.86/291.70 with precondition: [Out=0,V1>=1,V>=V1] 1112.86/291.70 1112.86/291.70 * Chain [[12],10]: 1*it(12)+1 1112.86/291.70 Such that:it(12) =< V 1112.86/291.70 1112.86/291.70 with precondition: [Out=1,V>=1,V1>=V+1] 1112.86/291.70 1112.86/291.70 * Chain [11]: 1 1112.86/291.70 with precondition: [V1=0,Out=0,V>=0] 1112.86/291.70 1112.86/291.70 * Chain [10]: 1 1112.86/291.70 with precondition: [V=0,Out=1,V1>=1] 1112.86/291.70 1112.86/291.70 1112.86/291.70 #### Cost of chains of trunc(V1,Out): 1112.86/291.70 * Chain [[15],14]: 1*it(15)+1 1112.86/291.70 Such that:it(15) =< Out 1112.86/291.70 1112.86/291.70 with precondition: [V1=Out,V1>=2] 1112.86/291.70 1112.86/291.70 * Chain [[15],13]: 1*it(15)+1 1112.86/291.70 Such that:it(15) =< Out 1112.86/291.70 1112.86/291.70 with precondition: [V1=Out+1,V1>=3] 1112.86/291.70 1112.86/291.70 * Chain [14]: 1 1112.86/291.70 with precondition: [V1=0,Out=0] 1112.86/291.70 1112.86/291.70 * Chain [13]: 1 1112.86/291.70 with precondition: [V1=1,Out=0] 1112.86/291.70 1112.86/291.70 1112.86/291.70 #### Cost of chains of f(V1,V,V2,Out): 1112.86/291.70 * Chain [[16,17],25]: 3*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+0 1112.86/291.70 Such that:aux(5) =< V 1112.86/291.70 aux(6) =< V-V2 1112.86/291.70 aux(7) =< V-V2+1 1112.86/291.70 it(17) =< V/2-V2/2 1112.86/291.70 it(17) =< aux(5) 1112.86/291.70 it(16) =< aux(6) 1112.86/291.70 it(17) =< aux(6) 1112.86/291.70 it(16) =< aux(7) 1112.86/291.70 it(17) =< aux(7) 1112.86/291.70 aux(4) =< aux(5) 1112.86/291.70 aux(3) =< aux(5)-1 1112.86/291.70 s(9) =< it(16)*aux(5) 1112.86/291.70 s(11) =< it(17)*aux(4) 1112.86/291.70 s(12) =< it(17)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] 1112.86/291.70 1112.86/291.70 * Chain [[16,17],19,25]: 3*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+2*s(13)+3 1112.86/291.70 Such that:aux(6) =< V-V2 1112.86/291.70 aux(9) =< V 1112.86/291.70 aux(10) =< 2*V-V2 1112.86/291.70 it(17) =< aux(9) 1112.86/291.70 s(13) =< aux(10) 1112.86/291.70 it(16) =< aux(6) 1112.86/291.70 it(17) =< aux(6) 1112.86/291.70 it(16) =< aux(10) 1112.86/291.70 it(17) =< aux(10) 1112.86/291.70 aux(4) =< aux(9) 1112.86/291.70 aux(3) =< aux(9)-1 1112.86/291.70 s(9) =< it(16)*aux(9) 1112.86/291.70 s(11) =< it(17)*aux(4) 1112.86/291.70 s(12) =< it(17)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] 1112.86/291.70 1112.86/291.70 * Chain [[16,17],18,25]: 3*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+2*s(15)+3 1112.86/291.70 Such that:aux(6) =< V-V2 1112.86/291.70 aux(12) =< V 1112.86/291.70 aux(13) =< 2*V-V2 1112.86/291.70 it(17) =< aux(12) 1112.86/291.70 s(15) =< aux(13) 1112.86/291.70 it(16) =< aux(6) 1112.86/291.70 it(17) =< aux(6) 1112.86/291.70 it(16) =< aux(13) 1112.86/291.70 it(17) =< aux(13) 1112.86/291.70 aux(4) =< aux(12) 1112.86/291.70 aux(3) =< aux(12)-1 1112.86/291.70 s(9) =< it(16)*aux(12) 1112.86/291.70 s(11) =< it(17)*aux(4) 1112.86/291.70 s(12) =< it(17)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,Out=0,V>=3,V2>=1,V>=V2+1] 1112.86/291.70 1112.86/291.70 * Chain [25]: 0 1112.86/291.70 with precondition: [Out=0,V1>=0,V>=0,V2>=0] 1112.86/291.70 1112.86/291.70 * Chain [24,25]: 3 1112.86/291.70 with precondition: [V1=1,V=0,Out=0,V2>=0] 1112.86/291.70 1112.86/291.70 * Chain [23,25]: 3 1112.86/291.70 with precondition: [V1=1,V=1,V2=0,Out=0] 1112.86/291.70 1112.86/291.70 * Chain [23,24,25]: 6 1112.86/291.70 with precondition: [V1=1,V=1,V2=0,Out=0] 1112.86/291.70 1112.86/291.70 * Chain [22,25]: 1*s(17)+3 1112.86/291.70 Such that:s(17) =< 1 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V=1,Out=0,V2>=1] 1112.86/291.70 1112.86/291.70 * Chain [21,[16,17],25]: 4*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+3 1112.86/291.70 Such that:it(17) =< V/2 1112.86/291.70 aux(14) =< V 1112.86/291.70 it(16) =< aux(14) 1112.86/291.70 it(17) =< aux(14) 1112.86/291.70 aux(4) =< aux(14) 1112.86/291.70 aux(3) =< aux(14)-1 1112.86/291.70 s(9) =< it(16)*aux(14) 1112.86/291.70 s(11) =< it(17)*aux(4) 1112.86/291.70 s(12) =< it(17)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=2] 1112.86/291.70 1112.86/291.70 * Chain [21,[16,17],19,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(13)+1*s(18)+6 1112.86/291.70 Such that:aux(10) =< 2*V 1112.86/291.70 aux(15) =< V 1112.86/291.70 s(18) =< aux(15) 1112.86/291.70 it(16) =< aux(15) 1112.86/291.70 s(13) =< aux(10) 1112.86/291.70 it(16) =< aux(10) 1112.86/291.70 aux(4) =< aux(15) 1112.86/291.70 aux(3) =< aux(15)-1 1112.86/291.70 s(9) =< it(16)*aux(15) 1112.86/291.70 s(11) =< it(16)*aux(4) 1112.86/291.70 s(12) =< it(16)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=2] 1112.86/291.70 1112.86/291.70 * Chain [21,[16,17],18,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(15)+1*s(18)+6 1112.86/291.70 Such that:aux(13) =< 2*V 1112.86/291.70 aux(16) =< V 1112.86/291.70 s(18) =< aux(16) 1112.86/291.70 it(16) =< aux(16) 1112.86/291.70 s(15) =< aux(13) 1112.86/291.70 it(16) =< aux(13) 1112.86/291.70 aux(4) =< aux(16) 1112.86/291.70 aux(3) =< aux(16)-1 1112.86/291.70 s(9) =< it(16)*aux(16) 1112.86/291.70 s(11) =< it(16)*aux(4) 1112.86/291.70 s(12) =< it(16)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=3] 1112.86/291.70 1112.86/291.70 * Chain [21,25]: 1*s(18)+3 1112.86/291.70 Such that:s(18) =< V 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=2] 1112.86/291.70 1112.86/291.70 * Chain [20,[16,17],25]: 4*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+3 1112.86/291.70 Such that:it(17) =< V/2 1112.86/291.70 aux(17) =< V 1112.86/291.70 it(16) =< aux(17) 1112.86/291.70 it(17) =< aux(17) 1112.86/291.70 aux(4) =< aux(17) 1112.86/291.70 aux(3) =< aux(17)-1 1112.86/291.70 s(9) =< it(16)*aux(17) 1112.86/291.70 s(11) =< it(17)*aux(4) 1112.86/291.70 s(12) =< it(17)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=3] 1112.86/291.70 1112.86/291.70 * Chain [20,[16,17],19,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(13)+1*s(19)+6 1112.86/291.70 Such that:aux(10) =< 2*V 1112.86/291.70 aux(18) =< V 1112.86/291.70 s(19) =< aux(18) 1112.86/291.70 it(16) =< aux(18) 1112.86/291.70 s(13) =< aux(10) 1112.86/291.70 it(16) =< aux(10) 1112.86/291.70 aux(4) =< aux(18) 1112.86/291.70 aux(3) =< aux(18)-1 1112.86/291.70 s(9) =< it(16)*aux(18) 1112.86/291.70 s(11) =< it(16)*aux(4) 1112.86/291.70 s(12) =< it(16)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=3] 1112.86/291.70 1112.86/291.70 * Chain [20,[16,17],18,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(15)+1*s(19)+6 1112.86/291.70 Such that:aux(13) =< 2*V 1112.86/291.70 aux(19) =< V 1112.86/291.70 s(19) =< aux(19) 1112.86/291.70 it(16) =< aux(19) 1112.86/291.70 s(15) =< aux(13) 1112.86/291.70 it(16) =< aux(13) 1112.86/291.70 aux(4) =< aux(19) 1112.86/291.70 aux(3) =< aux(19)-1 1112.86/291.70 s(9) =< it(16)*aux(19) 1112.86/291.70 s(11) =< it(16)*aux(4) 1112.86/291.70 s(12) =< it(16)*aux(3) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=4] 1112.86/291.70 1112.86/291.70 * Chain [20,25]: 1*s(19)+3 1112.86/291.70 Such that:s(19) =< V 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,V2=0,Out=0,V>=3] 1112.86/291.70 1112.86/291.70 * Chain [19,25]: 2*s(13)+3 1112.86/291.70 Such that:aux(8) =< V 1112.86/291.70 s(13) =< aux(8) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,Out=0,V>=2,V2>=V] 1112.86/291.70 1112.86/291.70 * Chain [18,25]: 2*s(15)+3 1112.86/291.70 Such that:aux(11) =< V 1112.86/291.70 s(15) =< aux(11) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1,Out=0,V>=3,V2>=V] 1112.86/291.70 1112.86/291.70 1112.86/291.70 #### Cost of chains of start(V1,V,V2): 1112.86/291.70 * Chain [31]: 1 1112.86/291.70 with precondition: [V1=0] 1112.86/291.70 1112.86/291.70 * Chain [30]: 1*s(114)+18*s(118)+6*s(119)+24*s(120)+8*s(121)+8*s(124)+4*s(125)+4*s(126)+4*s(127)+2*s(128)+2*s(129)+3*s(133)+3*s(137)+2*s(140)+1*s(141)+1*s(142)+6*s(143)+4*s(144)+6*s(145)+4*s(146)+2*s(147)+2*s(148)+6 1112.86/291.70 Such that:s(114) =< 1 1112.86/291.70 s(135) =< V-V2 1112.86/291.70 s(132) =< V-V2+1 1112.86/291.70 s(116) =< 2*V 1112.86/291.70 s(136) =< 2*V-V2 1112.86/291.70 s(117) =< V/2 1112.86/291.70 s(133) =< V/2-V2/2 1112.86/291.70 aux(27) =< V 1112.86/291.70 s(118) =< aux(27) 1112.86/291.70 s(119) =< s(117) 1112.86/291.70 s(120) =< aux(27) 1112.86/291.70 s(121) =< s(116) 1112.86/291.70 s(120) =< s(116) 1112.86/291.70 s(122) =< aux(27) 1112.86/291.70 s(123) =< aux(27)-1 1112.86/291.70 s(124) =< s(120)*aux(27) 1112.86/291.70 s(125) =< s(120)*s(122) 1112.86/291.70 s(126) =< s(120)*s(123) 1112.86/291.70 s(119) =< aux(27) 1112.86/291.70 s(127) =< s(118)*aux(27) 1112.86/291.70 s(128) =< s(119)*s(122) 1112.86/291.70 s(129) =< s(119)*s(123) 1112.86/291.70 s(133) =< aux(27) 1112.86/291.70 s(137) =< s(135) 1112.86/291.70 s(133) =< s(135) 1112.86/291.70 s(137) =< s(132) 1112.86/291.70 s(133) =< s(132) 1112.86/291.70 s(140) =< s(137)*aux(27) 1112.86/291.70 s(141) =< s(133)*s(122) 1112.86/291.70 s(142) =< s(133)*s(123) 1112.86/291.70 s(143) =< aux(27) 1112.86/291.70 s(144) =< s(136) 1112.86/291.70 s(145) =< s(135) 1112.86/291.70 s(143) =< s(135) 1112.86/291.70 s(145) =< s(136) 1112.86/291.70 s(143) =< s(136) 1112.86/291.70 s(146) =< s(145)*aux(27) 1112.86/291.70 s(147) =< s(143)*s(122) 1112.86/291.70 s(148) =< s(143)*s(123) 1112.86/291.70 1112.86/291.70 with precondition: [V1=1] 1112.86/291.70 1112.86/291.70 * Chain [29]: 1 1112.86/291.70 with precondition: [V=0,V1>=1] 1112.86/291.70 1112.86/291.70 * Chain [28]: 3 1112.86/291.70 with precondition: [V1>=0,V>=0,V2>=0] 1112.86/291.70 1112.86/291.70 * Chain [27]: 1*s(149)+1 1112.86/291.70 Such that:s(149) =< V1 1112.86/291.70 1112.86/291.70 with precondition: [V1>=1,V>=V1] 1112.86/291.70 1112.86/291.70 * Chain [26]: 2*s(150)+1*s(152)+1 1112.86/291.70 Such that:s(152) =< V 1112.86/291.70 aux(28) =< V1 1112.86/291.70 s(150) =< aux(28) 1112.86/291.70 1112.86/291.70 with precondition: [V1>=2] 1112.86/291.70 1112.86/291.70 1112.86/291.70 Closed-form bounds of start(V1,V,V2): 1112.86/291.70 ------------------------------------- 1112.86/291.70 * Chain [31] with precondition: [V1=0] 1112.86/291.70 - Upper bound: 1 1112.86/291.70 - Complexity: constant 1112.86/291.70 * Chain [30] with precondition: [V1=1] 1112.86/291.70 - Upper bound: nat(V)*48+7+nat(V)*18*nat(V)+nat(V)*6*nat(nat(V)+ -1)+nat(V)*6*nat(V-V2)+nat(V/2-V2/2)*nat(V)+nat(V)*2*nat(V/2)+nat(V/2-V2/2)*nat(nat(V)+ -1)+nat(nat(V)+ -1)*2*nat(V/2)+nat(2*V)*8+nat(V-V2)*9+nat(2*V-V2)*4+nat(V/2-V2/2)*3+nat(V/2)*6 1112.86/291.70 - Complexity: n^2 1112.86/291.70 * Chain [29] with precondition: [V=0,V1>=1] 1112.86/291.70 - Upper bound: 1 1112.86/291.70 - Complexity: constant 1112.86/291.70 * Chain [28] with precondition: [V1>=0,V>=0,V2>=0] 1112.86/291.70 - Upper bound: 3 1112.86/291.70 - Complexity: constant 1112.86/291.70 * Chain [27] with precondition: [V1>=1,V>=V1] 1112.86/291.70 - Upper bound: V1+1 1112.86/291.70 - Complexity: n 1112.86/291.70 * Chain [26] with precondition: [V1>=2] 1112.86/291.70 - Upper bound: 2*V1+1+nat(V) 1112.86/291.70 - Complexity: n 1112.86/291.70 1112.86/291.70 ### Maximum cost of start(V1,V,V2): max([max([2,nat(V)*48+6+nat(V)*18*nat(V)+nat(V)*6*nat(nat(V)+ -1)+nat(V)*6*nat(V-V2)+nat(V/2-V2/2)*nat(V)+nat(V)*2*nat(V/2)+nat(V/2-V2/2)*nat(nat(V)+ -1)+nat(nat(V)+ -1)*2*nat(V/2)+nat(2*V)*8+nat(V-V2)*9+nat(2*V-V2)*4+nat(V/2-V2/2)*3+nat(V/2)*6]),nat(V)+V1+V1])+1 1112.86/291.70 Asymptotic class: n^2 1112.86/291.70 * Total analysis performed in 482 ms. 1112.86/291.70 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (10) 1112.86/291.70 BOUNDS(1, n^2) 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 1112.86/291.70 Transformed a relative TRS into a decreasing-loop problem. 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (12) 1112.86/291.70 Obligation: 1112.86/291.70 Analyzing the following TRS for decreasing loops: 1112.86/291.70 1112.86/291.70 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1112.86/291.70 1112.86/291.70 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) 1112.86/291.70 trunc(0) -> 0 1112.86/291.70 trunc(s(0)) -> 0 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) 1112.86/291.70 gt(0, v) -> false 1112.86/291.70 gt(s(u), 0) -> true 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) 1112.86/291.70 1112.86/291.70 S is empty. 1112.86/291.70 Rewrite Strategy: INNERMOST 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (13) DecreasingLoopProof (LOWER BOUND(ID)) 1112.86/291.70 The following loop(s) give(s) rise to the lower bound Omega(n^1): 1112.86/291.70 1112.86/291.70 The rewrite sequence 1112.86/291.70 1112.86/291.70 gt(s(u), s(v)) ->^+ gt(u, v) 1112.86/291.70 1112.86/291.70 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 1112.86/291.70 1112.86/291.70 The pumping substitution is [u / s(u), v / s(v)]. 1112.86/291.70 1112.86/291.70 The result substitution is [ ]. 1112.86/291.70 1112.86/291.70 1112.86/291.70 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (14) 1112.86/291.70 Complex Obligation (BEST) 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (15) 1112.86/291.70 Obligation: 1112.86/291.70 Proved the lower bound n^1 for the following obligation: 1112.86/291.70 1112.86/291.70 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1112.86/291.70 1112.86/291.70 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) 1112.86/291.70 trunc(0) -> 0 1112.86/291.70 trunc(s(0)) -> 0 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) 1112.86/291.70 gt(0, v) -> false 1112.86/291.70 gt(s(u), 0) -> true 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) 1112.86/291.70 1112.86/291.70 S is empty. 1112.86/291.70 Rewrite Strategy: INNERMOST 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (16) LowerBoundPropagationProof (FINISHED) 1112.86/291.70 Propagated lower bound. 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (17) 1112.86/291.70 BOUNDS(n^1, INF) 1112.86/291.70 1112.86/291.70 ---------------------------------------- 1112.86/291.70 1112.86/291.70 (18) 1112.86/291.70 Obligation: 1112.86/291.70 Analyzing the following TRS for decreasing loops: 1112.86/291.70 1112.86/291.70 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1112.86/291.70 1112.86/291.70 1112.86/291.70 The TRS R consists of the following rules: 1112.86/291.70 1112.86/291.70 f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) 1112.86/291.70 trunc(0) -> 0 1112.86/291.70 trunc(s(0)) -> 0 1112.86/291.70 trunc(s(s(x))) -> s(s(trunc(x))) 1112.86/291.70 gt(0, v) -> false 1112.86/291.70 gt(s(u), 0) -> true 1112.86/291.70 gt(s(u), s(v)) -> gt(u, v) 1112.86/291.70 1112.86/291.70 S is empty. 1112.86/291.70 Rewrite Strategy: INNERMOST 1113.03/291.77 EOF