/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 (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). (0) CpxTRS (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (12) CpxRNTS (13) CompleteCoflocoProof [FINISHED, 559 ms] (14) BOUNDS(1, n^3) (15) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (16) TRS for Loop Detection (17) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) minus(x, plus(y, z)) -> minus(minus(x, y), z) p(s(s(x))) -> s(p(s(x))) p(0) -> s(s(0)) div(s(x), s(y)) -> s(div(minus(x, y), s(y))) div(plus(x, y), z) -> plus(div(x, z), div(y, z)) plus(0, y) -> y plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) The following defined symbols can occur below the 0th argument of minus: p, minus The following defined symbols can occur below the 1th argument of minus: p The following defined symbols can occur below the 0th argument of p: p The following defined symbols can occur below the 0th argument of plus: p, minus The following defined symbols can occur below the 1th argument of plus: p, minus The following defined symbols can occur below the 0th argument of div: p, minus Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: minus(x, plus(y, z)) -> minus(minus(x, y), z) div(plus(x, y), z) -> plus(div(x, z), div(y, z)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^3). The TRS R consists of the following rules: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) p(s(s(x))) -> s(p(s(x))) p(0) -> s(s(0)) div(s(x), s(y)) -> s(div(minus(x, y), s(y))) plus(0, y) -> y plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. The duplicating contexts are: div(s(x), s([])) The defined contexts are: minus([], x1) minus(x0, []) plus(x0, []) div([], s(x1)) p(s([])) plus([], x1) minus(s([]), s(0)) As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3). The TRS R consists of the following rules: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) p(s(s(x))) -> s(p(s(x))) p(0) -> s(s(0)) div(s(x), s(y)) -> s(div(minus(x, y), s(y))) plus(0, y) -> y plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) 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(x, 0) -> x [1] minus(0, y) -> 0 [1] minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) [1] p(s(s(x))) -> s(p(s(x))) [1] p(0) -> s(s(0)) [1] div(s(x), s(y)) -> s(div(minus(x, y), s(y))) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: minus(x, 0) -> x [1] minus(0, y) -> 0 [1] minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) [1] p(s(s(x))) -> s(p(s(x))) [1] p(0) -> s(s(0)) [1] div(s(x), s(y)) -> s(div(minus(x, y), s(y))) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) [1] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s p :: 0:s -> 0:s div :: 0:s -> 0:s -> 0:s plus :: 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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: p(v0) -> null_p [0] div(v0, v1) -> null_div [0] minus(v0, v1) -> null_minus [0] plus(v0, v1) -> null_plus [0] And the following fresh constants: null_p, null_div, null_minus, null_plus ---------------------------------------- (10) 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(x, 0) -> x [1] minus(0, y) -> 0 [1] minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) [1] p(s(s(x))) -> s(p(s(x))) [1] p(0) -> s(s(0)) [1] div(s(x), s(y)) -> s(div(minus(x, y), s(y))) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) [1] p(v0) -> null_p [0] div(v0, v1) -> null_div [0] minus(v0, v1) -> null_minus [0] plus(v0, v1) -> null_plus [0] The TRS has the following type information: minus :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus 0 :: 0:s:null_p:null_div:null_minus:null_plus s :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus p :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus div :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus plus :: 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus -> 0:s:null_p:null_div:null_minus:null_plus null_p :: 0:s:null_p:null_div:null_minus:null_plus null_div :: 0:s:null_p:null_div:null_minus:null_plus null_minus :: 0:s:null_p:null_div:null_minus:null_plus null_plus :: 0:s:null_p:null_div:null_minus:null_plus Rewrite Strategy: INNERMOST ---------------------------------------- (11) 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 null_p => 0 null_div => 0 null_minus => 0 null_plus => 0 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 div(z, z') -{ 1 }-> 1 + div(minus(x, y), 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(p(1 + x), p(1 + y)) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 p(z) -{ 1 }-> 1 + p(1 + x) :|: x >= 0, z = 1 + (1 + x) p(z) -{ 1 }-> 1 + (1 + 0) :|: z = 0 plus(z, z') -{ 1 }-> y :|: y >= 0, z = 0, z' = y plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 1 }-> 1 + plus(y, minus(1 + x, 1 + 0)) :|: x >= 0, y >= 0, z = 1 + x, z' = y Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (13) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[p(V1, Out)],[V1 >= 0]). eq(start(V1, V),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[plus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(minus(V1, V, Out),1,[],[Out = V2,V2 >= 0,V1 = V2,V = 0]). eq(minus(V1, V, Out),1,[],[Out = 0,V3 >= 0,V1 = 0,V = V3]). eq(minus(V1, V, Out),1,[p(1 + V4, Ret0),p(1 + V5, Ret1),minus(Ret0, Ret1, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). eq(p(V1, Out),1,[p(1 + V6, Ret11)],[Out = 1 + Ret11,V6 >= 0,V1 = 2 + V6]). eq(p(V1, Out),1,[],[Out = 2,V1 = 0]). eq(div(V1, V, Out),1,[minus(V7, V8, Ret10),div(Ret10, 1 + V8, Ret12)],[Out = 1 + Ret12,V = 1 + V8,V7 >= 0,V8 >= 0,V1 = 1 + V7]). eq(plus(V1, V, Out),1,[],[Out = V9,V9 >= 0,V1 = 0,V = V9]). eq(plus(V1, V, Out),1,[minus(1 + V11, 1 + 0, Ret111),plus(V10, Ret111, Ret13)],[Out = 1 + Ret13,V11 >= 0,V10 >= 0,V1 = 1 + V11,V = V10]). eq(p(V1, Out),0,[],[Out = 0,V12 >= 0,V1 = V12]). eq(div(V1, V, Out),0,[],[Out = 0,V14 >= 0,V13 >= 0,V1 = V14,V = V13]). eq(minus(V1, V, Out),0,[],[Out = 0,V16 >= 0,V15 >= 0,V1 = V16,V = V15]). eq(plus(V1, V, Out),0,[],[Out = 0,V17 >= 0,V18 >= 0,V1 = V17,V = V18]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(p(V1,Out),[V1],[Out]). input_output_vars(div(V1,V,Out),[V1,V],[Out]). input_output_vars(plus(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [p/2] 1. recursive : [minus/3] 2. recursive : [(div)/3] 3. recursive : [plus/3] 4. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into p/2 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into (div)/3 3. SCC is partially evaluated into plus/3 4. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations p/2 * CE 11 is refined into CE [17] * CE 10 is refined into CE [18] * CE 9 is refined into CE [19] ### Cost equations --> "Loop" of p/2 * CEs [19] --> Loop 13 * CEs [17] --> Loop 14 * CEs [18] --> Loop 15 ### Ranking functions of CR p(V1,Out) * RF of phase [13]: [V1-1] #### Partial ranking functions of CR p(V1,Out) * Partial RF of phase [13]: - RF of loop [13:1]: V1-1 ### Specialization of cost equations minus/3 * CE 5 is refined into CE [20] * CE 6 is refined into CE [21] * CE 8 is refined into CE [22] * CE 7 is refined into CE [23,24,25,26] ### Cost equations --> "Loop" of minus/3 * CEs [26] --> Loop 16 * CEs [25] --> Loop 17 * CEs [24] --> Loop 18 * CEs [23] --> Loop 19 * CEs [20] --> Loop 20 * CEs [21,22] --> Loop 21 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [16]: [V-1,V1-1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [16]: - RF of loop [16:1]: V-1 V1-1 ### Specialization of cost equations (div)/3 * CE 13 is refined into CE [27] * CE 12 is refined into CE [28,29,30] ### Cost equations --> "Loop" of (div)/3 * CEs [30] --> Loop 22 * CEs [29] --> Loop 23 * CEs [28] --> Loop 24 * CEs [27] --> Loop 25 ### Ranking functions of CR div(V1,V,Out) * RF of phase [22]: [V1/2-1] * RF of phase [24]: [V1] #### Partial ranking functions of CR div(V1,V,Out) * Partial RF of phase [22]: - RF of loop [22:1]: V1/2-1 * Partial RF of phase [24]: - RF of loop [24:1]: V1 ### Specialization of cost equations plus/3 * CE 16 is refined into CE [31] * CE 14 is refined into CE [32] * CE 15 is refined into CE [33,34] ### Cost equations --> "Loop" of plus/3 * CEs [34] --> Loop 26 * CEs [33] --> Loop 27 * CEs [31] --> Loop 28 * CEs [32] --> Loop 29 ### Ranking functions of CR plus(V1,V,Out) * RF of phase [26,27]: [V1+V] #### Partial ranking functions of CR plus(V1,V,Out) * Partial RF of phase [26,27]: - RF of loop [26:1]: V1+V-1 - RF of loop [27:1]: V1+V ### Specialization of cost equations start/2 * CE 1 is refined into CE [35,36,37] * CE 2 is refined into CE [38,39,40] * CE 3 is refined into CE [41,42,43,44,45] * CE 4 is refined into CE [46,47,48] ### Cost equations --> "Loop" of start/2 * CEs [41] --> Loop 30 * CEs [35] --> Loop 31 * CEs [36,37,38,39,40,42,43,44,45,46,47,48] --> Loop 32 ### Ranking functions of CR start(V1,V) #### Partial ranking functions of CR start(V1,V) Computing Bounds ===================================== #### Cost of chains of p(V1,Out): * Chain [[13],14]: 1*it(13)+0 Such that:it(13) =< Out with precondition: [Out>=1,V1>=Out+1] * Chain [15]: 1 with precondition: [V1=0,Out=2] * Chain [14]: 0 with precondition: [Out=0,V1>=0] #### Cost of chains of minus(V1,V,Out): * Chain [[16],21]: 1*it(16)+1*s(5)+1*s(6)+1 Such that:aux(3) =< V1 aux(5) =< V it(16) =< aux(5) it(16) =< aux(3) s(6) =< it(16)*aux(5) s(5) =< it(16)*aux(3) with precondition: [Out=0,V1>=2,V>=2] * Chain [[16],19,21]: 1*it(16)+1*s(5)+1*s(6)+2 Such that:aux(3) =< V1 aux(6) =< V it(16) =< aux(6) it(16) =< aux(3) s(6) =< it(16)*aux(6) s(5) =< it(16)*aux(3) with precondition: [Out=0,V1>=2,V>=2] * Chain [[16],19,20]: 1*it(16)+1*s(5)+1*s(6)+2 Such that:aux(3) =< V1 aux(7) =< V it(16) =< aux(7) it(16) =< aux(3) s(6) =< it(16)*aux(7) s(5) =< it(16)*aux(3) with precondition: [Out=0,V1>=2,V>=2] * Chain [[16],18,21]: 1*it(16)+1*s(5)+1*s(6)+1*s(7)+2 Such that:aux(3) =< V1 aux(8) =< V it(16) =< aux(8) s(7) =< aux(8) it(16) =< aux(3) s(6) =< it(16)*aux(8) s(5) =< it(16)*aux(3) with precondition: [Out=0,V1>=2,V>=3] * Chain [[16],17,21]: 1*it(16)+1*s(5)+1*s(6)+1*s(8)+2 Such that:aux(4) =< V aux(9) =< V1 it(16) =< aux(9) s(8) =< aux(9) it(16) =< aux(4) s(6) =< it(16)*aux(4) s(5) =< it(16)*aux(9) with precondition: [Out=0,V1>=3,V>=2] * Chain [[16],17,20]: 1*it(16)+1*s(5)+1*s(6)+1*s(8)+2 Such that:aux(3) =< V1 s(8) =< Out aux(10) =< V it(16) =< aux(10) it(16) =< aux(3) s(6) =< it(16)*aux(10) s(5) =< it(16)*aux(3) with precondition: [V>=2,Out>=1,V1>=Out+2] * Chain [21]: 1 with precondition: [Out=0,V1>=0,V>=0] * Chain [20]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [19,21]: 2 with precondition: [Out=0,V1>=1,V>=1] * Chain [19,20]: 2 with precondition: [Out=0,V1>=1,V>=1] * Chain [18,21]: 1*s(7)+2 Such that:s(7) =< V with precondition: [Out=0,V1>=1,V>=2] * Chain [17,21]: 1*s(8)+2 Such that:s(8) =< V1 with precondition: [Out=0,V1>=2,V>=1] * Chain [17,20]: 1*s(8)+2 Such that:s(8) =< Out with precondition: [V>=1,Out>=1,V1>=Out+1] #### Cost of chains of div(V1,V,Out): * Chain [[24],25]: 2*it(24)+0 Such that:it(24) =< Out with precondition: [V=1,Out>=1,V1>=Out] * Chain [[24],23,25]: 2*it(24)+2*s(47)+2*s(48)+5*s(49)+5*s(50)+5*s(51)+3 Such that:s(46) =< 1 s(45) =< V1-Out+1 it(24) =< Out s(47) =< s(45) s(48) =< s(46) s(49) =< s(46) s(49) =< s(45) s(50) =< s(49)*s(46) s(51) =< s(49)*s(45) with precondition: [V=1,Out>=2,V1>=Out] * Chain [[22],25]: 3*it(22)+2*s(66)+1*s(67)+1*s(68)+1*s(69)+0 Such that:s(59) =< V1 it(22) =< V1/2 s(61) =< V aux(16) =< s(61) aux(15) =< s(59)-2 aux(14) =< s(59) s(71) =< it(22)*aux(16) s(72) =< it(22)*aux(15) s(70) =< it(22)*aux(14) s(66) =< s(72) s(67) =< s(71) s(67) =< s(70) s(68) =< s(67)*s(61) s(69) =< s(67)*s(59) with precondition: [V>=2,Out>=1,V1>=2*Out+1] * Chain [[22],23,25]: 5*it(22)+2*s(48)+5*s(49)+5*s(50)+5*s(51)+2*s(66)+1*s(67)+1*s(68)+1*s(69)+3 Such that:aux(17) =< V1 aux(18) =< V it(22) =< aux(17) s(48) =< aux(18) s(49) =< aux(18) s(49) =< aux(17) s(50) =< s(49)*aux(18) s(51) =< s(49)*aux(17) aux(16) =< aux(18) aux(15) =< aux(17)-2 aux(14) =< aux(17) s(71) =< it(22)*aux(16) s(72) =< it(22)*aux(15) s(70) =< it(22)*aux(14) s(66) =< s(72) s(67) =< s(71) s(67) =< s(70) s(68) =< s(67)*aux(18) s(69) =< s(67)*aux(17) with precondition: [V>=2,Out>=2,V1+1>=2*Out] * Chain [25]: 0 with precondition: [Out=0,V1>=0,V>=0] * Chain [23,25]: 2*s(47)+2*s(48)+5*s(49)+5*s(50)+5*s(51)+3 Such that:s(45) =< V1 s(46) =< V s(47) =< s(45) s(48) =< s(46) s(49) =< s(46) s(49) =< s(45) s(50) =< s(49)*s(46) s(51) =< s(49)*s(45) with precondition: [Out=1,V1>=1,V>=1] #### Cost of chains of plus(V1,V,Out): * Chain [[26,27],29]: 15*it(26)+2*s(110)+1*s(111)+1*s(112)+1*s(113)+5*s(120)+5*s(121)+1 Such that:aux(24) =< 1 aux(27) =< V1+V it(26) =< aux(27) aux(22) =< aux(27)-1 aux(21) =< aux(27) s(116) =< it(26)*aux(22) s(114) =< it(26)*aux(21) s(120) =< it(26)*aux(24) s(121) =< it(26)*aux(21) s(110) =< s(116) s(111) =< aux(27) s(111) =< s(114) s(112) =< s(111)*aux(24) s(113) =< s(111)*aux(27) with precondition: [V1>=1,V>=0,Out>=1,V+V1>=Out] * Chain [[26,27],28]: 15*it(26)+2*s(110)+1*s(111)+1*s(112)+1*s(113)+5*s(120)+5*s(121)+0 Such that:aux(24) =< 1 aux(28) =< V1+V it(26) =< aux(28) aux(22) =< aux(28)-1 aux(21) =< aux(28) s(116) =< it(26)*aux(22) s(114) =< it(26)*aux(21) s(120) =< it(26)*aux(24) s(121) =< it(26)*aux(21) s(110) =< s(116) s(111) =< aux(28) s(111) =< s(114) s(112) =< s(111)*aux(24) s(113) =< s(111)*aux(28) with precondition: [V1>=1,V>=0,Out>=1] * Chain [29]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [28]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of start(V1,V): * Chain [32]: 12*s(152)+6*s(153)+16*s(154)+16*s(155)+16*s(156)+3*s(173)+2*s(181)+1*s(182)+1*s(183)+1*s(184)+2*s(198)+1*s(199)+1*s(200)+1*s(201)+30*s(204)+10*s(209)+10*s(210)+4*s(211)+2*s(212)+2*s(213)+2*s(214)+3 Such that:s(202) =< 1 s(203) =< V1+V s(173) =< V1/2 aux(32) =< V1 aux(33) =< V s(152) =< aux(32) s(204) =< s(203) s(205) =< s(203)-1 s(206) =< s(203) s(207) =< s(204)*s(205) s(208) =< s(204)*s(206) s(209) =< s(204)*s(202) s(210) =< s(204)*s(206) s(211) =< s(207) s(212) =< s(203) s(212) =< s(208) s(213) =< s(212)*s(202) s(214) =< s(212)*s(203) s(153) =< aux(33) s(154) =< aux(33) s(154) =< aux(32) s(155) =< s(154)*aux(33) s(156) =< s(154)*aux(32) s(175) =< aux(33) s(176) =< aux(32)-2 s(177) =< aux(32) s(178) =< s(173)*s(175) s(179) =< s(173)*s(176) s(180) =< s(173)*s(177) s(181) =< s(179) s(182) =< s(178) s(182) =< s(180) s(183) =< s(182)*aux(33) s(184) =< s(182)*aux(32) s(195) =< s(152)*s(175) s(196) =< s(152)*s(176) s(197) =< s(152)*s(177) s(198) =< s(196) s(199) =< s(195) s(199) =< s(197) s(200) =< s(199)*aux(33) s(201) =< s(199)*aux(32) with precondition: [V1>=0] * Chain [31]: 1 with precondition: [V=0,V1>=0] * Chain [30]: 6*s(218)+2*s(220)+5*s(221)+5*s(222)+5*s(223)+3 Such that:s(215) =< 1 aux(34) =< V1+1 s(218) =< aux(34) s(220) =< s(215) s(221) =< s(215) s(221) =< aux(34) s(222) =< s(221)*s(215) s(223) =< s(221)*aux(34) with precondition: [V=1,V1>=1] Closed-form bounds of start(V1,V): ------------------------------------- * Chain [32] with precondition: [V1>=0] - Upper bound: 12*V1+3+V1*V1*nat(V)+17*V1*nat(V)+nat(V)*V1*nat(V)+V1/2*(nat(V)*V1)+2*V1*nat(V1-2)+nat(V)*22+nat(V)*16*nat(V)+V1/2*(nat(V)*nat(V))+V1/2*nat(V)+V1/2*(nat(V1-2)*2)+nat(nat(V1+V)+ -1)*4*nat(V1+V)+nat(V1+V)*44+nat(V1+V)*12*nat(V1+V)+3/2*V1 - Complexity: n^3 * Chain [31] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant * Chain [30] with precondition: [V=1,V1>=1] - Upper bound: 11*V1+26 - Complexity: n ### Maximum cost of start(V1,V): max([11*V1+25,12*V1+2+V1*V1*nat(V)+17*V1*nat(V)+nat(V)*V1*nat(V)+V1/2*(nat(V)*V1)+2*V1*nat(V1-2)+nat(V)*22+nat(V)*16*nat(V)+V1/2*(nat(V)*nat(V))+V1/2*nat(V)+V1/2*(nat(V1-2)*2)+nat(nat(V1+V)+ -1)*4*nat(V1+V)+nat(V1+V)*44+nat(V1+V)*12*nat(V1+V)+3/2*V1])+1 Asymptotic class: n^3 * Total analysis performed in 448 ms. ---------------------------------------- (14) BOUNDS(1, n^3) ---------------------------------------- (15) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (16) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) minus(x, plus(y, z)) -> minus(minus(x, y), z) p(s(s(x))) -> s(p(s(x))) p(0) -> s(s(0)) div(s(x), s(y)) -> s(div(minus(x, y), s(y))) div(plus(x, y), z) -> plus(div(x, z), div(y, z)) plus(0, y) -> y plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (17) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence p(s(s(x))) ->^+ s(p(s(x))) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [x / s(x)]. The result substitution is [ ]. ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) minus(x, plus(y, z)) -> minus(minus(x, y), z) p(s(s(x))) -> s(p(s(x))) p(0) -> s(s(0)) div(s(x), s(y)) -> s(div(minus(x, y), s(y))) div(plus(x, y), z) -> plus(div(x, z), div(y, z)) plus(0, y) -> y plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) S is empty. Rewrite Strategy: FULL ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(p(s(x)), p(s(y))) minus(x, plus(y, z)) -> minus(minus(x, y), z) p(s(s(x))) -> s(p(s(x))) p(0) -> s(s(0)) div(s(x), s(y)) -> s(div(minus(x, y), s(y))) div(plus(x, y), z) -> plus(div(x, z), div(y, z)) plus(0, y) -> y plus(s(x), y) -> s(plus(y, minus(s(x), s(0)))) S is empty. Rewrite Strategy: FULL