15.63/5.12 WORST_CASE(Omega(n^1), O(n^1)) 15.63/5.13 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 15.63/5.13 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 15.63/5.13 15.63/5.13 15.63/5.13 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 15.63/5.13 15.63/5.13 (0) CpxTRS 15.63/5.13 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 15.63/5.13 (2) CpxWeightedTrs 15.63/5.13 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 15.63/5.13 (4) CpxTypedWeightedTrs 15.63/5.13 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 15.63/5.13 (6) CpxTypedWeightedCompleteTrs 15.63/5.13 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 15.63/5.13 (8) CpxRNTS 15.63/5.13 (9) CompleteCoflocoProof [FINISHED, 333 ms] 15.63/5.13 (10) BOUNDS(1, n^1) 15.63/5.13 (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 15.63/5.13 (12) TRS for Loop Detection 15.63/5.13 (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 15.63/5.13 (14) BEST 15.63/5.13 (15) proven lower bound 15.63/5.13 (16) LowerBoundPropagationProof [FINISHED, 0 ms] 15.63/5.13 (17) BOUNDS(n^1, INF) 15.63/5.13 (18) TRS for Loop Detection 15.63/5.13 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (0) 15.63/5.13 Obligation: 15.63/5.13 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 15.63/5.13 15.63/5.13 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) 15.63/5.13 geq(X, 0) -> true 15.63/5.13 geq(0, s(Y)) -> false 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) 15.63/5.13 div(0, s(Y)) -> 0 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) 15.63/5.13 if(true, X, Y) -> X 15.63/5.13 if(false, X, Y) -> Y 15.63/5.13 15.63/5.13 S is empty. 15.63/5.13 Rewrite Strategy: INNERMOST 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 15.63/5.13 Transformed relative TRS to weighted TRS 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (2) 15.63/5.13 Obligation: 15.63/5.13 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 15.63/5.13 15.63/5.13 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 [1] 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) [1] 15.63/5.13 geq(X, 0) -> true [1] 15.63/5.13 geq(0, s(Y)) -> false [1] 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) [1] 15.63/5.13 div(0, s(Y)) -> 0 [1] 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) [1] 15.63/5.13 if(true, X, Y) -> X [1] 15.63/5.13 if(false, X, Y) -> Y [1] 15.63/5.13 15.63/5.13 Rewrite Strategy: INNERMOST 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 15.63/5.13 Infered types. 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (4) 15.63/5.13 Obligation: 15.63/5.13 Runtime Complexity Weighted TRS with Types. 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 [1] 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) [1] 15.63/5.13 geq(X, 0) -> true [1] 15.63/5.13 geq(0, s(Y)) -> false [1] 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) [1] 15.63/5.13 div(0, s(Y)) -> 0 [1] 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) [1] 15.63/5.13 if(true, X, Y) -> X [1] 15.63/5.13 if(false, X, Y) -> Y [1] 15.63/5.13 15.63/5.13 The TRS has the following type information: 15.63/5.13 minus :: 0:s -> 0:s -> 0:s 15.63/5.13 0 :: 0:s 15.63/5.13 s :: 0:s -> 0:s 15.63/5.13 geq :: 0:s -> 0:s -> true:false 15.63/5.13 true :: true:false 15.63/5.13 false :: true:false 15.63/5.13 div :: 0:s -> 0:s -> 0:s 15.63/5.13 if :: true:false -> 0:s -> 0:s -> 0:s 15.63/5.13 15.63/5.13 Rewrite Strategy: INNERMOST 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (5) CompletionProof (UPPER BOUND(ID)) 15.63/5.13 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 15.63/5.13 15.63/5.13 minus(v0, v1) -> null_minus [0] 15.63/5.13 div(v0, v1) -> null_div [0] 15.63/5.13 geq(v0, v1) -> null_geq [0] 15.63/5.13 if(v0, v1, v2) -> null_if [0] 15.63/5.13 15.63/5.13 And the following fresh constants: null_minus, null_div, null_geq, null_if 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (6) 15.63/5.13 Obligation: 15.63/5.13 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 15.63/5.13 15.63/5.13 Runtime Complexity Weighted TRS with Types. 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 [1] 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) [1] 15.63/5.13 geq(X, 0) -> true [1] 15.63/5.13 geq(0, s(Y)) -> false [1] 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) [1] 15.63/5.13 div(0, s(Y)) -> 0 [1] 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) [1] 15.63/5.13 if(true, X, Y) -> X [1] 15.63/5.13 if(false, X, Y) -> Y [1] 15.63/5.13 minus(v0, v1) -> null_minus [0] 15.63/5.13 div(v0, v1) -> null_div [0] 15.63/5.13 geq(v0, v1) -> null_geq [0] 15.63/5.13 if(v0, v1, v2) -> null_if [0] 15.63/5.13 15.63/5.13 The TRS has the following type information: 15.63/5.13 minus :: 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if 15.63/5.13 0 :: 0:s:null_minus:null_div:null_if 15.63/5.13 s :: 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if 15.63/5.13 geq :: 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if -> true:false:null_geq 15.63/5.13 true :: true:false:null_geq 15.63/5.13 false :: true:false:null_geq 15.63/5.13 div :: 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if 15.63/5.13 if :: true:false:null_geq -> 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if -> 0:s:null_minus:null_div:null_if 15.63/5.13 null_minus :: 0:s:null_minus:null_div:null_if 15.63/5.13 null_div :: 0:s:null_minus:null_div:null_if 15.63/5.13 null_geq :: true:false:null_geq 15.63/5.13 null_if :: 0:s:null_minus:null_div:null_if 15.63/5.13 15.63/5.13 Rewrite Strategy: INNERMOST 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 15.63/5.13 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 15.63/5.13 The constant constructors are abstracted as follows: 15.63/5.13 15.63/5.13 0 => 0 15.63/5.13 true => 2 15.63/5.13 false => 1 15.63/5.13 null_minus => 0 15.63/5.13 null_div => 0 15.63/5.13 null_geq => 0 15.63/5.13 null_if => 0 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (8) 15.63/5.13 Obligation: 15.63/5.13 Complexity RNTS consisting of the following rules: 15.63/5.13 15.63/5.13 div(z, z') -{ 1 }-> if(geq(X, Y), 1 + div(minus(X, Y), 1 + Y), 0) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 15.63/5.13 div(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 15.63/5.13 div(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 15.63/5.13 geq(z, z') -{ 1 }-> geq(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 15.63/5.13 geq(z, z') -{ 1 }-> 2 :|: X >= 0, z = X, z' = 0 15.63/5.13 geq(z, z') -{ 1 }-> 1 :|: Y >= 0, z' = 1 + Y, z = 0 15.63/5.13 geq(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 15.63/5.13 if(z, z', z'') -{ 1 }-> X :|: z = 2, z' = X, Y >= 0, z'' = Y, X >= 0 15.63/5.13 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 15.63/5.13 if(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 15.63/5.13 minus(z, z') -{ 1 }-> minus(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 15.63/5.13 minus(z, z') -{ 1 }-> 0 :|: z' = Y, Y >= 0, z = 0 15.63/5.13 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 15.63/5.13 15.63/5.13 Only complete derivations are relevant for the runtime complexity. 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (9) CompleteCoflocoProof (FINISHED) 15.63/5.13 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 15.63/5.13 15.63/5.13 eq(start(V1, V, V2),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). 15.63/5.13 eq(start(V1, V, V2),0,[geq(V1, V, Out)],[V1 >= 0,V >= 0]). 15.63/5.13 eq(start(V1, V, V2),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). 15.63/5.13 eq(start(V1, V, V2),0,[if(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). 15.63/5.13 eq(minus(V1, V, Out),1,[],[Out = 0,V = Y1,Y1 >= 0,V1 = 0]). 15.63/5.13 eq(minus(V1, V, Out),1,[minus(X1, Y2, Ret)],[Out = Ret,V1 = 1 + X1,Y2 >= 0,V = 1 + Y2,X1 >= 0]). 15.63/5.13 eq(geq(V1, V, Out),1,[],[Out = 2,X2 >= 0,V1 = X2,V = 0]). 15.63/5.13 eq(geq(V1, V, Out),1,[],[Out = 1,Y3 >= 0,V = 1 + Y3,V1 = 0]). 15.63/5.13 eq(geq(V1, V, Out),1,[geq(X3, Y4, Ret1)],[Out = Ret1,V1 = 1 + X3,Y4 >= 0,V = 1 + Y4,X3 >= 0]). 15.63/5.13 eq(div(V1, V, Out),1,[],[Out = 0,Y5 >= 0,V = 1 + Y5,V1 = 0]). 15.63/5.13 eq(div(V1, V, Out),1,[geq(X4, Y6, Ret0),minus(X4, Y6, Ret110),div(Ret110, 1 + Y6, Ret11),if(Ret0, 1 + Ret11, 0, Ret2)],[Out = Ret2,V1 = 1 + X4,Y6 >= 0,V = 1 + Y6,X4 >= 0]). 15.63/5.13 eq(if(V1, V, V2, Out),1,[],[Out = X5,V1 = 2,V = X5,Y7 >= 0,V2 = Y7,X5 >= 0]). 15.63/5.13 eq(if(V1, V, V2, Out),1,[],[Out = Y8,V = X6,Y8 >= 0,V1 = 1,V2 = Y8,X6 >= 0]). 15.63/5.13 eq(minus(V1, V, Out),0,[],[Out = 0,V4 >= 0,V3 >= 0,V1 = V4,V = V3]). 15.63/5.13 eq(div(V1, V, Out),0,[],[Out = 0,V6 >= 0,V5 >= 0,V1 = V6,V = V5]). 15.63/5.13 eq(geq(V1, V, Out),0,[],[Out = 0,V8 >= 0,V7 >= 0,V1 = V8,V = V7]). 15.63/5.13 eq(if(V1, V, V2, Out),0,[],[Out = 0,V9 >= 0,V2 = V11,V10 >= 0,V1 = V9,V = V10,V11 >= 0]). 15.63/5.13 input_output_vars(minus(V1,V,Out),[V1,V],[Out]). 15.63/5.13 input_output_vars(geq(V1,V,Out),[V1,V],[Out]). 15.63/5.13 input_output_vars(div(V1,V,Out),[V1,V],[Out]). 15.63/5.13 input_output_vars(if(V1,V,V2,Out),[V1,V,V2],[Out]). 15.63/5.13 15.63/5.13 15.63/5.13 CoFloCo proof output: 15.63/5.13 Preprocessing Cost Relations 15.63/5.13 ===================================== 15.63/5.13 15.63/5.13 #### Computed strongly connected components 15.63/5.13 0. recursive : [geq/3] 15.63/5.13 1. non_recursive : [if/4] 15.63/5.13 2. recursive : [minus/3] 15.63/5.13 3. recursive [non_tail] : [(div)/3] 15.63/5.13 4. non_recursive : [start/3] 15.63/5.13 15.63/5.13 #### Obtained direct recursion through partial evaluation 15.63/5.13 0. SCC is partially evaluated into geq/3 15.63/5.13 1. SCC is partially evaluated into if/4 15.63/5.13 2. SCC is partially evaluated into minus/3 15.63/5.13 3. SCC is partially evaluated into (div)/3 15.63/5.13 4. SCC is partially evaluated into start/3 15.63/5.13 15.63/5.13 Control-Flow Refinement of Cost Relations 15.63/5.13 ===================================== 15.63/5.13 15.63/5.13 ### Specialization of cost equations geq/3 15.63/5.13 * CE 11 is refined into CE [18] 15.63/5.13 * CE 8 is refined into CE [19] 15.63/5.13 * CE 9 is refined into CE [20] 15.63/5.13 * CE 10 is refined into CE [21] 15.63/5.13 15.63/5.13 15.63/5.13 ### Cost equations --> "Loop" of geq/3 15.63/5.13 * CEs [21] --> Loop 13 15.63/5.13 * CEs [18] --> Loop 14 15.63/5.13 * CEs [19] --> Loop 15 15.63/5.13 * CEs [20] --> Loop 16 15.63/5.13 15.63/5.13 ### Ranking functions of CR geq(V1,V,Out) 15.63/5.13 * RF of phase [13]: [V,V1] 15.63/5.13 15.63/5.13 #### Partial ranking functions of CR geq(V1,V,Out) 15.63/5.13 * Partial RF of phase [13]: 15.63/5.13 - RF of loop [13:1]: 15.63/5.13 V 15.63/5.13 V1 15.63/5.13 15.63/5.13 15.63/5.13 ### Specialization of cost equations if/4 15.63/5.13 * CE 17 is refined into CE [22] 15.63/5.13 * CE 15 is refined into CE [23] 15.63/5.13 * CE 16 is refined into CE [24] 15.63/5.13 15.63/5.13 15.63/5.13 ### Cost equations --> "Loop" of if/4 15.63/5.13 * CEs [22] --> Loop 17 15.63/5.13 * CEs [23] --> Loop 18 15.63/5.13 * CEs [24] --> Loop 19 15.63/5.13 15.63/5.13 ### Ranking functions of CR if(V1,V,V2,Out) 15.63/5.13 15.63/5.13 #### Partial ranking functions of CR if(V1,V,V2,Out) 15.63/5.13 15.63/5.13 15.63/5.13 ### Specialization of cost equations minus/3 15.63/5.13 * CE 5 is refined into CE [25] 15.63/5.13 * CE 7 is refined into CE [26] 15.63/5.13 * CE 6 is refined into CE [27] 15.63/5.13 15.63/5.13 15.63/5.13 ### Cost equations --> "Loop" of minus/3 15.63/5.13 * CEs [27] --> Loop 20 15.63/5.13 * CEs [25,26] --> Loop 21 15.63/5.13 15.63/5.13 ### Ranking functions of CR minus(V1,V,Out) 15.63/5.13 * RF of phase [20]: [V,V1] 15.63/5.13 15.63/5.13 #### Partial ranking functions of CR minus(V1,V,Out) 15.63/5.13 * Partial RF of phase [20]: 15.63/5.13 - RF of loop [20:1]: 15.63/5.13 V 15.63/5.13 V1 15.63/5.13 15.63/5.13 15.63/5.13 ### Specialization of cost equations (div)/3 15.63/5.13 * CE 12 is refined into CE [28] 15.63/5.13 * CE 14 is refined into CE [29] 15.63/5.13 * CE 13 is refined into CE [30,31,32,33,34,35,36,37,38] 15.63/5.13 15.63/5.13 15.63/5.13 ### Cost equations --> "Loop" of (div)/3 15.63/5.13 * CEs [37] --> Loop 22 15.63/5.13 * CEs [38] --> Loop 23 15.63/5.13 * CEs [32] --> Loop 24 15.63/5.13 * CEs [33] --> Loop 25 15.63/5.13 * CEs [30,31,34,35,36] --> Loop 26 15.63/5.13 * CEs [28,29] --> Loop 27 15.63/5.13 15.63/5.13 ### Ranking functions of CR div(V1,V,Out) 15.63/5.13 15.63/5.13 #### Partial ranking functions of CR div(V1,V,Out) 15.63/5.13 15.63/5.13 15.63/5.13 ### Specialization of cost equations start/3 15.63/5.13 * CE 1 is refined into CE [39] 15.63/5.13 * CE 2 is refined into CE [40,41,42,43,44] 15.63/5.13 * CE 3 is refined into CE [45,46,47] 15.63/5.13 * CE 4 is refined into CE [48,49,50] 15.63/5.13 15.63/5.13 15.63/5.13 ### Cost equations --> "Loop" of start/3 15.63/5.13 * CEs [46] --> Loop 28 15.63/5.13 * CEs [41] --> Loop 29 15.63/5.13 * CEs [49] --> Loop 30 15.63/5.13 * CEs [48] --> Loop 31 15.63/5.13 * CEs [39,40,42,43,44,45,47,50] --> Loop 32 15.63/5.13 15.63/5.13 ### Ranking functions of CR start(V1,V,V2) 15.63/5.13 15.63/5.13 #### Partial ranking functions of CR start(V1,V,V2) 15.63/5.13 15.63/5.13 15.63/5.13 Computing Bounds 15.63/5.13 ===================================== 15.63/5.13 15.63/5.13 #### Cost of chains of geq(V1,V,Out): 15.63/5.13 * Chain [[13],16]: 1*it(13)+1 15.63/5.13 Such that:it(13) =< V1 15.63/5.13 15.63/5.13 with precondition: [Out=1,V1>=1,V>=V1+1] 15.63/5.13 15.63/5.13 * Chain [[13],15]: 1*it(13)+1 15.63/5.13 Such that:it(13) =< V 15.63/5.13 15.63/5.13 with precondition: [Out=2,V>=1,V1>=V] 15.63/5.13 15.63/5.13 * Chain [[13],14]: 1*it(13)+0 15.63/5.13 Such that:it(13) =< V 15.63/5.13 15.63/5.13 with precondition: [Out=0,V1>=1,V>=1] 15.63/5.13 15.63/5.13 * Chain [16]: 1 15.63/5.13 with precondition: [V1=0,Out=1,V>=1] 15.63/5.13 15.63/5.13 * Chain [15]: 1 15.63/5.13 with precondition: [V=0,Out=2,V1>=0] 15.63/5.13 15.63/5.13 * Chain [14]: 0 15.63/5.13 with precondition: [Out=0,V1>=0,V>=0] 15.63/5.13 15.63/5.13 15.63/5.13 #### Cost of chains of if(V1,V,V2,Out): 15.63/5.13 * Chain [19]: 1 15.63/5.13 with precondition: [V1=1,V2=Out,V>=0,V2>=0] 15.63/5.13 15.63/5.13 * Chain [18]: 1 15.63/5.13 with precondition: [V1=2,V=Out,V>=0,V2>=0] 15.63/5.13 15.63/5.13 * Chain [17]: 0 15.63/5.13 with precondition: [Out=0,V1>=0,V>=0,V2>=0] 15.63/5.13 15.63/5.13 15.63/5.13 #### Cost of chains of minus(V1,V,Out): 15.63/5.13 * Chain [[20],21]: 1*it(20)+1 15.63/5.13 Such that:it(20) =< V 15.63/5.13 15.63/5.13 with precondition: [Out=0,V1>=1,V>=1] 15.63/5.13 15.63/5.13 * Chain [21]: 1 15.63/5.13 with precondition: [Out=0,V1>=0,V>=0] 15.63/5.13 15.63/5.13 15.63/5.13 #### Cost of chains of div(V1,V,Out): 15.63/5.13 * Chain [27]: 1 15.63/5.13 with precondition: [Out=0,V1>=0,V>=0] 15.63/5.13 15.63/5.13 * Chain [26,27]: 6*s(3)+2*s(7)+5 15.63/5.13 Such that:aux(2) =< V1 15.63/5.13 aux(4) =< V 15.63/5.13 s(7) =< aux(2) 15.63/5.13 s(3) =< aux(4) 15.63/5.13 15.63/5.13 with precondition: [Out=0,V1>=1,V>=1] 15.63/5.13 15.63/5.13 * Chain [25,27]: 4 15.63/5.13 with precondition: [V=1,Out=0,V1>=1] 15.63/5.13 15.63/5.13 * Chain [24,27]: 5 15.63/5.13 with precondition: [V=1,Out=1,V1>=1] 15.63/5.13 15.63/5.13 * Chain [23,27]: 2*s(13)+4 15.63/5.13 Such that:aux(5) =< V 15.63/5.13 s(13) =< aux(5) 15.63/5.13 15.63/5.13 with precondition: [Out=0,V>=2,V1>=V] 15.63/5.13 15.63/5.13 * Chain [22,27]: 2*s(15)+5 15.63/5.13 Such that:aux(6) =< V 15.63/5.13 s(15) =< aux(6) 15.63/5.13 15.63/5.13 with precondition: [Out=1,V>=2,V1>=V] 15.63/5.13 15.63/5.13 15.63/5.13 #### Cost of chains of start(V1,V,V2): 15.63/5.13 * Chain [32]: 13*s(23)+3*s(25)+5 15.63/5.13 Such that:aux(8) =< V1 15.63/5.13 aux(9) =< V 15.63/5.13 s(25) =< aux(8) 15.63/5.13 s(23) =< aux(9) 15.63/5.13 15.63/5.13 with precondition: [V1>=0,V>=0] 15.63/5.13 15.63/5.13 * Chain [31]: 1 15.63/5.13 with precondition: [V1=1,V>=0,V2>=0] 15.63/5.13 15.63/5.13 * Chain [30]: 1 15.63/5.13 with precondition: [V1=2,V>=0,V2>=0] 15.63/5.13 15.63/5.13 * Chain [29]: 1 15.63/5.13 with precondition: [V=0,V1>=0] 15.63/5.13 15.63/5.13 * Chain [28]: 5 15.63/5.13 with precondition: [V=1,V1>=1] 15.63/5.13 15.63/5.13 15.63/5.13 Closed-form bounds of start(V1,V,V2): 15.63/5.13 ------------------------------------- 15.63/5.13 * Chain [32] with precondition: [V1>=0,V>=0] 15.63/5.13 - Upper bound: 3*V1+13*V+5 15.63/5.13 - Complexity: n 15.63/5.13 * Chain [31] with precondition: [V1=1,V>=0,V2>=0] 15.63/5.13 - Upper bound: 1 15.63/5.13 - Complexity: constant 15.63/5.13 * Chain [30] with precondition: [V1=2,V>=0,V2>=0] 15.63/5.13 - Upper bound: 1 15.63/5.13 - Complexity: constant 15.63/5.13 * Chain [29] with precondition: [V=0,V1>=0] 15.63/5.13 - Upper bound: 1 15.63/5.13 - Complexity: constant 15.63/5.13 * Chain [28] with precondition: [V=1,V1>=1] 15.63/5.13 - Upper bound: 5 15.63/5.13 - Complexity: constant 15.63/5.13 15.63/5.13 ### Maximum cost of start(V1,V,V2): 3*V1+13*V+5 15.63/5.13 Asymptotic class: n 15.63/5.13 * Total analysis performed in 258 ms. 15.63/5.13 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (10) 15.63/5.13 BOUNDS(1, n^1) 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 15.63/5.13 Transformed a relative TRS into a decreasing-loop problem. 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (12) 15.63/5.13 Obligation: 15.63/5.13 Analyzing the following TRS for decreasing loops: 15.63/5.13 15.63/5.13 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 15.63/5.13 15.63/5.13 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) 15.63/5.13 geq(X, 0) -> true 15.63/5.13 geq(0, s(Y)) -> false 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) 15.63/5.13 div(0, s(Y)) -> 0 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) 15.63/5.13 if(true, X, Y) -> X 15.63/5.13 if(false, X, Y) -> Y 15.63/5.13 15.63/5.13 S is empty. 15.63/5.13 Rewrite Strategy: INNERMOST 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (13) DecreasingLoopProof (LOWER BOUND(ID)) 15.63/5.13 The following loop(s) give(s) rise to the lower bound Omega(n^1): 15.63/5.13 15.63/5.13 The rewrite sequence 15.63/5.13 15.63/5.13 minus(s(X), s(Y)) ->^+ minus(X, Y) 15.63/5.13 15.63/5.13 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 15.63/5.13 15.63/5.13 The pumping substitution is [X / s(X), Y / s(Y)]. 15.63/5.13 15.63/5.13 The result substitution is [ ]. 15.63/5.13 15.63/5.13 15.63/5.13 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (14) 15.63/5.13 Complex Obligation (BEST) 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (15) 15.63/5.13 Obligation: 15.63/5.13 Proved the lower bound n^1 for the following obligation: 15.63/5.13 15.63/5.13 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 15.63/5.13 15.63/5.13 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) 15.63/5.13 geq(X, 0) -> true 15.63/5.13 geq(0, s(Y)) -> false 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) 15.63/5.13 div(0, s(Y)) -> 0 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) 15.63/5.13 if(true, X, Y) -> X 15.63/5.13 if(false, X, Y) -> Y 15.63/5.13 15.63/5.13 S is empty. 15.63/5.13 Rewrite Strategy: INNERMOST 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (16) LowerBoundPropagationProof (FINISHED) 15.63/5.13 Propagated lower bound. 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (17) 15.63/5.13 BOUNDS(n^1, INF) 15.63/5.13 15.63/5.13 ---------------------------------------- 15.63/5.13 15.63/5.13 (18) 15.63/5.13 Obligation: 15.63/5.13 Analyzing the following TRS for decreasing loops: 15.63/5.13 15.63/5.13 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 15.63/5.13 15.63/5.13 15.63/5.13 The TRS R consists of the following rules: 15.63/5.13 15.63/5.13 minus(0, Y) -> 0 15.63/5.13 minus(s(X), s(Y)) -> minus(X, Y) 15.63/5.13 geq(X, 0) -> true 15.63/5.13 geq(0, s(Y)) -> false 15.63/5.13 geq(s(X), s(Y)) -> geq(X, Y) 15.63/5.13 div(0, s(Y)) -> 0 15.63/5.13 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) 15.63/5.13 if(true, X, Y) -> X 15.63/5.13 if(false, X, Y) -> Y 15.63/5.13 15.63/5.13 S is empty. 15.63/5.13 Rewrite Strategy: INNERMOST 16.02/5.21 EOF