/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), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 544 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)) mod(0, y) -> 0 mod(s(x), 0) -> 0 mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> 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] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(minus(x, y)) [1] mod(0, y) -> 0 [1] mod(s(x), 0) -> 0 [1] mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) [1] if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) [1] if_mod(false, s(x), s(y)) -> 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] pred(s(x)) -> x [1] minus(x, 0) -> x [1] minus(x, s(y)) -> pred(minus(x, y)) [1] mod(0, y) -> 0 [1] mod(s(x), 0) -> 0 [1] mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) [1] if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) [1] if_mod(false, s(x), s(y)) -> 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 pred :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s mod :: 0:s -> 0:s -> 0:s if_mod :: 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] if_mod(v0, v1, v2) -> null_if_mod [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] mod(v0, v1) -> null_mod [0] And the following fresh constants: null_pred, null_if_mod, null_le, null_minus, null_mod ---------------------------------------- (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] mod(0, y) -> 0 [1] mod(s(x), 0) -> 0 [1] mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) [1] if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) [1] if_mod(false, s(x), s(y)) -> s(x) [1] pred(v0) -> null_pred [0] if_mod(v0, v1, v2) -> null_if_mod [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] mod(v0, v1) -> null_mod [0] The TRS has the following type information: le :: 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod -> true:false:null_le 0 :: 0:s:null_pred:null_if_mod:null_minus:null_mod true :: true:false:null_le s :: 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod false :: true:false:null_le pred :: 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod minus :: 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod mod :: 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod if_mod :: true:false:null_le -> 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod -> 0:s:null_pred:null_if_mod:null_minus:null_mod null_pred :: 0:s:null_pred:null_if_mod:null_minus:null_mod null_if_mod :: 0:s:null_pred:null_if_mod:null_minus:null_mod null_le :: true:false:null_le null_minus :: 0:s:null_pred:null_if_mod:null_minus:null_mod null_mod :: 0:s:null_pred:null_if_mod:null_minus:null_mod 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_if_mod => 0 null_le => 0 null_minus => 0 null_mod => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: if_mod(z, z', z'') -{ 1 }-> mod(minus(x, y), 1 + y) :|: z = 2, z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y if_mod(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if_mod(z, z', z'') -{ 1 }-> 1 + x :|: z' = 1 + x, z = 1, x >= 0, y >= 0, z'' = 1 + y 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 mod(z, z') -{ 1 }-> if_mod(le(y, x), 1 + x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x mod(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y mod(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 mod(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,[mod(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(mod(V1, V, Out),1,[],[Out = 0,V10 >= 0,V1 = 0,V = V10]). eq(mod(V1, V, Out),1,[],[Out = 0,V11 >= 0,V1 = 1 + V11,V = 0]). eq(mod(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),mod(Ret02, 1 + V14, Ret3)],[Out = Ret3,V1 = 2,V = 1 + V16,V16 >= 0,V14 >= 0,V15 = 1 + V14]). eq(fun(V1, V, V15, Out),1,[],[Out = 1 + V17,V = 1 + V17,V1 = 1,V17 >= 0,V18 >= 0,V15 = 1 + V18]). eq(pred(V1, Out),0,[],[Out = 0,V19 >= 0,V1 = V19]). eq(fun(V1, V, V15, Out),0,[],[Out = 0,V21 >= 0,V15 = 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(minus(V1, V, Out),0,[],[Out = 0,V25 >= 0,V26 >= 0,V1 = V25,V = V26]). eq(mod(V1, V, Out),0,[],[Out = 0,V27 >= 0,V28 >= 0,V1 = V27,V = V28]). 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(mod(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. non_recursive : [pred/2] 1. recursive [non_tail] : [minus/3] 2. recursive : [le/3] 3. recursive : [fun/4,(mod)/3] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into pred/2 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into le/3 3. SCC is partially evaluated into (mod)/3 4. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations pred/2 * CE 21 is refined into CE [23] * CE 22 is refined into CE [24] ### Cost equations --> "Loop" of pred/2 * CEs [23] --> Loop 16 * CEs [24] --> Loop 17 ### 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 [25] * CE 8 is refined into CE [26] * CE 9 is refined into CE [27,28] ### Cost equations --> "Loop" of minus/3 * CEs [28] --> Loop 18 * CEs [27] --> Loop 19 * CEs [25] --> Loop 20 * CEs [26] --> Loop 21 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [18]: [V] * RF of phase [19]: [V] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [18]: - RF of loop [18:1]: V * Partial RF of phase [19]: - RF of loop [19:1]: V ### Specialization of cost equations le/3 * CE 20 is refined into CE [29] * CE 18 is refined into CE [30] * CE 17 is refined into CE [31] * CE 19 is refined into CE [32] ### Cost equations --> "Loop" of le/3 * CEs [32] --> Loop 22 * CEs [29] --> Loop 23 * CEs [30] --> Loop 24 * CEs [31] --> Loop 25 ### Ranking functions of CR le(V1,V,Out) * RF of phase [22]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [22]: - RF of loop [22:1]: V V1 ### Specialization of cost equations (mod)/3 * CE 12 is refined into CE [33,34] * CE 15 is refined into CE [35] * CE 11 is refined into CE [36,37,38,39,40] * CE 14 is refined into CE [41] * CE 16 is refined into CE [42] * CE 13 is refined into CE [43,44,45,46] ### Cost equations --> "Loop" of (mod)/3 * CEs [46] --> Loop 26 * CEs [45] --> Loop 27 * CEs [43] --> Loop 28 * CEs [44] --> Loop 29 * CEs [34] --> Loop 30 * CEs [36] --> Loop 31 * CEs [35] --> Loop 32 * CEs [33] --> Loop 33 * CEs [37] --> Loop 34 * CEs [38,39,40,41,42] --> Loop 35 ### Ranking functions of CR mod(V1,V,Out) * RF of phase [26]: [V1-1,V1-V+1] * RF of phase [28]: [V1] #### Partial ranking functions of CR mod(V1,V,Out) * Partial RF of phase [26]: - RF of loop [26:1]: V1-1 V1-V+1 * Partial RF of phase [28]: - RF of loop [28:1]: V1 ### Specialization of cost equations start/3 * CE 3 is refined into CE [47,48,49,50,51,52,53,54] * CE 1 is refined into CE [55] * CE 2 is refined into CE [56] * CE 4 is refined into CE [57,58,59,60,61] * CE 5 is refined into CE [62,63] * CE 6 is refined into CE [64,65,66] * CE 7 is refined into CE [67,68,69,70,71,72,73] ### Cost equations --> "Loop" of start/3 * CEs [70] --> Loop 36 * CEs [58,64,69] --> Loop 37 * CEs [51] --> Loop 38 * CEs [47,48,49,50,52,53,54] --> Loop 39 * CEs [68] --> Loop 40 * CEs [56] --> Loop 41 * CEs [55,57,59,60,61,62,63,65,66,67,71,72,73] --> Loop 42 ### Ranking functions of CR start(V1,V,V15) #### Partial ranking functions of CR start(V1,V,V15) Computing Bounds ===================================== #### Cost of chains of pred(V1,Out): * Chain [17]: 0 with precondition: [Out=0,V1>=0] * Chain [16]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of minus(V1,V,Out): * Chain [[19],[18],21]: 3*it(18)+1 Such that:aux(1) =< V it(18) =< aux(1) with precondition: [Out=0,V1>=1,V>=2] * Chain [[19],21]: 1*it(19)+1 Such that:it(19) =< V with precondition: [Out=0,V1>=0,V>=1] * Chain [[19],20]: 1*it(19)+0 Such that:it(19) =< V with precondition: [Out=0,V1>=0,V>=1] * Chain [[18],21]: 2*it(18)+1 Such that:it(18) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * 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 le(V1,V,Out): * Chain [[22],25]: 1*it(22)+1 Such that:it(22) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[22],24]: 1*it(22)+1 Such that:it(22) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[22],23]: 1*it(22)+0 Such that:it(22) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [25]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [24]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [23]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of mod(V1,V,Out): * Chain [[28],35]: 6*it(28)+1*s(8)+2 Such that:s(8) =< 1 aux(4) =< V1 it(28) =< aux(4) with precondition: [V=1,Out=0,V1>=1] * Chain [[28],31]: 4*it(28)+2 Such that:it(28) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[28],29,35]: 4*it(28)+1*s(8)+6 Such that:s(8) =< 1 it(28) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[26],35]: 9*it(26)+1*s(8)+2 Such that:s(8) =< V aux(8) =< V1 it(26) =< aux(8) with precondition: [Out=0,V>=2,V1>=V] * Chain [[26],34]: 4*it(26)+3*s(15)+2 Such that:it(26) =< V1-V+1 aux(9) =< V1 it(26) =< aux(9) s(15) =< aux(9) with precondition: [Out=0,V>=2,V1>=V+1] * Chain [[26],33]: 4*it(26)+3*s(15)+3 Such that:it(26) =< V1-V+1 aux(10) =< V1 it(26) =< aux(10) s(15) =< aux(10) with precondition: [Out=1,V>=2,V1>=V+1] * Chain [[26],30]: 4*it(26)+3*s(15)+1*s(17)+3 Such that:aux(6) =< V1 it(26) =< V1-V+1 aux(7) =< V1-Out s(17) =< Out it(26) =< aux(6) s(16) =< aux(6) it(26) =< aux(7) s(16) =< aux(7) s(15) =< s(16) with precondition: [Out>=2,V>=Out+1,V1>=Out+V] * Chain [[26],27,35]: 4*it(26)+7*s(8)+3*s(15)+6 Such that:aux(6) =< V1 aux(12) =< V aux(13) =< V1-V it(26) =< aux(13) s(8) =< aux(12) it(26) =< aux(6) s(16) =< aux(6) s(16) =< aux(13) s(15) =< s(16) with precondition: [Out=0,V>=2,V1>=2*V] * Chain [35]: 2*s(6)+1*s(8)+2 Such that:s(8) =< V aux(3) =< V1 s(6) =< aux(3) with precondition: [Out=0,V1>=0,V>=0] * Chain [34]: 2 with precondition: [V1=1,Out=0,V>=2] * Chain [33]: 3 with precondition: [V1=1,Out=1,V>=2] * Chain [32]: 1 with precondition: [V=0,Out=0,V1>=1] * Chain [31]: 2 with precondition: [V=1,Out=0,V1>=1] * Chain [30]: 1*s(17)+3 Such that:s(17) =< V1 with precondition: [V1=Out,V1>=2,V>=V1+1] * Chain [29,35]: 1*s(8)+6 Such that:s(8) =< 1 with precondition: [V=1,Out=0,V1>=1] * Chain [27,35]: 7*s(8)+6 Such that:aux(12) =< V s(8) =< aux(12) with precondition: [Out=0,V>=2,V1>=V] #### Cost of chains of start(V1,V,V15): * Chain [42]: 25*s(46)+23*s(48)+12*s(53)+4*s(57)+3*s(59)+6 Such that:s(52) =< V1-V aux(19) =< V1 aux(20) =< V1-V+1 aux(21) =< V s(48) =< aux(19) s(53) =< aux(20) s(46) =< aux(21) s(57) =< s(52) s(57) =< aux(19) s(58) =< aux(19) s(58) =< s(52) s(59) =< s(58) s(53) =< aux(19) with precondition: [V1>=0] * Chain [41]: 1 with precondition: [V1=1,V>=1,V15>=1] * Chain [40]: 3 with precondition: [V1=1,V>=2] * Chain [39]: 39*s(72)+19*s(75)+45*s(85)+12*s(97)+4*s(101)+3*s(103)+22*s(104)+8 Such that:s(96) =< V-2*V15 aux(26) =< 1 aux(27) =< V aux(28) =< V-2*V15+1 aux(29) =< V-V15 aux(30) =< V15 s(97) =< aux(28) s(104) =< aux(29) s(85) =< aux(30) s(72) =< aux(27) s(75) =< aux(26) s(101) =< s(96) s(101) =< aux(29) s(102) =< aux(29) s(102) =< s(96) s(103) =< s(102) s(97) =< aux(29) with precondition: [V1=2,V>=1,V15>=1] * Chain [38]: 2*s(118)+5 Such that:s(118) =< V15 with precondition: [V1=2,V=V15+1,V>=3] * Chain [37]: 1 with precondition: [V=0,V1>=0] * Chain [36]: 3*s(121)+14*s(122)+6 Such that:s(119) =< 1 s(120) =< V1 s(121) =< s(119) s(122) =< s(120) with precondition: [V=1,V1>=1] Closed-form bounds of start(V1,V,V15): ------------------------------------- * Chain [42] with precondition: [V1>=0] - Upper bound: 26*V1+6+nat(V)*25+nat(V1-V+1)*12+nat(V1-V)*4 - Complexity: n * Chain [41] with precondition: [V1=1,V>=1,V15>=1] - Upper bound: 1 - Complexity: constant * Chain [40] with precondition: [V1=1,V>=2] - Upper bound: 3 - Complexity: constant * Chain [39] with precondition: [V1=2,V>=1,V15>=1] - Upper bound: 39*V+45*V15+27+nat(V-2*V15+1)*12+nat(V-V15)*25+nat(V-2*V15)*4 - Complexity: n * Chain [38] with precondition: [V1=2,V=V15+1,V>=3] - Upper bound: 2*V15+5 - Complexity: n * Chain [37] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant * Chain [36] with precondition: [V=1,V1>=1] - Upper bound: 14*V1+9 - Complexity: n ### Maximum cost of start(V1,V,V15): max([14*V1+3+max([3,nat(V)*25+12*V1+nat(V1-V+1)*12+nat(V1-V)*4]),nat(V)*39+22+nat(V15)*43+nat(V-2*V15+1)*12+nat(V-V15)*25+nat(V-2*V15)*4+(nat(V15)*2+2)])+3 Asymptotic class: n * Total analysis performed in 447 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)) mod(0, y) -> 0 mod(s(x), 0) -> 0 mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> 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(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)) mod(0, y) -> 0 mod(s(x), 0) -> 0 mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> 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) pred(s(x)) -> x minus(x, 0) -> x minus(x, s(y)) -> pred(minus(x, y)) mod(0, y) -> 0 mod(s(x), 0) -> 0 mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) S is empty. Rewrite Strategy: INNERMOST