/export/starexec/sandbox2/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(1, n^2). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 155 ms] (4) CpxRelTRS (5) NonCtorToCtorProof [UPPER BOUND(ID), 0 ms] (6) CpxRelTRS (7) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxRelTRS (9) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxWeightedTrs (11) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxWeightedTrs (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTypedWeightedTrs (15) CompletionProof [UPPER BOUND(ID), 0 ms] (16) CpxTypedWeightedCompleteTrs (17) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (18) CpxRNTS (19) CompleteCoflocoProof [FINISHED, 755 ms] (20) BOUNDS(1, n^2) ---------------------------------------- (0) Obligation: The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: +(x, +(y, z)) -> +(+(x, y), z) +(*(x, y), +(x, z)) -> *(x, +(y, z)) +(*(x, y), +(*(x, z), u)) -> +(*(x, +(y, z)), u) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: +(x, +(y, z)) -> +(+(x, y), z) +(*(x, y), +(x, z)) -> *(x, +(y, z)) +(*(x, y), +(*(x, z), u)) -> +(*(x, +(y, z)), u) The (relative) TRS S consists of the following rules: encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) Rewrite Strategy: FULL ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: +(x, +(y, z)) -> +(+(x, y), z) +(*(x, y), +(x, z)) -> *(x, +(y, z)) +(*(x, y), +(*(x, z), u)) -> +(*(x, +(y, z)), u) The (relative) TRS S consists of the following rules: encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) Rewrite Strategy: FULL ---------------------------------------- (5) NonCtorToCtorProof (UPPER BOUND(ID)) transformed non-ctor to ctor-system ---------------------------------------- (6) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: +(x, c_+(y, z)) -> +(+(x, y), z) +(*(x, y), c_+(x, z)) -> *(x, +(y, z)) +(*(x, y), c_+(*(x, z), u)) -> +(*(x, +(y, z)), u) The (relative) TRS S consists of the following rules: encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) +(x0, x1) -> c_+(x0, x1) Rewrite Strategy: FULL ---------------------------------------- (7) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS is a non-duplicating overlay system, we have rc = irc. ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: +(x, c_+(y, z)) -> +(+(x, y), z) +(*(x, y), c_+(x, z)) -> *(x, +(y, z)) +(*(x, y), c_+(*(x, z), u)) -> +(*(x, +(y, z)), u) The (relative) TRS S consists of the following rules: encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) +(x0, x1) -> c_+(x0, x1) Rewrite Strategy: INNERMOST ---------------------------------------- (9) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: +(x, c_+(y, z)) -> +(+(x, y), z) [1] +(*(x, y), c_+(x, z)) -> *(x, +(y, z)) [1] +(*(x, y), c_+(*(x, z), u)) -> +(*(x, +(y, z)), u) [1] encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) [0] encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) [0] encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) [0] encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) [0] +(x0, x1) -> c_+(x0, x1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (11) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: + => plus ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: plus(x, c_+(y, z)) -> plus(plus(x, y), z) [1] plus(*(x, y), c_+(x, z)) -> *(x, plus(y, z)) [1] plus(*(x, y), c_+(*(x, z), u)) -> plus(*(x, plus(y, z)), u) [1] encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) [0] encArg(cons_+(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) [0] encode_+(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) [0] encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) [0] plus(x0, x1) -> c_+(x0, x1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: plus(x, c_+(y, z)) -> plus(plus(x, y), z) [1] plus(*(x, y), c_+(x, z)) -> *(x, plus(y, z)) [1] plus(*(x, y), c_+(*(x, z), u)) -> plus(*(x, plus(y, z)), u) [1] encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) [0] encArg(cons_+(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) [0] encode_+(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) [0] encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) [0] plus(x0, x1) -> c_+(x0, x1) [0] The TRS has the following type information: plus :: c_+:*:cons_+ -> c_+:*:cons_+ -> c_+:*:cons_+ c_+ :: c_+:*:cons_+ -> c_+:*:cons_+ -> c_+:*:cons_+ * :: c_+:*:cons_+ -> c_+:*:cons_+ -> c_+:*:cons_+ encArg :: c_+:*:cons_+ -> c_+:*:cons_+ cons_+ :: c_+:*:cons_+ -> c_+:*:cons_+ -> c_+:*:cons_+ encode_+ :: c_+:*:cons_+ -> c_+:*:cons_+ -> c_+:*:cons_+ encode_* :: c_+:*:cons_+ -> c_+:*:cons_+ -> c_+:*:cons_+ Rewrite Strategy: INNERMOST ---------------------------------------- (15) 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: encArg(v0) -> null_encArg [0] encode_+(v0, v1) -> null_encode_+ [0] encode_*(v0, v1) -> null_encode_* [0] plus(v0, v1) -> null_plus [0] And the following fresh constants: null_encArg, null_encode_+, null_encode_*, null_plus ---------------------------------------- (16) 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: plus(x, c_+(y, z)) -> plus(plus(x, y), z) [1] plus(*(x, y), c_+(x, z)) -> *(x, plus(y, z)) [1] plus(*(x, y), c_+(*(x, z), u)) -> plus(*(x, plus(y, z)), u) [1] encArg(*(x_1, x_2)) -> *(encArg(x_1), encArg(x_2)) [0] encArg(cons_+(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) [0] encode_+(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) [0] encode_*(x_1, x_2) -> *(encArg(x_1), encArg(x_2)) [0] plus(x0, x1) -> c_+(x0, x1) [0] encArg(v0) -> null_encArg [0] encode_+(v0, v1) -> null_encode_+ [0] encode_*(v0, v1) -> null_encode_* [0] plus(v0, v1) -> null_plus [0] The TRS has the following type information: plus :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus c_+ :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus * :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus encArg :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus cons_+ :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus encode_+ :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus encode_* :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus -> c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus null_encArg :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus null_encode_+ :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus null_encode_* :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus null_plus :: c_+:*:cons_+:null_encArg:null_encode_+:null_encode_*:null_plus Rewrite Strategy: INNERMOST ---------------------------------------- (17) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: null_encArg => 0 null_encode_+ => 0 null_encode_* => 0 null_plus => 0 ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: encArg(z') -{ 0 }-> plus(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, x_2 >= 0, z' = 1 + x_1 + x_2 encArg(z') -{ 0 }-> 0 :|: v0 >= 0, z' = v0 encArg(z') -{ 0 }-> 1 + encArg(x_1) + encArg(x_2) :|: x_1 >= 0, x_2 >= 0, z' = 1 + x_1 + x_2 encode_*(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 encode_*(z', z'') -{ 0 }-> 1 + encArg(x_1) + encArg(x_2) :|: x_1 >= 0, z' = x_1, x_2 >= 0, z'' = x_2 encode_+(z', z'') -{ 0 }-> plus(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, z' = x_1, x_2 >= 0, z'' = x_2 encode_+(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 plus(z', z'') -{ 1 }-> plus(plus(x, y), z) :|: z >= 0, z' = x, x >= 0, y >= 0, z'' = 1 + y + z plus(z', z'') -{ 1 }-> plus(1 + x + plus(y, z), u) :|: z >= 0, z' = 1 + x + y, x >= 0, y >= 0, z'' = 1 + (1 + x + z) + u, u >= 0 plus(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 plus(z', z'') -{ 1 }-> 1 + x + plus(y, z) :|: z >= 0, z' = 1 + x + y, z'' = 1 + x + z, x >= 0, y >= 0 plus(z', z'') -{ 0 }-> 1 + x0 + x1 :|: z'' = x1, x0 >= 0, x1 >= 0, z' = x0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (19) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V, V2),0,[plus(V, V2, Out)],[V >= 0,V2 >= 0]). eq(start(V, V2),0,[encArg(V, Out)],[V >= 0]). eq(start(V, V2),0,[fun(V, V2, Out)],[V >= 0,V2 >= 0]). eq(start(V, V2),0,[fun1(V, V2, Out)],[V >= 0,V2 >= 0]). eq(plus(V, V2, Out),1,[plus(V1, V3, Ret0),plus(Ret0, V4, Ret)],[Out = Ret,V4 >= 0,V = V1,V1 >= 0,V3 >= 0,V2 = 1 + V3 + V4]). eq(plus(V, V2, Out),1,[plus(V7, V6, Ret1)],[Out = 1 + Ret1 + V5,V6 >= 0,V = 1 + V5 + V7,V2 = 1 + V5 + V6,V5 >= 0,V7 >= 0]). eq(plus(V, V2, Out),1,[plus(V10, V11, Ret01),plus(1 + V8 + Ret01, V9, Ret2)],[Out = Ret2,V11 >= 0,V = 1 + V10 + V8,V8 >= 0,V10 >= 0,V2 = 2 + V11 + V8 + V9,V9 >= 0]). eq(encArg(V, Out),0,[encArg(V13, Ret011),encArg(V12, Ret11)],[Out = 1 + Ret011 + Ret11,V13 >= 0,V12 >= 0,V = 1 + V12 + V13]). eq(encArg(V, Out),0,[encArg(V14, Ret02),encArg(V15, Ret12),plus(Ret02, Ret12, Ret3)],[Out = Ret3,V14 >= 0,V15 >= 0,V = 1 + V14 + V15]). eq(fun(V, V2, Out),0,[encArg(V17, Ret03),encArg(V16, Ret13),plus(Ret03, Ret13, Ret4)],[Out = Ret4,V17 >= 0,V = V17,V16 >= 0,V2 = V16]). eq(fun1(V, V2, Out),0,[encArg(V19, Ret012),encArg(V18, Ret14)],[Out = 1 + Ret012 + Ret14,V19 >= 0,V = V19,V18 >= 0,V2 = V18]). eq(plus(V, V2, Out),0,[],[Out = 1 + V20 + V21,V2 = V20,V21 >= 0,V20 >= 0,V = V21]). eq(encArg(V, Out),0,[],[Out = 0,V22 >= 0,V = V22]). eq(fun(V, V2, Out),0,[],[Out = 0,V24 >= 0,V23 >= 0,V2 = V23,V = V24]). eq(fun1(V, V2, Out),0,[],[Out = 0,V26 >= 0,V25 >= 0,V2 = V25,V = V26]). eq(plus(V, V2, Out),0,[],[Out = 0,V27 >= 0,V28 >= 0,V2 = V28,V = V27]). input_output_vars(plus(V,V2,Out),[V,V2],[Out]). input_output_vars(encArg(V,Out),[V],[Out]). input_output_vars(fun(V,V2,Out),[V,V2],[Out]). input_output_vars(fun1(V,V2,Out),[V,V2],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive [multiple] : [plus/3] 1. recursive [non_tail,multiple] : [encArg/2] 2. non_recursive : [fun/3] 3. non_recursive : [fun1/3] 4. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into plus/3 1. SCC is partially evaluated into encArg/2 2. SCC is partially evaluated into fun/3 3. SCC is partially evaluated into fun1/3 4. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations plus/3 * CE 8 is refined into CE [17] * CE 9 is refined into CE [18] * CE 7 is refined into CE [19] * CE 5 is refined into CE [20] * CE 6 is refined into CE [21] ### Cost equations --> "Loop" of plus/3 * CEs [21] --> Loop 11 * CEs [19] --> Loop 12 * CEs [20] --> Loop 13 * CEs [17] --> Loop 14 * CEs [18] --> Loop 15 ### Ranking functions of CR plus(V,V2,Out) * RF of phase [11,12,13]: [V2] #### Partial ranking functions of CR plus(V,V2,Out) * Partial RF of phase [11,12,13]: - RF of loop [11:1,12:1]: V depends on loops [12:2,13:2] - RF of loop [11:1,13:1,13:2]: V2 - RF of loop [12:1,12:2]: V2/2-1/2 ### Specialization of cost equations encArg/2 * CE 12 is refined into CE [22] * CE 10 is refined into CE [23] * CE 11 is refined into CE [24,25,26] ### Cost equations --> "Loop" of encArg/2 * CEs [26] --> Loop 16 * CEs [23,25] --> Loop 17 * CEs [24] --> Loop 18 * CEs [22] --> Loop 19 ### Ranking functions of CR encArg(V,Out) * RF of phase [16,17,18]: [V] #### Partial ranking functions of CR encArg(V,Out) * Partial RF of phase [16,17,18]: - RF of loop [16:1,16:2,17:1,17:2,18:1,18:2]: V ### Specialization of cost equations fun/3 * CE 13 is refined into CE [27,28,29,30,31,32,33,34,35,36] * CE 14 is refined into CE [37] ### Cost equations --> "Loop" of fun/3 * CEs [35,36] --> Loop 20 * CEs [33] --> Loop 21 * CEs [30,31] --> Loop 22 * CEs [28] --> Loop 23 * CEs [27,29,32,34,37] --> Loop 24 ### Ranking functions of CR fun(V,V2,Out) #### Partial ranking functions of CR fun(V,V2,Out) ### Specialization of cost equations fun1/3 * CE 15 is refined into CE [38,39,40,41] * CE 16 is refined into CE [42] ### Cost equations --> "Loop" of fun1/3 * CEs [41] --> Loop 25 * CEs [40] --> Loop 26 * CEs [39] --> Loop 27 * CEs [38] --> Loop 28 * CEs [42] --> Loop 29 ### Ranking functions of CR fun1(V,V2,Out) #### Partial ranking functions of CR fun1(V,V2,Out) ### Specialization of cost equations start/2 * CE 1 is refined into CE [43,44,45] * CE 2 is refined into CE [46,47] * CE 3 is refined into CE [48,49,50,51,52] * CE 4 is refined into CE [53,54,55,56,57] ### Cost equations --> "Loop" of start/2 * CEs [43,44,45,46,47,48,49,50,51,52,53,54,55,56,57] --> Loop 30 ### Ranking functions of CR start(V,V2) #### Partial ranking functions of CR start(V,V2) Computing Bounds ===================================== #### Cost of chains of plus(V,V2,Out): * Chain [15]: 0 with precondition: [Out=0,V>=0,V2>=0] * Chain [14]: 0 with precondition: [V+V2+1=Out,V>=0,V2>=0] * Chain [multiple([11,12,13],[[15],[14]])]: 1*it(11)+1*it(12)+1*it(13)+0 Such that:aux(8) =< V+V2 it(12) =< V2/2 aux(17) =< V aux(18) =< V2 it(11) =< aux(18) it(12) =< aux(18) it(13) =< aux(18) aux(10) =< aux(8)+2 aux(1) =< it(12)*aux(8) aux(2) =< it(13)*aux(10) it(11) =< aux(2)+aux(1)+aux(17) with precondition: [V>=0,V2>=1,Out>=0,V+V2+1>=Out] #### Cost of chains of encArg(V,Out): * Chain [19]: 0 with precondition: [Out=0,V>=0] * Chain [multiple([16,17,18],[[19]])]: 1*s(19)+1*s(20)+1*s(21)+0 Such that:aux(22) =< V aux(23) =< 2*V+1 it(16) =< aux(23) aux(19) =< aux(22)-1 aux(21) =< it(16)*aux(19) s(22) =< it(16)*aux(19) s(19) =< aux(21)*(1/2) s(20) =< aux(21) s(19) =< aux(21) s(21) =< aux(21) s(16) =< aux(22)+2 s(23) =< s(19)*aux(22) s(24) =< s(21)*s(16) s(20) =< s(24)+s(23)+s(22) with precondition: [V>=1,Out>=0,V>=Out] #### Cost of chains of fun(V,V2,Out): * Chain [24]: 2*s(32)+2*s(33)+2*s(34)+2*s(44)+2*s(45)+2*s(46)+0 Such that:aux(24) =< V aux(25) =< 2*V+1 aux(26) =< V2 aux(27) =< 2*V2+1 s(41) =< aux(24)-1 s(42) =< aux(25)*s(41) s(44) =< s(42)*(1/2) s(45) =< s(42) s(44) =< s(42) s(46) =< s(42) s(47) =< aux(24)+2 s(48) =< s(44)*aux(24) s(49) =< s(46)*s(47) s(45) =< s(49)+s(48)+s(42) s(29) =< aux(26)-1 s(30) =< aux(27)*s(29) s(32) =< s(30)*(1/2) s(33) =< s(30) s(32) =< s(30) s(34) =< s(30) s(35) =< aux(26)+2 s(36) =< s(32)*aux(26) s(37) =< s(34)*s(35) s(33) =< s(37)+s(36)+s(30) with precondition: [Out=0,V>=0,V2>=0] * Chain [23]: 0 with precondition: [Out=1,V>=0,V2>=0] * Chain [22]: 2*s(80)+2*s(81)+2*s(82)+1*s(99)+1*s(102)+1*s(103)+0 Such that:s(99) =< V2/2 aux(29) =< V2 aux(30) =< 2*V2+1 s(77) =< aux(29)-1 s(78) =< aux(30)*s(77) s(80) =< s(78)*(1/2) s(81) =< s(78) s(80) =< s(78) s(82) =< s(78) s(83) =< aux(29)+2 s(84) =< s(80)*aux(29) s(85) =< s(82)*s(83) s(81) =< s(85)+s(84)+s(78) s(102) =< aux(29) s(99) =< aux(29) s(103) =< aux(29) s(105) =< s(99)*aux(29) s(106) =< s(103)*s(83) s(102) =< s(106)+s(105) with precondition: [V>=0,V2>=1,Out>=0,V2+1>=Out] * Chain [21]: 1*s(113)+1*s(114)+1*s(115)+0 Such that:s(107) =< V s(108) =< 2*V+1 s(110) =< s(107)-1 s(111) =< s(108)*s(110) s(113) =< s(111)*(1/2) s(114) =< s(111) s(113) =< s(111) s(115) =< s(111) s(116) =< s(107)+2 s(117) =< s(113)*s(107) s(118) =< s(115)*s(116) s(114) =< s(118)+s(117)+s(111) with precondition: [V>=1,V2>=0,Out>=1,V+1>=Out] * Chain [20]: 2*s(125)+2*s(126)+2*s(127)+2*s(137)+2*s(138)+2*s(139)+1*s(168)+1*s(171)+1*s(172)+0 Such that:s(167) =< V+V2 s(168) =< V2/2 aux(33) =< V aux(34) =< 2*V+1 aux(35) =< V2 aux(36) =< 2*V2+1 s(134) =< aux(35)-1 s(135) =< aux(36)*s(134) s(137) =< s(135)*(1/2) s(138) =< s(135) s(137) =< s(135) s(139) =< s(135) s(140) =< aux(35)+2 s(141) =< s(137)*aux(35) s(142) =< s(139)*s(140) s(138) =< s(142)+s(141)+s(135) s(122) =< aux(33)-1 s(123) =< aux(34)*s(122) s(125) =< s(123)*(1/2) s(126) =< s(123) s(125) =< s(123) s(127) =< s(123) s(128) =< aux(33)+2 s(129) =< s(125)*aux(33) s(130) =< s(127)*s(128) s(126) =< s(130)+s(129)+s(123) s(171) =< aux(35) s(168) =< aux(35) s(172) =< aux(35) s(173) =< s(167)+2 s(174) =< s(168)*s(167) s(175) =< s(172)*s(173) s(171) =< s(175)+s(174)+aux(33) with precondition: [V>=1,V2>=1,Out>=0,V+V2+1>=Out] #### Cost of chains of fun1(V,V2,Out): * Chain [29]: 0 with precondition: [Out=0,V>=0,V2>=0] * Chain [28]: 0 with precondition: [Out=1,V>=0,V2>=0] * Chain [27]: 1*s(182)+1*s(183)+1*s(184)+0 Such that:s(176) =< V2 s(177) =< 2*V2+1 s(179) =< s(176)-1 s(180) =< s(177)*s(179) s(182) =< s(180)*(1/2) s(183) =< s(180) s(182) =< s(180) s(184) =< s(180) s(185) =< s(176)+2 s(186) =< s(182)*s(176) s(187) =< s(184)*s(185) s(183) =< s(187)+s(186)+s(180) with precondition: [V>=0,V2>=1,Out>=1,V2+1>=Out] * Chain [26]: 1*s(194)+1*s(195)+1*s(196)+0 Such that:s(188) =< V s(189) =< 2*V+1 s(191) =< s(188)-1 s(192) =< s(189)*s(191) s(194) =< s(192)*(1/2) s(195) =< s(192) s(194) =< s(192) s(196) =< s(192) s(197) =< s(188)+2 s(198) =< s(194)*s(188) s(199) =< s(196)*s(197) s(195) =< s(199)+s(198)+s(192) with precondition: [V>=1,V2>=0,Out>=1,V+1>=Out] * Chain [25]: 1*s(206)+1*s(207)+1*s(208)+1*s(218)+1*s(219)+1*s(220)+0 Such that:s(200) =< V s(201) =< 2*V+1 s(212) =< V2 s(213) =< 2*V2+1 s(215) =< s(212)-1 s(216) =< s(213)*s(215) s(218) =< s(216)*(1/2) s(219) =< s(216) s(218) =< s(216) s(220) =< s(216) s(221) =< s(212)+2 s(222) =< s(218)*s(212) s(223) =< s(220)*s(221) s(219) =< s(223)+s(222)+s(216) s(203) =< s(200)-1 s(204) =< s(201)*s(203) s(206) =< s(204)*(1/2) s(207) =< s(204) s(206) =< s(204) s(208) =< s(204) s(209) =< s(200)+2 s(210) =< s(206)*s(200) s(211) =< s(208)*s(209) s(207) =< s(211)+s(210)+s(204) with precondition: [V>=1,V2>=1,Out>=1,V+V2+1>=Out] #### Cost of chains of start(V,V2): * Chain [30]: 3*s(225)+2*s(228)+3*s(229)+8*s(239)+8*s(240)+8*s(241)+8*s(259)+8*s(260)+8*s(261)+1*s(276)+0 Such that:aux(37) =< V aux(38) =< V+V2 aux(39) =< 2*V+1 aux(40) =< V2 aux(41) =< 2*V2+1 aux(42) =< V2/2 s(225) =< aux(42) s(228) =< aux(40) s(225) =< aux(40) s(229) =< aux(40) s(230) =< aux(38)+2 s(231) =< s(225)*aux(38) s(232) =< s(229)*s(230) s(228) =< s(232)+s(231)+aux(37) s(236) =< aux(37)-1 s(237) =< aux(39)*s(236) s(239) =< s(237)*(1/2) s(240) =< s(237) s(239) =< s(237) s(241) =< s(237) s(242) =< aux(37)+2 s(243) =< s(239)*aux(37) s(244) =< s(241)*s(242) s(240) =< s(244)+s(243)+s(237) s(257) =< aux(40)-1 s(258) =< aux(41)*s(257) s(259) =< s(258)*(1/2) s(260) =< s(258) s(259) =< s(258) s(261) =< s(258) s(262) =< aux(40)+2 s(263) =< s(259)*aux(40) s(264) =< s(261)*s(262) s(260) =< s(264)+s(263)+s(258) s(276) =< aux(40) s(278) =< s(225)*aux(40) s(279) =< s(229)*s(262) s(276) =< s(279)+s(278) with precondition: [V>=0] Closed-form bounds of start(V,V2): ------------------------------------- * Chain [30] with precondition: [V>=0] - Upper bound: (2*V+1)*(nat(V-1)*20)+nat(V2)*6+nat(nat(V2)+ -1)*20*nat(2*V2+1)+nat(V2/2)*3 - Complexity: n^2 ### Maximum cost of start(V,V2): (2*V+1)*(nat(V-1)*20)+nat(V2)*6+nat(nat(V2)+ -1)*20*nat(2*V2+1)+nat(V2/2)*3 Asymptotic class: n^2 * Total analysis performed in 612 ms. ---------------------------------------- (20) BOUNDS(1, n^2)