/export/starexec/sandbox/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(n^1)) proof of /export/starexec/sandbox/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^1). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 206 ms] (4) CpxRelTRS (5) NonCtorToCtorProof [UPPER BOUND(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), 7 ms] (14) CpxRNTS (15) CompleteCoflocoProof [FINISHED, 330 ms] (16) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: f(X, g(X), Y) -> f(Y, Y, Y) g(b) -> c b -> c 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(c) -> c encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g(x_1)) -> g(encArg(x_1)) encArg(cons_b) -> b encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g(x_1) -> g(encArg(x_1)) encode_b -> b encode_c -> c ---------------------------------------- (2) 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, g(X), Y) -> f(Y, Y, Y) g(b) -> c b -> c The (relative) TRS S consists of the following rules: encArg(c) -> c encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g(x_1)) -> g(encArg(x_1)) encArg(cons_b) -> b encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g(x_1) -> g(encArg(x_1)) encode_b -> b encode_c -> c 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^1). The TRS R consists of the following rules: f(X, g(X), Y) -> f(Y, Y, Y) g(b) -> c b -> c The (relative) TRS S consists of the following rules: encArg(c) -> c encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g(x_1)) -> g(encArg(x_1)) encArg(cons_b) -> b encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g(x_1) -> g(encArg(x_1)) encode_b -> b encode_c -> c 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^1). The TRS R consists of the following rules: b -> c f(X, c_g(X), Y) -> f(Y, Y, Y) g(c_b) -> c The (relative) TRS S consists of the following rules: encArg(c) -> c encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g(x_1)) -> g(encArg(x_1)) encArg(cons_b) -> b encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g(x_1) -> g(encArg(x_1)) encode_b -> b encode_c -> c b -> c_b g(x0) -> c_g(x0) 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: b -> c [1] f(X, c_g(X), Y) -> f(Y, Y, Y) [1] g(c_b) -> c [1] encArg(c) -> c [0] encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_g(x_1)) -> g(encArg(x_1)) [0] encArg(cons_b) -> b [0] encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_g(x_1) -> g(encArg(x_1)) [0] encode_b -> b [0] encode_c -> c [0] b -> c_b [0] g(x0) -> c_g(x0) [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: b -> c [1] f(X, c_g(X), Y) -> f(Y, Y, Y) [1] g(c_b) -> c [1] encArg(c) -> c [0] encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_g(x_1)) -> g(encArg(x_1)) [0] encArg(cons_b) -> b [0] encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_g(x_1) -> g(encArg(x_1)) [0] encode_b -> b [0] encode_c -> c [0] b -> c_b [0] g(x0) -> c_g(x0) [0] The TRS has the following type information: b :: c:c_g:c_b:cons_f:cons_g:cons_b c :: c:c_g:c_b:cons_f:cons_g:cons_b f :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b c_g :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b g :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b c_b :: c:c_g:c_b:cons_f:cons_g:cons_b encArg :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b cons_f :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b cons_g :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b cons_b :: c:c_g:c_b:cons_f:cons_g:cons_b encode_f :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b encode_g :: c:c_g:c_b:cons_f:cons_g:cons_b -> c:c_g:c_b:cons_f:cons_g:cons_b encode_b :: c:c_g:c_b:cons_f:cons_g:cons_b encode_c :: c:c_g:c_b:cons_f:cons_g:cons_b 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, v2) -> null_encode_f [0] encode_g(v0) -> null_encode_g [0] encode_b -> null_encode_b [0] encode_c -> null_encode_c [0] b -> null_b [0] g(v0) -> null_g [0] f(v0, v1, v2) -> null_f [0] And the following fresh constants: null_encArg, null_encode_f, null_encode_g, null_encode_b, null_encode_c, null_b, null_g, 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: b -> c [1] f(X, c_g(X), Y) -> f(Y, Y, Y) [1] g(c_b) -> c [1] encArg(c) -> c [0] encArg(cons_f(x_1, x_2, x_3)) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_g(x_1)) -> g(encArg(x_1)) [0] encArg(cons_b) -> b [0] encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_g(x_1) -> g(encArg(x_1)) [0] encode_b -> b [0] encode_c -> c [0] b -> c_b [0] g(x0) -> c_g(x0) [0] encArg(v0) -> null_encArg [0] encode_f(v0, v1, v2) -> null_encode_f [0] encode_g(v0) -> null_encode_g [0] encode_b -> null_encode_b [0] encode_c -> null_encode_c [0] b -> null_b [0] g(v0) -> null_g [0] f(v0, v1, v2) -> null_f [0] The TRS has the following type information: b :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f c :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f f :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f c_g :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f g :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f c_b :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f encArg :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f cons_f :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f cons_g :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f cons_b :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f encode_f :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f encode_g :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f -> c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f encode_b :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f encode_c :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_encArg :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_encode_f :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_encode_g :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_encode_b :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_encode_c :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_b :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_g :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g:null_f null_f :: c:c_g:c_b:cons_f:cons_g:cons_b:null_encArg:null_encode_f:null_encode_g:null_encode_b:null_encode_c:null_b:null_g: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: c => 0 c_b => 1 cons_b => 2 null_encArg => 0 null_encode_f => 0 null_encode_g => 0 null_encode_b => 0 null_encode_c => 0 null_b => 0 null_g => 0 null_f => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: b -{ 0 }-> 1 :|: b -{ 1 }-> 0 :|: b -{ 0 }-> 0 :|: encArg(z) -{ 0 }-> g(encArg(x_1)) :|: z = 1 + x_1, x_1 >= 0 encArg(z) -{ 0 }-> f(encArg(x_1), encArg(x_2), encArg(x_3)) :|: x_1 >= 0, z = 1 + x_1 + x_2 + x_3, x_3 >= 0, x_2 >= 0 encArg(z) -{ 0 }-> b :|: z = 2 encArg(z) -{ 0 }-> 0 :|: z = 0 encArg(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_b -{ 0 }-> b :|: encode_b -{ 0 }-> 0 :|: encode_c -{ 0 }-> 0 :|: encode_f(z, z', z'') -{ 0 }-> f(encArg(x_1), encArg(x_2), encArg(x_3)) :|: x_1 >= 0, x_3 >= 0, x_2 >= 0, z = x_1, z' = x_2, z'' = x_3 encode_f(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 encode_g(z) -{ 0 }-> g(encArg(x_1)) :|: x_1 >= 0, z = x_1 encode_g(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 f(z, z', z'') -{ 1 }-> f(Y, Y, Y) :|: Y >= 0, z'' = Y, z' = 1 + X, X >= 0, z = X f(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 g(z) -{ 1 }-> 0 :|: z = 1 g(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 g(z) -{ 0 }-> 1 + x0 :|: z = x0, x0 >= 0 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, V2),0,[b(Out)],[]). eq(start(V1, V, V2),0,[f(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[g(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[encArg(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[fun(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[fun1(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[fun2(Out)],[]). eq(start(V1, V, V2),0,[fun3(Out)],[]). eq(b(Out),1,[],[Out = 0]). eq(f(V1, V, V2, Out),1,[f(Y1, Y1, Y1, Ret)],[Out = Ret,Y1 >= 0,V2 = Y1,V = 1 + X1,X1 >= 0,V1 = X1]). eq(g(V1, Out),1,[],[Out = 0,V1 = 1]). eq(encArg(V1, Out),0,[],[Out = 0,V1 = 0]). eq(encArg(V1, Out),0,[encArg(V5, Ret0),encArg(V4, Ret1),encArg(V3, Ret2),f(Ret0, Ret1, Ret2, Ret3)],[Out = Ret3,V5 >= 0,V1 = 1 + V3 + V4 + V5,V3 >= 0,V4 >= 0]). eq(encArg(V1, Out),0,[encArg(V6, Ret01),g(Ret01, Ret4)],[Out = Ret4,V1 = 1 + V6,V6 >= 0]). eq(encArg(V1, Out),0,[b(Ret5)],[Out = Ret5,V1 = 2]). eq(fun(V1, V, V2, Out),0,[encArg(V7, Ret02),encArg(V9, Ret11),encArg(V8, Ret21),f(Ret02, Ret11, Ret21, Ret6)],[Out = Ret6,V7 >= 0,V8 >= 0,V9 >= 0,V1 = V7,V = V9,V2 = V8]). eq(fun1(V1, Out),0,[encArg(V10, Ret03),g(Ret03, Ret7)],[Out = Ret7,V10 >= 0,V1 = V10]). eq(fun2(Out),0,[b(Ret8)],[Out = Ret8]). eq(fun3(Out),0,[],[Out = 0]). eq(b(Out),0,[],[Out = 1]). eq(g(V1, Out),0,[],[Out = 1 + V11,V1 = V11,V11 >= 0]). eq(encArg(V1, Out),0,[],[Out = 0,V12 >= 0,V1 = V12]). eq(fun(V1, V, V2, Out),0,[],[Out = 0,V14 >= 0,V2 = V15,V13 >= 0,V1 = V14,V = V13,V15 >= 0]). eq(fun1(V1, Out),0,[],[Out = 0,V16 >= 0,V1 = V16]). eq(fun2(Out),0,[],[Out = 0]). eq(b(Out),0,[],[Out = 0]). eq(g(V1, Out),0,[],[Out = 0,V17 >= 0,V1 = V17]). eq(f(V1, V, V2, Out),0,[],[Out = 0,V18 >= 0,V2 = V19,V20 >= 0,V1 = V18,V = V20,V19 >= 0]). input_output_vars(b(Out),[],[Out]). input_output_vars(f(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(g(V1,Out),[V1],[Out]). input_output_vars(encArg(V1,Out),[V1],[Out]). input_output_vars(fun(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(fun1(V1,Out),[V1],[Out]). input_output_vars(fun2(Out),[],[Out]). input_output_vars(fun3(Out),[],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [b/1] 1. recursive : [f/4] 2. non_recursive : [g/2] 3. recursive [non_tail,multiple] : [encArg/2] 4. non_recursive : [fun/4] 5. non_recursive : [fun1/2] 6. non_recursive : [fun2/1] 7. non_recursive : [fun3/1] 8. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into b/1 1. SCC is partially evaluated into f/4 2. SCC is partially evaluated into g/2 3. SCC is partially evaluated into encArg/2 4. SCC is partially evaluated into fun/4 5. SCC is partially evaluated into fun1/2 6. SCC is partially evaluated into fun2/1 7. SCC is completely evaluated into other SCCs 8. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations b/1 * CE 10 is refined into CE [27] * CE 9 is refined into CE [28] * CE 11 is refined into CE [29] ### Cost equations --> "Loop" of b/1 * CEs [27] --> Loop 15 * CEs [28,29] --> Loop 16 ### Ranking functions of CR b(Out) #### Partial ranking functions of CR b(Out) ### Specialization of cost equations f/4 * CE 13 is refined into CE [30] * CE 12 is refined into CE [31] ### Cost equations --> "Loop" of f/4 * CEs [31] --> Loop 17 * CEs [30] --> Loop 18 ### Ranking functions of CR f(V1,V,V2,Out) #### Partial ranking functions of CR f(V1,V,V2,Out) ### Specialization of cost equations g/2 * CE 15 is refined into CE [32] * CE 14 is refined into CE [33] * CE 16 is refined into CE [34] ### Cost equations --> "Loop" of g/2 * CEs [32] --> Loop 19 * CEs [33,34] --> Loop 20 ### Ranking functions of CR g(V1,Out) #### Partial ranking functions of CR g(V1,Out) ### Specialization of cost equations encArg/2 * CE 17 is refined into CE [35] * CE 20 is refined into CE [36,37] * CE 19 is refined into CE [38,39] * CE 18 is refined into CE [40] ### Cost equations --> "Loop" of encArg/2 * CEs [40] --> Loop 21 * CEs [39] --> Loop 22 * CEs [38] --> Loop 23 * CEs [37] --> Loop 24 * CEs [35,36] --> Loop 25 ### Ranking functions of CR encArg(V1,Out) * RF of phase [21,22,23]: [V1] #### Partial ranking functions of CR encArg(V1,Out) * Partial RF of phase [21,22,23]: - RF of loop [21:1,21:2,21:3,22:1,23:1]: V1 ### Specialization of cost equations fun/4 * CE 21 is refined into CE [41,42,43,44,45,46,47,48] * CE 22 is refined into CE [49] ### Cost equations --> "Loop" of fun/4 * CEs [41,42,43,44,45,46,47,48,49] --> Loop 26 ### Ranking functions of CR fun(V1,V,V2,Out) #### Partial ranking functions of CR fun(V1,V,V2,Out) ### Specialization of cost equations fun1/2 * CE 23 is refined into CE [50,51,52,53] * CE 24 is refined into CE [54] ### Cost equations --> "Loop" of fun1/2 * CEs [51] --> Loop 27 * CEs [53] --> Loop 28 * CEs [50,52,54] --> Loop 29 ### Ranking functions of CR fun1(V1,Out) #### Partial ranking functions of CR fun1(V1,Out) ### Specialization of cost equations fun2/1 * CE 25 is refined into CE [55,56] * CE 26 is refined into CE [57] ### Cost equations --> "Loop" of fun2/1 * CEs [56] --> Loop 30 * CEs [55,57] --> Loop 31 ### Ranking functions of CR fun2(Out) #### Partial ranking functions of CR fun2(Out) ### Specialization of cost equations start/3 * CE 1 is refined into CE [58,59] * CE 2 is refined into CE [60] * CE 3 is refined into CE [61,62] * CE 4 is refined into CE [63,64] * CE 5 is refined into CE [65] * CE 6 is refined into CE [66,67,68] * CE 7 is refined into CE [69,70] * CE 8 is refined into CE [71] ### Cost equations --> "Loop" of start/3 * CEs [58,59,60,61,62,63,64,65,66,67,68,69,70,71] --> Loop 32 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) Computing Bounds ===================================== #### Cost of chains of b(Out): * Chain [16]: 1 with precondition: [Out=0] * Chain [15]: 0 with precondition: [Out=1] #### Cost of chains of f(V1,V,V2,Out): * Chain [18]: 0 with precondition: [Out=0,V1>=0,V>=0,V2>=0] * Chain [17,18]: 1 with precondition: [Out=0,V1+1=V,V1>=0,V2>=0] #### Cost of chains of g(V1,Out): * Chain [20]: 1 with precondition: [Out=0,V1>=0] * Chain [19]: 0 with precondition: [V1+1=Out,V1>=0] #### Cost of chains of encArg(V1,Out): * Chain [25]: 1 with precondition: [Out=0,V1>=0] * Chain [24]: 0 with precondition: [V1=2,Out=1] * Chain [multiple([21,22,23],[[25],[24]])]: 2*it(21)+1*it([25])+0 Such that:it([25]) =< 2*V1+1 aux(1) =< V1 it(21) =< aux(1) with precondition: [V1>=1,Out>=0,V1>=Out] #### Cost of chains of fun(V1,V,V2,Out): * Chain [26]: 4*s(5)+8*s(6)+4*s(8)+8*s(9)+4*s(11)+8*s(12)+4 Such that:aux(2) =< V1 aux(3) =< 2*V1+1 aux(4) =< V aux(5) =< 2*V+1 aux(6) =< V2 aux(7) =< 2*V2+1 s(5) =< aux(3) s(8) =< aux(5) s(11) =< aux(7) s(12) =< aux(6) s(9) =< aux(4) s(6) =< aux(2) with precondition: [Out=0,V1>=0,V>=0,V2>=0] #### Cost of chains of fun1(V1,Out): * Chain [29]: 1*s(41)+2*s(42)+2 Such that:s(40) =< V1 s(41) =< 2*V1+1 s(42) =< s(40) with precondition: [Out=0,V1>=0] * Chain [28]: 1 with precondition: [Out=1,V1>=0] * Chain [27]: 1*s(44)+2*s(45)+0 Such that:s(43) =< V1 s(44) =< 2*V1+1 s(45) =< s(43) with precondition: [V1>=1,Out>=1,V1+1>=Out] #### Cost of chains of fun2(Out): * Chain [31]: 1 with precondition: [Out=0] * Chain [30]: 0 with precondition: [Out=1] #### Cost of chains of start(V1,V,V2): * Chain [32]: 7*s(47)+14*s(48)+4*s(56)+4*s(57)+8*s(58)+8*s(59)+4 Such that:s(51) =< V s(52) =< 2*V+1 s(53) =< V2 s(54) =< 2*V2+1 aux(8) =< V1 aux(9) =< 2*V1+1 s(47) =< aux(9) s(48) =< aux(8) s(56) =< s(52) s(57) =< s(54) s(58) =< s(53) s(59) =< s(51) with precondition: [] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [32] with precondition: [] - Upper bound: nat(V1)*14+4+nat(V)*8+nat(V2)*8+nat(2*V1+1)*7+nat(2*V+1)*4+nat(2*V2+1)*4 - Complexity: n ### Maximum cost of start(V1,V,V2): nat(V1)*14+4+nat(V)*8+nat(V2)*8+nat(2*V1+1)*7+nat(2*V+1)*4+nat(2*V2+1)*4 Asymptotic class: n * Total analysis performed in 252 ms. ---------------------------------------- (16) BOUNDS(1, n^1)