/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 1 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 1404 ms] (10) BOUNDS(1, n^1) (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (12) TRS for Loop Detection (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (14) BEST (15) proven lower bound (16) LowerBoundPropagationProof [FINISHED, 0 ms] (17) BOUNDS(n^1, INF) (18) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) gcd(0, y) -> y gcd(s(x), 0) -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] gcd(0, y) -> y [1] gcd(s(x), 0) -> s(x) [1] gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) [1] if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) [1] if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] gcd(0, y) -> y [1] gcd(s(x), 0) -> s(x) [1] gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) [1] if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) [1] if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) [1] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false minus :: 0:s -> 0:s -> 0:s gcd :: 0:s -> 0:s -> 0:s if_gcd :: true:false -> 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: minus(v0, v1) -> null_minus [0] if_gcd(v0, v1, v2) -> null_if_gcd [0] le(v0, v1) -> null_le [0] gcd(v0, v1) -> null_gcd [0] And the following fresh constants: null_minus, null_if_gcd, null_le, null_gcd ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] gcd(0, y) -> y [1] gcd(s(x), 0) -> s(x) [1] gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) [1] if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) [1] if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) [1] minus(v0, v1) -> null_minus [0] if_gcd(v0, v1, v2) -> null_if_gcd [0] le(v0, v1) -> null_le [0] gcd(v0, v1) -> null_gcd [0] The TRS has the following type information: le :: 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd -> true:false:null_le 0 :: 0:s:null_minus:null_if_gcd:null_gcd true :: true:false:null_le s :: 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd false :: true:false:null_le minus :: 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd gcd :: 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd if_gcd :: true:false:null_le -> 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd -> 0:s:null_minus:null_if_gcd:null_gcd null_minus :: 0:s:null_minus:null_if_gcd:null_gcd null_if_gcd :: 0:s:null_minus:null_if_gcd:null_gcd null_le :: true:false:null_le null_gcd :: 0:s:null_minus:null_if_gcd:null_gcd Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 true => 2 false => 1 null_minus => 0 null_if_gcd => 0 null_le => 0 null_gcd => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: gcd(z, z') -{ 1 }-> y :|: y >= 0, z = 0, z' = y gcd(z, z') -{ 1 }-> if_gcd(le(y, x), 1 + x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gcd(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 gcd(z, z') -{ 1 }-> 1 + x :|: x >= 0, z = 1 + x, z' = 0 if_gcd(z, z', z'') -{ 1 }-> gcd(minus(x, y), 1 + y) :|: z = 2, z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y if_gcd(z, z', z'') -{ 1 }-> gcd(minus(y, x), 1 + x) :|: z' = 1 + x, z = 1, x >= 0, y >= 0, z'' = 1 + y if_gcd(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 2 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 le(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V14),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V14),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V14),0,[gcd(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V14),0,[fun(V1, V, V14, Out)],[V1 >= 0,V >= 0,V14 >= 0]). eq(le(V1, V, Out),1,[],[Out = 2,V2 >= 0,V1 = 0,V = V2]). eq(le(V1, V, Out),1,[],[Out = 1,V3 >= 0,V1 = 1 + V3,V = 0]). eq(le(V1, V, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). eq(minus(V1, V, Out),1,[],[Out = V6,V6 >= 0,V1 = V6,V = 0]). eq(minus(V1, V, Out),1,[minus(V7, V8, Ret1)],[Out = Ret1,V = 1 + V8,V7 >= 0,V8 >= 0,V1 = 1 + V7]). eq(gcd(V1, V, Out),1,[],[Out = V9,V9 >= 0,V1 = 0,V = V9]). eq(gcd(V1, V, Out),1,[],[Out = 1 + V10,V10 >= 0,V1 = 1 + V10,V = 0]). eq(gcd(V1, V, Out),1,[le(V11, V12, Ret0),fun(Ret0, 1 + V12, 1 + V11, Ret2)],[Out = Ret2,V = 1 + V11,V12 >= 0,V11 >= 0,V1 = 1 + V12]). eq(fun(V1, V, V14, Out),1,[minus(V15, V13, Ret01),gcd(Ret01, 1 + V13, Ret3)],[Out = Ret3,V1 = 2,V = 1 + V15,V15 >= 0,V13 >= 0,V14 = 1 + V13]). eq(fun(V1, V, V14, Out),1,[minus(V17, V16, Ret02),gcd(Ret02, 1 + V16, Ret4)],[Out = Ret4,V = 1 + V16,V1 = 1,V16 >= 0,V17 >= 0,V14 = 1 + V17]). eq(minus(V1, V, Out),0,[],[Out = 0,V19 >= 0,V18 >= 0,V1 = V19,V = V18]). eq(fun(V1, V, V14, Out),0,[],[Out = 0,V21 >= 0,V14 = V22,V20 >= 0,V1 = V21,V = V20,V22 >= 0]). eq(le(V1, V, Out),0,[],[Out = 0,V24 >= 0,V23 >= 0,V1 = V24,V = V23]). eq(gcd(V1, V, Out),0,[],[Out = 0,V25 >= 0,V26 >= 0,V1 = V25,V = V26]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(gcd(V1,V,Out),[V1,V],[Out]). input_output_vars(fun(V1,V,V14,Out),[V1,V,V14],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [le/3] 1. recursive : [minus/3] 2. recursive : [fun/4,gcd/3] 3. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into le/3 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into gcd/3 3. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 19 is refined into CE [20] * CE 17 is refined into CE [21] * CE 16 is refined into CE [22] * CE 18 is refined into CE [23] ### Cost equations --> "Loop" of le/3 * CEs [23] --> Loop 15 * CEs [20] --> Loop 16 * CEs [21] --> Loop 17 * CEs [22] --> Loop 18 ### Ranking functions of CR le(V1,V,Out) * RF of phase [15]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [15]: - RF of loop [15:1]: V V1 ### Specialization of cost equations minus/3 * CE 9 is refined into CE [24] * CE 7 is refined into CE [25] * CE 8 is refined into CE [26] ### Cost equations --> "Loop" of minus/3 * CEs [26] --> Loop 19 * CEs [24] --> Loop 20 * CEs [25] --> Loop 21 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [19]: [V,V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [19]: - RF of loop [19:1]: V V1 ### Specialization of cost equations gcd/3 * CE 10 is refined into CE [27,28,29,30,31] * CE 15 is refined into CE [32] * CE 14 is refined into CE [33] * CE 13 is refined into CE [34] * CE 12 is refined into CE [35,36,37,38] * CE 11 is refined into CE [39,40,41,42] ### Cost equations --> "Loop" of gcd/3 * CEs [42] --> Loop 22 * CEs [38] --> Loop 23 * CEs [41] --> Loop 24 * CEs [37] --> Loop 25 * CEs [35] --> Loop 26 * CEs [36] --> Loop 27 * CEs [39] --> Loop 28 * CEs [40] --> Loop 29 * CEs [27] --> Loop 30 * CEs [33] --> Loop 31 * CEs [28,29,30,31,32] --> Loop 32 * CEs [34] --> Loop 33 ### Ranking functions of CR gcd(V1,V,Out) * RF of phase [22,23]: [V1+V-3] * RF of phase [26]: [V1] #### Partial ranking functions of CR gcd(V1,V,Out) * Partial RF of phase [22,23]: - RF of loop [22:1]: V-2 V1/2+V/2-2 - RF of loop [23:1]: V1-1 depends on loops [22:1] V1-V+1 depends on loops [22:1] * Partial RF of phase [26]: - RF of loop [26:1]: V1 ### Specialization of cost equations start/3 * CE 3 is refined into CE [43,44,45,46,47,48,49,50,51,52,53,54] * CE 1 is refined into CE [55] * CE 2 is refined into CE [56,57,58,59,60,61,62,63,64,65,66,67] * CE 4 is refined into CE [68,69,70,71,72] * CE 5 is refined into CE [73,74,75] * CE 6 is refined into CE [76,77,78,79,80,81,82,83,84] ### Cost equations --> "Loop" of start/3 * CEs [80,81] --> Loop 34 * CEs [69,73,79] --> Loop 35 * CEs [51] --> Loop 36 * CEs [49] --> Loop 37 * CEs [43,44,45,46,47,48,50,52,53,54] --> Loop 38 * CEs [62] --> Loop 39 * CEs [64,78] --> Loop 40 * CEs [56,57,58,59,60,61,63,65,66,67] --> Loop 41 * CEs [55,68,70,71,72,74,75,76,77,82,83,84] --> Loop 42 ### Ranking functions of CR start(V1,V,V14) #### Partial ranking functions of CR start(V1,V,V14) Computing Bounds ===================================== #### Cost of chains of le(V1,V,Out): * Chain [[15],18]: 1*it(15)+1 Such that:it(15) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[15],17]: 1*it(15)+1 Such that:it(15) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[15],16]: 1*it(15)+0 Such that:it(15) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [18]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [17]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [16]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of minus(V1,V,Out): * Chain [[19],21]: 1*it(19)+1 Such that:it(19) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [[19],20]: 1*it(19)+0 Such that:it(19) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [21]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [20]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of gcd(V1,V,Out): * Chain [[26],33]: 4*it(26)+1 Such that:it(26) =< V1 with precondition: [V=1,Out=1,V1>=1] * Chain [[26],32]: 6*it(26)+1*s(5)+2 Such that:s(5) =< 1 aux(2) =< V1 it(26) =< aux(2) with precondition: [V=1,Out=0,V1>=1] * Chain [[26],30]: 4*it(26)+2 Such that:it(26) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[26],27,33]: 4*it(26)+4 Such that:it(26) =< V1 with precondition: [V=1,Out=1,V1>=2] * Chain [[26],27,32]: 4*it(26)+1*s(5)+5 Such that:s(5) =< 1 it(26) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[22,23],33]: 4*it(22)+4*it(23)+2*s(15)+2*s(17)+1 Such that:aux(8) =< V1-V+1 aux(20) =< V1+V aux(21) =< V1+V-Out it(22) =< V1/2+V/2 aux(23) =< V1/2+V/2-Out/2 aux(24) =< V aux(25) =< V-Out aux(7) =< 2*V-2*Out aux(26) =< V1 it(22) =< aux(20) it(23) =< aux(20) s(16) =< aux(20) it(22) =< aux(21) it(23) =< aux(21) s(16) =< aux(21) it(22) =< aux(23) it(23) =< aux(23) aux(5) =< aux(24) it(22) =< aux(24) aux(5) =< aux(25) it(22) =< aux(25) it(23) =< aux(7)+aux(8) it(23) =< aux(5)+aux(26) s(18) =< aux(5)+aux(26) s(18) =< it(23)*aux(24) s(17) =< s(18) s(15) =< s(16) with precondition: [Out>=2,V1>=Out,V>=Out] * Chain [[22,23],32]: 4*it(22)+4*it(23)+5*s(3)+2*s(17)+2 Such that:aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(7) =< 2*V aux(27) =< V1 aux(28) =< V1+V aux(29) =< V s(3) =< aux(28) it(22) =< aux(28) it(23) =< aux(28) it(22) =< aux(29) it(23) =< aux(7)+aux(8) it(23) =< aux(29)+aux(27) s(18) =< aux(29)+aux(27) s(18) =< it(23)*aux(29) s(17) =< s(18) with precondition: [Out=0,V1>=2,V>=2] * Chain [[22,23],29,33]: 4*it(22)+4*it(23)+2*s(15)+2*s(17)+4 Such that:aux(8) =< V1-V+1 aux(7) =< 2*V aux(30) =< V1 aux(31) =< V1+V aux(32) =< V1/2+V/2 aux(33) =< V it(22) =< aux(32) it(22) =< aux(31) it(23) =< aux(31) it(23) =< aux(32) it(22) =< aux(33) it(23) =< aux(7)+aux(8) it(23) =< aux(33)+aux(30) s(18) =< aux(33)+aux(30) s(18) =< it(23)*aux(33) s(17) =< s(18) s(15) =< aux(31) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],29,32]: 4*it(22)+4*it(23)+1*s(5)+2*s(15)+2*s(17)+5 Such that:s(5) =< 1 aux(8) =< V1-V+1 aux(7) =< 2*V aux(34) =< V1 aux(35) =< V1+V aux(36) =< V1/2+V/2 aux(37) =< V it(22) =< aux(36) it(22) =< aux(35) it(23) =< aux(35) it(23) =< aux(36) it(22) =< aux(37) it(23) =< aux(7)+aux(8) it(23) =< aux(37)+aux(34) s(18) =< aux(37)+aux(34) s(18) =< it(23)*aux(37) s(17) =< s(18) s(15) =< aux(35) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],28,[26],33]: 4*it(22)+4*it(23)+4*it(26)+2*s(15)+2*s(17)+5 Such that:aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(7) =< 2*V aux(38) =< V1 aux(39) =< V1+V aux(40) =< V it(26) =< aux(40) it(22) =< aux(39) it(23) =< aux(39) it(22) =< aux(40) it(23) =< aux(7)+aux(8) it(23) =< aux(40)+aux(38) s(18) =< aux(40)+aux(38) s(18) =< it(23)*aux(40) s(17) =< s(18) s(15) =< aux(39) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],28,[26],32]: 4*it(22)+4*it(23)+6*it(26)+1*s(5)+2*s(15)+2*s(17)+6 Such that:s(5) =< 1 aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(41) =< V1 aux(42) =< V1+V aux(43) =< V aux(44) =< 2*V it(26) =< aux(44) it(22) =< aux(42) it(23) =< aux(42) it(22) =< aux(43) it(23) =< aux(44)+aux(8) it(23) =< aux(43)+aux(41) s(18) =< aux(43)+aux(41) s(18) =< it(23)*aux(43) s(17) =< s(18) s(15) =< aux(42) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],28,[26],30]: 4*it(22)+4*it(23)+4*it(26)+2*s(15)+2*s(17)+6 Such that:aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(7) =< 2*V aux(45) =< V1 aux(46) =< V1+V aux(47) =< V it(26) =< aux(47) it(22) =< aux(46) it(23) =< aux(46) it(22) =< aux(47) it(23) =< aux(7)+aux(8) it(23) =< aux(47)+aux(45) s(18) =< aux(47)+aux(45) s(18) =< it(23)*aux(47) s(17) =< s(18) s(15) =< aux(46) with precondition: [Out=0,V1>=3,V>=3,V+V1>=7] * Chain [[22,23],28,[26],27,33]: 4*it(22)+4*it(23)+4*it(26)+2*s(15)+2*s(17)+8 Such that:aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(7) =< 2*V aux(48) =< V1 aux(49) =< V1+V aux(50) =< V it(26) =< aux(50) it(22) =< aux(49) it(23) =< aux(49) it(22) =< aux(50) it(23) =< aux(7)+aux(8) it(23) =< aux(50)+aux(48) s(18) =< aux(50)+aux(48) s(18) =< it(23)*aux(50) s(17) =< s(18) s(15) =< aux(49) with precondition: [Out=1,V1>=3,V>=3,V+V1>=7] * Chain [[22,23],28,[26],27,32]: 4*it(22)+4*it(23)+4*it(26)+1*s(5)+2*s(15)+2*s(17)+9 Such that:s(5) =< 1 aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(7) =< 2*V aux(51) =< V1 aux(52) =< V1+V aux(53) =< V it(26) =< aux(53) it(22) =< aux(52) it(23) =< aux(52) it(22) =< aux(53) it(23) =< aux(7)+aux(8) it(23) =< aux(53)+aux(51) s(18) =< aux(53)+aux(51) s(18) =< it(23)*aux(53) s(17) =< s(18) s(15) =< aux(52) with precondition: [Out=0,V1>=3,V>=3,V+V1>=7] * Chain [[22,23],28,32]: 4*it(22)+4*it(23)+2*s(3)+1*s(5)+2*s(15)+2*s(17)+6 Such that:s(5) =< 1 aux(8) =< V1-V+1 it(22) =< V1/2+V/2 aux(54) =< V1 aux(55) =< V1+V aux(56) =< V aux(57) =< 2*V s(3) =< aux(57) it(22) =< aux(55) it(23) =< aux(55) it(22) =< aux(56) it(23) =< aux(57)+aux(8) it(23) =< aux(56)+aux(54) s(18) =< aux(56)+aux(54) s(18) =< it(23)*aux(56) s(17) =< s(18) s(15) =< aux(55) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],28,30]: 4*it(22)+4*it(23)+2*s(15)+2*s(17)+6 Such that:aux(8) =< V1-V+1 aux(7) =< 2*V aux(58) =< V1 aux(59) =< V1+V aux(60) =< V1/2+V/2 aux(61) =< V it(22) =< aux(60) it(22) =< aux(59) it(23) =< aux(59) it(23) =< aux(60) it(22) =< aux(61) it(23) =< aux(7)+aux(8) it(23) =< aux(61)+aux(58) s(18) =< aux(61)+aux(58) s(18) =< it(23)*aux(61) s(17) =< s(18) s(15) =< aux(59) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],28,27,33]: 4*it(22)+4*it(23)+2*s(15)+2*s(17)+8 Such that:aux(8) =< V1-V+1 aux(7) =< 2*V aux(62) =< V1 aux(63) =< V1+V aux(64) =< V1/2+V/2 aux(65) =< V it(22) =< aux(64) it(22) =< aux(63) it(23) =< aux(63) it(23) =< aux(64) it(22) =< aux(65) it(23) =< aux(7)+aux(8) it(23) =< aux(65)+aux(62) s(18) =< aux(65)+aux(62) s(18) =< it(23)*aux(65) s(17) =< s(18) s(15) =< aux(63) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],28,27,32]: 4*it(22)+4*it(23)+1*s(5)+2*s(15)+2*s(17)+9 Such that:s(5) =< 1 aux(8) =< V1-V+1 aux(7) =< 2*V aux(66) =< V1 aux(67) =< V1+V aux(68) =< V1/2+V/2 aux(69) =< V it(22) =< aux(68) it(22) =< aux(67) it(23) =< aux(67) it(23) =< aux(68) it(22) =< aux(69) it(23) =< aux(7)+aux(8) it(23) =< aux(69)+aux(66) s(18) =< aux(69)+aux(66) s(18) =< it(23)*aux(69) s(17) =< s(18) s(15) =< aux(67) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[22,23],25,33]: 4*it(22)+4*it(23)+2*s(15)+2*s(17)+2*s(20)+4 Such that:aux(19) =< V1 aux(8) =< V1-V+1 aux(20) =< V1+V aux(21) =< V1+V-2*Out aux(22) =< V1-Out it(22) =< V1/2+V/2 aux(23) =< V1/2+V/2-Out aux(24) =< V aux(25) =< V-Out aux(7) =< 2*V-2*Out aux(70) =< Out s(20) =< aux(70) it(22) =< aux(20) it(23) =< aux(20) s(16) =< aux(20) it(22) =< aux(21) it(23) =< aux(21) s(16) =< aux(21) it(22) =< aux(23) it(23) =< aux(23) aux(5) =< aux(24) it(22) =< aux(24) aux(5) =< aux(25) it(22) =< aux(25) it(23) =< aux(7)+aux(8) it(23) =< aux(5)+aux(19) s(18) =< aux(5)+aux(22) s(18) =< aux(5)+aux(19) it(23) =< aux(5)+aux(22) s(18) =< it(23)*aux(24) s(17) =< s(18) s(15) =< s(16) with precondition: [Out>=2,V1>=Out,V>=Out,V+V1>=3*Out] * Chain [[22,23],25,32]: 4*it(22)+4*it(23)+3*s(5)+2*s(15)+2*s(17)+5 Such that:aux(8) =< V1-V+1 aux(7) =< 2*V aux(72) =< V1 aux(73) =< V1+V aux(74) =< V1/2+V/2 aux(75) =< V it(22) =< aux(74) s(5) =< aux(75) it(22) =< aux(73) it(23) =< aux(73) it(23) =< aux(74) it(22) =< aux(75) it(23) =< aux(7)+aux(8) it(23) =< aux(75)+aux(72) s(18) =< aux(75)+aux(72) s(18) =< it(23)*aux(75) s(17) =< s(18) s(15) =< aux(73) with precondition: [Out=0,V1>=2,V>=2,V+V1>=6] * Chain [[22,23],24,33]: 4*it(22)+4*it(23)+2*s(15)+2*s(17)+2*s(22)+4 Such that:aux(19) =< V1 aux(8) =< V1-V+1 aux(20) =< V1+V aux(21) =< V1+V-2*Out aux(22) =< V1-Out it(22) =< V1/2+V/2 aux(23) =< V1/2+V/2-Out aux(24) =< V aux(25) =< V-Out aux(7) =< 2*V-2*Out aux(76) =< Out s(22) =< aux(76) it(22) =< aux(20) it(23) =< aux(20) s(16) =< aux(20) it(22) =< aux(21) it(23) =< aux(21) s(16) =< aux(21) it(22) =< aux(23) it(23) =< aux(23) aux(5) =< aux(24) it(22) =< aux(24) aux(5) =< aux(25) it(22) =< aux(25) it(23) =< aux(7)+aux(8) it(23) =< aux(5)+aux(19) s(18) =< aux(5)+aux(22) s(18) =< aux(5)+aux(19) it(23) =< aux(5)+aux(22) s(18) =< it(23)*aux(24) s(17) =< s(18) s(15) =< s(16) with precondition: [Out>=2,V1>=Out+1,V>=Out+1,V+V1>=3*Out+2] * Chain [[22,23],24,32]: 4*it(22)+4*it(23)+3*s(5)+2*s(15)+2*s(17)+5 Such that:aux(8) =< V1-V+1 aux(7) =< 2*V aux(78) =< V1 aux(79) =< V1+V aux(80) =< V1/2+V/2 aux(81) =< V it(22) =< aux(80) s(5) =< aux(78) it(22) =< aux(79) it(23) =< aux(79) it(23) =< aux(80) it(22) =< aux(81) it(23) =< aux(7)+aux(8) it(23) =< aux(81)+aux(78) s(18) =< aux(81)+aux(78) s(18) =< it(23)*aux(81) s(17) =< s(18) s(15) =< aux(79) with precondition: [Out=0,V1>=3,V>=3,V+V1>=8] * Chain [33]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [32]: 2*s(3)+1*s(5)+2 Such that:s(5) =< V aux(1) =< V1 s(3) =< aux(1) with precondition: [Out=0,V1>=0,V>=0] * Chain [31]: 1 with precondition: [V=0,V1=Out,V1>=1] * Chain [30]: 2 with precondition: [V=1,Out=0,V1>=1] * Chain [29,33]: 4 with precondition: [V1=1,Out=1,V>=2] * Chain [29,32]: 1*s(5)+5 Such that:s(5) =< 1 with precondition: [V1=1,Out=0,V>=2] * Chain [28,[26],33]: 4*it(26)+5 Such that:it(26) =< V with precondition: [V1=1,Out=1,V>=2] * Chain [28,[26],32]: 6*it(26)+1*s(5)+6 Such that:s(5) =< 1 aux(2) =< V it(26) =< aux(2) with precondition: [V1=1,Out=0,V>=2] * Chain [28,[26],30]: 4*it(26)+6 Such that:it(26) =< V with precondition: [V1=1,Out=0,V>=3] * Chain [28,[26],27,33]: 4*it(26)+8 Such that:it(26) =< V with precondition: [V1=1,Out=1,V>=3] * Chain [28,[26],27,32]: 4*it(26)+1*s(5)+9 Such that:s(5) =< 1 it(26) =< V with precondition: [V1=1,Out=0,V>=3] * Chain [28,32]: 2*s(3)+1*s(5)+6 Such that:s(5) =< 1 aux(1) =< V s(3) =< aux(1) with precondition: [V1=1,Out=0,V>=2] * Chain [28,30]: 6 with precondition: [V1=1,Out=0,V>=2] * Chain [28,27,33]: 8 with precondition: [V1=1,Out=1,V>=2] * Chain [28,27,32]: 1*s(5)+9 Such that:s(5) =< 1 with precondition: [V1=1,Out=0,V>=2] * Chain [27,33]: 4 with precondition: [V=1,Out=1,V1>=1] * Chain [27,32]: 1*s(5)+5 Such that:s(5) =< 1 with precondition: [V=1,Out=0,V1>=1] * Chain [25,33]: 2*s(20)+4 Such that:aux(70) =< Out s(20) =< aux(70) with precondition: [V=Out,V>=2,V1>=V] * Chain [25,32]: 3*s(5)+5 Such that:aux(71) =< V s(5) =< aux(71) with precondition: [Out=0,V>=2,V1>=V] * Chain [24,33]: 2*s(22)+4 Such that:aux(76) =< Out s(22) =< aux(76) with precondition: [V1=Out,V1>=2,V>=V1+1] * Chain [24,32]: 3*s(5)+5 Such that:aux(77) =< V1 s(5) =< aux(77) with precondition: [Out=0,V1>=2,V>=V1+1] #### Cost of chains of start(V1,V,V14): * Chain [42]: 45*s(266)+9*s(268)+10*s(278)+68*s(279)+36*s(281)+18*s(283)+43*s(284)+8*s(285)+32*s(286)+16*s(288)+9 Such that:s(271) =< 1 aux(114) =< V1 aux(115) =< V1-V+1 aux(116) =< V1+V aux(117) =< V1/2+V/2 aux(118) =< V aux(119) =< 2*V s(268) =< aux(114) s(266) =< aux(118) s(278) =< s(271) s(279) =< aux(117) s(279) =< aux(116) s(281) =< aux(116) s(281) =< aux(117) s(279) =< aux(118) s(281) =< aux(119)+aux(115) s(281) =< aux(118)+aux(114) s(282) =< aux(118)+aux(114) s(282) =< s(281)*aux(118) s(283) =< s(282) s(284) =< aux(116) s(285) =< aux(119) s(286) =< aux(116) s(286) =< aux(119)+aux(115) s(286) =< aux(118)+aux(114) s(287) =< aux(118)+aux(114) s(287) =< s(286)*aux(118) s(288) =< s(287) with precondition: [V1>=0,V>=0] * Chain [41]: 64*s(341)+40*s(342)+20*s(344)+10*s(346)+96*s(347)+8*s(348)+20*s(349)+10*s(351)+101*s(359)+40*s(369)+20*s(371)+10*s(373)+16*s(375)+20*s(376)+10*s(378)+68*s(389)+36*s(391)+18*s(393)+32*s(396)+16*s(398)+8*s(399)+11 Such that:s(340) =< 2 s(363) =< -V+1 s(365) =< V/2 aux(130) =< 1 aux(131) =< -2*V+V14+1 aux(132) =< -V+V14 aux(133) =< V aux(134) =< 2*V aux(135) =< V14 aux(136) =< V14/2 s(359) =< aux(133) s(341) =< aux(130) s(347) =< aux(135) s(369) =< s(365) s(369) =< aux(133) s(371) =< aux(133) s(371) =< s(365) s(371) =< aux(134)+s(363) s(372) =< aux(133) s(372) =< s(371)*aux(133) s(373) =< s(372) s(375) =< aux(134) s(376) =< aux(133) s(376) =< aux(134)+s(363) s(377) =< aux(133) s(377) =< s(376)*aux(133) s(378) =< s(377) s(389) =< aux(136) s(389) =< aux(135) s(391) =< aux(135) s(391) =< aux(136) s(389) =< aux(133) s(391) =< aux(134)+aux(131) s(391) =< aux(133)+aux(132) s(392) =< aux(133)+aux(132) s(392) =< s(391)*aux(133) s(393) =< s(392) s(396) =< aux(135) s(396) =< aux(134)+aux(131) s(396) =< aux(133)+aux(132) s(397) =< aux(133)+aux(132) s(397) =< s(396)*aux(133) s(398) =< s(397) s(399) =< aux(132) s(342) =< aux(136) s(342) =< aux(135) s(344) =< aux(135) s(344) =< aux(136) s(342) =< aux(130) s(344) =< s(340)+aux(135) s(344) =< aux(130)+aux(135) s(345) =< aux(130)+aux(135) s(345) =< s(344)*aux(130) s(346) =< s(345) s(348) =< s(340) s(349) =< aux(135) s(349) =< s(340)+aux(135) s(349) =< aux(130)+aux(135) s(350) =< aux(130)+aux(135) s(350) =< s(349)*aux(130) s(351) =< s(350) with precondition: [V1=1,V>=1,V14>=1] * Chain [40]: 9*s(447)+8*s(451)+10 Such that:s(450) =< V aux(137) =< V14 s(451) =< s(450) s(447) =< aux(137) with precondition: [V1=1,V>=2] * Chain [39]: 1*s(452)+3 Such that:s(452) =< V14 with precondition: [V1=1,V=V14,V>=2] * Chain [38]: 64*s(460)+40*s(461)+20*s(463)+10*s(465)+96*s(466)+8*s(467)+20*s(468)+10*s(470)+101*s(478)+40*s(488)+20*s(490)+10*s(492)+16*s(494)+20*s(495)+10*s(497)+68*s(508)+36*s(510)+18*s(512)+32*s(515)+16*s(517)+8*s(518)+11 Such that:s(459) =< 2 s(482) =< -V14+1 s(484) =< V14/2 aux(148) =< 1 aux(149) =< V aux(150) =< V-2*V14+1 aux(151) =< V-V14 aux(152) =< V/2 aux(153) =< V14 aux(154) =< 2*V14 s(478) =< aux(153) s(460) =< aux(148) s(466) =< aux(149) s(488) =< s(484) s(488) =< aux(153) s(490) =< aux(153) s(490) =< s(484) s(490) =< aux(154)+s(482) s(491) =< aux(153) s(491) =< s(490)*aux(153) s(492) =< s(491) s(494) =< aux(154) s(495) =< aux(153) s(495) =< aux(154)+s(482) s(496) =< aux(153) s(496) =< s(495)*aux(153) s(497) =< s(496) s(508) =< aux(152) s(508) =< aux(149) s(510) =< aux(149) s(510) =< aux(152) s(508) =< aux(153) s(510) =< aux(154)+aux(150) s(510) =< aux(153)+aux(151) s(511) =< aux(153)+aux(151) s(511) =< s(510)*aux(153) s(512) =< s(511) s(515) =< aux(149) s(515) =< aux(154)+aux(150) s(515) =< aux(153)+aux(151) s(516) =< aux(153)+aux(151) s(516) =< s(515)*aux(153) s(517) =< s(516) s(518) =< aux(151) s(461) =< aux(152) s(461) =< aux(149) s(463) =< aux(149) s(463) =< aux(152) s(461) =< aux(148) s(463) =< s(459)+aux(149) s(463) =< aux(148)+aux(149) s(464) =< aux(148)+aux(149) s(464) =< s(463)*aux(148) s(465) =< s(464) s(467) =< s(459) s(468) =< aux(149) s(468) =< s(459)+aux(149) s(468) =< aux(148)+aux(149) s(469) =< aux(148)+aux(149) s(469) =< s(468)*aux(148) s(470) =< s(469) with precondition: [V1=2,V>=1,V14>=1] * Chain [37]: 1*s(566)+3 Such that:s(566) =< V14 with precondition: [V1=2,V=V14,V>=2] * Chain [36]: 9*s(567)+10 Such that:aux(155) =< V14 s(567) =< aux(155) with precondition: [V1=2,V=V14+1,V>=3] * Chain [35]: 1 with precondition: [V=0,V1>=0] * Chain [34]: 3*s(572)+22*s(573)+5 Such that:s(570) =< 1 aux(156) =< V1 s(572) =< s(570) s(573) =< aux(156) with precondition: [V=1,V1>=1] Closed-form bounds of start(V1,V,V14): ------------------------------------- * Chain [42] with precondition: [V1>=0,V>=0] - Upper bound: 188*V1+240*V+19 - Complexity: n * Chain [41] with precondition: [V1=1,V>=1,V14>=1] - Upper bound: 227*V+224*V14+151+nat(-V+V14)*42+20*V+34*V14 - Complexity: n * Chain [40] with precondition: [V1=1,V>=2] - Upper bound: 8*V+10+nat(V14)*9 - Complexity: n * Chain [39] with precondition: [V1=1,V=V14,V>=2] - Upper bound: V14+3 - Complexity: n * Chain [38] with precondition: [V1=2,V>=1,V14>=1] - Upper bound: 224*V+227*V14+151+nat(V-V14)*42+34*V+20*V14 - Complexity: n * Chain [37] with precondition: [V1=2,V=V14,V>=2] - Upper bound: V14+3 - Complexity: n * Chain [36] with precondition: [V1=2,V=V14+1,V>=3] - Upper bound: 9*V14+10 - Complexity: n * Chain [35] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant * Chain [34] with precondition: [V=1,V1>=1] - Upper bound: 22*V1+8 - Complexity: n ### Maximum cost of start(V1,V,V14): max([188*V1+240*V+18,187*V+141+nat(V14)*186+20*V+nat(V14/2)*40+max([nat(V14)*29+32*V+nat(-V+V14)*42+nat(V14/2)*28,nat(2*V14)*16+29*V+nat(V-V14)*42+14*V])+8*V+(nat(V14)*8+7)+(nat(V14)+2)])+1 Asymptotic class: n * Total analysis performed in 1253 ms. ---------------------------------------- (10) BOUNDS(1, n^1) ---------------------------------------- (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (12) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) gcd(0, y) -> y gcd(s(x), 0) -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence minus(s(x), s(y)) ->^+ minus(x, y) gives rise to a decreasing loop by considering the right hand sides subterm at position []. The pumping substitution is [x / s(x), y / s(y)]. The result substitution is [ ]. ---------------------------------------- (14) Complex Obligation (BEST) ---------------------------------------- (15) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) gcd(0, y) -> y gcd(s(x), 0) -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (16) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (17) BOUNDS(n^1, INF) ---------------------------------------- (18) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) gcd(0, y) -> y gcd(s(x), 0) -> s(x) gcd(s(x), s(y)) -> if_gcd(le(y, x), s(x), s(y)) if_gcd(true, s(x), s(y)) -> gcd(minus(x, y), s(y)) if_gcd(false, s(x), s(y)) -> gcd(minus(y, x), s(x)) S is empty. Rewrite Strategy: INNERMOST