/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^3)) 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^3). (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), 4 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 512 ms] (10) BOUNDS(1, n^3) (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^3). The TRS R consists of the following rules: minus(0, y) -> 0 minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 mod(x, 0) -> 0 mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) if1(true, x, y) -> x if1(false, x, y) -> mod(minus(x, y), y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) 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^3). The TRS R consists of the following rules: minus(0, y) -> 0 [1] minus(s(x), y) -> if(gt(s(x), y), x, y) [1] if(true, x, y) -> s(minus(x, y)) [1] if(false, x, y) -> 0 [1] mod(x, 0) -> 0 [1] mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) [1] if1(true, x, y) -> x [1] if1(false, x, y) -> mod(minus(x, y), y) [1] gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] lt(x, 0) -> false [1] lt(0, s(x)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [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: minus(0, y) -> 0 [1] minus(s(x), y) -> if(gt(s(x), y), x, y) [1] if(true, x, y) -> s(minus(x, y)) [1] if(false, x, y) -> 0 [1] mod(x, 0) -> 0 [1] mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) [1] if1(true, x, y) -> x [1] if1(false, x, y) -> mod(minus(x, y), y) [1] gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] lt(x, 0) -> false [1] lt(0, s(x)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [1] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s if :: true:false -> 0:s -> 0:s -> 0:s gt :: 0:s -> 0:s -> true:false true :: true:false false :: true:false mod :: 0:s -> 0:s -> 0:s if1 :: true:false -> 0:s -> 0:s -> 0:s lt :: 0:s -> 0:s -> true:false 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: none And the following fresh constants: none ---------------------------------------- (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: minus(0, y) -> 0 [1] minus(s(x), y) -> if(gt(s(x), y), x, y) [1] if(true, x, y) -> s(minus(x, y)) [1] if(false, x, y) -> 0 [1] mod(x, 0) -> 0 [1] mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) [1] if1(true, x, y) -> x [1] if1(false, x, y) -> mod(minus(x, y), y) [1] gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] lt(x, 0) -> false [1] lt(0, s(x)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [1] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s if :: true:false -> 0:s -> 0:s -> 0:s gt :: 0:s -> 0:s -> true:false true :: true:false false :: true:false mod :: 0:s -> 0:s -> 0:s if1 :: true:false -> 0:s -> 0:s -> 0:s lt :: 0:s -> 0:s -> true:false 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 => 1 false => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: gt(z, z') -{ 1 }-> gt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gt(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 gt(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y if(z, z', z'') -{ 1 }-> 0 :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 if(z, z', z'') -{ 1 }-> 1 + minus(x, y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if1(z, z', z'') -{ 1 }-> x :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if1(z, z', z'') -{ 1 }-> mod(minus(x, y), y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 lt(z, z') -{ 1 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lt(z, z') -{ 1 }-> 1 :|: z' = 1 + x, x >= 0, z = 0 lt(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> if(gt(1 + x, y), x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y minus(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y mod(z, z') -{ 1 }-> if1(lt(x, 1 + y), x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = x mod(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 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, V7),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V7),0,[if(V1, V, V7, Out)],[V1 >= 0,V >= 0,V7 >= 0]). eq(start(V1, V, V7),0,[mod(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V7),0,[if1(V1, V, V7, Out)],[V1 >= 0,V >= 0,V7 >= 0]). eq(start(V1, V, V7),0,[gt(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V7),0,[lt(V1, V, Out)],[V1 >= 0,V >= 0]). eq(minus(V1, V, Out),1,[],[Out = 0,V2 >= 0,V1 = 0,V = V2]). eq(minus(V1, V, Out),1,[gt(1 + V3, V4, Ret0),if(Ret0, V3, V4, Ret)],[Out = Ret,V3 >= 0,V4 >= 0,V1 = 1 + V3,V = V4]). eq(if(V1, V, V7, Out),1,[minus(V5, V6, Ret1)],[Out = 1 + Ret1,V = V5,V7 = V6,V1 = 1,V5 >= 0,V6 >= 0]). eq(if(V1, V, V7, Out),1,[],[Out = 0,V = V8,V7 = V9,V8 >= 0,V9 >= 0,V1 = 0]). eq(mod(V1, V, Out),1,[],[Out = 0,V10 >= 0,V1 = V10,V = 0]). eq(mod(V1, V, Out),1,[lt(V12, 1 + V11, Ret01),if1(Ret01, V12, 1 + V11, Ret2)],[Out = Ret2,V = 1 + V11,V12 >= 0,V11 >= 0,V1 = V12]). eq(if1(V1, V, V7, Out),1,[],[Out = V14,V = V14,V7 = V13,V1 = 1,V14 >= 0,V13 >= 0]). eq(if1(V1, V, V7, Out),1,[minus(V16, V15, Ret02),mod(Ret02, V15, Ret3)],[Out = Ret3,V = V16,V7 = V15,V16 >= 0,V15 >= 0,V1 = 0]). eq(gt(V1, V, Out),1,[],[Out = 0,V17 >= 0,V1 = 0,V = V17]). eq(gt(V1, V, Out),1,[],[Out = 1,V18 >= 0,V1 = 1 + V18,V = 0]). eq(gt(V1, V, Out),1,[gt(V20, V19, Ret4)],[Out = Ret4,V = 1 + V19,V20 >= 0,V19 >= 0,V1 = 1 + V20]). eq(lt(V1, V, Out),1,[],[Out = 0,V21 >= 0,V1 = V21,V = 0]). eq(lt(V1, V, Out),1,[],[Out = 1,V = 1 + V22,V22 >= 0,V1 = 0]). eq(lt(V1, V, Out),1,[lt(V24, V23, Ret5)],[Out = Ret5,V = 1 + V23,V24 >= 0,V23 >= 0,V1 = 1 + V24]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(if(V1,V,V7,Out),[V1,V,V7],[Out]). input_output_vars(mod(V1,V,Out),[V1,V],[Out]). input_output_vars(if1(V1,V,V7,Out),[V1,V,V7],[Out]). input_output_vars(gt(V1,V,Out),[V1,V],[Out]). input_output_vars(lt(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [gt/3] 1. recursive : [if/4,minus/3] 2. recursive : [lt/3] 3. recursive : [if1/4,(mod)/3] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into gt/3 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into lt/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 gt/3 * CE 17 is refined into CE [21] * CE 16 is refined into CE [22] * CE 15 is refined into CE [23] ### Cost equations --> "Loop" of gt/3 * CEs [22] --> Loop 15 * CEs [23] --> Loop 16 * CEs [21] --> Loop 17 ### Ranking functions of CR gt(V1,V,Out) * RF of phase [17]: [V,V1] #### Partial ranking functions of CR gt(V1,V,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V V1 ### Specialization of cost equations minus/3 * CE 9 is refined into CE [24] * CE 11 is refined into CE [25] * CE 10 is refined into CE [26,27] ### Cost equations --> "Loop" of minus/3 * CEs [27] --> Loop 18 * CEs [26] --> Loop 19 * CEs [24] --> Loop 20 * CEs [25] --> Loop 21 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [18]: [V1-1,V1-V] * RF of phase [19]: [V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [18]: - RF of loop [18:1]: V1-1 V1-V * Partial RF of phase [19]: - RF of loop [19:1]: V1 ### Specialization of cost equations lt/3 * CE 20 is refined into CE [28] * CE 18 is refined into CE [29] * CE 19 is refined into CE [30] ### Cost equations --> "Loop" of lt/3 * CEs [29] --> Loop 22 * CEs [30] --> Loop 23 * CEs [28] --> Loop 24 ### Ranking functions of CR lt(V1,V,Out) * RF of phase [24]: [V,V1] #### Partial ranking functions of CR lt(V1,V,Out) * Partial RF of phase [24]: - RF of loop [24:1]: V V1 ### Specialization of cost equations (mod)/3 * CE 13 is refined into CE [31,32] * CE 14 is refined into CE [33] * CE 12 is refined into CE [34,35] ### Cost equations --> "Loop" of (mod)/3 * CEs [35] --> Loop 25 * CEs [34] --> Loop 26 * CEs [32] --> Loop 27 * CEs [33] --> Loop 28 * CEs [31] --> Loop 29 ### Ranking functions of CR mod(V1,V,Out) * RF of phase [25]: [V1-1,V1-V] #### Partial ranking functions of CR mod(V1,V,Out) * Partial RF of phase [25]: - RF of loop [25:1]: V1-1 V1-V ### Specialization of cost equations start/3 * CE 2 is refined into CE [36] * CE 4 is refined into CE [37,38,39,40] * CE 1 is refined into CE [41,42,43,44,45,46,47,48] * CE 3 is refined into CE [49] * CE 5 is refined into CE [50,51,52,53] * CE 6 is refined into CE [54,55,56,57,58,59] * CE 7 is refined into CE [60,61,62,63] * CE 8 is refined into CE [64,65,66,67] ### Cost equations --> "Loop" of start/3 * CEs [57] --> Loop 30 * CEs [53,56,59,63,66] --> Loop 31 * CEs [38,52,58,62,67] --> Loop 32 * CEs [36,37,39,40] --> Loop 33 * CEs [45] --> Loop 34 * CEs [43] --> Loop 35 * CEs [41,51,55,61,65] --> Loop 36 * CEs [42,44,46,47,48,49,50,54,60,64] --> Loop 37 ### Ranking functions of CR start(V1,V,V7) #### Partial ranking functions of CR start(V1,V,V7) Computing Bounds ===================================== #### Cost of chains of gt(V1,V,Out): * Chain [[17],16]: 1*it(17)+1 Such that:it(17) =< V1 with precondition: [Out=0,V1>=1,V>=V1] * Chain [[17],15]: 1*it(17)+1 Such that:it(17) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [16]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [15]: 1 with precondition: [V=0,Out=1,V1>=1] #### Cost of chains of minus(V1,V,Out): * Chain [[19],21]: 3*it(19)+1 Such that:it(19) =< Out with precondition: [V=0,V1=Out,V1>=1] * Chain [[18],20]: 3*it(18)+1*s(1)+1*s(4)+3 Such that:it(18) =< Out aux(2) =< V1-Out s(1) =< aux(2) s(4) =< it(18)*aux(2) with precondition: [V1=Out+V,V>=1,V1>=V+1] * Chain [21]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [20]: 1*s(1)+3 Such that:s(1) =< V1 with precondition: [Out=0,V1>=1,V>=V1] #### Cost of chains of lt(V1,V,Out): * Chain [[24],23]: 1*it(24)+1 Such that:it(24) =< V1 with precondition: [Out=1,V1>=1,V>=V1+1] * Chain [[24],22]: 1*it(24)+1 Such that:it(24) =< V with precondition: [Out=0,V>=1,V1>=V] * Chain [23]: 1 with precondition: [V1=0,Out=1,V>=1] * Chain [22]: 1 with precondition: [V=0,Out=0,V1>=0] #### Cost of chains of mod(V1,V,Out): * Chain [[25],27]: 6*it(25)+1*s(5)+2*s(15)+3*s(16)+1*s(17)+3 Such that:aux(5) =< V1 aux(6) =< V1-V s(12) =< V s(5) =< Out aux(8) =< V1-Out it(25) =< aux(8) it(25) =< aux(5) s(18) =< aux(5) it(25) =< aux(6) s(18) =< aux(8) s(16) =< it(25)*aux(6) s(15) =< s(18) s(17) =< s(16)*s(12) with precondition: [Out>=1,V>=Out+1,V1>=Out+V] * Chain [[25],26,29]: 6*it(25)+2*s(15)+3*s(16)+1*s(17)+2*s(19)+9 Such that:aux(5) =< V1 aux(10) =< V1-V aux(11) =< V it(25) =< aux(10) s(19) =< aux(11) it(25) =< aux(5) s(18) =< aux(5) s(18) =< aux(10) s(16) =< it(25)*aux(10) s(15) =< s(18) s(17) =< s(16)*aux(11) with precondition: [Out=0,V>=1,V1>=2*V] * Chain [29]: 3 with precondition: [V1=0,Out=0,V>=1] * Chain [28]: 1 with precondition: [V=0,Out=0,V1>=0] * Chain [27]: 1*s(5)+3 Such that:s(5) =< V1 with precondition: [V1=Out,V1>=1,V>=V1+1] * Chain [26,29]: 2*s(19)+9 Such that:aux(9) =< V1 s(19) =< aux(9) with precondition: [Out=0,V1=V,V1>=1] #### Cost of chains of start(V1,V,V7): * Chain [37]: 1*s(21)+13*s(22)+5*s(24)+3*s(25)+12*s(29)+6*s(32)+2*s(33)+2*s(34)+13 Such that:s(21) =< V aux(17) =< V-2*V7 aux(18) =< V-V7 aux(19) =< V7 s(22) =< aux(18) s(29) =< aux(17) s(24) =< aux(19) s(29) =< aux(18) s(31) =< aux(18) s(31) =< aux(17) s(32) =< s(29)*aux(17) s(33) =< s(31) s(34) =< s(32)*aux(19) s(25) =< s(22)*aux(19) with precondition: [V1=0,V>=0] * Chain [36]: 3*s(54)+5 Such that:s(54) =< V1 with precondition: [V=0,V1>=0] * Chain [35]: 3*s(55)+3 Such that:s(55) =< V with precondition: [V1=0,V7=0,V>=1] * Chain [34]: 6*s(56)+1*s(59)+13 Such that:aux(20) =< V7 s(56) =< aux(20) s(59) =< s(56)*aux(20) with precondition: [V1=0,V=2*V7,V>=2] * Chain [33]: 1*s(62)+3*s(63)+1*s(65)+1*s(66)+4 Such that:s(62) =< V s(63) =< V-V7 s(64) =< V7 s(65) =< s(64) s(66) =< s(63)*s(64) with precondition: [V1=1,V>=0,V7>=0] * Chain [32]: 3*s(67)+4*s(68)+3 Such that:s(67) =< V aux(21) =< V1 s(68) =< aux(21) with precondition: [V1>=1,V>=V1] * Chain [31]: 3*s(72)+5*s(74)+1*s(75)+3*s(81)+6*s(83)+3*s(85)+1*s(87)+9 Such that:aux(22) =< V1 aux(23) =< V1-V aux(24) =< V s(72) =< aux(23) s(74) =< aux(24) s(75) =< s(72)*aux(24) s(81) =< aux(22) s(83) =< aux(22) s(83) =< aux(23) s(85) =< s(83)*aux(23) s(87) =< s(85)*aux(24) with precondition: [V>=1,V1>=V] * Chain [30]: 6*s(93)+2*s(94)+3*s(96)+2*s(97)+1*s(98)+9 Such that:s(90) =< V1 s(91) =< V1-V s(92) =< V s(93) =< s(91) s(94) =< s(92) s(93) =< s(90) s(95) =< s(90) s(95) =< s(91) s(96) =< s(93)*s(91) s(97) =< s(95) s(98) =< s(96)*s(92) with precondition: [V>=1,V1>=2*V] Closed-form bounds of start(V1,V,V7): ------------------------------------- * Chain [37] with precondition: [V1=0,V>=0] - Upper bound: V+13+nat(V7)*5+nat(V7)*3*nat(V-V7)+nat(V7)*2*nat(V-2*V7)*nat(V-2*V7)+nat(V-V7)*15+nat(V-2*V7)*12+nat(V-2*V7)*6*nat(V-2*V7) - Complexity: n^3 * Chain [36] with precondition: [V=0,V1>=0] - Upper bound: 3*V1+5 - Complexity: n * Chain [35] with precondition: [V1=0,V7=0,V>=1] - Upper bound: 3*V+3 - Complexity: n * Chain [34] with precondition: [V1=0,V=2*V7,V>=2] - Upper bound: 6*V7+13+V7*V7 - Complexity: n^2 * Chain [33] with precondition: [V1=1,V>=0,V7>=0] - Upper bound: V+V7+4+nat(V-V7)*V7+nat(V-V7)*3 - Complexity: n^2 * Chain [32] with precondition: [V1>=1,V>=V1] - Upper bound: 4*V1+3*V+3 - Complexity: n * Chain [31] with precondition: [V>=1,V1>=V] - Upper bound: 3*V1-3*V+(9*V1+9+(V1-V)*(V*V1)+(V1-V)*(3*V1)+5*V+(V1-V)*V) - Complexity: n^3 * Chain [30] with precondition: [V>=1,V1>=2*V] - Upper bound: 6*V1-6*V+(2*V1+2*V+9+(V1-V)*((V1-V)*V))+(3*V1-3*V)*(V1-V) - Complexity: n^3 ### Maximum cost of start(V1,V,V7): max([max([3*V1,nat(V7)*6+8+nat(V7)*nat(V7)])+2,max([max([V,2*V1+max([nat(V1-V)*V*nat(V1-V)+6+nat(V1-V)*6+nat(V1-V)*3*nat(V1-V),5*V1+6+V*V1*nat(V1-V)+3*V1*nat(V1-V)+2*V+nat(V1-V)*V+nat(V1-V)*3+(2*V1+V)])])+V,nat(V7)*4+9+nat(V7)*2*nat(V-V7)+nat(V7)*2*nat(V-2*V7)*nat(V-2*V7)+nat(V-V7)*12+nat(V-2*V7)*12+nat(V-2*V7)*6*nat(V-2*V7)+(nat(V7)+1+nat(V-V7)*nat(V7)+nat(V-V7)*3)])+V])+3 Asymptotic class: n^3 * Total analysis performed in 415 ms. ---------------------------------------- (10) BOUNDS(1, n^3) ---------------------------------------- (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^3). The TRS R consists of the following rules: minus(0, y) -> 0 minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 mod(x, 0) -> 0 mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) if1(true, x, y) -> x if1(false, x, y) -> mod(minus(x, y), y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) 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 lt(s(x), s(y)) ->^+ lt(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^3). The TRS R consists of the following rules: minus(0, y) -> 0 minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 mod(x, 0) -> 0 mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) if1(true, x, y) -> x if1(false, x, y) -> mod(minus(x, y), y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) 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^3). The TRS R consists of the following rules: minus(0, y) -> 0 minus(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 mod(x, 0) -> 0 mod(x, s(y)) -> if1(lt(x, s(y)), x, s(y)) if1(true, x, y) -> x if1(false, x, y) -> mod(minus(x, y), y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) lt(x, 0) -> false lt(0, s(x)) -> true lt(s(x), s(y)) -> lt(x, y) S is empty. Rewrite Strategy: INNERMOST