51.31/14.23 WORST_CASE(Omega(n^1), O(n^1)) 51.31/14.24 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 51.31/14.24 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 51.31/14.24 51.31/14.24 51.31/14.24 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 51.31/14.24 51.31/14.24 (0) CpxTRS 51.31/14.24 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 51.31/14.24 (2) CpxWeightedTrs 51.31/14.24 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 51.31/14.24 (4) CpxTypedWeightedTrs 51.31/14.24 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 51.31/14.24 (6) CpxTypedWeightedCompleteTrs 51.31/14.24 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 2 ms] 51.31/14.24 (8) CpxRNTS 51.31/14.24 (9) CompleteCoflocoProof [FINISHED, 643 ms] 51.31/14.24 (10) BOUNDS(1, n^1) 51.31/14.24 (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 51.31/14.24 (12) TRS for Loop Detection 51.31/14.24 (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 51.31/14.24 (14) BEST 51.31/14.24 (15) proven lower bound 51.31/14.24 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 51.31/14.24 (17) BOUNDS(n^1, INF) 51.31/14.24 (18) TRS for Loop Detection 51.31/14.24 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (0) 51.31/14.24 Obligation: 51.31/14.24 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 51.31/14.24 51.31/14.24 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true 51.31/14.24 ge(0, s(y)) -> false 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) 51.31/14.24 minus(x, 0) -> x 51.31/14.24 minus(0, y) -> 0 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) 51.31/14.24 id_inc(x) -> x 51.31/14.24 id_inc(x) -> s(x) 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) 51.31/14.24 if(false, b, x, y) -> div_by_zero 51.31/14.24 if(true, false, x, y) -> 0 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) 51.31/14.24 51.31/14.24 S is empty. 51.31/14.24 Rewrite Strategy: INNERMOST 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 51.31/14.24 Transformed relative TRS to weighted TRS 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (2) 51.31/14.24 Obligation: 51.31/14.24 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 51.31/14.24 51.31/14.24 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true [1] 51.31/14.24 ge(0, s(y)) -> false [1] 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) [1] 51.31/14.24 minus(x, 0) -> x [1] 51.31/14.24 minus(0, y) -> 0 [1] 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) [1] 51.31/14.24 id_inc(x) -> x [1] 51.31/14.24 id_inc(x) -> s(x) [1] 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) [1] 51.31/14.24 if(false, b, x, y) -> div_by_zero [1] 51.31/14.24 if(true, false, x, y) -> 0 [1] 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) [1] 51.31/14.24 51.31/14.24 Rewrite Strategy: INNERMOST 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 51.31/14.24 Infered types. 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (4) 51.31/14.24 Obligation: 51.31/14.24 Runtime Complexity Weighted TRS with Types. 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true [1] 51.31/14.24 ge(0, s(y)) -> false [1] 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) [1] 51.31/14.24 minus(x, 0) -> x [1] 51.31/14.24 minus(0, y) -> 0 [1] 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) [1] 51.31/14.24 id_inc(x) -> x [1] 51.31/14.24 id_inc(x) -> s(x) [1] 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) [1] 51.31/14.24 if(false, b, x, y) -> div_by_zero [1] 51.31/14.24 if(true, false, x, y) -> 0 [1] 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) [1] 51.31/14.24 51.31/14.24 The TRS has the following type information: 51.31/14.24 ge :: 0:s:div_by_zero -> 0:s:div_by_zero -> true:false 51.31/14.24 0 :: 0:s:div_by_zero 51.31/14.24 true :: true:false 51.31/14.24 s :: 0:s:div_by_zero -> 0:s:div_by_zero 51.31/14.24 false :: true:false 51.31/14.24 minus :: 0:s:div_by_zero -> 0:s:div_by_zero -> 0:s:div_by_zero 51.31/14.24 id_inc :: 0:s:div_by_zero -> 0:s:div_by_zero 51.31/14.24 div :: 0:s:div_by_zero -> 0:s:div_by_zero -> 0:s:div_by_zero 51.31/14.24 if :: true:false -> true:false -> 0:s:div_by_zero -> 0:s:div_by_zero -> 0:s:div_by_zero 51.31/14.24 div_by_zero :: 0:s:div_by_zero 51.31/14.24 51.31/14.24 Rewrite Strategy: INNERMOST 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (5) CompletionProof (UPPER BOUND(ID)) 51.31/14.24 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 51.31/14.24 51.31/14.24 ge(v0, v1) -> null_ge [0] 51.31/14.24 minus(v0, v1) -> null_minus [0] 51.31/14.24 if(v0, v1, v2, v3) -> null_if [0] 51.31/14.24 51.31/14.24 And the following fresh constants: null_ge, null_minus, null_if 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (6) 51.31/14.24 Obligation: 51.31/14.24 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 51.31/14.24 51.31/14.24 Runtime Complexity Weighted TRS with Types. 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true [1] 51.31/14.24 ge(0, s(y)) -> false [1] 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) [1] 51.31/14.24 minus(x, 0) -> x [1] 51.31/14.24 minus(0, y) -> 0 [1] 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) [1] 51.31/14.24 id_inc(x) -> x [1] 51.31/14.24 id_inc(x) -> s(x) [1] 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) [1] 51.31/14.24 if(false, b, x, y) -> div_by_zero [1] 51.31/14.24 if(true, false, x, y) -> 0 [1] 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) [1] 51.31/14.24 ge(v0, v1) -> null_ge [0] 51.31/14.24 minus(v0, v1) -> null_minus [0] 51.31/14.24 if(v0, v1, v2, v3) -> null_if [0] 51.31/14.24 51.31/14.24 The TRS has the following type information: 51.31/14.24 ge :: 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if -> true:false:null_ge 51.31/14.24 0 :: 0:s:div_by_zero:null_minus:null_if 51.31/14.24 true :: true:false:null_ge 51.31/14.24 s :: 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if 51.31/14.24 false :: true:false:null_ge 51.31/14.24 minus :: 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if 51.31/14.24 id_inc :: 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if 51.31/14.24 div :: 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if 51.31/14.24 if :: true:false:null_ge -> true:false:null_ge -> 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if -> 0:s:div_by_zero:null_minus:null_if 51.31/14.24 div_by_zero :: 0:s:div_by_zero:null_minus:null_if 51.31/14.24 null_ge :: true:false:null_ge 51.31/14.24 null_minus :: 0:s:div_by_zero:null_minus:null_if 51.31/14.24 null_if :: 0:s:div_by_zero:null_minus:null_if 51.31/14.24 51.31/14.24 Rewrite Strategy: INNERMOST 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 51.31/14.24 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 51.31/14.24 The constant constructors are abstracted as follows: 51.31/14.24 51.31/14.24 0 => 0 51.31/14.24 true => 2 51.31/14.24 false => 1 51.31/14.24 div_by_zero => 1 51.31/14.24 null_ge => 0 51.31/14.24 null_minus => 0 51.31/14.24 null_if => 0 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (8) 51.31/14.24 Obligation: 51.31/14.24 Complexity RNTS consisting of the following rules: 51.31/14.24 51.31/14.24 div(z, z') -{ 1 }-> if(ge(y, 1 + 0), ge(x, y), x, y) :|: x >= 0, y >= 0, z = x, z' = y 51.31/14.24 ge(z, z') -{ 1 }-> ge(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 51.31/14.24 ge(z, z') -{ 1 }-> 2 :|: x >= 0, z = x, z' = 0 51.31/14.24 ge(z, z') -{ 1 }-> 1 :|: z' = 1 + y, y >= 0, z = 0 51.31/14.24 ge(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 51.31/14.24 id_inc(z) -{ 1 }-> x :|: x >= 0, z = x 51.31/14.24 id_inc(z) -{ 1 }-> 1 + x :|: x >= 0, z = x 51.31/14.24 if(z, z', z'', z1) -{ 1 }-> id_inc(div(minus(x, y), y)) :|: z = 2, z1 = y, z' = 2, x >= 0, y >= 0, z'' = x 51.31/14.24 if(z, z', z'', z1) -{ 1 }-> 1 :|: b >= 0, z1 = y, z = 1, x >= 0, y >= 0, z' = b, z'' = x 51.31/14.24 if(z, z', z'', z1) -{ 1 }-> 0 :|: z = 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1 51.31/14.24 if(z, z', z'', z1) -{ 0 }-> 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0 51.31/14.24 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 51.31/14.24 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 51.31/14.24 minus(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y 51.31/14.24 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 51.31/14.24 51.31/14.24 Only complete derivations are relevant for the runtime complexity. 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (9) CompleteCoflocoProof (FINISHED) 51.31/14.24 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 51.31/14.24 51.31/14.24 eq(start(V1, V, V15, V18),0,[ge(V1, V, Out)],[V1 >= 0,V >= 0]). 51.31/14.24 eq(start(V1, V, V15, V18),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). 51.31/14.24 eq(start(V1, V, V15, V18),0,[fun(V1, Out)],[V1 >= 0]). 51.31/14.24 eq(start(V1, V, V15, V18),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). 51.31/14.24 eq(start(V1, V, V15, V18),0,[if(V1, V, V15, V18, Out)],[V1 >= 0,V >= 0,V15 >= 0,V18 >= 0]). 51.31/14.24 eq(ge(V1, V, Out),1,[],[Out = 2,V2 >= 0,V1 = V2,V = 0]). 51.31/14.24 eq(ge(V1, V, Out),1,[],[Out = 1,V = 1 + V3,V3 >= 0,V1 = 0]). 51.31/14.24 eq(ge(V1, V, Out),1,[ge(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). 51.31/14.24 eq(minus(V1, V, Out),1,[],[Out = V6,V6 >= 0,V1 = V6,V = 0]). 51.31/14.24 eq(minus(V1, V, Out),1,[],[Out = 0,V7 >= 0,V1 = 0,V = V7]). 51.31/14.24 eq(minus(V1, V, Out),1,[minus(V8, V9, Ret1)],[Out = Ret1,V = 1 + V9,V8 >= 0,V9 >= 0,V1 = 1 + V8]). 51.31/14.24 eq(fun(V1, Out),1,[],[Out = V10,V10 >= 0,V1 = V10]). 51.31/14.24 eq(fun(V1, Out),1,[],[Out = 1 + V11,V11 >= 0,V1 = V11]). 51.31/14.24 eq(div(V1, V, Out),1,[ge(V12, 1 + 0, Ret0),ge(V13, V12, Ret11),if(Ret0, Ret11, V13, V12, Ret2)],[Out = Ret2,V13 >= 0,V12 >= 0,V1 = V13,V = V12]). 51.31/14.24 eq(if(V1, V, V15, V18, Out),1,[],[Out = 1,V17 >= 0,V18 = V14,V1 = 1,V16 >= 0,V14 >= 0,V = V17,V15 = V16]). 51.31/14.24 eq(if(V1, V, V15, V18, Out),1,[],[Out = 0,V1 = 2,V18 = V20,V19 >= 0,V20 >= 0,V15 = V19,V = 1]). 51.31/14.24 eq(if(V1, V, V15, V18, Out),1,[minus(V22, V21, Ret00),div(Ret00, V21, Ret01),fun(Ret01, Ret3)],[Out = Ret3,V1 = 2,V18 = V21,V = 2,V22 >= 0,V21 >= 0,V15 = V22]). 51.31/14.24 eq(ge(V1, V, Out),0,[],[Out = 0,V24 >= 0,V23 >= 0,V1 = V24,V = V23]). 51.31/14.24 eq(minus(V1, V, Out),0,[],[Out = 0,V26 >= 0,V25 >= 0,V1 = V26,V = V25]). 51.31/14.24 eq(if(V1, V, V15, V18, Out),0,[],[Out = 0,V18 = V29,V28 >= 0,V15 = V30,V27 >= 0,V1 = V28,V = V27,V30 >= 0,V29 >= 0]). 51.31/14.24 input_output_vars(ge(V1,V,Out),[V1,V],[Out]). 51.31/14.24 input_output_vars(minus(V1,V,Out),[V1,V],[Out]). 51.31/14.24 input_output_vars(fun(V1,Out),[V1],[Out]). 51.31/14.24 input_output_vars(div(V1,V,Out),[V1,V],[Out]). 51.31/14.24 input_output_vars(if(V1,V,V15,V18,Out),[V1,V,V15,V18],[Out]). 51.31/14.24 51.31/14.24 51.31/14.24 CoFloCo proof output: 51.31/14.24 Preprocessing Cost Relations 51.31/14.24 ===================================== 51.31/14.24 51.31/14.24 #### Computed strongly connected components 51.31/14.24 0. recursive : [ge/3] 51.31/14.24 1. non_recursive : [fun/2] 51.31/14.24 2. recursive : [minus/3] 51.31/14.24 3. recursive [non_tail] : [(div)/3,if/5] 51.31/14.24 4. non_recursive : [start/4] 51.31/14.24 51.31/14.24 #### Obtained direct recursion through partial evaluation 51.31/14.24 0. SCC is partially evaluated into ge/3 51.31/14.24 1. SCC is partially evaluated into fun/2 51.31/14.24 2. SCC is partially evaluated into minus/3 51.31/14.24 3. SCC is partially evaluated into (div)/3 51.31/14.24 4. SCC is partially evaluated into start/4 51.31/14.24 51.31/14.24 Control-Flow Refinement of Cost Relations 51.31/14.24 ===================================== 51.31/14.24 51.31/14.24 ### Specialization of cost equations ge/3 51.31/14.24 * CE 22 is refined into CE [23] 51.31/14.24 * CE 19 is refined into CE [24] 51.31/14.24 * CE 20 is refined into CE [25] 51.31/14.24 * CE 21 is refined into CE [26] 51.31/14.24 51.31/14.24 51.31/14.24 ### Cost equations --> "Loop" of ge/3 51.31/14.24 * CEs [26] --> Loop 16 51.31/14.24 * CEs [23] --> Loop 17 51.31/14.24 * CEs [24] --> Loop 18 51.31/14.24 * CEs [25] --> Loop 19 51.31/14.24 51.31/14.24 ### Ranking functions of CR ge(V1,V,Out) 51.31/14.24 * RF of phase [16]: [V,V1] 51.31/14.24 51.31/14.24 #### Partial ranking functions of CR ge(V1,V,Out) 51.31/14.24 * Partial RF of phase [16]: 51.31/14.24 - RF of loop [16:1]: 51.31/14.24 V 51.31/14.24 V1 51.31/14.24 51.31/14.24 51.31/14.24 ### Specialization of cost equations fun/2 51.31/14.24 * CE 17 is refined into CE [27] 51.31/14.24 * CE 18 is refined into CE [28] 51.31/14.24 51.31/14.24 51.31/14.24 ### Cost equations --> "Loop" of fun/2 51.31/14.24 * CEs [27] --> Loop 20 51.31/14.24 * CEs [28] --> Loop 21 51.31/14.24 51.31/14.24 ### Ranking functions of CR fun(V1,Out) 51.31/14.24 51.31/14.24 #### Partial ranking functions of CR fun(V1,Out) 51.31/14.24 51.31/14.24 51.31/14.24 ### Specialization of cost equations minus/3 51.31/14.24 * CE 9 is refined into CE [29] 51.31/14.24 * CE 10 is refined into CE [30] 51.31/14.24 * CE 12 is refined into CE [31] 51.31/14.24 * CE 11 is refined into CE [32] 51.31/14.24 51.31/14.24 51.31/14.24 ### Cost equations --> "Loop" of minus/3 51.31/14.24 * CEs [32] --> Loop 22 51.31/14.24 * CEs [29] --> Loop 23 51.31/14.24 * CEs [30,31] --> Loop 24 51.31/14.24 51.31/14.24 ### Ranking functions of CR minus(V1,V,Out) 51.31/14.24 * RF of phase [22]: [V,V1] 51.31/14.24 51.31/14.24 #### Partial ranking functions of CR minus(V1,V,Out) 51.31/14.24 * Partial RF of phase [22]: 51.31/14.24 - RF of loop [22:1]: 51.31/14.24 V 51.31/14.24 V1 51.31/14.24 51.31/14.24 51.31/14.24 ### Specialization of cost equations (div)/3 51.31/14.24 * CE 16 is refined into CE [33,34] 51.31/14.24 * CE 13 is refined into CE [35,36,37,38,39,40,41,42,43,44,45] 51.31/14.24 * CE 15 is refined into CE [46,47] 51.31/14.24 * CE 14 is refined into CE [48,49,50,51] 51.31/14.24 51.31/14.24 51.31/14.24 ### Cost equations --> "Loop" of (div)/3 51.31/14.24 * CEs [51] --> Loop 25 51.31/14.24 * CEs [50] --> Loop 26 51.31/14.24 * CEs [49] --> Loop 27 51.31/14.24 * CEs [48] --> Loop 28 51.31/14.24 * CEs [33,34] --> Loop 29 51.31/14.24 * CEs [35,36,38] --> Loop 30 51.31/14.24 * CEs [37,39,40,41,42,43,44,45,46,47] --> Loop 31 51.31/14.24 51.31/14.24 ### Ranking functions of CR div(V1,V,Out) 51.31/14.24 * RF of phase [25,26]: [V1,V1-V+1] 51.31/14.24 51.31/14.24 #### Partial ranking functions of CR div(V1,V,Out) 51.31/14.24 * Partial RF of phase [25,26]: 51.31/14.24 - RF of loop [25:1,26:1]: 51.31/14.24 V1 51.31/14.24 V1-V+1 51.31/14.24 51.31/14.24 51.31/14.24 ### Specialization of cost equations start/4 51.31/14.24 * CE 2 is refined into CE [52,53,54,55,56,57,58,59,60,61,62,63,64,65] 51.31/14.24 * CE 3 is refined into CE [66] 51.31/14.24 * CE 1 is refined into CE [67] 51.31/14.24 * CE 4 is refined into CE [68] 51.31/14.24 * CE 5 is refined into CE [69,70,71,72,73] 51.31/14.24 * CE 6 is refined into CE [74,75,76] 51.31/14.24 * CE 7 is refined into CE [77,78] 51.31/14.24 * CE 8 is refined into CE [79,80,81,82] 51.31/14.24 51.31/14.24 51.31/14.24 ### Cost equations --> "Loop" of start/4 51.31/14.24 * CEs [70,74,80] --> Loop 32 51.31/14.24 * CEs [52,53,54,55,56,57,58,59,60,61,62,63,64,65] --> Loop 33 51.31/14.24 * CEs [66] --> Loop 34 51.31/14.24 * CEs [68] --> Loop 35 51.31/14.24 * CEs [67,69,71,72,73,75,76,77,78,79,81,82] --> Loop 36 51.31/14.24 51.31/14.24 ### Ranking functions of CR start(V1,V,V15,V18) 51.31/14.24 51.31/14.24 #### Partial ranking functions of CR start(V1,V,V15,V18) 51.31/14.24 51.31/14.24 51.31/14.24 Computing Bounds 51.31/14.24 ===================================== 51.31/14.24 51.31/14.24 #### Cost of chains of ge(V1,V,Out): 51.31/14.24 * Chain [[16],19]: 1*it(16)+1 51.31/14.24 Such that:it(16) =< V1 51.31/14.24 51.31/14.24 with precondition: [Out=1,V1>=1,V>=V1+1] 51.31/14.24 51.31/14.24 * Chain [[16],18]: 1*it(16)+1 51.31/14.24 Such that:it(16) =< V 51.31/14.24 51.31/14.24 with precondition: [Out=2,V>=1,V1>=V] 51.31/14.24 51.31/14.24 * Chain [[16],17]: 1*it(16)+0 51.31/14.24 Such that:it(16) =< V 51.31/14.24 51.31/14.24 with precondition: [Out=0,V1>=1,V>=1] 51.31/14.24 51.31/14.24 * Chain [19]: 1 51.31/14.24 with precondition: [V1=0,Out=1,V>=1] 51.31/14.24 51.31/14.24 * Chain [18]: 1 51.31/14.24 with precondition: [V=0,Out=2,V1>=0] 51.31/14.24 51.31/14.24 * Chain [17]: 0 51.31/14.24 with precondition: [Out=0,V1>=0,V>=0] 51.31/14.24 51.31/14.24 51.31/14.24 #### Cost of chains of fun(V1,Out): 51.31/14.24 * Chain [21]: 1 51.31/14.24 with precondition: [V1+1=Out,V1>=0] 51.31/14.24 51.31/14.24 * Chain [20]: 1 51.31/14.24 with precondition: [V1=Out,V1>=0] 51.31/14.24 51.31/14.24 51.31/14.24 #### Cost of chains of minus(V1,V,Out): 51.31/14.24 * Chain [[22],24]: 1*it(22)+1 51.31/14.24 Such that:it(22) =< V 51.31/14.24 51.31/14.24 with precondition: [Out=0,V1>=1,V>=1] 51.31/14.24 51.31/14.24 * Chain [[22],23]: 1*it(22)+1 51.31/14.24 Such that:it(22) =< V 51.31/14.24 51.31/14.24 with precondition: [V1=Out+V,V>=1,V1>=V] 51.31/14.24 51.31/14.24 * Chain [24]: 1 51.31/14.24 with precondition: [Out=0,V1>=0,V>=0] 51.31/14.24 51.31/14.24 * Chain [23]: 1 51.31/14.24 with precondition: [V=0,V1=Out,V1>=0] 51.31/14.24 51.31/14.24 51.31/14.24 #### Cost of chains of div(V1,V,Out): 51.31/14.24 * Chain [[25,26],31]: 12*it(25)+10*s(3)+4*s(5)+7*s(7)+2*s(32)+4 51.31/14.24 Such that:aux(1) =< 1 51.31/14.24 aux(9) =< V1-V+1 51.31/14.24 aux(3) =< V 51.31/14.24 aux(12) =< V1 51.31/14.24 s(3) =< aux(1) 51.31/14.24 s(7) =< aux(12) 51.31/14.24 s(5) =< aux(3) 51.31/14.24 aux(6) =< aux(12) 51.31/14.24 it(25) =< aux(12) 51.31/14.24 aux(6) =< aux(9) 51.31/14.24 it(25) =< aux(9) 51.31/14.24 s(32) =< aux(6) 51.31/14.24 51.31/14.24 with precondition: [V>=1,Out>=0,V1>=V,V1+1>=Out+V] 51.31/14.24 51.31/14.24 * Chain [[25,26],28,31]: 12*it(25)+11*s(3)+6*s(5)+2*s(32)+4*s(33)+10 51.31/14.24 Such that:aux(14) =< 1 51.31/14.24 aux(8) =< V1 51.31/14.24 aux(9) =< V1-V+1 51.31/14.24 aux(15) =< V 51.31/14.24 aux(16) =< V1-V 51.31/14.24 s(3) =< aux(14) 51.31/14.24 s(5) =< aux(15) 51.31/14.24 aux(6) =< aux(8) 51.31/14.24 it(25) =< aux(8) 51.31/14.24 s(34) =< aux(8) 51.31/14.24 aux(6) =< aux(9) 51.31/14.24 it(25) =< aux(9) 51.31/14.24 aux(6) =< aux(16) 51.31/14.24 it(25) =< aux(16) 51.31/14.24 s(34) =< aux(16) 51.31/14.24 s(32) =< aux(6) 51.31/14.24 s(33) =< s(34) 51.31/14.24 51.31/14.24 with precondition: [V>=1,Out>=1,V1>=2*V,V1+2>=2*V+Out] 51.31/14.24 51.31/14.24 * Chain [[25,26],27,31]: 12*it(25)+11*s(3)+6*s(5)+2*s(32)+4*s(33)+10 51.31/14.24 Such that:aux(18) =< 1 51.31/14.24 aux(8) =< V1 51.31/14.24 aux(9) =< V1-V+1 51.31/14.24 aux(19) =< V 51.31/14.24 aux(20) =< V1-V 51.31/14.24 s(3) =< aux(18) 51.31/14.24 s(5) =< aux(19) 51.31/14.24 aux(6) =< aux(8) 51.31/14.24 it(25) =< aux(8) 51.31/14.24 s(34) =< aux(8) 51.31/14.24 aux(6) =< aux(9) 51.31/14.24 it(25) =< aux(9) 51.31/14.24 aux(6) =< aux(20) 51.31/14.24 it(25) =< aux(20) 51.31/14.24 s(34) =< aux(20) 51.31/14.24 s(32) =< aux(6) 51.31/14.24 s(33) =< s(34) 51.31/14.24 51.31/14.24 with precondition: [V>=1,Out>=0,V1>=2*V,V1+1>=2*V+Out] 51.31/14.24 51.31/14.24 * Chain [31]: 10*s(3)+4*s(5)+3*s(7)+4 51.31/14.24 Such that:aux(1) =< 1 51.31/14.24 aux(2) =< V1 51.31/14.24 aux(3) =< V 51.31/14.24 s(3) =< aux(1) 51.31/14.24 s(7) =< aux(2) 51.31/14.24 s(5) =< aux(3) 51.31/14.24 51.31/14.24 with precondition: [Out=0,V1>=0,V>=0] 51.31/14.24 51.31/14.24 * Chain [30]: 4 51.31/14.24 with precondition: [V=0,Out=0,V1>=0] 51.31/14.24 51.31/14.24 * Chain [29]: 4 51.31/14.24 with precondition: [V=0,Out=1,V1>=0] 51.31/14.24 51.31/14.24 * Chain [28,31]: 11*s(3)+6*s(5)+10 51.31/14.24 Such that:aux(14) =< 1 51.31/14.24 aux(15) =< V 51.31/14.24 s(3) =< aux(14) 51.31/14.24 s(5) =< aux(15) 51.31/14.24 51.31/14.24 with precondition: [Out=1,V>=1,V1>=V] 51.31/14.24 51.31/14.24 * Chain [27,31]: 11*s(3)+6*s(5)+10 51.31/14.24 Such that:aux(18) =< 1 51.31/14.24 aux(19) =< V 51.31/14.24 s(3) =< aux(18) 51.31/14.24 s(5) =< aux(19) 51.31/14.24 51.31/14.24 with precondition: [Out=0,V>=1,V1>=V] 51.31/14.24 51.31/14.24 51.31/14.24 #### Cost of chains of start(V1,V,V15,V18): 51.31/14.24 * Chain [36]: 36*s(83)+11*s(84)+64*s(91)+24*s(102)+4*s(104)+8*s(105)+12*s(108)+2*s(109)+10 51.31/14.24 Such that:aux(27) =< 1 51.31/14.24 aux(28) =< V1 51.31/14.24 aux(29) =< V1-V 51.31/14.24 aux(30) =< V1-V+1 51.31/14.24 aux(31) =< V 51.31/14.24 s(84) =< aux(28) 51.31/14.24 s(83) =< aux(31) 51.31/14.24 s(91) =< aux(27) 51.31/14.24 s(101) =< aux(28) 51.31/14.24 s(102) =< aux(28) 51.31/14.24 s(103) =< aux(28) 51.31/14.24 s(101) =< aux(30) 51.31/14.24 s(102) =< aux(30) 51.31/14.24 s(101) =< aux(29) 51.31/14.24 s(102) =< aux(29) 51.31/14.24 s(103) =< aux(29) 51.31/14.24 s(104) =< s(101) 51.31/14.24 s(105) =< s(103) 51.31/14.24 s(107) =< aux(28) 51.31/14.24 s(108) =< aux(28) 51.31/14.24 s(107) =< aux(30) 51.31/14.24 s(108) =< aux(30) 51.31/14.24 s(109) =< s(107) 51.31/14.24 51.31/14.24 with precondition: [V1>=0] 51.31/14.24 51.31/14.24 * Chain [35]: 1 51.31/14.24 with precondition: [V1=1,V>=0,V15>=0,V18>=0] 51.31/14.24 51.31/14.24 * Chain [34]: 1 51.31/14.24 with precondition: [V1=2,V=1,V15>=0,V18>=0] 51.31/14.24 51.31/14.24 * Chain [33]: 212*s(125)+6*s(127)+92*s(134)+20*s(156)+48*s(173)+8*s(175)+16*s(176)+24*s(179)+4*s(180)+13 51.31/14.24 Such that:aux(40) =< 1 51.31/14.24 aux(41) =< V15 51.31/14.24 aux(42) =< V15-2*V18 51.31/14.24 aux(43) =< V15-2*V18+1 51.31/14.24 aux(44) =< V15-V18 51.31/14.24 aux(45) =< V18 51.31/14.24 s(125) =< aux(40) 51.31/14.24 s(127) =< aux(41) 51.31/14.24 s(134) =< aux(45) 51.31/14.24 s(156) =< aux(44) 51.31/14.24 s(172) =< aux(44) 51.31/14.24 s(173) =< aux(44) 51.31/14.24 s(174) =< aux(44) 51.31/14.24 s(172) =< aux(43) 51.31/14.24 s(173) =< aux(43) 51.31/14.24 s(172) =< aux(42) 51.31/14.24 s(173) =< aux(42) 51.31/14.24 s(174) =< aux(42) 51.31/14.24 s(175) =< s(172) 51.31/14.24 s(176) =< s(174) 51.31/14.24 s(178) =< aux(44) 51.31/14.24 s(179) =< aux(44) 51.31/14.24 s(178) =< aux(43) 51.31/14.24 s(179) =< aux(43) 51.31/14.24 s(180) =< s(178) 51.31/14.24 51.31/14.24 with precondition: [V1=2,V=2,V15>=0,V18>=0] 51.31/14.24 51.31/14.24 * Chain [32]: 4 51.31/14.24 with precondition: [V=0,V1>=0] 51.31/14.24 51.31/14.24 51.31/14.24 Closed-form bounds of start(V1,V,V15,V18): 51.31/14.24 ------------------------------------- 51.31/14.24 * Chain [36] with precondition: [V1>=0] 51.31/14.24 - Upper bound: 61*V1+74+nat(V)*36 51.31/14.24 - Complexity: n 51.31/14.24 * Chain [35] with precondition: [V1=1,V>=0,V15>=0,V18>=0] 51.31/14.24 - Upper bound: 1 51.31/14.24 - Complexity: constant 51.31/14.24 * Chain [34] with precondition: [V1=2,V=1,V15>=0,V18>=0] 51.31/14.24 - Upper bound: 1 51.31/14.24 - Complexity: constant 51.31/14.24 * Chain [33] with precondition: [V1=2,V=2,V15>=0,V18>=0] 51.31/14.24 - Upper bound: 6*V15+92*V18+225+nat(V15-V18)*120 51.31/14.24 - Complexity: n 51.31/14.24 * Chain [32] with precondition: [V=0,V1>=0] 51.31/14.24 - Upper bound: 4 51.31/14.24 - Complexity: constant 51.31/14.24 51.31/14.24 ### Maximum cost of start(V1,V,V15,V18): max([3,61*V1+73+nat(V)*36,nat(V15)*6+224+nat(V18)*92+nat(V15-V18)*120])+1 51.31/14.24 Asymptotic class: n 51.31/14.24 * Total analysis performed in 542 ms. 51.31/14.24 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (10) 51.31/14.24 BOUNDS(1, n^1) 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 51.31/14.24 Transformed a relative TRS into a decreasing-loop problem. 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (12) 51.31/14.24 Obligation: 51.31/14.24 Analyzing the following TRS for decreasing loops: 51.31/14.24 51.31/14.24 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 51.31/14.24 51.31/14.24 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true 51.31/14.24 ge(0, s(y)) -> false 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) 51.31/14.24 minus(x, 0) -> x 51.31/14.24 minus(0, y) -> 0 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) 51.31/14.24 id_inc(x) -> x 51.31/14.24 id_inc(x) -> s(x) 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) 51.31/14.24 if(false, b, x, y) -> div_by_zero 51.31/14.24 if(true, false, x, y) -> 0 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) 51.31/14.24 51.31/14.24 S is empty. 51.31/14.24 Rewrite Strategy: INNERMOST 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (13) DecreasingLoopProof (LOWER BOUND(ID)) 51.31/14.24 The following loop(s) give(s) rise to the lower bound Omega(n^1): 51.31/14.24 51.31/14.24 The rewrite sequence 51.31/14.24 51.31/14.24 minus(s(x), s(y)) ->^+ minus(x, y) 51.31/14.24 51.31/14.24 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 51.31/14.24 51.31/14.24 The pumping substitution is [x / s(x), y / s(y)]. 51.31/14.24 51.31/14.24 The result substitution is [ ]. 51.31/14.24 51.31/14.24 51.31/14.24 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (14) 51.31/14.24 Complex Obligation (BEST) 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (15) 51.31/14.24 Obligation: 51.31/14.24 Proved the lower bound n^1 for the following obligation: 51.31/14.24 51.31/14.24 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 51.31/14.24 51.31/14.24 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true 51.31/14.24 ge(0, s(y)) -> false 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) 51.31/14.24 minus(x, 0) -> x 51.31/14.24 minus(0, y) -> 0 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) 51.31/14.24 id_inc(x) -> x 51.31/14.24 id_inc(x) -> s(x) 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) 51.31/14.24 if(false, b, x, y) -> div_by_zero 51.31/14.24 if(true, false, x, y) -> 0 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) 51.31/14.24 51.31/14.24 S is empty. 51.31/14.24 Rewrite Strategy: INNERMOST 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (16) LowerBoundPropagationProof (FINISHED) 51.31/14.24 Propagated lower bound. 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (17) 51.31/14.24 BOUNDS(n^1, INF) 51.31/14.24 51.31/14.24 ---------------------------------------- 51.31/14.24 51.31/14.24 (18) 51.31/14.24 Obligation: 51.31/14.24 Analyzing the following TRS for decreasing loops: 51.31/14.24 51.31/14.24 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 51.31/14.24 51.31/14.24 51.31/14.24 The TRS R consists of the following rules: 51.31/14.24 51.31/14.24 ge(x, 0) -> true 51.31/14.24 ge(0, s(y)) -> false 51.31/14.24 ge(s(x), s(y)) -> ge(x, y) 51.31/14.24 minus(x, 0) -> x 51.31/14.24 minus(0, y) -> 0 51.31/14.24 minus(s(x), s(y)) -> minus(x, y) 51.31/14.24 id_inc(x) -> x 51.31/14.24 id_inc(x) -> s(x) 51.31/14.24 div(x, y) -> if(ge(y, s(0)), ge(x, y), x, y) 51.31/14.24 if(false, b, x, y) -> div_by_zero 51.31/14.24 if(true, false, x, y) -> 0 51.31/14.24 if(true, true, x, y) -> id_inc(div(minus(x, y), y)) 51.31/14.24 51.31/14.24 S is empty. 51.31/14.24 Rewrite Strategy: INNERMOST 51.42/14.29 EOF