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