1129.68/291.83 WORST_CASE(Omega(n^1), O(n^2)) 1140.58/294.56 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 1140.58/294.56 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1140.58/294.56 1140.58/294.56 1140.58/294.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1140.58/294.56 1140.58/294.56 (0) CpxTRS 1140.58/294.56 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 1140.58/294.56 (2) CpxTRS 1140.58/294.56 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 1140.58/294.56 (4) CpxWeightedTrs 1140.58/294.56 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1140.58/294.56 (6) CpxTypedWeightedTrs 1140.58/294.56 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 1140.58/294.56 (8) CpxTypedWeightedCompleteTrs 1140.58/294.56 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 1140.58/294.56 (10) CpxRNTS 1140.58/294.56 (11) CompleteCoflocoProof [FINISHED, 361 ms] 1140.58/294.56 (12) BOUNDS(1, n^2) 1140.58/294.56 (13) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 1140.58/294.56 (14) TRS for Loop Detection 1140.58/294.56 (15) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 1140.58/294.56 (16) BEST 1140.58/294.56 (17) proven lower bound 1140.58/294.56 (18) LowerBoundPropagationProof [FINISHED, 0 ms] 1140.58/294.56 (19) BOUNDS(n^1, INF) 1140.58/294.56 (20) TRS for Loop Detection 1140.58/294.56 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (0) 1140.58/294.56 Obligation: 1140.58/294.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1140.58/294.56 1140.58/294.56 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) 1140.58/294.56 min(0, v) -> 0 1140.58/294.56 min(u, 0) -> 0 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) 1140.58/294.56 equal(0, 0) -> true 1140.58/294.56 equal(s(x), 0) -> false 1140.58/294.56 equal(0, s(y)) -> false 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) 1140.58/294.56 1140.58/294.56 S is empty. 1140.58/294.56 Rewrite Strategy: FULL 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 1140.58/294.56 Converted rc-obligation to irc-obligation. 1140.58/294.56 1140.58/294.56 The duplicating contexts are: 1140.58/294.56 minus([], y) 1140.58/294.56 minus(x, []) 1140.58/294.56 1140.58/294.56 1140.58/294.56 The defined contexts are: 1140.58/294.56 cond([], x1, x2) 1140.58/294.56 equal([], x1) 1140.58/294.56 1140.58/294.56 1140.58/294.56 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (2) 1140.58/294.56 Obligation: 1140.58/294.56 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2). 1140.58/294.56 1140.58/294.56 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) 1140.58/294.56 min(0, v) -> 0 1140.58/294.56 min(u, 0) -> 0 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) 1140.58/294.56 equal(0, 0) -> true 1140.58/294.56 equal(s(x), 0) -> false 1140.58/294.56 equal(0, s(y)) -> false 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) 1140.58/294.56 1140.58/294.56 S is empty. 1140.58/294.56 Rewrite Strategy: INNERMOST 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 1140.58/294.56 Transformed relative TRS to weighted TRS 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (4) 1140.58/294.56 Obligation: 1140.58/294.56 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 1140.58/294.56 1140.58/294.56 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) [1] 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) [1] 1140.58/294.56 min(0, v) -> 0 [1] 1140.58/294.56 min(u, 0) -> 0 [1] 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) [1] 1140.58/294.56 equal(0, 0) -> true [1] 1140.58/294.56 equal(s(x), 0) -> false [1] 1140.58/294.56 equal(0, s(y)) -> false [1] 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) [1] 1140.58/294.56 1140.58/294.56 Rewrite Strategy: INNERMOST 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1140.58/294.56 Infered types. 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (6) 1140.58/294.56 Obligation: 1140.58/294.56 Runtime Complexity Weighted TRS with Types. 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) [1] 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) [1] 1140.58/294.56 min(0, v) -> 0 [1] 1140.58/294.56 min(u, 0) -> 0 [1] 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) [1] 1140.58/294.56 equal(0, 0) -> true [1] 1140.58/294.56 equal(s(x), 0) -> false [1] 1140.58/294.56 equal(0, s(y)) -> false [1] 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) [1] 1140.58/294.56 1140.58/294.56 The TRS has the following type information: 1140.58/294.56 minus :: s:0 -> s:0 -> s:0 1140.58/294.56 cond :: true:false -> s:0 -> s:0 -> s:0 1140.58/294.56 equal :: s:0 -> s:0 -> true:false 1140.58/294.56 min :: s:0 -> s:0 -> s:0 1140.58/294.56 true :: true:false 1140.58/294.56 s :: s:0 -> s:0 1140.58/294.56 0 :: s:0 1140.58/294.56 false :: true:false 1140.58/294.56 1140.58/294.56 Rewrite Strategy: INNERMOST 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (7) CompletionProof (UPPER BOUND(ID)) 1140.58/294.56 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 1140.58/294.56 1140.58/294.56 cond(v0, v1, v2) -> null_cond [0] 1140.58/294.56 min(v0, v1) -> null_min [0] 1140.58/294.56 equal(v0, v1) -> null_equal [0] 1140.58/294.56 1140.58/294.56 And the following fresh constants: null_cond, null_min, null_equal 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (8) 1140.58/294.56 Obligation: 1140.58/294.56 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 1140.58/294.56 1140.58/294.56 Runtime Complexity Weighted TRS with Types. 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) [1] 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) [1] 1140.58/294.56 min(0, v) -> 0 [1] 1140.58/294.56 min(u, 0) -> 0 [1] 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) [1] 1140.58/294.56 equal(0, 0) -> true [1] 1140.58/294.56 equal(s(x), 0) -> false [1] 1140.58/294.56 equal(0, s(y)) -> false [1] 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) [1] 1140.58/294.56 cond(v0, v1, v2) -> null_cond [0] 1140.58/294.56 min(v0, v1) -> null_min [0] 1140.58/294.56 equal(v0, v1) -> null_equal [0] 1140.58/294.56 1140.58/294.56 The TRS has the following type information: 1140.58/294.56 minus :: s:0:null_cond:null_min -> s:0:null_cond:null_min -> s:0:null_cond:null_min 1140.58/294.56 cond :: true:false:null_equal -> s:0:null_cond:null_min -> s:0:null_cond:null_min -> s:0:null_cond:null_min 1140.58/294.56 equal :: s:0:null_cond:null_min -> s:0:null_cond:null_min -> true:false:null_equal 1140.58/294.56 min :: s:0:null_cond:null_min -> s:0:null_cond:null_min -> s:0:null_cond:null_min 1140.58/294.56 true :: true:false:null_equal 1140.58/294.56 s :: s:0:null_cond:null_min -> s:0:null_cond:null_min 1140.58/294.56 0 :: s:0:null_cond:null_min 1140.58/294.56 false :: true:false:null_equal 1140.58/294.56 null_cond :: s:0:null_cond:null_min 1140.58/294.56 null_min :: s:0:null_cond:null_min 1140.58/294.56 null_equal :: true:false:null_equal 1140.58/294.56 1140.58/294.56 Rewrite Strategy: INNERMOST 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 1140.58/294.56 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 1140.58/294.56 The constant constructors are abstracted as follows: 1140.58/294.56 1140.58/294.56 true => 2 1140.58/294.56 0 => 0 1140.58/294.56 false => 1 1140.58/294.56 null_cond => 0 1140.58/294.56 null_min => 0 1140.58/294.56 null_equal => 0 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (10) 1140.58/294.56 Obligation: 1140.58/294.56 Complexity RNTS consisting of the following rules: 1140.58/294.56 1140.58/294.56 cond(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 1140.58/294.56 cond(z, z', z'') -{ 1 }-> 1 + minus(x, 1 + y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 1140.58/294.56 equal(z, z') -{ 1 }-> equal(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 1140.58/294.56 equal(z, z') -{ 1 }-> 2 :|: z = 0, z' = 0 1140.58/294.56 equal(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 1140.58/294.56 equal(z, z') -{ 1 }-> 1 :|: z' = 1 + y, y >= 0, z = 0 1140.58/294.56 equal(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1140.58/294.56 min(z, z') -{ 1 }-> 0 :|: v >= 0, z' = v, z = 0 1140.58/294.56 min(z, z') -{ 1 }-> 0 :|: z = u, z' = 0, u >= 0 1140.58/294.56 min(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 1140.58/294.56 min(z, z') -{ 1 }-> 1 + min(u, v) :|: v >= 0, z' = 1 + v, z = 1 + u, u >= 0 1140.58/294.56 minus(z, z') -{ 1 }-> cond(equal(min(x, y), y), x, y) :|: x >= 0, y >= 0, z = x, z' = y 1140.58/294.56 1140.58/294.56 Only complete derivations are relevant for the runtime complexity. 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (11) CompleteCoflocoProof (FINISHED) 1140.58/294.56 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 1140.58/294.56 1140.58/294.56 eq(start(V1, V, V5),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). 1140.58/294.56 eq(start(V1, V, V5),0,[cond(V1, V, V5, Out)],[V1 >= 0,V >= 0,V5 >= 0]). 1140.58/294.56 eq(start(V1, V, V5),0,[min(V1, V, Out)],[V1 >= 0,V >= 0]). 1140.58/294.56 eq(start(V1, V, V5),0,[equal(V1, V, Out)],[V1 >= 0,V >= 0]). 1140.58/294.56 eq(minus(V1, V, Out),1,[min(V3, V2, Ret00),equal(Ret00, V2, Ret0),cond(Ret0, V3, V2, Ret)],[Out = Ret,V3 >= 0,V2 >= 0,V1 = V3,V = V2]). 1140.58/294.56 eq(cond(V1, V, V5, Out),1,[minus(V4, 1 + V6, Ret1)],[Out = 1 + Ret1,V1 = 2,V = V4,V5 = V6,V4 >= 0,V6 >= 0]). 1140.58/294.56 eq(min(V1, V, Out),1,[],[Out = 0,V7 >= 0,V = V7,V1 = 0]). 1140.58/294.56 eq(min(V1, V, Out),1,[],[Out = 0,V1 = V8,V = 0,V8 >= 0]). 1140.58/294.56 eq(min(V1, V, Out),1,[min(V9, V10, Ret11)],[Out = 1 + Ret11,V10 >= 0,V = 1 + V10,V1 = 1 + V9,V9 >= 0]). 1140.58/294.56 eq(equal(V1, V, Out),1,[],[Out = 2,V1 = 0,V = 0]). 1140.58/294.56 eq(equal(V1, V, Out),1,[],[Out = 1,V11 >= 0,V1 = 1 + V11,V = 0]). 1140.58/294.56 eq(equal(V1, V, Out),1,[],[Out = 1,V = 1 + V12,V12 >= 0,V1 = 0]). 1140.58/294.56 eq(equal(V1, V, Out),1,[equal(V13, V14, Ret2)],[Out = Ret2,V = 1 + V14,V13 >= 0,V14 >= 0,V1 = 1 + V13]). 1140.58/294.56 eq(cond(V1, V, V5, Out),0,[],[Out = 0,V16 >= 0,V5 = V17,V15 >= 0,V1 = V16,V = V15,V17 >= 0]). 1140.58/294.56 eq(min(V1, V, Out),0,[],[Out = 0,V19 >= 0,V18 >= 0,V1 = V19,V = V18]). 1140.58/294.56 eq(equal(V1, V, Out),0,[],[Out = 0,V21 >= 0,V20 >= 0,V1 = V21,V = V20]). 1140.58/294.56 input_output_vars(minus(V1,V,Out),[V1,V],[Out]). 1140.58/294.56 input_output_vars(cond(V1,V,V5,Out),[V1,V,V5],[Out]). 1140.58/294.56 input_output_vars(min(V1,V,Out),[V1,V],[Out]). 1140.58/294.56 input_output_vars(equal(V1,V,Out),[V1,V],[Out]). 1140.58/294.56 1140.58/294.56 1140.58/294.56 CoFloCo proof output: 1140.58/294.56 Preprocessing Cost Relations 1140.58/294.56 ===================================== 1140.58/294.56 1140.58/294.56 #### Computed strongly connected components 1140.58/294.56 0. recursive : [equal/3] 1140.58/294.56 1. recursive : [min/3] 1140.58/294.56 2. recursive : [cond/4,minus/3] 1140.58/294.56 3. non_recursive : [start/3] 1140.58/294.56 1140.58/294.56 #### Obtained direct recursion through partial evaluation 1140.58/294.56 0. SCC is partially evaluated into equal/3 1140.58/294.56 1. SCC is partially evaluated into min/3 1140.58/294.56 2. SCC is partially evaluated into minus/3 1140.58/294.56 3. SCC is partially evaluated into start/3 1140.58/294.56 1140.58/294.56 Control-Flow Refinement of Cost Relations 1140.58/294.56 ===================================== 1140.58/294.56 1140.58/294.56 ### Specialization of cost equations equal/3 1140.58/294.56 * CE 16 is refined into CE [17] 1140.58/294.56 * CE 13 is refined into CE [18] 1140.58/294.56 * CE 14 is refined into CE [19] 1140.58/294.56 * CE 12 is refined into CE [20] 1140.58/294.56 * CE 15 is refined into CE [21] 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Cost equations --> "Loop" of equal/3 1140.58/294.56 * CEs [21] --> Loop 12 1140.58/294.56 * CEs [17] --> Loop 13 1140.58/294.56 * CEs [18] --> Loop 14 1140.58/294.56 * CEs [19] --> Loop 15 1140.58/294.56 * CEs [20] --> Loop 16 1140.58/294.56 1140.58/294.56 ### Ranking functions of CR equal(V1,V,Out) 1140.58/294.56 * RF of phase [12]: [V,V1] 1140.58/294.56 1140.58/294.56 #### Partial ranking functions of CR equal(V1,V,Out) 1140.58/294.56 * Partial RF of phase [12]: 1140.58/294.56 - RF of loop [12:1]: 1140.58/294.56 V 1140.58/294.56 V1 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Specialization of cost equations min/3 1140.58/294.56 * CE 9 is refined into CE [22] 1140.58/294.56 * CE 8 is refined into CE [23] 1140.58/294.56 * CE 11 is refined into CE [24] 1140.58/294.56 * CE 10 is refined into CE [25] 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Cost equations --> "Loop" of min/3 1140.58/294.56 * CEs [25] --> Loop 17 1140.58/294.56 * CEs [22] --> Loop 18 1140.58/294.56 * CEs [23,24] --> Loop 19 1140.58/294.56 1140.58/294.56 ### Ranking functions of CR min(V1,V,Out) 1140.58/294.56 * RF of phase [17]: [V,V1] 1140.58/294.56 1140.58/294.56 #### Partial ranking functions of CR min(V1,V,Out) 1140.58/294.56 * Partial RF of phase [17]: 1140.58/294.56 - RF of loop [17:1]: 1140.58/294.56 V 1140.58/294.56 V1 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Specialization of cost equations minus/3 1140.58/294.56 * CE 7 is refined into CE [26,27] 1140.58/294.56 * CE 6 is refined into CE [28,29,30,31,32,33] 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Cost equations --> "Loop" of minus/3 1140.58/294.56 * CEs [28,29,30,31,32,33] --> Loop 20 1140.58/294.56 * CEs [27] --> Loop 21 1140.58/294.56 * CEs [26] --> Loop 22 1140.58/294.56 1140.58/294.56 ### Ranking functions of CR minus(V1,V,Out) 1140.58/294.56 * RF of phase [21]: [V1-V+1] 1140.58/294.56 1140.58/294.56 #### Partial ranking functions of CR minus(V1,V,Out) 1140.58/294.56 * Partial RF of phase [21]: 1140.58/294.56 - RF of loop [21:1]: 1140.58/294.56 V1-V+1 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Specialization of cost equations start/3 1140.58/294.56 * CE 1 is refined into CE [34] 1140.58/294.56 * CE 2 is refined into CE [35,36] 1140.58/294.56 * CE 3 is refined into CE [37,38,39,40] 1140.58/294.56 * CE 4 is refined into CE [41,42] 1140.58/294.56 * CE 5 is refined into CE [43,44,45,46,47,48,49] 1140.58/294.56 1140.58/294.56 1140.58/294.56 ### Cost equations --> "Loop" of start/3 1140.58/294.56 * CEs [49] --> Loop 23 1140.58/294.56 * CEs [35,36] --> Loop 24 1140.58/294.56 * CEs [44] --> Loop 25 1140.58/294.56 * CEs [34,37,38,39,40,41,42,43,45,46,47,48] --> Loop 26 1140.58/294.56 1140.58/294.56 ### Ranking functions of CR start(V1,V,V5) 1140.58/294.56 1140.58/294.56 #### Partial ranking functions of CR start(V1,V,V5) 1140.58/294.56 1140.58/294.56 1140.58/294.56 Computing Bounds 1140.58/294.56 ===================================== 1140.58/294.56 1140.58/294.56 #### Cost of chains of equal(V1,V,Out): 1140.58/294.56 * Chain [[12],16]: 1*it(12)+1 1140.58/294.56 Such that:it(12) =< V1 1140.58/294.56 1140.58/294.56 with precondition: [Out=2,V1=V,V1>=1] 1140.58/294.56 1140.58/294.56 * Chain [[12],15]: 1*it(12)+1 1140.58/294.56 Such that:it(12) =< V1 1140.58/294.56 1140.58/294.56 with precondition: [Out=1,V1>=1,V>=V1+1] 1140.58/294.56 1140.58/294.56 * Chain [[12],14]: 1*it(12)+1 1140.58/294.56 Such that:it(12) =< V 1140.58/294.56 1140.58/294.56 with precondition: [Out=1,V>=1,V1>=V+1] 1140.58/294.56 1140.58/294.56 * Chain [[12],13]: 1*it(12)+0 1140.58/294.56 Such that:it(12) =< V 1140.58/294.56 1140.58/294.56 with precondition: [Out=0,V1>=1,V>=1] 1140.58/294.56 1140.58/294.56 * Chain [16]: 1 1140.58/294.56 with precondition: [V1=0,V=0,Out=2] 1140.58/294.56 1140.58/294.56 * Chain [15]: 1 1140.58/294.56 with precondition: [V1=0,Out=1,V>=1] 1140.58/294.56 1140.58/294.56 * Chain [14]: 1 1140.58/294.56 with precondition: [V=0,Out=1,V1>=1] 1140.58/294.56 1140.58/294.56 * Chain [13]: 0 1140.58/294.56 with precondition: [Out=0,V1>=0,V>=0] 1140.58/294.56 1140.58/294.56 1140.58/294.56 #### Cost of chains of min(V1,V,Out): 1140.58/294.56 * Chain [[17],19]: 1*it(17)+1 1140.58/294.56 Such that:it(17) =< Out 1140.58/294.56 1140.58/294.56 with precondition: [Out>=1,V1>=Out,V>=Out] 1140.58/294.56 1140.58/294.56 * Chain [[17],18]: 1*it(17)+1 1140.58/294.56 Such that:it(17) =< Out 1140.58/294.56 1140.58/294.56 with precondition: [V=Out,V>=1,V1>=V] 1140.58/294.56 1140.58/294.56 * Chain [19]: 1 1140.58/294.56 with precondition: [Out=0,V1>=0,V>=0] 1140.58/294.56 1140.58/294.56 * Chain [18]: 1 1140.58/294.56 with precondition: [V=0,Out=0,V1>=0] 1140.58/294.56 1140.58/294.56 1140.58/294.56 #### Cost of chains of minus(V1,V,Out): 1140.58/294.56 * Chain [[21],20]: 4*it(21)+10*s(4)+3*s(19)+3 1140.58/294.56 Such that:aux(7) =< V1+1 1140.58/294.56 aux(5) =< V+Out 1140.58/294.56 it(21) =< Out 1140.58/294.56 s(4) =< aux(5) 1140.58/294.56 s(20) =< it(21)*aux(7) 1140.58/294.56 s(19) =< s(20) 1140.58/294.56 1140.58/294.56 with precondition: [V>=1,Out>=1,V1+1>=Out+V] 1140.58/294.56 1140.58/294.56 * Chain [22,[21],20]: 14*it(21)+3*s(19)+7 1140.58/294.56 Such that:aux(7) =< V1+1 1140.58/294.56 aux(8) =< Out 1140.58/294.56 it(21) =< aux(8) 1140.58/294.56 s(20) =< it(21)*aux(7) 1140.58/294.56 s(19) =< s(20) 1140.58/294.56 1140.58/294.56 with precondition: [V=0,Out>=2,V1+1>=Out] 1140.58/294.56 1140.58/294.56 * Chain [22,20]: 10*s(4)+7 1140.58/294.56 Such that:aux(5) =< 1 1140.58/294.56 s(4) =< aux(5) 1140.58/294.56 1140.58/294.56 with precondition: [V=0,Out=1,V1>=0] 1140.58/294.56 1140.58/294.56 * Chain [20]: 10*s(4)+3 1140.58/294.56 Such that:aux(5) =< V 1140.58/294.56 s(4) =< aux(5) 1140.58/294.56 1140.58/294.56 with precondition: [Out=0,V1>=0,V>=0] 1140.58/294.56 1140.58/294.56 1140.58/294.56 #### Cost of chains of start(V1,V,V5): 1140.58/294.56 * Chain [26]: 10*s(22)+24*s(25)+3*s(27)+14*s(29)+4*s(32)+3*s(35)+1*s(39)+7 1140.58/294.56 Such that:s(21) =< 1 1140.58/294.56 s(39) =< V1 1140.58/294.56 s(32) =< V1-V+1 1140.58/294.56 aux(11) =< V1+1 1140.58/294.56 aux(12) =< V 1140.58/294.56 s(29) =< aux(12) 1140.58/294.56 s(22) =< s(21) 1140.58/294.56 s(25) =< aux(11) 1140.58/294.56 s(26) =< s(25)*aux(11) 1140.58/294.56 s(27) =< s(26) 1140.58/294.56 s(34) =< s(32)*aux(11) 1140.58/294.56 s(35) =< s(34) 1140.58/294.56 1140.58/294.56 with precondition: [V1>=0,V>=0] 1140.58/294.56 1140.58/294.56 * Chain [25]: 1 1140.58/294.56 with precondition: [V1=0,V>=1] 1140.58/294.56 1140.58/294.56 * Chain [24]: 10*s(42)+4*s(45)+10*s(46)+3*s(48)+4 1140.58/294.56 Such that:aux(13) =< V+1 1140.58/294.56 s(45) =< V-V5 1140.58/294.56 s(41) =< V5+1 1140.58/294.56 s(46) =< aux(13) 1140.58/294.56 s(47) =< s(45)*aux(13) 1140.58/294.56 s(48) =< s(47) 1140.58/294.56 s(42) =< s(41) 1140.58/294.56 1140.58/294.56 with precondition: [V1=2,V>=0,V5>=0] 1140.58/294.56 1140.58/294.56 * Chain [23]: 1*s(49)+1 1140.58/294.56 Such that:s(49) =< V 1140.58/294.56 1140.58/294.56 with precondition: [V1=V,V1>=1] 1140.58/294.56 1140.58/294.56 1140.58/294.56 Closed-form bounds of start(V1,V,V5): 1140.58/294.56 ------------------------------------- 1140.58/294.56 * Chain [26] with precondition: [V1>=0,V>=0] 1140.58/294.56 - Upper bound: 25*V1+14*V+41+(3*V1+3)*(V1+1)+(3*V1+3)*nat(V1-V+1)+nat(V1-V+1)*4 1140.58/294.56 - Complexity: n^2 1140.58/294.56 * Chain [25] with precondition: [V1=0,V>=1] 1140.58/294.56 - Upper bound: 1 1140.58/294.56 - Complexity: constant 1140.58/294.56 * Chain [24] with precondition: [V1=2,V>=0,V5>=0] 1140.58/294.56 - Upper bound: 10*V+14+(3*V+3)*nat(V-V5)+(10*V5+10)+nat(V-V5)*4 1140.58/294.56 - Complexity: n^2 1140.58/294.56 * Chain [23] with precondition: [V1=V,V1>=1] 1140.58/294.56 - Upper bound: V+1 1140.58/294.56 - Complexity: n 1140.58/294.56 1140.58/294.56 ### Maximum cost of start(V1,V,V5): max([10*V+13+(3*V+3)*nat(V-V5)+nat(V5+1)*10+nat(V-V5)*4,25*V1+13*V+40+(3*V1+3)*(V1+1)+(3*V1+3)*nat(V1-V+1)+nat(V1-V+1)*4+V])+1 1140.58/294.56 Asymptotic class: n^2 1140.58/294.56 * Total analysis performed in 278 ms. 1140.58/294.56 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (12) 1140.58/294.56 BOUNDS(1, n^2) 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (13) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 1140.58/294.56 Transformed a relative TRS into a decreasing-loop problem. 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (14) 1140.58/294.56 Obligation: 1140.58/294.56 Analyzing the following TRS for decreasing loops: 1140.58/294.56 1140.58/294.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1140.58/294.56 1140.58/294.56 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) 1140.58/294.56 min(0, v) -> 0 1140.58/294.56 min(u, 0) -> 0 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) 1140.58/294.56 equal(0, 0) -> true 1140.58/294.56 equal(s(x), 0) -> false 1140.58/294.56 equal(0, s(y)) -> false 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) 1140.58/294.56 1140.58/294.56 S is empty. 1140.58/294.56 Rewrite Strategy: FULL 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (15) DecreasingLoopProof (LOWER BOUND(ID)) 1140.58/294.56 The following loop(s) give(s) rise to the lower bound Omega(n^1): 1140.58/294.56 1140.58/294.56 The rewrite sequence 1140.58/294.56 1140.58/294.56 min(s(u), s(v)) ->^+ s(min(u, v)) 1140.58/294.56 1140.58/294.56 gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. 1140.58/294.56 1140.58/294.56 The pumping substitution is [u / s(u), v / s(v)]. 1140.58/294.56 1140.58/294.56 The result substitution is [ ]. 1140.58/294.56 1140.58/294.56 1140.58/294.56 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (16) 1140.58/294.56 Complex Obligation (BEST) 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (17) 1140.58/294.56 Obligation: 1140.58/294.56 Proved the lower bound n^1 for the following obligation: 1140.58/294.56 1140.58/294.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1140.58/294.56 1140.58/294.56 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) 1140.58/294.56 min(0, v) -> 0 1140.58/294.56 min(u, 0) -> 0 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) 1140.58/294.56 equal(0, 0) -> true 1140.58/294.56 equal(s(x), 0) -> false 1140.58/294.56 equal(0, s(y)) -> false 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) 1140.58/294.56 1140.58/294.56 S is empty. 1140.58/294.56 Rewrite Strategy: FULL 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (18) LowerBoundPropagationProof (FINISHED) 1140.58/294.56 Propagated lower bound. 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (19) 1140.58/294.56 BOUNDS(n^1, INF) 1140.58/294.56 1140.58/294.56 ---------------------------------------- 1140.58/294.56 1140.58/294.56 (20) 1140.58/294.56 Obligation: 1140.58/294.56 Analyzing the following TRS for decreasing loops: 1140.58/294.56 1140.58/294.56 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1140.58/294.56 1140.58/294.56 1140.58/294.56 The TRS R consists of the following rules: 1140.58/294.56 1140.58/294.56 minus(x, y) -> cond(equal(min(x, y), y), x, y) 1140.58/294.56 cond(true, x, y) -> s(minus(x, s(y))) 1140.58/294.56 min(0, v) -> 0 1140.58/294.56 min(u, 0) -> 0 1140.58/294.56 min(s(u), s(v)) -> s(min(u, v)) 1140.58/294.56 equal(0, 0) -> true 1140.58/294.56 equal(s(x), 0) -> false 1140.58/294.56 equal(0, s(y)) -> false 1140.58/294.56 equal(s(x), s(y)) -> equal(x, y) 1140.58/294.56 1140.58/294.56 S is empty. 1140.58/294.56 Rewrite Strategy: FULL 1140.58/294.61 EOF