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