/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 (innermost) 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), 152 ms] (4) CpxRelTRS (5) NonCtorToCtorProof [UPPER BOUND(ID), 0 ms] (6) CpxRelTRS (7) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxWeightedTrs (9) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxWeightedTrs (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedTrs (13) CompletionProof [UPPER BOUND(ID), 0 ms] (14) CpxTypedWeightedCompleteTrs (15) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) CompleteCoflocoProof [FINISHED, 434 ms] (18) BOUNDS(1, n^2) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: f(+(x, 0)) -> f(x) +(x, +(y, z)) -> +(+(x, y), z) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (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(0) -> 0 encArg(cons_f(x_1)) -> f(encArg(x_1)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_f(x_1) -> f(encArg(x_1)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_0 -> 0 ---------------------------------------- (2) 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: f(+(x, 0)) -> f(x) +(x, +(y, z)) -> +(+(x, y), z) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(cons_f(x_1)) -> f(encArg(x_1)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_f(x_1) -> f(encArg(x_1)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_0 -> 0 Rewrite Strategy: INNERMOST ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) 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: f(+(x, 0)) -> f(x) +(x, +(y, z)) -> +(+(x, y), z) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(cons_f(x_1)) -> f(encArg(x_1)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_f(x_1) -> f(encArg(x_1)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_0 -> 0 Rewrite Strategy: INNERMOST ---------------------------------------- (5) NonCtorToCtorProof (UPPER BOUND(ID)) transformed non-ctor to ctor-system ---------------------------------------- (6) 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: f(c_+(x, 0)) -> f(x) +(x, c_+(y, z)) -> +(+(x, y), z) The (relative) TRS S consists of the following rules: encArg(0) -> 0 encArg(cons_f(x_1)) -> f(encArg(x_1)) encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) encode_f(x_1) -> f(encArg(x_1)) encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) encode_0 -> 0 +(x0, x1) -> c_+(x0, x1) Rewrite Strategy: INNERMOST ---------------------------------------- (7) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (8) 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: f(c_+(x, 0)) -> f(x) [1] +(x, c_+(y, z)) -> +(+(x, y), z) [1] encArg(0) -> 0 [0] encArg(cons_f(x_1)) -> f(encArg(x_1)) [0] encArg(cons_+(x_1, x_2)) -> +(encArg(x_1), encArg(x_2)) [0] encode_f(x_1) -> f(encArg(x_1)) [0] encode_+(x_1, x_2) -> +(encArg(x_1), encArg(x_2)) [0] encode_0 -> 0 [0] +(x0, x1) -> c_+(x0, x1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: + => plus ---------------------------------------- (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: f(c_+(x, 0)) -> f(x) [1] plus(x, c_+(y, z)) -> plus(plus(x, y), z) [1] encArg(0) -> 0 [0] encArg(cons_f(x_1)) -> f(encArg(x_1)) [0] encArg(cons_+(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) [0] encode_f(x_1) -> f(encArg(x_1)) [0] encode_+(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) [0] encode_0 -> 0 [0] plus(x0, x1) -> c_+(x0, x1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (12) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: f(c_+(x, 0)) -> f(x) [1] plus(x, c_+(y, z)) -> plus(plus(x, y), z) [1] encArg(0) -> 0 [0] encArg(cons_f(x_1)) -> f(encArg(x_1)) [0] encArg(cons_+(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) [0] encode_f(x_1) -> f(encArg(x_1)) [0] encode_+(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) [0] encode_0 -> 0 [0] plus(x0, x1) -> c_+(x0, x1) [0] The TRS has the following type information: f :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ c_+ :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ 0 :: 0:c_+:cons_f:cons_+ plus :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ encArg :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ cons_f :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ cons_+ :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ encode_f :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ encode_+ :: 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ -> 0:c_+:cons_f:cons_+ encode_0 :: 0:c_+:cons_f:cons_+ Rewrite Strategy: INNERMOST ---------------------------------------- (13) 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_f(v0) -> null_encode_f [0] encode_+(v0, v1) -> null_encode_+ [0] encode_0 -> null_encode_0 [0] plus(v0, v1) -> null_plus [0] f(v0) -> null_f [0] And the following fresh constants: null_encArg, null_encode_f, null_encode_+, null_encode_0, null_plus, null_f ---------------------------------------- (14) 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: f(c_+(x, 0)) -> f(x) [1] plus(x, c_+(y, z)) -> plus(plus(x, y), z) [1] encArg(0) -> 0 [0] encArg(cons_f(x_1)) -> f(encArg(x_1)) [0] encArg(cons_+(x_1, x_2)) -> plus(encArg(x_1), encArg(x_2)) [0] encode_f(x_1) -> f(encArg(x_1)) [0] encode_+(x_1, x_2) -> plus(encArg(x_1), encArg(x_2)) [0] encode_0 -> 0 [0] plus(x0, x1) -> c_+(x0, x1) [0] encArg(v0) -> null_encArg [0] encode_f(v0) -> null_encode_f [0] encode_+(v0, v1) -> null_encode_+ [0] encode_0 -> null_encode_0 [0] plus(v0, v1) -> null_plus [0] f(v0) -> null_f [0] The TRS has the following type information: f :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f c_+ :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f 0 :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f plus :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f encArg :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f cons_f :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f cons_+ :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f encode_f :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f encode_+ :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f -> 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f encode_0 :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f null_encArg :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f null_encode_f :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f null_encode_+ :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f null_encode_0 :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f null_plus :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f null_f :: 0:c_+:cons_f:cons_+:null_encArg:null_encode_f:null_encode_+:null_encode_0:null_plus:null_f Rewrite Strategy: INNERMOST ---------------------------------------- (15) 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_encArg => 0 null_encode_f => 0 null_encode_+ => 0 null_encode_0 => 0 null_plus => 0 null_f => 0 ---------------------------------------- (16) 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 }-> f(encArg(x_1)) :|: x_1 >= 0, z' = 1 + x_1 encArg(z') -{ 0 }-> 0 :|: z' = 0 encArg(z') -{ 0 }-> 0 :|: v0 >= 0, z' = v0 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 encode_0 -{ 0 }-> 0 :|: encode_f(z') -{ 0 }-> f(encArg(x_1)) :|: x_1 >= 0, z' = x_1 encode_f(z') -{ 0 }-> 0 :|: v0 >= 0, z' = v0 f(z') -{ 1 }-> f(x) :|: x >= 0, z' = 1 + x + 0 f(z') -{ 0 }-> 0 :|: v0 >= 0, 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'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 plus(z', z'') -{ 0 }-> 1 + x0 + x1 :|: z'' = x1, x0 >= 0, x1 >= 0, z' = x0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (17) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V, V3),0,[f(V, Out)],[V >= 0]). eq(start(V, V3),0,[plus(V, V3, Out)],[V >= 0,V3 >= 0]). eq(start(V, V3),0,[encArg(V, Out)],[V >= 0]). eq(start(V, V3),0,[fun(V, Out)],[V >= 0]). eq(start(V, V3),0,[fun1(V, V3, Out)],[V >= 0,V3 >= 0]). eq(start(V, V3),0,[fun2(Out)],[]). eq(f(V, Out),1,[f(V1, Ret)],[Out = Ret,V1 >= 0,V = 1 + V1]). eq(plus(V, V3, Out),1,[plus(V2, V4, Ret0),plus(Ret0, V5, Ret1)],[Out = Ret1,V5 >= 0,V = V2,V2 >= 0,V4 >= 0,V3 = 1 + V4 + V5]). eq(encArg(V, Out),0,[],[Out = 0,V = 0]). eq(encArg(V, Out),0,[encArg(V6, Ret01),f(Ret01, Ret2)],[Out = Ret2,V6 >= 0,V = 1 + V6]). eq(encArg(V, Out),0,[encArg(V7, Ret02),encArg(V8, Ret11),plus(Ret02, Ret11, Ret3)],[Out = Ret3,V7 >= 0,V8 >= 0,V = 1 + V7 + V8]). eq(fun(V, Out),0,[encArg(V9, Ret03),f(Ret03, Ret4)],[Out = Ret4,V9 >= 0,V = V9]). eq(fun1(V, V3, Out),0,[encArg(V11, Ret04),encArg(V10, Ret12),plus(Ret04, Ret12, Ret5)],[Out = Ret5,V11 >= 0,V = V11,V10 >= 0,V3 = V10]). eq(fun2(Out),0,[],[Out = 0]). eq(plus(V, V3, Out),0,[],[Out = 1 + V12 + V13,V3 = V12,V13 >= 0,V12 >= 0,V = V13]). eq(encArg(V, Out),0,[],[Out = 0,V14 >= 0,V = V14]). eq(fun(V, Out),0,[],[Out = 0,V15 >= 0,V = V15]). eq(fun1(V, V3, Out),0,[],[Out = 0,V17 >= 0,V16 >= 0,V3 = V16,V = V17]). eq(plus(V, V3, Out),0,[],[Out = 0,V18 >= 0,V19 >= 0,V3 = V19,V = V18]). eq(f(V, Out),0,[],[Out = 0,V20 >= 0,V = V20]). input_output_vars(f(V,Out),[V],[Out]). input_output_vars(plus(V,V3,Out),[V,V3],[Out]). input_output_vars(encArg(V,Out),[V],[Out]). input_output_vars(fun(V,Out),[V],[Out]). input_output_vars(fun1(V,V3,Out),[V,V3],[Out]). input_output_vars(fun2(Out),[],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [f/2] 1. recursive [multiple] : [plus/3] 2. recursive [non_tail,multiple] : [encArg/2] 3. non_recursive : [fun/2] 4. non_recursive : [fun1/3] 5. non_recursive : [fun2/1] 6. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into f/2 1. SCC is partially evaluated into plus/3 2. SCC is partially evaluated into encArg/2 3. SCC is partially evaluated into fun/2 4. SCC is partially evaluated into fun1/3 5. SCC is completely evaluated into other SCCs 6. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations f/2 * CE 8 is refined into CE [19] * CE 7 is refined into CE [20] ### Cost equations --> "Loop" of f/2 * CEs [20] --> Loop 12 * CEs [19] --> Loop 13 ### Ranking functions of CR f(V,Out) * RF of phase [12]: [V] #### Partial ranking functions of CR f(V,Out) * Partial RF of phase [12]: - RF of loop [12:1]: V ### Specialization of cost equations plus/3 * CE 10 is refined into CE [21] * CE 11 is refined into CE [22] * CE 9 is refined into CE [23] ### Cost equations --> "Loop" of plus/3 * CEs [23] --> Loop 14 * CEs [21] --> Loop 15 * CEs [22] --> Loop 16 ### Ranking functions of CR plus(V,V3,Out) * RF of phase [14]: [V3] #### Partial ranking functions of CR plus(V,V3,Out) * Partial RF of phase [14]: - RF of loop [14:1,14:2]: V3 ### Specialization of cost equations encArg/2 * CE 12 is refined into CE [24] * CE 14 is refined into CE [25,26,27] * CE 13 is refined into CE [28] ### Cost equations --> "Loop" of encArg/2 * CEs [28] --> Loop 17 * CEs [27] --> Loop 18 * CEs [26] --> Loop 19 * CEs [25] --> Loop 20 * CEs [24] --> Loop 21 ### Ranking functions of CR encArg(V,Out) * RF of phase [17,18,19,20]: [V] #### Partial ranking functions of CR encArg(V,Out) * Partial RF of phase [17,18,19,20]: - RF of loop [17:1,18:1,18:2,19:1,19:2,20:1,20:2]: V ### Specialization of cost equations fun/2 * CE 15 is refined into CE [29,30] * CE 16 is refined into CE [31] ### Cost equations --> "Loop" of fun/2 * CEs [29,30,31] --> Loop 22 ### Ranking functions of CR fun(V,Out) #### Partial ranking functions of CR fun(V,Out) ### Specialization of cost equations fun1/3 * CE 17 is refined into CE [32,33,34,35,36,37,38,39,40,41] * CE 18 is refined into CE [42] ### Cost equations --> "Loop" of fun1/3 * CEs [40,41] --> Loop 23 * CEs [38] --> Loop 24 * CEs [35,36] --> Loop 25 * CEs [33] --> Loop 26 * CEs [32,34,37,39,42] --> Loop 27 ### Ranking functions of CR fun1(V,V3,Out) #### Partial ranking functions of CR fun1(V,V3,Out) ### Specialization of cost equations start/2 * CE 1 is refined into CE [43] * CE 2 is refined into CE [44,45,46] * CE 3 is refined into CE [47,48] * CE 4 is refined into CE [49] * CE 5 is refined into CE [50,51,52,53,54] * CE 6 is refined into CE [55] ### Cost equations --> "Loop" of start/2 * CEs [43,44,45,46,47,48,49,50,51,52,53,54,55] --> Loop 28 ### Ranking functions of CR start(V,V3) #### Partial ranking functions of CR start(V,V3) Computing Bounds ===================================== #### Cost of chains of f(V,Out): * Chain [[12],13]: 1*it(12)+0 Such that:it(12) =< V with precondition: [Out=0,V>=1] * Chain [13]: 0 with precondition: [Out=0,V>=0] #### Cost of chains of plus(V,V3,Out): * Chain [16]: 0 with precondition: [Out=0,V>=0,V3>=0] * Chain [15]: 0 with precondition: [V+V3+1=Out,V>=0,V3>=0] * Chain [multiple([14],[[16],[15]])]: 1*it(14)+0 Such that:it(14) =< V3 with precondition: [V>=0,V3>=1,Out>=0,V+V3+1>=Out] #### Cost of chains of encArg(V,Out): * Chain [21]: 0 with precondition: [Out=0,V>=0] * Chain [multiple([17,18,19,20],[[21]])]: 1*s(6)+1*s(7)+0 Such that:aux(7) =< V aux(8) =< 2*V+1 it(17) =< aux(7) it(18) =< aux(7) it(18) =< aux(8) aux(3) =< aux(7)-1 s(6) =< it(17)*aux(7) s(7) =< it(18)*aux(3) with precondition: [V>=1,Out>=0,V>=Out] #### Cost of chains of fun(V,Out): * Chain [22]: 1*s(14)+1*s(15)+1*s(16)+0 Such that:aux(9) =< V s(10) =< 2*V+1 s(16) =< aux(9) s(12) =< aux(9) s(12) =< s(10) s(13) =< aux(9)-1 s(14) =< aux(9)*aux(9) s(15) =< s(12)*s(13) with precondition: [Out=0,V>=0] #### Cost of chains of fun1(V,V3,Out): * Chain [27]: 2*s(22)+2*s(23)+2*s(29)+2*s(30)+0 Such that:aux(10) =< V aux(11) =< 2*V+1 aux(12) =< V3 aux(13) =< 2*V3+1 s(27) =< aux(10) s(27) =< aux(11) s(28) =< aux(10)-1 s(29) =< aux(10)*aux(10) s(30) =< s(27)*s(28) s(20) =< aux(12) s(20) =< aux(13) s(21) =< aux(12)-1 s(22) =< aux(12)*aux(12) s(23) =< s(20)*s(21) with precondition: [Out=0,V>=0,V3>=0] * Chain [26]: 0 with precondition: [Out=1,V>=0,V3>=0] * Chain [25]: 2*s(50)+2*s(51)+1*s(59)+0 Such that:aux(15) =< V3 aux(16) =< 2*V3+1 s(48) =< aux(15) s(48) =< aux(16) s(49) =< aux(15)-1 s(50) =< aux(15)*aux(15) s(51) =< s(48)*s(49) s(59) =< aux(15) with precondition: [V>=0,V3>=1,Out>=0,V3+1>=Out] * Chain [24]: 1*s(65)+1*s(66)+0 Such that:s(60) =< V s(61) =< 2*V+1 s(63) =< s(60) s(63) =< s(61) s(64) =< s(60)-1 s(65) =< s(60)*s(60) s(66) =< s(63)*s(64) with precondition: [V>=1,V3>=0,Out>=1,V+1>=Out] * Chain [23]: 2*s(72)+2*s(73)+2*s(79)+2*s(80)+1*s(95)+0 Such that:aux(18) =< V aux(19) =< 2*V+1 aux(20) =< V3 aux(21) =< 2*V3+1 s(77) =< aux(20) s(77) =< aux(21) s(78) =< aux(20)-1 s(79) =< aux(20)*aux(20) s(80) =< s(77)*s(78) s(70) =< aux(18) s(70) =< aux(19) s(71) =< aux(18)-1 s(72) =< aux(18)*aux(18) s(73) =< s(70)*s(71) s(95) =< aux(20) with precondition: [V>=1,V3>=1,Out>=0,V+V3+1>=Out] #### Cost of chains of start(V,V3): * Chain [28]: 2*s(96)+3*s(97)+7*s(103)+7*s(104)+6*s(122)+6*s(123)+0 Such that:aux(22) =< V aux(23) =< 2*V+1 aux(24) =< V3 aux(25) =< 2*V3+1 s(96) =< aux(22) s(97) =< aux(24) s(101) =< aux(22) s(101) =< aux(23) s(102) =< aux(22)-1 s(103) =< aux(22)*aux(22) s(104) =< s(101)*s(102) s(120) =< aux(24) s(120) =< aux(25) s(121) =< aux(24)-1 s(122) =< aux(24)*aux(24) s(123) =< s(120)*s(121) with precondition: [] Closed-form bounds of start(V,V3): ------------------------------------- * Chain [28] with precondition: [] - Upper bound: nat(V)*7*nat(V)+nat(V)*2+nat(V)*7*nat(nat(V)+ -1)+nat(V3)*3+nat(V3)*6*nat(V3)+nat(V3)*6*nat(nat(V3)+ -1) - Complexity: n^2 ### Maximum cost of start(V,V3): nat(V)*7*nat(V)+nat(V)*2+nat(V)*7*nat(nat(V)+ -1)+nat(V3)*3+nat(V3)*6*nat(V3)+nat(V3)*6*nat(nat(V3)+ -1) Asymptotic class: n^2 * Total analysis performed in 348 ms. ---------------------------------------- (18) BOUNDS(1, n^2)