WORST_CASE(?,O(n^1)) proof of input_lcVQs3Sr20.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxWeightedTrs (13) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxWeightedTrs (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxTypedWeightedTrs (17) CompletionProof [UPPER BOUND(ID), 0 ms] (18) CpxTypedWeightedCompleteTrs (19) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (20) CpxRNTS (21) CompleteCoflocoProof [FINISHED, 376 ms] (22) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: -(x, 0) -> x -(0, s(y)) -> 0 -(s(x), s(y)) -> -(x, y) lt(x, 0) -> false lt(0, s(y)) -> true lt(s(x), s(y)) -> lt(x, y) if(true, x, y) -> x if(false, x, y) -> y div(x, 0) -> 0 div(0, y) -> 0 div(s(x), s(y)) -> if(lt(x, y), 0, s(div(-(x, y), s(y)))) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: -(z0, 0) -> z0 -(0, s(z0)) -> 0 -(s(z0), s(z1)) -> -(z0, z1) lt(z0, 0) -> false lt(0, s(z0)) -> true lt(s(z0), s(z1)) -> lt(z0, z1) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 div(z0, 0) -> 0 div(0, z0) -> 0 div(s(z0), s(z1)) -> if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))) Tuples: -'(z0, 0) -> c -'(0, s(z0)) -> c1 -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(z0, 0) -> c3 LT(0, s(z0)) -> c4 LT(s(z0), s(z1)) -> c5(LT(z0, z1)) IF(true, z0, z1) -> c6 IF(false, z0, z1) -> c7 DIV(z0, 0) -> c8 DIV(0, z0) -> c9 DIV(s(z0), s(z1)) -> c10(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), DIV(-(z0, z1), s(z1)), -'(z0, z1)) S tuples: -'(z0, 0) -> c -'(0, s(z0)) -> c1 -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(z0, 0) -> c3 LT(0, s(z0)) -> c4 LT(s(z0), s(z1)) -> c5(LT(z0, z1)) IF(true, z0, z1) -> c6 IF(false, z0, z1) -> c7 DIV(z0, 0) -> c8 DIV(0, z0) -> c9 DIV(s(z0), s(z1)) -> c10(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), DIV(-(z0, z1), s(z1)), -'(z0, z1)) K tuples:none Defined Rule Symbols: -_2, lt_2, if_3, div_2 Defined Pair Symbols: -'_2, LT_2, IF_3, DIV_2 Compound Symbols: c, c1, c2_1, c3, c4, c5_1, c6, c7, c8, c9, c10_2, c11_3 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 8 trailing nodes: DIV(z0, 0) -> c8 -'(0, s(z0)) -> c1 -'(z0, 0) -> c LT(z0, 0) -> c3 IF(true, z0, z1) -> c6 LT(0, s(z0)) -> c4 DIV(0, z0) -> c9 IF(false, z0, z1) -> c7 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: -(z0, 0) -> z0 -(0, s(z0)) -> 0 -(s(z0), s(z1)) -> -(z0, z1) lt(z0, 0) -> false lt(0, s(z0)) -> true lt(s(z0), s(z1)) -> lt(z0, z1) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 div(z0, 0) -> 0 div(0, z0) -> 0 div(s(z0), s(z1)) -> if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))) Tuples: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), DIV(-(z0, z1), s(z1)), -'(z0, z1)) S tuples: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), DIV(-(z0, z1), s(z1)), -'(z0, z1)) K tuples:none Defined Rule Symbols: -_2, lt_2, if_3, div_2 Defined Pair Symbols: -'_2, LT_2, DIV_2 Compound Symbols: c2_1, c5_1, c10_2, c11_3 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: -(z0, 0) -> z0 -(0, s(z0)) -> 0 -(s(z0), s(z1)) -> -(z0, z1) lt(z0, 0) -> false lt(0, s(z0)) -> true lt(s(z0), s(z1)) -> lt(z0, z1) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 div(z0, 0) -> 0 div(0, z0) -> 0 div(s(z0), s(z1)) -> if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))) Tuples: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(DIV(-(z0, z1), s(z1)), -'(z0, z1)) S tuples: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(DIV(-(z0, z1), s(z1)), -'(z0, z1)) K tuples:none Defined Rule Symbols: -_2, lt_2, if_3, div_2 Defined Pair Symbols: -'_2, LT_2, DIV_2 Compound Symbols: c2_1, c5_1, c10_1, c11_2 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: lt(z0, 0) -> false lt(0, s(z0)) -> true lt(s(z0), s(z1)) -> lt(z0, z1) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 div(z0, 0) -> 0 div(0, z0) -> 0 div(s(z0), s(z1)) -> if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: -(z0, 0) -> z0 -(0, s(z0)) -> 0 -(s(z0), s(z1)) -> -(z0, z1) Tuples: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(DIV(-(z0, z1), s(z1)), -'(z0, z1)) S tuples: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(DIV(-(z0, z1), s(z1)), -'(z0, z1)) K tuples:none Defined Rule Symbols: -_2 Defined Pair Symbols: -'_2, LT_2, DIV_2 Compound Symbols: c2_1, c5_1, c10_1, c11_2 ---------------------------------------- (9) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) LT(s(z0), s(z1)) -> c5(LT(z0, z1)) DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) DIV(s(z0), s(z1)) -> c11(DIV(-(z0, z1), s(z1)), -'(z0, z1)) The (relative) TRS S consists of the following rules: -(z0, 0) -> z0 -(0, s(z0)) -> 0 -(s(z0), s(z1)) -> -(z0, z1) Rewrite Strategy: INNERMOST ---------------------------------------- (11) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (12) 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: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) [1] LT(s(z0), s(z1)) -> c5(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c11(DIV(-(z0, z1), s(z1)), -'(z0, z1)) [1] -(z0, 0) -> z0 [0] -(0, s(z0)) -> 0 [0] -(s(z0), s(z1)) -> -(z0, z1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: - => minus ---------------------------------------- (14) 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: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) [1] LT(s(z0), s(z1)) -> c5(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c11(DIV(minus(z0, z1), s(z1)), -'(z0, z1)) [1] minus(z0, 0) -> z0 [0] minus(0, s(z0)) -> 0 [0] minus(s(z0), s(z1)) -> minus(z0, z1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (16) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) [1] LT(s(z0), s(z1)) -> c5(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c11(DIV(minus(z0, z1), s(z1)), -'(z0, z1)) [1] minus(z0, 0) -> z0 [0] minus(0, s(z0)) -> 0 [0] minus(s(z0), s(z1)) -> minus(z0, z1) [0] The TRS has the following type information: -' :: s:0 -> s:0 -> c2 s :: s:0 -> s:0 c2 :: c2 -> c2 LT :: s:0 -> s:0 -> c5 c5 :: c5 -> c5 DIV :: s:0 -> s:0 -> c10:c11 c10 :: c5 -> c10:c11 c11 :: c10:c11 -> c2 -> c10:c11 minus :: s:0 -> s:0 -> s:0 0 :: s:0 Rewrite Strategy: INNERMOST ---------------------------------------- (17) 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] -'(v0, v1) -> null_-' [0] LT(v0, v1) -> null_LT [0] DIV(v0, v1) -> null_DIV [0] And the following fresh constants: null_minus, null_-', null_LT, null_DIV ---------------------------------------- (18) 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: -'(s(z0), s(z1)) -> c2(-'(z0, z1)) [1] LT(s(z0), s(z1)) -> c5(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c10(LT(z0, z1)) [1] DIV(s(z0), s(z1)) -> c11(DIV(minus(z0, z1), s(z1)), -'(z0, z1)) [1] minus(z0, 0) -> z0 [0] minus(0, s(z0)) -> 0 [0] minus(s(z0), s(z1)) -> minus(z0, z1) [0] minus(v0, v1) -> null_minus [0] -'(v0, v1) -> null_-' [0] LT(v0, v1) -> null_LT [0] DIV(v0, v1) -> null_DIV [0] The TRS has the following type information: -' :: s:0:null_minus -> s:0:null_minus -> c2:null_-' s :: s:0:null_minus -> s:0:null_minus c2 :: c2:null_-' -> c2:null_-' LT :: s:0:null_minus -> s:0:null_minus -> c5:null_LT c5 :: c5:null_LT -> c5:null_LT DIV :: s:0:null_minus -> s:0:null_minus -> c10:c11:null_DIV c10 :: c5:null_LT -> c10:c11:null_DIV c11 :: c10:c11:null_DIV -> c2:null_-' -> c10:c11:null_DIV minus :: s:0:null_minus -> s:0:null_minus -> s:0:null_minus 0 :: s:0:null_minus null_minus :: s:0:null_minus null_-' :: c2:null_-' null_LT :: c5:null_LT null_DIV :: c10:c11:null_DIV Rewrite Strategy: INNERMOST ---------------------------------------- (19) 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_minus => 0 null_-' => 0 null_LT => 0 null_DIV => 0 ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: -'(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 -'(z, z') -{ 1 }-> 1 + -'(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 DIV(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 DIV(z, z') -{ 1 }-> 1 + LT(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 DIV(z, z') -{ 1 }-> 1 + DIV(minus(z0, z1), 1 + z1) + -'(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 LT(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 LT(z, z') -{ 1 }-> 1 + LT(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 minus(z, z') -{ 0 }-> z0 :|: z = z0, z0 >= 0, z' = 0 minus(z, z') -{ 0 }-> minus(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 minus(z, z') -{ 0 }-> 0 :|: z0 >= 0, z' = 1 + z0, z = 0 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (21) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V),0,[fun(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[fun1(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[fun2(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(fun(V1, V, Out),1,[fun(V3, V2, Ret1)],[Out = 1 + Ret1,V2 >= 0,V1 = 1 + V3,V3 >= 0,V = 1 + V2]). eq(fun1(V1, V, Out),1,[fun1(V5, V4, Ret11)],[Out = 1 + Ret11,V4 >= 0,V1 = 1 + V5,V5 >= 0,V = 1 + V4]). eq(fun2(V1, V, Out),1,[fun1(V7, V6, Ret12)],[Out = 1 + Ret12,V6 >= 0,V1 = 1 + V7,V7 >= 0,V = 1 + V6]). eq(fun2(V1, V, Out),1,[minus(V8, V9, Ret010),fun2(Ret010, 1 + V9, Ret01),fun(V8, V9, Ret13)],[Out = 1 + Ret01 + Ret13,V9 >= 0,V1 = 1 + V8,V8 >= 0,V = 1 + V9]). eq(minus(V1, V, Out),0,[],[Out = V10,V1 = V10,V10 >= 0,V = 0]). eq(minus(V1, V, Out),0,[],[Out = 0,V11 >= 0,V = 1 + V11,V1 = 0]). eq(minus(V1, V, Out),0,[minus(V13, V12, Ret)],[Out = Ret,V12 >= 0,V1 = 1 + V13,V13 >= 0,V = 1 + V12]). eq(minus(V1, V, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V1 = V15,V = V14]). eq(fun(V1, V, Out),0,[],[Out = 0,V17 >= 0,V16 >= 0,V1 = V17,V = V16]). eq(fun1(V1, V, Out),0,[],[Out = 0,V19 >= 0,V18 >= 0,V1 = V19,V = V18]). eq(fun2(V1, V, Out),0,[],[Out = 0,V20 >= 0,V21 >= 0,V1 = V20,V = V21]). input_output_vars(fun(V1,V,Out),[V1,V],[Out]). input_output_vars(fun1(V1,V,Out),[V1,V],[Out]). input_output_vars(fun2(V1,V,Out),[V1,V],[Out]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [fun/3] 1. recursive : [fun1/3] 2. recursive : [minus/3] 3. recursive [non_tail] : [fun2/3] 4. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into fun/3 1. SCC is partially evaluated into fun1/3 2. SCC is partially evaluated into minus/3 3. SCC is partially evaluated into fun2/3 4. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations fun/3 * CE 6 is refined into CE [15] * CE 5 is refined into CE [16] ### Cost equations --> "Loop" of fun/3 * CEs [16] --> Loop 12 * CEs [15] --> Loop 13 ### Ranking functions of CR fun(V1,V,Out) * RF of phase [12]: [V,V1] #### Partial ranking functions of CR fun(V1,V,Out) * Partial RF of phase [12]: - RF of loop [12:1]: V V1 ### Specialization of cost equations fun1/3 * CE 8 is refined into CE [17] * CE 7 is refined into CE [18] ### Cost equations --> "Loop" of fun1/3 * CEs [18] --> Loop 14 * CEs [17] --> Loop 15 ### Ranking functions of CR fun1(V1,V,Out) * RF of phase [14]: [V,V1] #### Partial ranking functions of CR fun1(V1,V,Out) * Partial RF of phase [14]: - RF of loop [14:1]: V V1 ### Specialization of cost equations minus/3 * CE 13 is refined into CE [19] * CE 12 is refined into CE [20] * CE 14 is refined into CE [21] ### Cost equations --> "Loop" of minus/3 * CEs [21] --> Loop 16 * CEs [19] --> Loop 17 * CEs [20] --> Loop 18 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [16]: [V,V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [16]: - RF of loop [16:1]: V V1 ### Specialization of cost equations fun2/3 * CE 9 is refined into CE [22,23] * CE 11 is refined into CE [24] * CE 10 is refined into CE [25,26,27,28,29] ### Cost equations --> "Loop" of fun2/3 * CEs [29] --> Loop 19 * CEs [28] --> Loop 20 * CEs [27] --> Loop 21 * CEs [26] --> Loop 22 * CEs [25] --> Loop 23 * CEs [23] --> Loop 24 * CEs [22] --> Loop 25 * CEs [24] --> Loop 26 ### Ranking functions of CR fun2(V1,V,Out) * RF of phase [19,20]: [V1-1,V1-V+1] * RF of phase [23]: [V1] #### Partial ranking functions of CR fun2(V1,V,Out) * Partial RF of phase [19,20]: - RF of loop [19:1,20:1]: V1-1 V1-V+1 * Partial RF of phase [23]: - RF of loop [23:1]: V1 ### Specialization of cost equations start/2 * CE 1 is refined into CE [30,31] * CE 2 is refined into CE [32,33] * CE 3 is refined into CE [34,35,36,37,38] * CE 4 is refined into CE [39,40,41] ### Cost equations --> "Loop" of start/2 * CEs [34] --> Loop 27 * CEs [30,31,32,33,35,36,37,38,39,40,41] --> Loop 28 ### Ranking functions of CR start(V1,V) #### Partial ranking functions of CR start(V1,V) Computing Bounds ===================================== #### Cost of chains of fun(V1,V,Out): * Chain [[12],13]: 1*it(12)+0 Such that:it(12) =< Out with precondition: [Out>=1,V1>=Out,V>=Out] * Chain [13]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of fun1(V1,V,Out): * Chain [[14],15]: 1*it(14)+0 Such that:it(14) =< Out with precondition: [Out>=1,V1>=Out,V>=Out] * Chain [15]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of minus(V1,V,Out): * Chain [[16],18]: 0 with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [[16],17]: 0 with precondition: [Out=0,V1>=1,V>=1] * Chain [18]: 0 with precondition: [V=0,V1=Out,V1>=0] * Chain [17]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of fun2(V1,V,Out): * Chain [[23],26]: 1*it(23)+0 Such that:it(23) =< Out with precondition: [V=1,Out>=1,V1>=Out] * Chain [[23],25]: 1*it(23)+1 Such that:it(23) =< Out with precondition: [V=1,Out>=2,V1>=Out] * Chain [[23],22,26]: 1*it(23)+1 Such that:it(23) =< Out with precondition: [V=1,Out>=2,V1>=Out] * Chain [[19,20],26]: 2*it(19)+1*s(3)+0 Such that:aux(2) =< V1-V+1 aux(5) =< V1 it(19) =< aux(5) s(3) =< aux(5) it(19) =< aux(2) with precondition: [V>=2,Out>=1,V1>=V,V1>=Out] * Chain [[19,20],25]: 2*it(19)+1*s(3)+1 Such that:aux(2) =< V1-V+1 aux(6) =< V1 it(19) =< aux(6) s(3) =< aux(6) it(19) =< aux(2) with precondition: [V>=2,Out>=2,V1>=V+1,V1>=Out] * Chain [[19,20],24]: 2*it(19)+1*s(3)+1*s(4)+1 Such that:aux(2) =< V1-V+1 s(4) =< V aux(7) =< V1 it(19) =< aux(7) s(3) =< aux(7) it(19) =< aux(2) with precondition: [V>=2,Out>=3,V1>=V+2,V1>=Out] * Chain [[19,20],22,26]: 2*it(19)+1*s(3)+1 Such that:aux(2) =< V1-V+1 aux(8) =< V1 it(19) =< aux(8) s(3) =< aux(8) it(19) =< aux(2) with precondition: [V>=2,Out>=2,V1>=V+1,V1>=Out] * Chain [[19,20],21,26]: 2*it(19)+2*s(3)+1 Such that:aux(2) =< V1-V+1 aux(9) =< V1 s(3) =< aux(9) it(19) =< aux(9) it(19) =< aux(2) with precondition: [V>=2,Out>=3,V1>=V+2,V1>=Out] * Chain [26]: 0 with precondition: [Out=0,V1>=0,V>=0] * Chain [25]: 1 with precondition: [Out=1,V1>=1,V>=1] * Chain [24]: 1*s(4)+1 Such that:s(4) =< V with precondition: [Out>=2,V1>=Out,V>=Out] * Chain [22,26]: 1 with precondition: [Out=1,V1>=1,V>=1] * Chain [21,26]: 1*s(5)+1 Such that:s(5) =< V1 with precondition: [Out>=2,V1>=Out,V>=Out] #### Cost of chains of start(V1,V): * Chain [28]: 4*s(32)+7*s(37)+10*s(38)+1 Such that:s(36) =< V1-V+1 aux(13) =< V1 aux(14) =< V s(37) =< aux(13) s(32) =< aux(14) s(38) =< aux(13) s(38) =< s(36) with precondition: [V1>=0,V>=0] * Chain [27]: 3*s(42)+1 Such that:s(41) =< V1 s(42) =< s(41) with precondition: [V=1,V1>=1] Closed-form bounds of start(V1,V): ------------------------------------- * Chain [28] with precondition: [V1>=0,V>=0] - Upper bound: 17*V1+4*V+1 - Complexity: n * Chain [27] with precondition: [V=1,V1>=1] - Upper bound: 3*V1+1 - Complexity: n ### Maximum cost of start(V1,V): 17*V1+4*V+1 Asymptotic class: n * Total analysis performed in 328 ms. ---------------------------------------- (22) BOUNDS(1, n^1)