/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/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), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 1377 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) pred(s(x)) -> x minus(x, 0) -> x minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), 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] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) [1] if_gcd(false, x, y) -> gcd(minus(y, x), 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] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) [1] if_gcd(false, x, y) -> gcd(minus(y, x), 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 pred :: 0:s -> 0:s 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: pred(v0) -> null_pred [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] gcd(v0, v1) -> null_gcd [0] if_gcd(v0, v1, v2) -> null_if_gcd [0] And the following fresh constants: null_pred, null_le, null_minus, null_gcd, null_if_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] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) [1] if_gcd(false, x, y) -> gcd(minus(y, x), x) [1] pred(v0) -> null_pred [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] gcd(v0, v1) -> null_gcd [0] if_gcd(v0, v1, v2) -> null_if_gcd [0] The TRS has the following type information: le :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> true:false:null_le 0 :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd true :: true:false:null_le s :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd false :: true:false:null_le pred :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd minus :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd gcd :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd if_gcd :: true:false:null_le -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd -> 0:s:null_pred:null_minus:null_gcd:null_if_gcd null_pred :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd null_le :: true:false:null_le null_minus :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd null_gcd :: 0:s:null_pred:null_minus:null_gcd:null_if_gcd null_if_gcd :: 0:s:null_pred:null_minus:null_gcd:null_if_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_pred => 0 null_le => 0 null_minus => 0 null_gcd => 0 null_if_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), y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 if_gcd(z, z', z'') -{ 1 }-> gcd(minus(y, x), x) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 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 }-> pred(minus(x, y)) :|: z' = 1 + y, x >= 0, y >= 0, z = x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 pred(z) -{ 1 }-> x :|: x >= 0, z = 1 + x pred(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 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, V15),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V15),0,[pred(V1, Out)],[V1 >= 0]). eq(start(V1, V, V15),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V15),0,[gcd(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V15),0,[fun(V1, V, V15, Out)],[V1 >= 0,V >= 0,V15 >= 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(pred(V1, Out),1,[],[Out = V6,V6 >= 0,V1 = 1 + V6]). eq(minus(V1, V, Out),1,[],[Out = V7,V7 >= 0,V1 = V7,V = 0]). eq(minus(V1, V, Out),1,[minus(V8, V9, Ret0),pred(Ret0, Ret1)],[Out = Ret1,V = 1 + V9,V8 >= 0,V9 >= 0,V1 = V8]). eq(gcd(V1, V, Out),1,[],[Out = V10,V10 >= 0,V1 = 0,V = V10]). eq(gcd(V1, V, Out),1,[],[Out = 1 + V11,V11 >= 0,V1 = 1 + V11,V = 0]). eq(gcd(V1, V, Out),1,[le(V12, V13, Ret01),fun(Ret01, 1 + V13, 1 + V12, Ret2)],[Out = Ret2,V = 1 + V12,V13 >= 0,V12 >= 0,V1 = 1 + V13]). eq(fun(V1, V, V15, Out),1,[minus(V16, V14, Ret02),gcd(Ret02, V14, Ret3)],[Out = Ret3,V1 = 2,V = V16,V15 = V14,V16 >= 0,V14 >= 0]). eq(fun(V1, V, V15, Out),1,[minus(V18, V17, Ret03),gcd(Ret03, V17, Ret4)],[Out = Ret4,V = V17,V15 = V18,V1 = 1,V17 >= 0,V18 >= 0]). eq(pred(V1, Out),0,[],[Out = 0,V19 >= 0,V1 = V19]). eq(le(V1, V, Out),0,[],[Out = 0,V21 >= 0,V20 >= 0,V1 = V21,V = V20]). eq(minus(V1, V, Out),0,[],[Out = 0,V23 >= 0,V22 >= 0,V1 = V23,V = V22]). eq(gcd(V1, V, Out),0,[],[Out = 0,V24 >= 0,V25 >= 0,V1 = V24,V = V25]). eq(fun(V1, V, V15, Out),0,[],[Out = 0,V26 >= 0,V15 = V28,V27 >= 0,V1 = V26,V = V27,V28 >= 0]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(pred(V1,Out),[V1],[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,V15,Out),[V1,V,V15],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [le/3] 1. non_recursive : [pred/2] 2. recursive [non_tail] : [minus/3] 3. recursive : [fun/4,gcd/3] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into le/3 1. SCC is partially evaluated into pred/2 2. SCC is partially evaluated into minus/3 3. SCC is partially evaluated into gcd/3 4. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 20 is refined into CE [23] * CE 18 is refined into CE [24] * CE 17 is refined into CE [25] * CE 19 is refined into CE [26] ### Cost equations --> "Loop" of le/3 * CEs [26] --> Loop 17 * CEs [23] --> Loop 18 * CEs [24] --> Loop 19 * CEs [25] --> Loop 20 ### Ranking functions of CR le(V1,V,Out) * RF of phase [17]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V V1 ### Specialization of cost equations pred/2 * CE 21 is refined into CE [27] * CE 22 is refined into CE [28] ### Cost equations --> "Loop" of pred/2 * CEs [27] --> Loop 21 * CEs [28] --> Loop 22 ### Ranking functions of CR pred(V1,Out) #### Partial ranking functions of CR pred(V1,Out) ### Specialization of cost equations minus/3 * CE 10 is refined into CE [29] * CE 8 is refined into CE [30] * CE 9 is refined into CE [31,32] ### Cost equations --> "Loop" of minus/3 * CEs [32] --> Loop 23 * CEs [31] --> Loop 24 * CEs [29] --> Loop 25 * CEs [30] --> Loop 26 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [23]: [V] * RF of phase [24]: [V] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [23]: - RF of loop [23:1]: V * Partial RF of phase [24]: - RF of loop [24:1]: V ### Specialization of cost equations gcd/3 * CE 11 is refined into CE [33,34,35,36,37] * CE 16 is refined into CE [38] * CE 15 is refined into CE [39] * CE 14 is refined into CE [40] * CE 13 is refined into CE [41,42,43,44] * CE 12 is refined into CE [45,46,47,48] ### Cost equations --> "Loop" of gcd/3 * CEs [44] --> Loop 27 * CEs [48] --> Loop 28 * CEs [43] --> Loop 29 * CEs [47] --> Loop 30 * CEs [42] --> Loop 31 * CEs [41] --> Loop 32 * CEs [46] --> Loop 33 * CEs [45] --> Loop 34 * CEs [33] --> Loop 35 * CEs [39] --> Loop 36 * CEs [34,35,36,37,38] --> Loop 37 * CEs [40] --> Loop 38 ### Ranking functions of CR gcd(V1,V,Out) * RF of phase [27,28]: [V1+V-3] * RF of phase [31]: [V1] #### Partial ranking functions of CR gcd(V1,V,Out) * Partial RF of phase [27,28]: - RF of loop [27:1]: V1-1 depends on loops [28:1] V1-V+1 depends on loops [28:1] - RF of loop [28:1]: V-2 V1/2+V/2-2 * Partial RF of phase [31]: - RF of loop [31:1]: V1 ### Specialization of cost equations start/3 * CE 3 is refined into CE [49,50,51,52,53,54,55,56,57,58,59,60,61] * CE 1 is refined into CE [62] * CE 2 is refined into CE [63,64,65,66,67,68,69,70,71,72,73,74,75] * CE 4 is refined into CE [76,77,78,79,80] * CE 5 is refined into CE [81,82] * CE 6 is refined into CE [83,84,85] * CE 7 is refined into CE [86,87,88,89,90,91,92,93,94] ### Cost equations --> "Loop" of start/3 * CEs [77,83,89] --> Loop 39 * CEs [56] --> Loop 40 * CEs [54] --> Loop 41 * CEs [57,58] --> Loop 42 * CEs [49,50,51,52,53,55,59,60,61] --> Loop 43 * CEs [68] --> Loop 44 * CEs [70,88] --> Loop 45 * CEs [71,72,90,91] --> Loop 46 * CEs [63,64,65,66,67,69,73,74,75] --> Loop 47 * CEs [62,76,78,79,80,81,82,84,85,86,87,92,93,94] --> Loop 48 ### Ranking functions of CR start(V1,V,V15) #### Partial ranking functions of CR start(V1,V,V15) Computing Bounds ===================================== #### Cost of chains of le(V1,V,Out): * Chain [[17],20]: 1*it(17)+1 Such that:it(17) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[17],19]: 1*it(17)+1 Such that:it(17) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[17],18]: 1*it(17)+0 Such that:it(17) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [20]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [19]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [18]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of pred(V1,Out): * Chain [22]: 0 with precondition: [Out=0,V1>=0] * Chain [21]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of minus(V1,V,Out): * Chain [[24],[23],26]: 3*it(23)+1 Such that:aux(1) =< V it(23) =< aux(1) with precondition: [Out=0,V1>=1,V>=2] * Chain [[24],26]: 1*it(24)+1 Such that:it(24) =< V with precondition: [Out=0,V1>=0,V>=1] * Chain [[24],25]: 1*it(24)+0 Such that:it(24) =< V with precondition: [Out=0,V1>=0,V>=1] * Chain [[23],26]: 2*it(23)+1 Such that:it(23) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [26]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [25]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of gcd(V1,V,Out): * Chain [[31],38]: 6*it(31)+1 Such that:aux(6) =< V1 it(31) =< aux(6) with precondition: [V=1,Out=1,V1>=1] * Chain [[31],37]: 8*it(31)+1*s(11)+2 Such that:s(11) =< 1 aux(8) =< V1 it(31) =< aux(8) with precondition: [V=1,Out=0,V1>=1] * Chain [[31],35]: 6*it(31)+2 Such that:aux(9) =< V1 it(31) =< aux(9) with precondition: [V=1,Out=0,V1>=2] * Chain [[31],32,38]: 6*it(31)+5*s(13)+5 Such that:s(12) =< 1 aux(10) =< V1 s(13) =< s(12) it(31) =< aux(10) with precondition: [V=1,Out=1,V1>=2] * Chain [[31],32,37]: 6*it(31)+6*s(11)+6 Such that:aux(11) =< 1 aux(12) =< V1 s(11) =< aux(11) it(31) =< aux(12) with precondition: [V=1,Out=0,V1>=2] * Chain [[27,28],38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+1 Such that:aux(18) =< V1-V+1 aux(30) =< V1+V aux(31) =< V1+V-Out it(28) =< V1/2+V/2-Out/2 aux(33) =< V aux(34) =< V-Out aux(17) =< 2*V-2*Out aux(35) =< V1 it(27) =< aux(30) it(28) =< aux(30) s(25) =< aux(30) it(27) =< aux(31) it(28) =< aux(31) s(25) =< aux(31) aux(15) =< aux(33) it(28) =< aux(33) aux(15) =< aux(34) it(28) =< aux(34) it(27) =< aux(17)+aux(18) it(27) =< aux(15)+aux(35) s(23) =< aux(15)+aux(35) s(23) =< it(27)*aux(33) s(24) =< s(25) s(22) =< s(23) with precondition: [Out>=2,V1>=Out,V>=Out] * Chain [[27,28],37]: 4*it(27)+4*it(28)+6*s(9)+3*s(22)+2 Such that:aux(18) =< V1-V+1 aux(17) =< 2*V aux(36) =< V1 aux(37) =< V1+V aux(38) =< V it(28) =< aux(37) s(9) =< aux(37) it(27) =< aux(37) it(28) =< aux(38) it(27) =< aux(17)+aux(18) it(27) =< aux(38)+aux(36) s(23) =< aux(38)+aux(36) s(23) =< it(27)*aux(38) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2] * Chain [[27,28],34,38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+5*s(27)+5 Such that:s(26) =< 1 aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(17) =< 2*V aux(39) =< V1 aux(40) =< V1+V aux(41) =< V s(27) =< s(26) it(27) =< aux(40) it(28) =< aux(40) it(28) =< aux(41) it(27) =< aux(17)+aux(18) it(27) =< aux(41)+aux(39) s(23) =< aux(41)+aux(39) s(23) =< it(27)*aux(41) s(24) =< aux(40) s(22) =< s(23) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],34,37]: 4*it(27)+4*it(28)+6*s(11)+3*s(22)+3*s(24)+6 Such that:aux(42) =< 1 aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(17) =< 2*V aux(43) =< V1 aux(44) =< V1+V aux(45) =< V s(11) =< aux(42) it(27) =< aux(44) it(28) =< aux(44) it(28) =< aux(45) it(27) =< aux(17)+aux(18) it(27) =< aux(45)+aux(43) s(23) =< aux(45)+aux(43) s(23) =< it(27)*aux(45) s(24) =< aux(44) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,[31],38]: 4*it(27)+4*it(28)+6*it(31)+3*s(22)+3*s(24)+2*s(28)+5 Such that:s(28) =< 1 aux(18) =< V1-V+1 aux(46) =< V1 aux(47) =< V1+V aux(48) =< V aux(49) =< 2*V it(28) =< aux(47) it(31) =< aux(49) it(27) =< aux(47) it(28) =< aux(48) it(27) =< aux(49)+aux(18) it(27) =< aux(48)+aux(46) s(23) =< aux(48)+aux(46) s(23) =< it(27)*aux(48) s(24) =< aux(47) s(22) =< s(23) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,[31],37]: 4*it(27)+4*it(28)+8*it(31)+3*s(11)+3*s(22)+3*s(24)+6 Such that:aux(50) =< 1 aux(18) =< V1-V+1 aux(51) =< V1 aux(52) =< V1+V aux(53) =< V aux(54) =< 2*V it(28) =< aux(52) s(11) =< aux(50) it(31) =< aux(54) it(27) =< aux(52) it(28) =< aux(53) it(27) =< aux(54)+aux(18) it(27) =< aux(53)+aux(51) s(23) =< aux(53)+aux(51) s(23) =< it(27)*aux(53) s(24) =< aux(52) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,[31],35]: 4*it(27)+4*it(28)+6*it(31)+3*s(22)+3*s(24)+2*s(28)+6 Such that:s(28) =< 1 aux(18) =< V1-V+1 aux(55) =< V1 aux(56) =< V1+V aux(57) =< V aux(58) =< 2*V it(28) =< aux(56) it(31) =< aux(58) it(27) =< aux(56) it(28) =< aux(57) it(27) =< aux(58)+aux(18) it(27) =< aux(57)+aux(55) s(23) =< aux(57)+aux(55) s(23) =< it(27)*aux(57) s(24) =< aux(56) s(22) =< s(23) with precondition: [Out=0,V1>=3,V>=3,V+V1>=7] * Chain [[27,28],33,[31],32,38]: 4*it(27)+4*it(28)+6*it(31)+7*s(13)+3*s(22)+3*s(24)+9 Such that:aux(59) =< 1 aux(18) =< V1-V+1 aux(60) =< V1 aux(61) =< V1+V aux(62) =< V aux(63) =< 2*V it(28) =< aux(61) s(13) =< aux(59) it(31) =< aux(63) it(27) =< aux(61) it(28) =< aux(62) it(27) =< aux(63)+aux(18) it(27) =< aux(62)+aux(60) s(23) =< aux(62)+aux(60) s(23) =< it(27)*aux(62) s(24) =< aux(61) s(22) =< s(23) with precondition: [Out=1,V1>=3,V>=3,V+V1>=7] * Chain [[27,28],33,[31],32,37]: 4*it(27)+4*it(28)+6*it(31)+8*s(11)+3*s(22)+3*s(24)+10 Such that:aux(64) =< 1 aux(18) =< V1-V+1 aux(65) =< V1 aux(66) =< V1+V aux(67) =< V aux(68) =< 2*V it(28) =< aux(66) s(11) =< aux(64) it(31) =< aux(68) it(27) =< aux(66) it(28) =< aux(67) it(27) =< aux(68)+aux(18) it(27) =< aux(67)+aux(65) s(23) =< aux(67)+aux(65) s(23) =< it(27)*aux(67) s(24) =< aux(66) s(22) =< s(23) with precondition: [Out=0,V1>=3,V>=3,V+V1>=7] * Chain [[27,28],33,37]: 4*it(27)+4*it(28)+2*s(9)+3*s(11)+3*s(22)+3*s(24)+6 Such that:aux(69) =< 1 aux(18) =< V1-V+1 aux(70) =< V1 aux(71) =< V1+V aux(72) =< V aux(73) =< 2*V it(28) =< aux(71) s(11) =< aux(69) s(9) =< aux(73) it(27) =< aux(71) it(28) =< aux(72) it(27) =< aux(73)+aux(18) it(27) =< aux(72)+aux(70) s(23) =< aux(72)+aux(70) s(23) =< it(27)*aux(72) s(24) =< aux(71) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,35]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+2*s(28)+6 Such that:s(28) =< 1 aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(17) =< 2*V aux(74) =< V1 aux(75) =< V1+V aux(76) =< V it(27) =< aux(75) it(28) =< aux(75) it(28) =< aux(76) it(27) =< aux(17)+aux(18) it(27) =< aux(76)+aux(74) s(23) =< aux(76)+aux(74) s(23) =< it(27)*aux(76) s(24) =< aux(75) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,32,38]: 4*it(27)+4*it(28)+7*s(13)+3*s(22)+3*s(24)+9 Such that:aux(77) =< 1 aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(17) =< 2*V aux(78) =< V1 aux(79) =< V1+V aux(80) =< V s(13) =< aux(77) it(27) =< aux(79) it(28) =< aux(79) it(28) =< aux(80) it(27) =< aux(17)+aux(18) it(27) =< aux(80)+aux(78) s(23) =< aux(80)+aux(78) s(23) =< it(27)*aux(80) s(24) =< aux(79) s(22) =< s(23) with precondition: [Out=1,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],33,32,37]: 4*it(27)+4*it(28)+8*s(11)+3*s(22)+3*s(24)+10 Such that:aux(81) =< 1 aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(17) =< 2*V aux(82) =< V1 aux(83) =< V1+V aux(84) =< V s(11) =< aux(81) it(27) =< aux(83) it(28) =< aux(83) it(28) =< aux(84) it(27) =< aux(17)+aux(18) it(27) =< aux(84)+aux(82) s(23) =< aux(84)+aux(82) s(23) =< it(27)*aux(84) s(24) =< aux(83) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2,V+V1>=5] * Chain [[27,28],30,38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+6*s(29)+5 Such that:aux(29) =< V1 aux(18) =< V1-V+1 aux(30) =< V1+V aux(31) =< V1+V-2*Out aux(32) =< V1-Out it(28) =< V1/2+V/2-Out aux(33) =< V aux(34) =< V-Out aux(17) =< 2*V-2*Out aux(85) =< Out s(29) =< aux(85) it(27) =< aux(30) it(28) =< aux(30) s(25) =< aux(30) it(27) =< aux(31) it(28) =< aux(31) s(25) =< aux(31) aux(15) =< aux(33) it(28) =< aux(33) aux(15) =< aux(34) it(28) =< aux(34) it(27) =< aux(17)+aux(18) it(27) =< aux(15)+aux(29) s(23) =< aux(15)+aux(32) s(23) =< aux(15)+aux(29) it(27) =< aux(15)+aux(32) s(23) =< it(27)*aux(33) s(24) =< s(25) s(22) =< s(23) with precondition: [Out>=2,V1>=Out+1,V>=Out+1,V+V1>=3*Out+2] * Chain [[27,28],30,37]: 4*it(27)+4*it(28)+7*s(11)+3*s(22)+3*s(24)+6 Such that:aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(17) =< 2*V aux(87) =< V1 aux(88) =< V1+V aux(89) =< V s(11) =< aux(87) it(27) =< aux(88) it(28) =< aux(88) it(28) =< aux(89) it(27) =< aux(17)+aux(18) it(27) =< aux(89)+aux(87) s(23) =< aux(89)+aux(87) s(23) =< it(27)*aux(89) s(24) =< aux(88) s(22) =< s(23) with precondition: [Out=0,V1>=3,V>=3,V+V1>=8] * Chain [[27,28],29,38]: 4*it(27)+4*it(28)+3*s(22)+3*s(24)+6*s(32)+5 Such that:aux(29) =< V1 aux(18) =< V1-V+1 aux(30) =< V1+V aux(31) =< V1+V-2*Out aux(32) =< V1-Out it(28) =< V1/2+V/2-Out aux(33) =< V aux(34) =< V-Out aux(17) =< 2*V-2*Out aux(90) =< Out s(32) =< aux(90) it(27) =< aux(30) it(28) =< aux(30) s(25) =< aux(30) it(27) =< aux(31) it(28) =< aux(31) s(25) =< aux(31) aux(15) =< aux(33) it(28) =< aux(33) aux(15) =< aux(34) it(28) =< aux(34) it(27) =< aux(17)+aux(18) it(27) =< aux(15)+aux(29) s(23) =< aux(15)+aux(32) s(23) =< aux(15)+aux(29) it(27) =< aux(15)+aux(32) s(23) =< it(27)*aux(33) s(24) =< s(25) s(22) =< s(23) with precondition: [Out>=2,V1>=Out,V>=Out,V+V1>=3*Out] * Chain [[27,28],29,37]: 4*it(27)+4*it(28)+7*s(11)+3*s(22)+3*s(24)+6 Such that:aux(18) =< V1-V+1 it(28) =< V1/2+V/2 aux(92) =< V1 aux(93) =< V1+V aux(94) =< V aux(95) =< 2*V s(11) =< aux(95) it(27) =< aux(93) it(28) =< aux(93) it(28) =< aux(94) it(27) =< aux(95)+aux(18) it(27) =< aux(94)+aux(92) s(23) =< aux(94)+aux(92) s(23) =< it(27)*aux(94) s(24) =< aux(93) s(22) =< s(23) with precondition: [Out=0,V1>=2,V>=2,V+V1>=6] * Chain [38]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [37]: 2*s(9)+1*s(11)+2 Such that:s(11) =< V aux(7) =< V1 s(9) =< aux(7) with precondition: [Out=0,V1>=0,V>=0] * Chain [36]: 1 with precondition: [V=0,V1=Out,V1>=1] * Chain [35]: 2 with precondition: [V=1,Out=0,V1>=1] * Chain [34,38]: 5*s(27)+5 Such that:s(26) =< 1 s(27) =< s(26) with precondition: [V1=1,Out=1,V>=2] * Chain [34,37]: 6*s(11)+6 Such that:aux(42) =< 1 s(11) =< aux(42) with precondition: [V1=1,Out=0,V>=2] * Chain [33,[31],38]: 6*it(31)+2*s(28)+5 Such that:s(28) =< 1 aux(6) =< V it(31) =< aux(6) with precondition: [V1=1,Out=1,V>=2] * Chain [33,[31],37]: 8*it(31)+3*s(11)+6 Such that:aux(8) =< V aux(50) =< 1 s(11) =< aux(50) it(31) =< aux(8) with precondition: [V1=1,Out=0,V>=2] * Chain [33,[31],35]: 6*it(31)+2*s(28)+6 Such that:s(28) =< 1 aux(9) =< V it(31) =< aux(9) with precondition: [V1=1,Out=0,V>=3] * Chain [33,[31],32,38]: 6*it(31)+7*s(13)+9 Such that:aux(10) =< V aux(59) =< 1 s(13) =< aux(59) it(31) =< aux(10) with precondition: [V1=1,Out=1,V>=3] * Chain [33,[31],32,37]: 6*it(31)+8*s(11)+10 Such that:aux(12) =< V aux(64) =< 1 s(11) =< aux(64) it(31) =< aux(12) with precondition: [V1=1,Out=0,V>=3] * Chain [33,37]: 2*s(9)+3*s(11)+6 Such that:aux(7) =< V aux(69) =< 1 s(11) =< aux(69) s(9) =< aux(7) with precondition: [V1=1,Out=0,V>=2] * Chain [33,35]: 2*s(28)+6 Such that:s(28) =< 1 with precondition: [V1=1,Out=0,V>=2] * Chain [33,32,38]: 7*s(13)+9 Such that:aux(77) =< 1 s(13) =< aux(77) with precondition: [V1=1,Out=1,V>=2] * Chain [33,32,37]: 8*s(11)+10 Such that:aux(81) =< 1 s(11) =< aux(81) with precondition: [V1=1,Out=0,V>=2] * Chain [32,38]: 5*s(13)+5 Such that:s(12) =< 1 s(13) =< s(12) with precondition: [V=1,Out=1,V1>=1] * Chain [32,37]: 6*s(11)+6 Such that:aux(11) =< 1 s(11) =< aux(11) with precondition: [V=1,Out=0,V1>=1] * Chain [30,38]: 6*s(29)+5 Such that:aux(85) =< Out s(29) =< aux(85) with precondition: [V1=Out,V1>=2,V>=V1+1] * Chain [30,37]: 7*s(11)+6 Such that:aux(86) =< V1 s(11) =< aux(86) with precondition: [Out=0,V1>=2,V>=V1+1] * Chain [29,38]: 6*s(32)+5 Such that:aux(90) =< Out s(32) =< aux(90) with precondition: [V=Out,V>=2,V1>=V] * Chain [29,37]: 7*s(11)+6 Such that:aux(91) =< V s(11) =< aux(91) with precondition: [Out=0,V>=2,V1>=V] #### Cost of chains of start(V1,V,V15): * Chain [48]: 45*s(309)+17*s(311)+85*s(322)+36*s(323)+68*s(325)+72*s(327)+51*s(328)+32*s(329)+41*s(330)+10 Such that:aux(129) =< 1 aux(130) =< V1 aux(131) =< V1-V+1 aux(132) =< V1+V aux(133) =< V1/2+V/2 aux(134) =< V aux(135) =< 2*V s(311) =< aux(130) s(309) =< aux(134) s(322) =< aux(129) s(323) =< aux(133) s(325) =< aux(132) s(323) =< aux(132) s(323) =< aux(134) s(325) =< aux(135)+aux(131) s(325) =< aux(134)+aux(130) s(326) =< aux(134)+aux(130) s(326) =< s(325)*aux(134) s(327) =< aux(132) s(328) =< s(326) s(329) =< aux(132) s(330) =< aux(135) s(329) =< aux(134) with precondition: [V1>=0] * Chain [47]: 213*s(381)+40*s(384)+121*s(386)+137*s(392)+20*s(403)+40*s(405)+30*s(408)+70*s(410)+36*s(421)+68*s(423)+51*s(426)+32*s(427)+16*s(429)+12 Such that:s(397) =< -V+1 s(399) =< V/2 s(376) =< V15+1 aux(145) =< 1 aux(146) =< -2*V+V15+1 aux(147) =< -V+V15 aux(148) =< V aux(149) =< 2*V aux(150) =< V15 aux(151) =< V15/2 s(381) =< aux(145) s(384) =< aux(150) s(384) =< s(376) s(386) =< aux(150) s(403) =< s(399) s(392) =< aux(148) s(405) =< aux(148) s(403) =< aux(148) s(405) =< aux(149)+s(397) s(406) =< aux(148) s(406) =< s(405)*aux(148) s(408) =< s(406) s(410) =< aux(149) s(421) =< aux(151) s(423) =< aux(150) s(421) =< aux(150) s(421) =< aux(148) s(423) =< aux(149)+aux(146) s(423) =< aux(148)+aux(147) s(424) =< aux(148)+aux(147) s(424) =< s(423)*aux(148) s(426) =< s(424) s(427) =< aux(150) s(427) =< aux(148) s(429) =< aux(147) with precondition: [V1=1,V>=0,V15>=0] * Chain [46]: 50*s(475)+32*s(479)+32*s(488)+8 Such that:aux(154) =< 1 aux(155) =< V1 aux(156) =< V15 s(475) =< aux(154) s(488) =< aux(155) s(479) =< aux(156) with precondition: [V=1,V1>=1] * Chain [45]: 26*s(493)+42*s(496)+11 Such that:aux(158) =< 1 aux(159) =< V s(493) =< aux(159) s(496) =< aux(158) with precondition: [V1=1,V>=2] * Chain [44]: 2*s(502)+3 Such that:s(502) =< V15 with precondition: [V1=1,V=V15,V>=1] * Chain [43]: 213*s(510)+40*s(513)+121*s(515)+137*s(521)+20*s(532)+40*s(534)+30*s(537)+70*s(539)+36*s(550)+68*s(552)+51*s(555)+32*s(556)+16*s(558)+12 Such that:s(505) =< V+1 s(526) =< -V15+1 s(528) =< V15/2 aux(169) =< 1 aux(170) =< V aux(171) =< V-2*V15+1 aux(172) =< V-V15 aux(173) =< V/2 aux(174) =< V15 aux(175) =< 2*V15 s(510) =< aux(169) s(513) =< aux(170) s(513) =< s(505) s(515) =< aux(170) s(532) =< s(528) s(521) =< aux(174) s(534) =< aux(174) s(532) =< aux(174) s(534) =< aux(175)+s(526) s(535) =< aux(174) s(535) =< s(534)*aux(174) s(537) =< s(535) s(539) =< aux(175) s(550) =< aux(173) s(552) =< aux(170) s(550) =< aux(170) s(550) =< aux(174) s(552) =< aux(175)+aux(171) s(552) =< aux(174)+aux(172) s(553) =< aux(174)+aux(172) s(553) =< s(552)*aux(174) s(555) =< s(553) s(556) =< aux(170) s(556) =< aux(174) s(558) =< aux(172) with precondition: [V1=2,V>=0,V15>=0] * Chain [42]: 27*s(604)+32*s(608)+8 Such that:aux(178) =< 1 aux(179) =< V s(604) =< aux(178) s(608) =< aux(179) with precondition: [V1=2,V15=1,V>=2] * Chain [41]: 2*s(614)+3 Such that:s(614) =< V15 with precondition: [V1=2,V=V15,V>=1] * Chain [40]: 14*s(615)+21*s(618)+11 Such that:s(616) =< 1 aux(180) =< V s(615) =< aux(180) s(618) =< s(616) with precondition: [V1=2,V=V15+1,V>=3] * Chain [39]: 1 with precondition: [V=0,V1>=0] Closed-form bounds of start(V1,V,V15): ------------------------------------- * Chain [48] with precondition: [V1>=0] - Upper bound: 68*V1+95+nat(V)*96+nat(2*V)*41+nat(V1+V)*172+nat(V1/2+V/2)*36 - Complexity: n * Chain [47] with precondition: [V1=1,V>=0,V15>=0] - Upper bound: 398*V+261*V15+225+nat(-V+V15)*67+10*V+18*V15 - Complexity: n * Chain [46] with precondition: [V=1,V1>=1] - Upper bound: 32*V1+58+nat(V15)*32 - Complexity: n * Chain [45] with precondition: [V1=1,V>=2] - Upper bound: 26*V+53 - Complexity: n * Chain [44] with precondition: [V1=1,V=V15,V>=1] - Upper bound: 2*V15+3 - Complexity: n * Chain [43] with precondition: [V1=2,V>=0,V15>=0] - Upper bound: 261*V+398*V15+225+nat(V-V15)*67+18*V+10*V15 - Complexity: n * Chain [42] with precondition: [V1=2,V15=1,V>=2] - Upper bound: 32*V+35 - Complexity: n * Chain [41] with precondition: [V1=2,V=V15,V>=1] - Upper bound: 2*V15+3 - Complexity: n * Chain [40] with precondition: [V1=2,V=V15+1,V>=3] - Upper bound: 14*V+32 - Complexity: n * Chain [39] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant ### Maximum cost of start(V1,V,V15): max([32*V1+55+nat(V15)*30+(nat(V15)*2+2),nat(V)*12+3+max([18,nat(V)*64+60+max([nat(2*V)*41+68*V1+nat(V1+V)*172+nat(V1/2+V/2)*36,nat(V)*162+130+nat(V15)*258+nat(V/2)*20+nat(V15/2)*20+max([nat(2*V)*70+nat(V15)*3+nat(-V+V15)*67+nat(V15/2)*16,nat(2*V15)*70+nat(V)*3+nat(V-V15)*67+nat(V/2)*16])])+nat(V)*6])+(nat(V)*14+31)])+1 Asymptotic class: n * Total analysis performed in 1237 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) pred(s(x)) -> x minus(x, 0) -> x minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), 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(x, s(y)) ->^+ pred(minus(x, y)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [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) pred(s(x)) -> x minus(x, 0) -> x minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), 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) pred(s(x)) -> x minus(x, 0) -> x minus(x, s(y)) -> pred(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, x, y) -> gcd(minus(x, y), y) if_gcd(false, x, y) -> gcd(minus(y, x), x) S is empty. Rewrite Strategy: INNERMOST