/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 (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), 214 ms] (4) CpxRelTRS (5) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (12) CpxRNTS (13) CompleteCoflocoProof [FINISHED, 145 ms] (14) 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, y) -> g1(x, x, y) f(x, y) -> g1(y, x, x) f(x, y) -> g2(x, y, y) f(x, y) -> g2(y, y, x) g1(x, x, y) -> h(x, y) g1(y, x, x) -> h(x, y) g2(x, y, y) -> h(x, y) g2(y, y, x) -> h(x, y) h(x, x) -> x 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(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_g1(x_1, x_2, x_3)) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g2(x_1, x_2, x_3)) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_g1(x_1, x_2, x_3) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g2(x_1, x_2, x_3) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) ---------------------------------------- (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, y) -> g1(x, x, y) f(x, y) -> g1(y, x, x) f(x, y) -> g2(x, y, y) f(x, y) -> g2(y, y, x) g1(x, x, y) -> h(x, y) g1(y, x, x) -> h(x, y) g2(x, y, y) -> h(x, y) g2(y, y, x) -> h(x, y) h(x, x) -> x The (relative) TRS S consists of the following rules: encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_g1(x_1, x_2, x_3)) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g2(x_1, x_2, x_3)) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_g1(x_1, x_2, x_3) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g2(x_1, x_2, x_3) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) 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, y) -> g1(x, x, y) f(x, y) -> g1(y, x, x) f(x, y) -> g2(x, y, y) f(x, y) -> g2(y, y, x) g1(x, x, y) -> h(x, y) g1(y, x, x) -> h(x, y) g2(x, y, y) -> h(x, y) g2(y, y, x) -> h(x, y) h(x, x) -> x The (relative) TRS S consists of the following rules: encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encArg(cons_g1(x_1, x_2, x_3)) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_g2(x_1, x_2, x_3)) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) encArg(cons_h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_g1(x_1, x_2, x_3) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) encode_g2(x_1, x_2, x_3) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) Rewrite Strategy: INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) 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, y) -> g1(x, x, y) [1] f(x, y) -> g1(y, x, x) [1] f(x, y) -> g2(x, y, y) [1] f(x, y) -> g2(y, y, x) [1] g1(x, x, y) -> h(x, y) [1] g1(y, x, x) -> h(x, y) [1] g2(x, y, y) -> h(x, y) [1] g2(y, y, x) -> h(x, y) [1] h(x, x) -> x [1] encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) [0] encArg(cons_g1(x_1, x_2, x_3)) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_g2(x_1, x_2, x_3)) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) [0] encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) [0] encode_g1(x_1, x_2, x_3) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_g2(x_1, x_2, x_3) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: f(x, y) -> g1(x, x, y) [1] f(x, y) -> g1(y, x, x) [1] f(x, y) -> g2(x, y, y) [1] f(x, y) -> g2(y, y, x) [1] g1(x, x, y) -> h(x, y) [1] g1(y, x, x) -> h(x, y) [1] g2(x, y, y) -> h(x, y) [1] g2(y, y, x) -> h(x, y) [1] h(x, x) -> x [1] encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) [0] encArg(cons_g1(x_1, x_2, x_3)) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_g2(x_1, x_2, x_3)) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) [0] encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) [0] encode_g1(x_1, x_2, x_3) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_g2(x_1, x_2, x_3) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) [0] The TRS has the following type information: f :: f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h g1 :: f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h g2 :: f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h h :: f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h encArg :: cons_f:cons_g1:cons_g2:cons_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h cons_f :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h cons_g1 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h cons_g2 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h cons_h :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h encode_f :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h encode_g1 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h encode_g2 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h encode_h :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> f:g1:g2:h:encArg:encode_f:encode_g1:encode_g2:encode_h Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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_g1(v0, v1, v2) -> null_encode_g1 [0] encode_g2(v0, v1, v2) -> null_encode_g2 [0] encode_h(v0, v1) -> null_encode_h [0] g1(v0, v1, v2) -> null_g1 [0] g2(v0, v1, v2) -> null_g2 [0] h(v0, v1) -> null_h [0] And the following fresh constants: null_encArg, null_encode_f, null_encode_g1, null_encode_g2, null_encode_h, null_g1, null_g2, null_h, const ---------------------------------------- (10) 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, y) -> g1(x, x, y) [1] f(x, y) -> g1(y, x, x) [1] f(x, y) -> g2(x, y, y) [1] f(x, y) -> g2(y, y, x) [1] g1(x, x, y) -> h(x, y) [1] g1(y, x, x) -> h(x, y) [1] g2(x, y, y) -> h(x, y) [1] g2(y, y, x) -> h(x, y) [1] h(x, x) -> x [1] encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) [0] encArg(cons_g1(x_1, x_2, x_3)) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_g2(x_1, x_2, x_3)) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encArg(cons_h(x_1, x_2)) -> h(encArg(x_1), encArg(x_2)) [0] encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) [0] encode_g1(x_1, x_2, x_3) -> g1(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_g2(x_1, x_2, x_3) -> g2(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_h(x_1, x_2) -> h(encArg(x_1), encArg(x_2)) [0] encArg(v0) -> null_encArg [0] encode_f(v0, v1) -> null_encode_f [0] encode_g1(v0, v1, v2) -> null_encode_g1 [0] encode_g2(v0, v1, v2) -> null_encode_g2 [0] encode_h(v0, v1) -> null_encode_h [0] g1(v0, v1, v2) -> null_g1 [0] g2(v0, v1, v2) -> null_g2 [0] h(v0, v1) -> null_h [0] The TRS has the following type information: f :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h g1 :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h g2 :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h h :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h encArg :: cons_f:cons_g1:cons_g2:cons_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h cons_f :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h cons_g1 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h cons_g2 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h cons_h :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h encode_f :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h encode_g1 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h encode_g2 :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h encode_h :: cons_f:cons_g1:cons_g2:cons_h -> cons_f:cons_g1:cons_g2:cons_h -> null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_encArg :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_encode_f :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_encode_g1 :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_encode_g2 :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_encode_h :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_g1 :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_g2 :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h null_h :: null_encArg:null_encode_f:null_encode_g1:null_encode_g2:null_encode_h:null_g1:null_g2:null_h const :: cons_f:cons_g1:cons_g2:cons_h Rewrite Strategy: INNERMOST ---------------------------------------- (11) 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_f => 0 null_encode_g1 => 0 null_encode_g2 => 0 null_encode_h => 0 null_g1 => 0 null_g2 => 0 null_h => 0 const => 0 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: encArg(z) -{ 0 }-> h(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, z = 1 + x_1 + x_2, x_2 >= 0 encArg(z) -{ 0 }-> g2(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 }-> g1(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 }-> f(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, z = 1 + x_1 + x_2, x_2 >= 0 encArg(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 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_g1(z, z', z'') -{ 0 }-> g1(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_g1(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 encode_g2(z, z', z'') -{ 0 }-> g2(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_g2(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 encode_h(z, z') -{ 0 }-> h(encArg(x_1), encArg(x_2)) :|: x_1 >= 0, x_2 >= 0, z = x_1, z' = x_2 encode_h(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 f(z, z') -{ 1 }-> g2(x, y, y) :|: x >= 0, y >= 0, z = x, z' = y f(z, z') -{ 1 }-> g2(y, y, x) :|: x >= 0, y >= 0, z = x, z' = y f(z, z') -{ 1 }-> g1(x, x, y) :|: x >= 0, y >= 0, z = x, z' = y f(z, z') -{ 1 }-> g1(y, x, x) :|: x >= 0, y >= 0, z = x, z' = y g1(z, z', z'') -{ 1 }-> h(x, y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = x g1(z, z', z'') -{ 1 }-> h(x, y) :|: z' = x, y >= 0, x >= 0, z'' = x, z = y g1(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 g2(z, z', z'') -{ 1 }-> h(x, y) :|: z'' = y, x >= 0, y >= 0, z = x, z' = y g2(z, z', z'') -{ 1 }-> h(x, y) :|: y >= 0, x >= 0, z'' = x, z' = y, z = y g2(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 h(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = x h(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (13) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V12),0,[f(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V12),0,[g1(V1, V, V12, Out)],[V1 >= 0,V >= 0,V12 >= 0]). eq(start(V1, V, V12),0,[g2(V1, V, V12, Out)],[V1 >= 0,V >= 0,V12 >= 0]). eq(start(V1, V, V12),0,[h(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V12),0,[encArg(V1, Out)],[V1 >= 0]). eq(start(V1, V, V12),0,[fun(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V12),0,[fun1(V1, V, V12, Out)],[V1 >= 0,V >= 0,V12 >= 0]). eq(start(V1, V, V12),0,[fun2(V1, V, V12, Out)],[V1 >= 0,V >= 0,V12 >= 0]). eq(start(V1, V, V12),0,[fun3(V1, V, Out)],[V1 >= 0,V >= 0]). eq(f(V1, V, Out),1,[g1(V3, V3, V2, Ret)],[Out = Ret,V3 >= 0,V2 >= 0,V1 = V3,V = V2]). eq(f(V1, V, Out),1,[g1(V5, V4, V4, Ret1)],[Out = Ret1,V4 >= 0,V5 >= 0,V1 = V4,V = V5]). eq(f(V1, V, Out),1,[g2(V7, V6, V6, Ret2)],[Out = Ret2,V7 >= 0,V6 >= 0,V1 = V7,V = V6]). eq(f(V1, V, Out),1,[g2(V9, V9, V8, Ret3)],[Out = Ret3,V8 >= 0,V9 >= 0,V1 = V8,V = V9]). eq(g1(V1, V, V12, Out),1,[h(V11, V10, Ret4)],[Out = Ret4,V = V11,V12 = V10,V11 >= 0,V10 >= 0,V1 = V11]). eq(g1(V1, V, V12, Out),1,[h(V14, V13, Ret5)],[Out = Ret5,V = V14,V13 >= 0,V14 >= 0,V12 = V14,V1 = V13]). eq(g2(V1, V, V12, Out),1,[h(V16, V15, Ret6)],[Out = Ret6,V12 = V15,V16 >= 0,V15 >= 0,V1 = V16,V = V15]). eq(g2(V1, V, V12, Out),1,[h(V17, V18, Ret7)],[Out = Ret7,V18 >= 0,V17 >= 0,V12 = V17,V = V18,V1 = V18]). eq(h(V1, V, Out),1,[],[Out = V19,V = V19,V19 >= 0,V1 = V19]). eq(encArg(V1, Out),0,[encArg(V21, Ret0),encArg(V20, Ret11),f(Ret0, Ret11, Ret8)],[Out = Ret8,V21 >= 0,V1 = 1 + V20 + V21,V20 >= 0]). eq(encArg(V1, Out),0,[encArg(V23, Ret01),encArg(V24, Ret12),encArg(V22, Ret21),g1(Ret01, Ret12, Ret21, Ret9)],[Out = Ret9,V23 >= 0,V1 = 1 + V22 + V23 + V24,V22 >= 0,V24 >= 0]). eq(encArg(V1, Out),0,[encArg(V26, Ret02),encArg(V25, Ret13),encArg(V27, Ret22),g2(Ret02, Ret13, Ret22, Ret10)],[Out = Ret10,V26 >= 0,V1 = 1 + V25 + V26 + V27,V27 >= 0,V25 >= 0]). eq(encArg(V1, Out),0,[encArg(V29, Ret03),encArg(V28, Ret14),h(Ret03, Ret14, Ret15)],[Out = Ret15,V29 >= 0,V1 = 1 + V28 + V29,V28 >= 0]). eq(fun(V1, V, Out),0,[encArg(V31, Ret04),encArg(V30, Ret16),f(Ret04, Ret16, Ret17)],[Out = Ret17,V31 >= 0,V30 >= 0,V1 = V31,V = V30]). eq(fun1(V1, V, V12, Out),0,[encArg(V33, Ret05),encArg(V34, Ret18),encArg(V32, Ret23),g1(Ret05, Ret18, Ret23, Ret19)],[Out = Ret19,V33 >= 0,V32 >= 0,V34 >= 0,V1 = V33,V = V34,V12 = V32]). eq(fun2(V1, V, V12, Out),0,[encArg(V37, Ret06),encArg(V36, Ret110),encArg(V35, Ret24),g2(Ret06, Ret110, Ret24, Ret20)],[Out = Ret20,V37 >= 0,V35 >= 0,V36 >= 0,V1 = V37,V = V36,V12 = V35]). eq(fun3(V1, V, Out),0,[encArg(V39, Ret07),encArg(V38, Ret111),h(Ret07, Ret111, Ret25)],[Out = Ret25,V39 >= 0,V38 >= 0,V1 = V39,V = V38]). eq(encArg(V1, Out),0,[],[Out = 0,V40 >= 0,V1 = V40]). eq(fun(V1, V, Out),0,[],[Out = 0,V42 >= 0,V41 >= 0,V1 = V42,V = V41]). eq(fun1(V1, V, V12, Out),0,[],[Out = 0,V44 >= 0,V12 = V45,V43 >= 0,V1 = V44,V = V43,V45 >= 0]). eq(fun2(V1, V, V12, Out),0,[],[Out = 0,V46 >= 0,V12 = V47,V48 >= 0,V1 = V46,V = V48,V47 >= 0]). eq(fun3(V1, V, Out),0,[],[Out = 0,V49 >= 0,V50 >= 0,V1 = V49,V = V50]). eq(g1(V1, V, V12, Out),0,[],[Out = 0,V52 >= 0,V12 = V53,V51 >= 0,V1 = V52,V = V51,V53 >= 0]). eq(g2(V1, V, V12, Out),0,[],[Out = 0,V55 >= 0,V12 = V56,V54 >= 0,V1 = V55,V = V54,V56 >= 0]). eq(h(V1, V, Out),0,[],[Out = 0,V57 >= 0,V58 >= 0,V1 = V57,V = V58]). input_output_vars(f(V1,V,Out),[V1,V],[Out]). input_output_vars(g1(V1,V,V12,Out),[V1,V,V12],[Out]). input_output_vars(g2(V1,V,V12,Out),[V1,V,V12],[Out]). input_output_vars(h(V1,V,Out),[V1,V],[Out]). input_output_vars(encArg(V1,Out),[V1],[Out]). input_output_vars(fun(V1,V,Out),[V1,V],[Out]). input_output_vars(fun1(V1,V,V12,Out),[V1,V,V12],[Out]). input_output_vars(fun2(V1,V,V12,Out),[V1,V,V12],[Out]). input_output_vars(fun3(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [h/3] 1. non_recursive : [g1/4] 2. non_recursive : [g2/4] 3. non_recursive : [f/3] 4. recursive [non_tail,multiple] : [encArg/2] 5. non_recursive : [fun/3] 6. non_recursive : [fun1/4] 7. non_recursive : [fun2/4] 8. non_recursive : [fun3/3] 9. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into h/3 1. SCC is partially evaluated into g1/4 2. SCC is partially evaluated into g2/4 3. SCC is partially evaluated into f/3 4. SCC is partially evaluated into encArg/2 5. SCC is partially evaluated into fun/3 6. SCC is partially evaluated into fun1/4 7. SCC is partially evaluated into fun2/4 8. SCC is partially evaluated into fun3/3 9. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations h/3 * CE 20 is refined into CE [35] * CE 21 is refined into CE [36] ### Cost equations --> "Loop" of h/3 * CEs [35] --> Loop 18 * CEs [36] --> Loop 19 ### Ranking functions of CR h(V1,V,Out) #### Partial ranking functions of CR h(V1,V,Out) ### Specialization of cost equations g1/4 * CE 15 is refined into CE [37,38] * CE 14 is refined into CE [39,40] * CE 16 is refined into CE [41] ### Cost equations --> "Loop" of g1/4 * CEs [38,40] --> Loop 20 * CEs [37] --> Loop 21 * CEs [39,41] --> Loop 22 ### Ranking functions of CR g1(V1,V,V12,Out) #### Partial ranking functions of CR g1(V1,V,V12,Out) ### Specialization of cost equations g2/4 * CE 17 is refined into CE [42,43] * CE 18 is refined into CE [44,45] * CE 19 is refined into CE [46] ### Cost equations --> "Loop" of g2/4 * CEs [43,45] --> Loop 23 * CEs [42] --> Loop 24 * CEs [44,46] --> Loop 25 ### Ranking functions of CR g2(V1,V,V12,Out) #### Partial ranking functions of CR g2(V1,V,V12,Out) ### Specialization of cost equations f/3 * CE 10 is refined into CE [47,48] * CE 11 is refined into CE [49,50] * CE 12 is refined into CE [51,52] * CE 13 is refined into CE [53,54] ### Cost equations --> "Loop" of f/3 * CEs [48,50,52,54] --> Loop 26 * CEs [47,49,51,53] --> Loop 27 ### Ranking functions of CR f(V1,V,Out) #### Partial ranking functions of CR f(V1,V,Out) ### Specialization of cost equations encArg/2 * CE 26 is refined into CE [55] * CE 22 is refined into CE [56,57] * CE 25 is refined into CE [58,59] * CE 23 is refined into CE [60,61] * CE 24 is refined into CE [62,63] ### Cost equations --> "Loop" of encArg/2 * CEs [61,63] --> Loop 28 * CEs [60,62] --> Loop 29 * CEs [57,59] --> Loop 30 * CEs [56,58] --> Loop 31 * CEs [55] --> Loop 32 ### Ranking functions of CR encArg(V1,Out) * RF of phase [28,29,30,31]: [V1] #### Partial ranking functions of CR encArg(V1,Out) * Partial RF of phase [28,29,30,31]: - RF of loop [28:1,28:2,28:3,29:1,29:2,29:3,30:1,30:2,31:1,31:2]: V1 ### Specialization of cost equations fun/3 * CE 27 is refined into CE [64,65] * CE 28 is refined into CE [66] ### Cost equations --> "Loop" of fun/3 * CEs [64,65,66] --> Loop 33 ### Ranking functions of CR fun(V1,V,Out) #### Partial ranking functions of CR fun(V1,V,Out) ### Specialization of cost equations fun1/4 * CE 29 is refined into CE [67,68] * CE 30 is refined into CE [69] ### Cost equations --> "Loop" of fun1/4 * CEs [67,68,69] --> Loop 34 ### Ranking functions of CR fun1(V1,V,V12,Out) #### Partial ranking functions of CR fun1(V1,V,V12,Out) ### Specialization of cost equations fun2/4 * CE 31 is refined into CE [70,71] * CE 32 is refined into CE [72] ### Cost equations --> "Loop" of fun2/4 * CEs [70,71,72] --> Loop 35 ### Ranking functions of CR fun2(V1,V,V12,Out) #### Partial ranking functions of CR fun2(V1,V,V12,Out) ### Specialization of cost equations fun3/3 * CE 33 is refined into CE [73,74] * CE 34 is refined into CE [75] ### Cost equations --> "Loop" of fun3/3 * CEs [73,74,75] --> Loop 36 ### Ranking functions of CR fun3(V1,V,Out) #### Partial ranking functions of CR fun3(V1,V,Out) ### Specialization of cost equations start/3 * CE 1 is refined into CE [76,77] * CE 2 is refined into CE [78,79] * CE 3 is refined into CE [80,81] * CE 4 is refined into CE [82,83] * CE 5 is refined into CE [84] * CE 6 is refined into CE [85] * CE 7 is refined into CE [86] * CE 8 is refined into CE [87] * CE 9 is refined into CE [88] ### Cost equations --> "Loop" of start/3 * CEs [76,77,78,79,80,81,82,83,84,85,86,87,88] --> Loop 37 ### Ranking functions of CR start(V1,V,V12) #### Partial ranking functions of CR start(V1,V,V12) Computing Bounds ===================================== #### Cost of chains of h(V1,V,Out): * Chain [19]: 0 with precondition: [Out=0,V1>=0,V>=0] * Chain [18]: 1 with precondition: [V1=V,V1=Out,V1>=0] #### Cost of chains of g1(V1,V,V12,Out): * Chain [22]: 1 with precondition: [Out=0,V1>=0,V>=0,V12>=0] * Chain [21]: 1 with precondition: [Out=0,V=V12,V1>=0,V>=0] * Chain [20]: 2 with precondition: [V1=V,V1=V12,V1=Out,V1>=0] #### Cost of chains of g2(V1,V,V12,Out): * Chain [25]: 1 with precondition: [Out=0,V1>=0,V>=0,V12>=0] * Chain [24]: 1 with precondition: [Out=0,V=V12,V1>=0,V>=0] * Chain [23]: 2 with precondition: [V1=V,V1=V12,V1=Out,V1>=0] #### Cost of chains of f(V1,V,Out): * Chain [27]: 2 with precondition: [Out=0,V1>=0,V>=0] * Chain [26]: 3 with precondition: [V1=V,V1=Out,V1>=0] #### Cost of chains of encArg(V1,Out): * Chain [32]: 0 with precondition: [Out=0,V1>=0] * Chain [multiple([28,29,30,31],[[32]])]: 8*it(28)+0 Such that:aux(1) =< V1 it(28) =< aux(1) with precondition: [Out=0,V1>=1] #### Cost of chains of fun(V1,V,Out): * Chain [33]: 16*s(4)+16*s(6)+3 Such that:aux(2) =< V1 aux(3) =< V s(6) =< aux(3) s(4) =< aux(2) with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of fun1(V1,V,V12,Out): * Chain [34]: 16*s(12)+16*s(14)+16*s(16)+2 Such that:aux(4) =< V1 aux(5) =< V aux(6) =< V12 s(16) =< aux(6) s(14) =< aux(5) s(12) =< aux(4) with precondition: [Out=0,V1>=0,V>=0,V12>=0] #### Cost of chains of fun2(V1,V,V12,Out): * Chain [35]: 16*s(24)+16*s(26)+16*s(28)+2 Such that:aux(7) =< V1 aux(8) =< V aux(9) =< V12 s(28) =< aux(9) s(26) =< aux(8) s(24) =< aux(7) with precondition: [Out=0,V1>=0,V>=0,V12>=0] #### Cost of chains of fun3(V1,V,Out): * Chain [36]: 16*s(36)+16*s(38)+1 Such that:aux(10) =< V1 aux(11) =< V s(38) =< aux(11) s(36) =< aux(10) with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of start(V1,V,V12): * Chain [37]: 72*s(44)+64*s(47)+32*s(52)+3 Such that:aux(12) =< V1 aux(13) =< V aux(14) =< V12 s(44) =< aux(12) s(47) =< aux(13) s(52) =< aux(14) with precondition: [V1>=0] Closed-form bounds of start(V1,V,V12): ------------------------------------- * Chain [37] with precondition: [V1>=0] - Upper bound: 72*V1+3+nat(V)*64+nat(V12)*32 - Complexity: n ### Maximum cost of start(V1,V,V12): 72*V1+3+nat(V)*64+nat(V12)*32 Asymptotic class: n * Total analysis performed in 377 ms. ---------------------------------------- (14) BOUNDS(1, n^1)