/export/starexec/sandbox2/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(n^1)) 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^1). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 163 ms] (4) CpxRelTRS (5) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxWeightedTrs (9) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxTypedWeightedTrs (11) CompletionProof [UPPER BOUND(ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) CompleteCoflocoProof [FINISHED, 314 ms] (16) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Derivational Complexity (full) of the given DCpxTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: f(X, X) -> f(a, n__b) b -> a b -> n__b activate(n__b) -> b activate(X) -> X 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(a) -> a encArg(n__b) -> n__b encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_b) -> b encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a encode_n__b -> n__b encode_b -> b encode_activate(x_1) -> activate(encArg(x_1)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: f(X, X) -> f(a, n__b) b -> a b -> n__b activate(n__b) -> b activate(X) -> X The (relative) TRS S consists of the following rules: encArg(a) -> a encArg(n__b) -> n__b encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_b) -> b encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a encode_n__b -> n__b encode_b -> b encode_activate(x_1) -> activate(encArg(x_1)) 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^1). The TRS R consists of the following rules: f(X, X) -> f(a, n__b) b -> a b -> n__b activate(n__b) -> b activate(X) -> X The (relative) TRS S consists of the following rules: encArg(a) -> a encArg(n__b) -> n__b encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_b) -> b encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a encode_n__b -> n__b encode_b -> b encode_activate(x_1) -> activate(encArg(x_1)) Rewrite Strategy: FULL ---------------------------------------- (5) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS is a non-duplicating overlay system, we have rc = irc. ---------------------------------------- (6) 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: f(X, X) -> f(a, n__b) b -> a b -> n__b activate(n__b) -> b activate(X) -> X The (relative) TRS S consists of the following rules: encArg(a) -> a encArg(n__b) -> n__b encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_b) -> b encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a encode_n__b -> n__b encode_b -> b encode_activate(x_1) -> activate(encArg(x_1)) 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^1). The TRS R consists of the following rules: f(X, X) -> f(a, n__b) [1] b -> a [1] b -> n__b [1] activate(n__b) -> b [1] activate(X) -> X [1] encArg(a) -> a [0] encArg(n__b) -> n__b [0] encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) [0] encArg(cons_b) -> b [0] encArg(cons_activate(x_1)) -> activate(encArg(x_1)) [0] encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) [0] encode_a -> a [0] encode_n__b -> n__b [0] encode_b -> b [0] encode_activate(x_1) -> activate(encArg(x_1)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (9) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (10) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: f(X, X) -> f(a, n__b) [1] b -> a [1] b -> n__b [1] activate(n__b) -> b [1] activate(X) -> X [1] encArg(a) -> a [0] encArg(n__b) -> n__b [0] encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) [0] encArg(cons_b) -> b [0] encArg(cons_activate(x_1)) -> activate(encArg(x_1)) [0] encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) [0] encode_a -> a [0] encode_n__b -> n__b [0] encode_b -> b [0] encode_activate(x_1) -> activate(encArg(x_1)) [0] The TRS has the following type information: f :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate a :: a:n__b:cons_f:cons_b:cons_activate n__b :: a:n__b:cons_f:cons_b:cons_activate b :: a:n__b:cons_f:cons_b:cons_activate activate :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate encArg :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate cons_f :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate cons_b :: a:n__b:cons_f:cons_b:cons_activate cons_activate :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate encode_f :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate encode_a :: a:n__b:cons_f:cons_b:cons_activate encode_n__b :: a:n__b:cons_f:cons_b:cons_activate encode_b :: a:n__b:cons_f:cons_b:cons_activate encode_activate :: a:n__b:cons_f:cons_b:cons_activate -> a:n__b:cons_f:cons_b:cons_activate Rewrite Strategy: INNERMOST ---------------------------------------- (11) 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, v1) -> null_encode_f [0] encode_a -> null_encode_a [0] encode_n__b -> null_encode_n__b [0] encode_b -> null_encode_b [0] encode_activate(v0) -> null_encode_activate [0] f(v0, v1) -> null_f [0] And the following fresh constants: null_encArg, null_encode_f, null_encode_a, null_encode_n__b, null_encode_b, null_encode_activate, null_f ---------------------------------------- (12) 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(X, X) -> f(a, n__b) [1] b -> a [1] b -> n__b [1] activate(n__b) -> b [1] activate(X) -> X [1] encArg(a) -> a [0] encArg(n__b) -> n__b [0] encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) [0] encArg(cons_b) -> b [0] encArg(cons_activate(x_1)) -> activate(encArg(x_1)) [0] encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) [0] encode_a -> a [0] encode_n__b -> n__b [0] encode_b -> b [0] encode_activate(x_1) -> activate(encArg(x_1)) [0] encArg(v0) -> null_encArg [0] encode_f(v0, v1) -> null_encode_f [0] encode_a -> null_encode_a [0] encode_n__b -> null_encode_n__b [0] encode_b -> null_encode_b [0] encode_activate(v0) -> null_encode_activate [0] f(v0, v1) -> null_f [0] The TRS has the following type information: f :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f a :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f n__b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f activate :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f encArg :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f cons_f :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f cons_b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f cons_activate :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f encode_f :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f encode_a :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f encode_n__b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f encode_b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f encode_activate :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f -> a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_encArg :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_encode_f :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_encode_a :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_encode_n__b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_encode_b :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_encode_activate :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f null_f :: a:n__b:cons_f:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_a:null_encode_n__b:null_encode_b:null_encode_activate:null_f Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: a => 0 n__b => 2 cons_b => 1 null_encArg => 0 null_encode_f => 0 null_encode_a => 0 null_encode_n__b => 0 null_encode_b => 0 null_encode_activate => 0 null_f => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> X :|: X >= 0, z = X activate(z) -{ 1 }-> b :|: z = 2 b -{ 1 }-> 2 :|: b -{ 1 }-> 0 :|: encArg(z) -{ 0 }-> f(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, z = 1 + x_1 + x_2, x_2 >= 0 encArg(z) -{ 0 }-> b :|: z = 1 encArg(z) -{ 0 }-> activate(encArg(x_1)) :|: z = 1 + x_1, x_1 >= 0 encArg(z) -{ 0 }-> 2 :|: z = 2 encArg(z) -{ 0 }-> 0 :|: z = 0 encArg(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_a -{ 0 }-> 0 :|: encode_activate(z) -{ 0 }-> activate(encArg(x_1)) :|: x_1 >= 0, z = x_1 encode_activate(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_b -{ 0 }-> b :|: encode_b -{ 0 }-> 0 :|: encode_f(z, z') -{ 0 }-> f(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, x_2 >= 0, z = x_1, z' = x_2 encode_f(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 encode_n__b -{ 0 }-> 2 :|: encode_n__b -{ 0 }-> 0 :|: f(z, z') -{ 1 }-> f(0, 2) :|: z' = X, X >= 0, z = X f(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (15) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V),0,[f(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[b(Out)],[]). eq(start(V1, V),0,[activate(V1, Out)],[V1 >= 0]). eq(start(V1, V),0,[encArg(V1, Out)],[V1 >= 0]). eq(start(V1, V),0,[fun(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[fun1(Out)],[]). eq(start(V1, V),0,[fun2(Out)],[]). eq(start(V1, V),0,[fun3(Out)],[]). eq(start(V1, V),0,[fun4(V1, Out)],[V1 >= 0]). eq(f(V1, V, Out),1,[f(0, 2, Ret)],[Out = Ret,V = X1,X1 >= 0,V1 = X1]). eq(b(Out),1,[],[Out = 0]). eq(b(Out),1,[],[Out = 2]). eq(activate(V1, Out),1,[b(Ret1)],[Out = Ret1,V1 = 2]). eq(activate(V1, Out),1,[],[Out = X2,X2 >= 0,V1 = X2]). eq(encArg(V1, Out),0,[],[Out = 0,V1 = 0]). eq(encArg(V1, Out),0,[],[Out = 2,V1 = 2]). eq(encArg(V1, Out),0,[encArg(V3, Ret0),encArg(V2, Ret11),f(Ret0, Ret11, Ret2)],[Out = Ret2,V3 >= 0,V1 = 1 + V2 + V3,V2 >= 0]). eq(encArg(V1, Out),0,[b(Ret3)],[Out = Ret3,V1 = 1]). eq(encArg(V1, Out),0,[encArg(V4, Ret01),activate(Ret01, Ret4)],[Out = Ret4,V1 = 1 + V4,V4 >= 0]). eq(fun(V1, V, Out),0,[encArg(V5, Ret02),encArg(V6, Ret12),f(Ret02, Ret12, Ret5)],[Out = Ret5,V5 >= 0,V6 >= 0,V1 = V5,V = V6]). eq(fun1(Out),0,[],[Out = 0]). eq(fun2(Out),0,[],[Out = 2]). eq(fun3(Out),0,[b(Ret6)],[Out = Ret6]). eq(fun4(V1, Out),0,[encArg(V7, Ret03),activate(Ret03, Ret7)],[Out = Ret7,V7 >= 0,V1 = V7]). eq(encArg(V1, Out),0,[],[Out = 0,V8 >= 0,V1 = V8]). eq(fun(V1, V, Out),0,[],[Out = 0,V10 >= 0,V9 >= 0,V1 = V10,V = V9]). eq(fun2(Out),0,[],[Out = 0]). eq(fun3(Out),0,[],[Out = 0]). eq(fun4(V1, Out),0,[],[Out = 0,V11 >= 0,V1 = V11]). eq(f(V1, V, Out),0,[],[Out = 0,V12 >= 0,V13 >= 0,V1 = V12,V = V13]). input_output_vars(f(V1,V,Out),[V1,V],[Out]). input_output_vars(b(Out),[],[Out]). input_output_vars(activate(V1,Out),[V1],[Out]). input_output_vars(encArg(V1,Out),[V1],[Out]). input_output_vars(fun(V1,V,Out),[V1,V],[Out]). input_output_vars(fun1(Out),[],[Out]). input_output_vars(fun2(Out),[],[Out]). input_output_vars(fun3(Out),[],[Out]). input_output_vars(fun4(V1,Out),[V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [b/1] 1. non_recursive : [activate/2] 2. recursive : [f/3] 3. recursive [non_tail,multiple] : [encArg/2] 4. non_recursive : [fun/3] 5. non_recursive : [fun1/1] 6. non_recursive : [fun2/1] 7. non_recursive : [fun3/1] 8. non_recursive : [fun4/2] 9. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into b/1 1. SCC is partially evaluated into activate/2 2. SCC is partially evaluated into f/3 3. SCC is partially evaluated into encArg/2 4. SCC is partially evaluated into fun/3 5. SCC is completely evaluated into other SCCs 6. SCC is partially evaluated into fun2/1 7. SCC is partially evaluated into fun3/1 8. SCC is partially evaluated into fun4/2 9. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations b/1 * CE 13 is refined into CE [29] * CE 12 is refined into CE [30] ### Cost equations --> "Loop" of b/1 * CEs [29] --> Loop 18 * CEs [30] --> Loop 19 ### Ranking functions of CR b(Out) #### Partial ranking functions of CR b(Out) ### Specialization of cost equations activate/2 * CE 15 is refined into CE [31] * CE 14 is refined into CE [32,33] ### Cost equations --> "Loop" of activate/2 * CEs [31,33] --> Loop 20 * CEs [32] --> Loop 21 ### Ranking functions of CR activate(V1,Out) #### Partial ranking functions of CR activate(V1,Out) ### Specialization of cost equations f/3 * CE 11 is refined into CE [34] * CE 10 is refined into CE [35] ### Cost equations --> "Loop" of f/3 * CEs [35] --> Loop 22 * CEs [34] --> Loop 23 ### Ranking functions of CR f(V1,V,Out) #### Partial ranking functions of CR f(V1,V,Out) ### Specialization of cost equations encArg/2 * CE 16 is refined into CE [36] * CE 17 is refined into CE [37] * CE 19 is refined into CE [38,39] * CE 20 is refined into CE [40,41] * CE 18 is refined into CE [42] ### Cost equations --> "Loop" of encArg/2 * CEs [42] --> Loop 24 * CEs [41] --> Loop 25 * CEs [40] --> Loop 26 * CEs [37] --> Loop 27 * CEs [39] --> Loop 28 * CEs [36,38] --> Loop 29 ### Ranking functions of CR encArg(V1,Out) * RF of phase [24,25,26]: [V1] #### Partial ranking functions of CR encArg(V1,Out) * Partial RF of phase [24,25,26]: - RF of loop [24:1,24:2,25:1,26:1]: V1 ### Specialization of cost equations fun/3 * CE 21 is refined into CE [43,44,45,46,47,48,49,50,51] * CE 22 is refined into CE [52] ### Cost equations --> "Loop" of fun/3 * CEs [46,49] --> Loop 30 * CEs [43,44,45,47,48,50,51,52] --> Loop 31 ### Ranking functions of CR fun(V1,V,Out) #### Partial ranking functions of CR fun(V1,V,Out) ### Specialization of cost equations fun2/1 * CE 23 is refined into CE [53] * CE 24 is refined into CE [54] ### Cost equations --> "Loop" of fun2/1 * CEs [53] --> Loop 32 * CEs [54] --> Loop 33 ### Ranking functions of CR fun2(Out) #### Partial ranking functions of CR fun2(Out) ### Specialization of cost equations fun3/1 * CE 25 is refined into CE [55,56] * CE 26 is refined into CE [57] ### Cost equations --> "Loop" of fun3/1 * CEs [56] --> Loop 34 * CEs [55,57] --> Loop 35 ### Ranking functions of CR fun3(Out) #### Partial ranking functions of CR fun3(Out) ### Specialization of cost equations fun4/2 * CE 27 is refined into CE [58,59,60,61,62] * CE 28 is refined into CE [63] ### Cost equations --> "Loop" of fun4/2 * CEs [61] --> Loop 36 * CEs [59] --> Loop 37 * CEs [58,60,62,63] --> Loop 38 ### Ranking functions of CR fun4(V1,Out) #### Partial ranking functions of CR fun4(V1,Out) ### Specialization of cost equations start/2 * CE 1 is refined into CE [64] * CE 2 is refined into CE [65,66] * CE 3 is refined into CE [67,68] * CE 4 is refined into CE [69,70,71] * CE 5 is refined into CE [72] * CE 6 is refined into CE [73] * CE 7 is refined into CE [74,75] * CE 8 is refined into CE [76,77] * CE 9 is refined into CE [78,79,80] ### Cost equations --> "Loop" of start/2 * CEs [64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80] --> Loop 39 ### Ranking functions of CR start(V1,V) #### Partial ranking functions of CR start(V1,V) Computing Bounds ===================================== #### Cost of chains of b(Out): * Chain [19]: 1 with precondition: [Out=0] * Chain [18]: 1 with precondition: [Out=2] #### Cost of chains of activate(V1,Out): * Chain [21]: 2 with precondition: [V1=2,Out=0] * Chain [20]: 2 with precondition: [V1=Out,V1>=0] #### Cost of chains of f(V1,V,Out): * Chain [23]: 0 with precondition: [Out=0,V1>=0,V>=0] * Chain [22,23]: 1 with precondition: [Out=0,V1=V,V1>=0] #### Cost of chains of encArg(V1,Out): * Chain [29]: 1 with precondition: [Out=0,V1>=0] * Chain [28]: 1 with precondition: [V1=1,Out=2] * Chain [27]: 0 with precondition: [V1=2,Out=2] * Chain [multiple([24,25,26],[[29],[28],[27]])]: 5*it(24)+1*it([28])+1*it([29])+0 Such that:it([29]) =< V1+1 it([28]) =< V1/2+1/2 aux(1) =< V1 it(24) =< aux(1) it([28]) =< aux(1) with precondition: [2>=Out,Out>=0,2*V1>=Out+2] #### Cost of chains of fun(V1,V,Out): * Chain [31]: 3*s(6)+3*s(7)+15*s(8)+2*s(10)+2*s(11)+10*s(12)+3 Such that:aux(2) =< V1 aux(3) =< V1+1 aux(4) =< V1/2+1/2 aux(5) =< V aux(6) =< V+1 aux(7) =< V/2+1/2 s(10) =< aux(3) s(11) =< aux(4) s(6) =< aux(6) s(7) =< aux(7) s(8) =< aux(5) s(7) =< aux(5) s(12) =< aux(2) s(11) =< aux(2) with precondition: [Out=0,V1>=0,V>=0] * Chain [30]: 1*s(26)+1*s(27)+5*s(28)+3 Such that:s(25) =< V1 s(26) =< V1+1 s(27) =< V1/2+1/2 s(28) =< s(25) s(27) =< s(25) with precondition: [V=1,Out=0,V1>=0] #### Cost of chains of fun2(Out): * Chain [33]: 0 with precondition: [Out=0] * Chain [32]: 0 with precondition: [Out=2] #### Cost of chains of fun3(Out): * Chain [35]: 1 with precondition: [Out=0] * Chain [34]: 1 with precondition: [Out=2] #### Cost of chains of fun4(V1,Out): * Chain [38]: 1*s(46)+1*s(47)+5*s(48)+3 Such that:s(45) =< V1 s(46) =< V1+1 s(47) =< V1/2+1/2 s(48) =< s(45) s(47) =< s(45) with precondition: [Out=0,V1>=0] * Chain [37]: 3 with precondition: [V1=1,Out=2] * Chain [36]: 1*s(50)+1*s(51)+5*s(52)+2 Such that:s(49) =< V1 s(50) =< V1+1 s(51) =< V1/2+1/2 s(52) =< s(49) s(51) =< s(49) with precondition: [2>=Out,Out>=0,2*V1>=Out+2] #### Cost of chains of start(V1,V): * Chain [39]: 6*s(54)+6*s(55)+30*s(56)+3*s(66)+3*s(67)+15*s(68)+3 Such that:s(57) =< V s(58) =< V+1 s(59) =< V/2+1/2 aux(11) =< V1 aux(12) =< V1+1 aux(13) =< V1/2+1/2 s(54) =< aux(12) s(55) =< aux(13) s(56) =< aux(11) s(55) =< aux(11) s(66) =< s(58) s(67) =< s(59) s(68) =< s(57) s(67) =< s(57) with precondition: [] Closed-form bounds of start(V1,V): ------------------------------------- * Chain [39] with precondition: [] - Upper bound: nat(V1)*30+3+nat(V)*15+nat(V1+1)*6+nat(V+1)*3+nat(V1/2+1/2)*6+nat(V/2+1/2)*3 - Complexity: n ### Maximum cost of start(V1,V): nat(V1)*30+3+nat(V)*15+nat(V1+1)*6+nat(V+1)*3+nat(V1/2+1/2)*6+nat(V/2+1/2)*3 Asymptotic class: n * Total analysis performed in 240 ms. ---------------------------------------- (16) BOUNDS(1, n^1)