/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), 3 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 709 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(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) div(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> 0 if2(true, x, y) -> s(div(minus(x, y), y)) if2(false, x, y) -> 0 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(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] ge(x, 0) -> true [1] ge(0, s(x)) -> false [1] ge(s(x), s(y)) -> ge(x, y) [1] gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] div(x, y) -> if1(ge(x, y), x, y) [1] if1(true, x, y) -> if2(gt(y, 0), x, y) [1] if1(false, x, y) -> 0 [1] if2(true, x, y) -> s(div(minus(x, y), y)) [1] if2(false, x, y) -> 0 [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(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] ge(x, 0) -> true [1] ge(0, s(x)) -> false [1] ge(s(x), s(y)) -> ge(x, y) [1] gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] div(x, y) -> if1(ge(x, y), x, y) [1] if1(true, x, y) -> if2(gt(y, 0), x, y) [1] if1(false, x, y) -> 0 [1] if2(true, x, y) -> s(div(minus(x, y), y)) [1] if2(false, x, y) -> 0 [1] The TRS has the following type information: minus :: s:0 -> s:0 -> s:0 s :: s:0 -> s:0 if :: true:false -> s:0 -> s:0 -> s:0 gt :: s:0 -> s:0 -> true:false true :: true:false false :: true:false 0 :: s:0 ge :: s:0 -> s:0 -> true:false div :: s:0 -> s:0 -> s:0 if1 :: true:false -> s:0 -> s:0 -> s:0 if2 :: true:false -> s:0 -> s:0 -> s:0 Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: minus(v0, v1) -> null_minus [0] ge(v0, v1) -> null_ge [0] gt(v0, v1) -> null_gt [0] if(v0, v1, v2) -> null_if [0] if1(v0, v1, v2) -> null_if1 [0] if2(v0, v1, v2) -> null_if2 [0] And the following fresh constants: null_minus, null_ge, null_gt, null_if, null_if1, null_if2 ---------------------------------------- (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(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] ge(x, 0) -> true [1] ge(0, s(x)) -> false [1] ge(s(x), s(y)) -> ge(x, y) [1] gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] div(x, y) -> if1(ge(x, y), x, y) [1] if1(true, x, y) -> if2(gt(y, 0), x, y) [1] if1(false, x, y) -> 0 [1] if2(true, x, y) -> s(div(minus(x, y), y)) [1] if2(false, x, y) -> 0 [1] minus(v0, v1) -> null_minus [0] ge(v0, v1) -> null_ge [0] gt(v0, v1) -> null_gt [0] if(v0, v1, v2) -> null_if [0] if1(v0, v1, v2) -> null_if1 [0] if2(v0, v1, v2) -> null_if2 [0] The TRS has the following type information: minus :: s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 s :: s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 if :: true:false:null_ge:null_gt -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 gt :: s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> true:false:null_ge:null_gt true :: true:false:null_ge:null_gt false :: true:false:null_ge:null_gt 0 :: s:0:null_minus:null_if:null_if1:null_if2 ge :: s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> true:false:null_ge:null_gt div :: s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 if1 :: true:false:null_ge:null_gt -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 if2 :: true:false:null_ge:null_gt -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 -> s:0:null_minus:null_if:null_if1:null_if2 null_minus :: s:0:null_minus:null_if:null_if1:null_if2 null_ge :: true:false:null_ge:null_gt null_gt :: true:false:null_ge:null_gt null_if :: s:0:null_minus:null_if:null_if1:null_if2 null_if1 :: s:0:null_minus:null_if:null_if1:null_if2 null_if2 :: s:0:null_minus:null_if:null_if1:null_if2 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: true => 2 false => 1 0 => 0 null_minus => 0 null_ge => 0 null_gt => 0 null_if => 0 null_if1 => 0 null_if2 => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 1 }-> if1(ge(x, y), x, y) :|: x >= 0, y >= 0, z = x, z' = y ge(z, z') -{ 1 }-> ge(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x ge(z, z') -{ 1 }-> 2 :|: x >= 0, z = x, z' = 0 ge(z, z') -{ 1 }-> 1 :|: z' = 1 + x, x >= 0, z = 0 ge(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 gt(z, z') -{ 1 }-> gt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gt(z, z') -{ 1 }-> 2 :|: x >= 0, z = 1 + x, z' = 0 gt(z, z') -{ 1 }-> 1 :|: y >= 0, z = 0, z' = y gt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 if(z, z', z'') -{ 1 }-> 0 :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if(z, z', z'') -{ 1 }-> 1 + minus(x, y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 if1(z, z', z'') -{ 1 }-> if2(gt(y, 0), x, y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 if1(z, z', z'') -{ 1 }-> 0 :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if1(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if2(z, z', z'') -{ 1 }-> 0 :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if2(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if2(z, z', z'') -{ 1 }-> 1 + div(minus(x, y), y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 minus(z, z') -{ 1 }-> if(gt(1 + x, y), x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V5),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V5),0,[if(V1, V, V5, Out)],[V1 >= 0,V >= 0,V5 >= 0]). eq(start(V1, V, V5),0,[ge(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V5),0,[gt(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V5),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V5),0,[if1(V1, V, V5, Out)],[V1 >= 0,V >= 0,V5 >= 0]). eq(start(V1, V, V5),0,[if2(V1, V, V5, Out)],[V1 >= 0,V >= 0,V5 >= 0]). eq(minus(V1, V, Out),1,[gt(1 + V3, V2, Ret0),if(Ret0, V3, V2, Ret)],[Out = Ret,V3 >= 0,V2 >= 0,V1 = 1 + V3,V = V2]). eq(if(V1, V, V5, Out),1,[minus(V4, V6, Ret1)],[Out = 1 + Ret1,V1 = 2,V = V4,V5 = V6,V4 >= 0,V6 >= 0]). eq(if(V1, V, V5, Out),1,[],[Out = 0,V = V8,V5 = V7,V1 = 1,V8 >= 0,V7 >= 0]). eq(ge(V1, V, Out),1,[],[Out = 2,V9 >= 0,V1 = V9,V = 0]). eq(ge(V1, V, Out),1,[],[Out = 1,V = 1 + V10,V10 >= 0,V1 = 0]). eq(ge(V1, V, Out),1,[ge(V12, V11, Ret2)],[Out = Ret2,V = 1 + V11,V12 >= 0,V11 >= 0,V1 = 1 + V12]). eq(gt(V1, V, Out),1,[],[Out = 1,V13 >= 0,V1 = 0,V = V13]). eq(gt(V1, V, Out),1,[],[Out = 2,V14 >= 0,V1 = 1 + V14,V = 0]). eq(gt(V1, V, Out),1,[gt(V16, V15, Ret3)],[Out = Ret3,V = 1 + V15,V16 >= 0,V15 >= 0,V1 = 1 + V16]). eq(div(V1, V, Out),1,[ge(V17, V18, Ret01),if1(Ret01, V17, V18, Ret4)],[Out = Ret4,V17 >= 0,V18 >= 0,V1 = V17,V = V18]). eq(if1(V1, V, V5, Out),1,[gt(V19, 0, Ret02),if2(Ret02, V20, V19, Ret5)],[Out = Ret5,V1 = 2,V = V20,V5 = V19,V20 >= 0,V19 >= 0]). eq(if1(V1, V, V5, Out),1,[],[Out = 0,V = V22,V5 = V21,V1 = 1,V22 >= 0,V21 >= 0]). eq(if2(V1, V, V5, Out),1,[minus(V24, V23, Ret10),div(Ret10, V23, Ret11)],[Out = 1 + Ret11,V1 = 2,V = V24,V5 = V23,V24 >= 0,V23 >= 0]). eq(if2(V1, V, V5, Out),1,[],[Out = 0,V = V25,V5 = V26,V1 = 1,V25 >= 0,V26 >= 0]). eq(minus(V1, V, Out),0,[],[Out = 0,V28 >= 0,V27 >= 0,V1 = V28,V = V27]). eq(ge(V1, V, Out),0,[],[Out = 0,V30 >= 0,V29 >= 0,V1 = V30,V = V29]). eq(gt(V1, V, Out),0,[],[Out = 0,V32 >= 0,V31 >= 0,V1 = V32,V = V31]). eq(if(V1, V, V5, Out),0,[],[Out = 0,V33 >= 0,V5 = V35,V34 >= 0,V1 = V33,V = V34,V35 >= 0]). eq(if1(V1, V, V5, Out),0,[],[Out = 0,V37 >= 0,V5 = V38,V36 >= 0,V1 = V37,V = V36,V38 >= 0]). eq(if2(V1, V, V5, Out),0,[],[Out = 0,V40 >= 0,V5 = V41,V39 >= 0,V1 = V40,V = V39,V41 >= 0]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(if(V1,V,V5,Out),[V1,V,V5],[Out]). input_output_vars(ge(V1,V,Out),[V1,V],[Out]). input_output_vars(gt(V1,V,Out),[V1,V],[Out]). input_output_vars(div(V1,V,Out),[V1,V],[Out]). input_output_vars(if1(V1,V,V5,Out),[V1,V,V5],[Out]). input_output_vars(if2(V1,V,V5,Out),[V1,V,V5],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [ge/3] 1. recursive : [gt/3] 2. recursive : [if/4,minus/3] 3. recursive : [(div)/3,if1/4,if2/4] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into ge/3 1. SCC is partially evaluated into gt/3 2. SCC is partially evaluated into minus/3 3. SCC is partially evaluated into (div)/3 4. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations ge/3 * CE 28 is refined into CE [29] * CE 25 is refined into CE [30] * CE 26 is refined into CE [31] * CE 27 is refined into CE [32] ### Cost equations --> "Loop" of ge/3 * CEs [32] --> Loop 15 * CEs [29] --> Loop 16 * CEs [30] --> Loop 17 * CEs [31] --> Loop 18 ### Ranking functions of CR ge(V1,V,Out) * RF of phase [15]: [V,V1] #### Partial ranking functions of CR ge(V1,V,Out) * Partial RF of phase [15]: - RF of loop [15:1]: V V1 ### Specialization of cost equations gt/3 * CE 15 is refined into CE [33] * CE 13 is refined into CE [34] * CE 12 is refined into CE [35] * CE 14 is refined into CE [36] ### Cost equations --> "Loop" of gt/3 * CEs [36] --> Loop 19 * CEs [33] --> Loop 20 * CEs [34] --> Loop 21 * CEs [35] --> Loop 22 ### Ranking functions of CR gt(V1,V,Out) * RF of phase [19]: [V,V1] #### Partial ranking functions of CR gt(V1,V,Out) * Partial RF of phase [19]: - RF of loop [19:1]: V V1 ### Specialization of cost equations minus/3 * CE 16 is refined into CE [37,38,39,40] * CE 17 is refined into CE [41] * CE 19 is refined into CE [42] * CE 18 is refined into CE [43,44] ### Cost equations --> "Loop" of minus/3 * CEs [44] --> Loop 23 * CEs [43] --> Loop 24 * CEs [37,38,39,40,41,42] --> Loop 25 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [23]: [V1-1,V1-V] * RF of phase [24]: [V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [23]: - RF of loop [23:1]: V1-1 V1-V * Partial RF of phase [24]: - RF of loop [24:1]: V1 ### Specialization of cost equations (div)/3 * CE 20 is refined into CE [45,46,47,48] * CE 21 is refined into CE [49] * CE 23 is refined into CE [50,51,52,53,54] * CE 24 is refined into CE [55,56] * CE 22 is refined into CE [57,58] ### Cost equations --> "Loop" of (div)/3 * CEs [58] --> Loop 26 * CEs [57] --> Loop 27 * CEs [45,46,49,51] --> Loop 28 * CEs [47,48,50,52,53,54,55,56] --> Loop 29 ### Ranking functions of CR div(V1,V,Out) * RF of phase [26]: [V1-1,V1-V] #### Partial ranking functions of CR div(V1,V,Out) * Partial RF of phase [26]: - RF of loop [26:1]: V1-1 V1-V ### Specialization of cost equations start/3 * CE 1 is refined into CE [59,60,61] * CE 3 is refined into CE [62] * CE 5 is refined into CE [63,64,65,66,67] * CE 6 is refined into CE [68,69,70,71,72,73] * CE 7 is refined into CE [74,75,76] * CE 2 is refined into CE [77] * CE 4 is refined into CE [78] * CE 8 is refined into CE [79,80,81] * CE 9 is refined into CE [82,83,84,85,86] * CE 10 is refined into CE [87,88,89,90,91] * CE 11 is refined into CE [92,93,94,95] ### Cost equations --> "Loop" of start/3 * CEs [79,83,88] --> Loop 30 * CEs [59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76] --> Loop 31 * CEs [78] --> Loop 32 * CEs [77,80,81,82,84,85,86,87,89,90,91,92,93,94,95] --> Loop 33 ### Ranking functions of CR start(V1,V,V5) #### Partial ranking functions of CR start(V1,V,V5) Computing Bounds ===================================== #### Cost of chains of ge(V1,V,Out): * Chain [[15],18]: 1*it(15)+1 Such that:it(15) =< V1 with precondition: [Out=1,V1>=1,V>=V1+1] * Chain [[15],17]: 1*it(15)+1 Such that:it(15) =< V with precondition: [Out=2,V>=1,V1>=V] * Chain [[15],16]: 1*it(15)+0 Such that:it(15) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [18]: 1 with precondition: [V1=0,Out=1,V>=1] * Chain [17]: 1 with precondition: [V=0,Out=2,V1>=0] * Chain [16]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of gt(V1,V,Out): * Chain [[19],22]: 1*it(19)+1 Such that:it(19) =< V1 with precondition: [Out=1,V1>=1,V>=V1] * Chain [[19],21]: 1*it(19)+1 Such that:it(19) =< V with precondition: [Out=2,V>=1,V1>=V+1] * Chain [[19],20]: 1*it(19)+0 Such that:it(19) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [22]: 1 with precondition: [V1=0,Out=1,V>=0] * Chain [21]: 1 with precondition: [V=0,Out=2,V1>=1] * Chain [20]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of minus(V1,V,Out): * Chain [[24],25]: 3*it(24)+2*s(4)+3 Such that:aux(1) =< V1-Out it(24) =< Out s(4) =< aux(1) with precondition: [V=0,Out>=1,V1>=Out] * Chain [[23],25]: 3*it(23)+2*s(3)+2*s(4)+1*s(9)+3 Such that:aux(1) =< V1-Out it(23) =< Out aux(4) =< V s(4) =< aux(1) s(3) =< aux(4) s(9) =< it(23)*aux(4) with precondition: [V>=1,Out>=1,V1>=Out+V] * Chain [25]: 2*s(3)+2*s(4)+3 Such that:aux(1) =< V1 aux(2) =< V s(4) =< aux(1) s(3) =< aux(2) with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of div(V1,V,Out): * Chain [[26],29]: 8*it(26)+4*s(10)+7*s(14)+3*s(31)+1*s(33)+4 Such that:aux(10) =< V1-V aux(12) =< V1 aux(13) =< V it(26) =< aux(12) s(14) =< aux(12) s(10) =< aux(13) it(26) =< aux(10) s(31) =< it(26)*aux(10) s(33) =< s(31)*aux(13) with precondition: [V>=1,Out>=1,V1>=Out+V] * Chain [[26],27,29]: 8*it(26)+7*s(10)+7*s(30)+3*s(31)+1*s(33)+12 Such that:aux(10) =< V1-V aux(16) =< V1 aux(17) =< V it(26) =< aux(16) s(10) =< aux(17) s(30) =< aux(16) it(26) =< aux(10) s(31) =< it(26)*aux(10) s(33) =< s(31)*aux(17) with precondition: [V>=1,Out>=2,V1+2>=2*V+Out] * Chain [29]: 4*s(10)+2*s(14)+4 Such that:aux(5) =< V1 aux(6) =< V s(14) =< aux(5) s(10) =< aux(6) with precondition: [Out=0,V1>=0,V>=0] * Chain [28]: 5 with precondition: [V=0,Out=0,V1>=0] * Chain [27,29]: 7*s(10)+2*s(39)+12 Such that:s(37) =< V1 aux(15) =< V s(10) =< aux(15) s(39) =< s(37) with precondition: [Out=1,V>=1,V1>=V] #### Cost of chains of start(V1,V,V5): * Chain [33]: 27*s(48)+30*s(49)+1*s(55)+16*s(73)+6*s(76)+2*s(77)+12 Such that:aux(19) =< V1 aux(20) =< V1-V aux(21) =< V s(48) =< aux(19) s(49) =< aux(21) s(73) =< aux(19) s(73) =< aux(20) s(76) =< s(73)*aux(20) s(77) =< s(76)*aux(21) s(55) =< s(48)*aux(21) with precondition: [V1>=0,V>=0] * Chain [32]: 1 with precondition: [V1=1,V>=0,V5>=0] * Chain [31]: 99*s(89)+76*s(90)+9*s(100)+32*s(124)+12*s(127)+4*s(128)+18 Such that:aux(43) =< V aux(44) =< V-V5 aux(45) =< V5 s(89) =< aux(43) s(90) =< aux(45) s(100) =< s(89)*aux(45) s(124) =< aux(43) s(124) =< aux(44) s(127) =< s(124)*aux(44) s(128) =< s(127)*aux(45) with precondition: [V1=2,V>=0,V5>=0] * Chain [30]: 5*s(220)+3 Such that:aux(46) =< V1 s(220) =< aux(46) with precondition: [V=0,V1>=0] Closed-form bounds of start(V1,V,V5): ------------------------------------- * Chain [33] with precondition: [V1>=0,V>=0] - Upper bound: 43*V1+12+V*V1+2*V1*V*nat(V1-V)+6*V1*nat(V1-V)+30*V - Complexity: n^3 * Chain [32] with precondition: [V1=1,V>=0,V5>=0] - Upper bound: 1 - Complexity: constant * Chain [31] with precondition: [V1=2,V>=0,V5>=0] - Upper bound: 131*V+18+9*V*V5+4*V*V5*nat(V-V5)+12*V*nat(V-V5)+76*V5 - Complexity: n^3 * Chain [30] with precondition: [V=0,V1>=0] - Upper bound: 5*V1+3 - Complexity: n ### Maximum cost of start(V1,V,V5): max([131*V+17+9*V*nat(V5)+4*V*nat(V5)*nat(V-V5)+12*V*nat(V-V5)+nat(V5)*76,38*V1+9+V*V1+2*V1*V*nat(V1-V)+6*V1*nat(V1-V)+30*V+(5*V1+2)])+1 Asymptotic class: n^3 * Total analysis performed in 588 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(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) div(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> 0 if2(true, x, y) -> s(div(minus(x, y), y)) if2(false, x, y) -> 0 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 gt(s(x), s(y)) ->^+ gt(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(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) div(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> 0 if2(true, x, y) -> s(div(minus(x, y), y)) if2(false, x, y) -> 0 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(s(x), y) -> if(gt(s(x), y), x, y) if(true, x, y) -> s(minus(x, y)) if(false, x, y) -> 0 ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) div(x, y) -> if1(ge(x, y), x, y) if1(true, x, y) -> if2(gt(y, 0), x, y) if1(false, x, y) -> 0 if2(true, x, y) -> s(div(minus(x, y), y)) if2(false, x, y) -> 0 S is empty. Rewrite Strategy: INNERMOST