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