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), 200 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), 0 ms] (14) CpxRNTS (15) CompleteCoflocoProof [FINISHED, 404 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, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) g(b) -> c b -> c g(X) -> n__g(X) activate(n__g(X)) -> g(X) activate(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(n__g(x_1)) -> n__g(encArg(x_1)) 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 encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_n__g(x_1) -> n__g(encArg(x_1)) encode_activate(x_1) -> activate(encArg(x_1)) 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, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) g(b) -> c b -> c g(X) -> n__g(X) activate(n__g(X)) -> g(X) activate(X) -> X The (relative) TRS S consists of the following rules: encArg(n__g(x_1)) -> n__g(encArg(x_1)) 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 encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_n__g(x_1) -> n__g(encArg(x_1)) encode_activate(x_1) -> activate(encArg(x_1)) 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, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) g(b) -> c b -> c g(X) -> n__g(X) activate(n__g(X)) -> g(X) activate(X) -> X The (relative) TRS S consists of the following rules: encArg(n__g(x_1)) -> n__g(encArg(x_1)) 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 encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_n__g(x_1) -> n__g(encArg(x_1)) encode_activate(x_1) -> activate(encArg(x_1)) 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: f(X, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) b -> c g(X) -> n__g(X) activate(n__g(X)) -> g(X) activate(X) -> X g(c_b) -> c The (relative) TRS S consists of the following rules: encArg(n__g(x_1)) -> n__g(encArg(x_1)) 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 encArg(cons_activate(x_1)) -> activate(encArg(x_1)) encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) encode_n__g(x_1) -> n__g(encArg(x_1)) encode_activate(x_1) -> activate(encArg(x_1)) encode_g(x_1) -> g(encArg(x_1)) encode_b -> b encode_c -> c b -> c_b 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, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) [1] b -> c [1] g(X) -> n__g(X) [1] activate(n__g(X)) -> g(X) [1] activate(X) -> X [1] g(c_b) -> c [1] encArg(n__g(x_1)) -> n__g(encArg(x_1)) [0] 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] encArg(cons_activate(x_1)) -> activate(encArg(x_1)) [0] encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_n__g(x_1) -> n__g(encArg(x_1)) [0] encode_activate(x_1) -> activate(encArg(x_1)) [0] encode_g(x_1) -> g(encArg(x_1)) [0] encode_b -> b [0] encode_c -> c [0] b -> c_b [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, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) [1] b -> c [1] g(X) -> n__g(X) [1] activate(n__g(X)) -> g(X) [1] activate(X) -> X [1] g(c_b) -> c [1] encArg(n__g(x_1)) -> n__g(encArg(x_1)) [0] 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] encArg(cons_activate(x_1)) -> activate(encArg(x_1)) [0] encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_n__g(x_1) -> n__g(encArg(x_1)) [0] encode_activate(x_1) -> activate(encArg(x_1)) [0] encode_g(x_1) -> g(encArg(x_1)) [0] encode_b -> b [0] encode_c -> c [0] b -> c_b [0] The TRS has the following type information: f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate n__g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate c :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate c_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encArg :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate cons_f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate cons_g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate cons_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate cons_activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encode_f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encode_n__g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encode_activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encode_g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encode_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate encode_c :: n__g:c:c_b:cons_f:cons_g: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, v2) -> null_encode_f [0] encode_n__g(v0) -> null_encode_n__g [0] encode_activate(v0) -> null_encode_activate [0] encode_g(v0) -> null_encode_g [0] encode_b -> null_encode_b [0] encode_c -> null_encode_c [0] b -> null_b [0] f(v0, v1, v2) -> null_f [0] And the following fresh constants: null_encArg, null_encode_f, null_encode_n__g, null_encode_activate, null_encode_g, null_encode_b, null_encode_c, null_b, 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, n__g(X), Y) -> f(activate(Y), activate(Y), activate(Y)) [1] b -> c [1] g(X) -> n__g(X) [1] activate(n__g(X)) -> g(X) [1] activate(X) -> X [1] g(c_b) -> c [1] encArg(n__g(x_1)) -> n__g(encArg(x_1)) [0] 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] encArg(cons_activate(x_1)) -> activate(encArg(x_1)) [0] encode_f(x_1, x_2, x_3) -> f(encArg(x_1), encArg(x_2), encArg(x_3)) [0] encode_n__g(x_1) -> n__g(encArg(x_1)) [0] encode_activate(x_1) -> activate(encArg(x_1)) [0] encode_g(x_1) -> g(encArg(x_1)) [0] encode_b -> b [0] encode_c -> c [0] b -> c_b [0] encArg(v0) -> null_encArg [0] encode_f(v0, v1, v2) -> null_encode_f [0] encode_n__g(v0) -> null_encode_n__g [0] encode_activate(v0) -> null_encode_activate [0] encode_g(v0) -> null_encode_g [0] encode_b -> null_encode_b [0] encode_c -> null_encode_c [0] b -> null_b [0] f(v0, v1, v2) -> null_f [0] The TRS has the following type information: f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f n__g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f c :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f c_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encArg :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f cons_f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f cons_g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f cons_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f cons_activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encode_f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encode_n__g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encode_activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encode_g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f -> n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encode_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f encode_c :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encArg :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encode_f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encode_n__g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encode_activate :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encode_g :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encode_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_encode_c :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_b :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b:null_f null_f :: n__g:c:c_b:cons_f:cons_g:cons_b:cons_activate:null_encArg:null_encode_f:null_encode_n__g:null_encode_activate:null_encode_g:null_encode_b:null_encode_c:null_b: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_n__g => 0 null_encode_activate => 0 null_encode_g => 0 null_encode_b => 0 null_encode_c => 0 null_b => 0 null_f => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> X :|: X >= 0, z = X activate(z) -{ 1 }-> g(X) :|: z = 1 + X, X >= 0 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 }-> activate(encArg(x_1)) :|: z = 1 + x_1, x_1 >= 0 encArg(z) -{ 0 }-> 0 :|: z = 0 encArg(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encArg(z) -{ 0 }-> 1 + encArg(x_1) :|: z = 1 + x_1, x_1 >= 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_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 encode_n__g(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 encode_n__g(z) -{ 0 }-> 1 + encArg(x_1) :|: x_1 >= 0, z = x_1 f(z, z', z'') -{ 1 }-> f(activate(Y), activate(Y), activate(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) -{ 1 }-> 1 + X :|: X >= 0, z = X 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,[f(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[b(Out)],[]). eq(start(V1, V, V2),0,[g(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[activate(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(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[fun3(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[fun4(Out)],[]). eq(start(V1, V, V2),0,[fun5(Out)],[]). eq(f(V1, V, V2, Out),1,[activate(Y1, Ret0),activate(Y1, Ret1),activate(Y1, Ret2),f(Ret0, Ret1, Ret2, Ret)],[Out = Ret,Y1 >= 0,V2 = Y1,V = 1 + X1,X1 >= 0,V1 = X1]). eq(b(Out),1,[],[Out = 0]). eq(g(V1, Out),1,[],[Out = 1 + X2,X2 >= 0,V1 = X2]). eq(activate(V1, Out),1,[g(X3, Ret3)],[Out = Ret3,V1 = 1 + X3,X3 >= 0]). eq(activate(V1, Out),1,[],[Out = X4,X4 >= 0,V1 = X4]). eq(g(V1, Out),1,[],[Out = 0,V1 = 1]). eq(encArg(V1, Out),0,[encArg(V3, Ret11)],[Out = 1 + Ret11,V1 = 1 + V3,V3 >= 0]). eq(encArg(V1, Out),0,[],[Out = 0,V1 = 0]). eq(encArg(V1, Out),0,[encArg(V5, Ret01),encArg(V6, Ret12),encArg(V4, Ret21),f(Ret01, Ret12, Ret21, Ret4)],[Out = Ret4,V5 >= 0,V1 = 1 + V4 + V5 + V6,V4 >= 0,V6 >= 0]). eq(encArg(V1, Out),0,[encArg(V7, Ret02),g(Ret02, Ret5)],[Out = Ret5,V1 = 1 + V7,V7 >= 0]). eq(encArg(V1, Out),0,[b(Ret6)],[Out = Ret6,V1 = 2]). eq(encArg(V1, Out),0,[encArg(V8, Ret03),activate(Ret03, Ret7)],[Out = Ret7,V1 = 1 + V8,V8 >= 0]). eq(fun(V1, V, V2, Out),0,[encArg(V11, Ret04),encArg(V10, Ret13),encArg(V9, Ret22),f(Ret04, Ret13, Ret22, Ret8)],[Out = Ret8,V11 >= 0,V9 >= 0,V10 >= 0,V1 = V11,V = V10,V2 = V9]). eq(fun1(V1, Out),0,[encArg(V12, Ret14)],[Out = 1 + Ret14,V12 >= 0,V1 = V12]). eq(fun2(V1, Out),0,[encArg(V13, Ret05),activate(Ret05, Ret9)],[Out = Ret9,V13 >= 0,V1 = V13]). eq(fun3(V1, Out),0,[encArg(V14, Ret06),g(Ret06, Ret10)],[Out = Ret10,V14 >= 0,V1 = V14]). eq(fun4(Out),0,[b(Ret15)],[Out = Ret15]). eq(fun5(Out),0,[],[Out = 0]). eq(b(Out),0,[],[Out = 1]). eq(encArg(V1, Out),0,[],[Out = 0,V15 >= 0,V1 = V15]). eq(fun(V1, V, V2, Out),0,[],[Out = 0,V17 >= 0,V2 = V18,V16 >= 0,V1 = V17,V = V16,V18 >= 0]). eq(fun1(V1, Out),0,[],[Out = 0,V19 >= 0,V1 = V19]). eq(fun2(V1, Out),0,[],[Out = 0,V20 >= 0,V1 = V20]). eq(fun3(V1, Out),0,[],[Out = 0,V21 >= 0,V1 = V21]). eq(fun4(Out),0,[],[Out = 0]). eq(b(Out),0,[],[Out = 0]). eq(f(V1, V, V2, Out),0,[],[Out = 0,V22 >= 0,V2 = V23,V24 >= 0,V1 = V22,V = V24,V23 >= 0]). input_output_vars(f(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(b(Out),[],[Out]). input_output_vars(g(V1,Out),[V1],[Out]). input_output_vars(activate(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(V1,Out),[V1],[Out]). input_output_vars(fun3(V1,Out),[V1],[Out]). input_output_vars(fun4(Out),[],[Out]). input_output_vars(fun5(Out),[],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [g/2] 1. non_recursive : [activate/2] 2. non_recursive : [b/1] 3. recursive : [f/4] 4. recursive [non_tail,multiple] : [encArg/2] 5. non_recursive : [fun/4] 6. non_recursive : [fun1/2] 7. non_recursive : [fun2/2] 8. non_recursive : [fun3/2] 9. non_recursive : [fun4/1] 10. non_recursive : [fun5/1] 11. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into g/2 1. SCC is partially evaluated into activate/2 2. SCC is partially evaluated into b/1 3. SCC is partially evaluated into f/4 4. SCC is partially evaluated into encArg/2 5. SCC is partially evaluated into fun/4 6. SCC is partially evaluated into fun1/2 7. SCC is partially evaluated into fun2/2 8. SCC is partially evaluated into fun3/2 9. SCC is partially evaluated into fun4/1 10. SCC is completely evaluated into other SCCs 11. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations g/2 * CE 17 is refined into CE [37] * CE 18 is refined into CE [38] ### Cost equations --> "Loop" of g/2 * CEs [37] --> Loop 19 * CEs [38] --> Loop 20 ### Ranking functions of CR g(V1,Out) #### Partial ranking functions of CR g(V1,Out) ### Specialization of cost equations activate/2 * CE 19 is refined into CE [39,40] * CE 20 is refined into CE [41] ### Cost equations --> "Loop" of activate/2 * CEs [40,41] --> Loop 21 * CEs [39] --> Loop 22 ### Ranking functions of CR activate(V1,Out) #### Partial ranking functions of CR activate(V1,Out) ### Specialization of cost equations b/1 * CE 15 is refined into CE [42] * CE 14 is refined into CE [43] * CE 16 is refined into CE [44] ### Cost equations --> "Loop" of b/1 * CEs [42] --> Loop 23 * CEs [43,44] --> Loop 24 ### 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 [45] * CE 12 is refined into CE [46,47,48,49,50,51,52,53] ### Cost equations --> "Loop" of f/4 * CEs [53] --> Loop 25 * CEs [52] --> Loop 26 * CEs [51] --> Loop 27 * CEs [50] --> Loop 28 * CEs [49] --> Loop 29 * CEs [48] --> Loop 30 * CEs [47] --> Loop 31 * CEs [46] --> Loop 32 * CEs [45] --> Loop 33 ### Ranking functions of CR f(V1,V,V2,Out) #### Partial ranking functions of CR f(V1,V,V2,Out) ### Specialization of cost equations encArg/2 * CE 22 is refined into CE [54] * CE 25 is refined into CE [55,56] * CE 21 is refined into CE [57] * CE 24 is refined into CE [58,59] * CE 26 is refined into CE [60,61] * CE 23 is refined into CE [62] ### Cost equations --> "Loop" of encArg/2 * CEs [62] --> Loop 34 * CEs [61] --> Loop 35 * CEs [57,59] --> Loop 36 * CEs [60] --> Loop 37 * CEs [58] --> Loop 38 * CEs [56] --> Loop 39 * CEs [54,55] --> Loop 40 ### Ranking functions of CR encArg(V1,Out) * RF of phase [34,35,36,37,38]: [V1] #### Partial ranking functions of CR encArg(V1,Out) * Partial RF of phase [34,35,36,37,38]: - RF of loop [34:1,34:2,34:3,35:1,36:1,37:1,38:1]: V1 ### Specialization of cost equations fun/4 * CE 27 is refined into CE [63,64,65,66,67,68,69,70] * CE 28 is refined into CE [71] ### Cost equations --> "Loop" of fun/4 * CEs [63,64,65,66,67,68,69,70,71] --> Loop 41 ### 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 29 is refined into CE [72,73] * CE 30 is refined into CE [74] ### Cost equations --> "Loop" of fun1/2 * CEs [72] --> Loop 42 * CEs [73] --> Loop 43 * CEs [74] --> Loop 44 ### Ranking functions of CR fun1(V1,Out) #### Partial ranking functions of CR fun1(V1,Out) ### Specialization of cost equations fun2/2 * CE 31 is refined into CE [75,76,77] * CE 32 is refined into CE [78] ### Cost equations --> "Loop" of fun2/2 * CEs [76] --> Loop 45 * CEs [75,77,78] --> Loop 46 ### Ranking functions of CR fun2(V1,Out) #### Partial ranking functions of CR fun2(V1,Out) ### Specialization of cost equations fun3/2 * CE 33 is refined into CE [79,80,81] * CE 34 is refined into CE [82] ### Cost equations --> "Loop" of fun3/2 * CEs [80] --> Loop 47 * CEs [81] --> Loop 48 * CEs [79,82] --> Loop 49 ### Ranking functions of CR fun3(V1,Out) #### Partial ranking functions of CR fun3(V1,Out) ### Specialization of cost equations fun4/1 * CE 35 is refined into CE [83,84] * CE 36 is refined into CE [85] ### Cost equations --> "Loop" of fun4/1 * CEs [84] --> Loop 50 * CEs [83,85] --> Loop 51 ### Ranking functions of CR fun4(Out) #### Partial ranking functions of CR fun4(Out) ### Specialization of cost equations start/3 * CE 1 is refined into CE [86] * CE 2 is refined into CE [87,88] * CE 3 is refined into CE [89,90] * CE 4 is refined into CE [91,92] * CE 5 is refined into CE [93,94] * CE 6 is refined into CE [95] * CE 7 is refined into CE [96,97,98] * CE 8 is refined into CE [99,100] * CE 9 is refined into CE [101,102,103] * CE 10 is refined into CE [104,105] * CE 11 is refined into CE [106] ### Cost equations --> "Loop" of start/3 * CEs [86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106] --> Loop 52 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) Computing Bounds ===================================== #### Cost of chains of g(V1,Out): * Chain [20]: 1 with precondition: [V1=1,Out=0] * Chain [19]: 1 with precondition: [V1+1=Out,V1>=0] #### Cost of chains of activate(V1,Out): * Chain [22]: 2 with precondition: [V1=2,Out=0] * Chain [21]: 2 with precondition: [V1=Out,V1>=0] #### Cost of chains of b(Out): * Chain [24]: 1 with precondition: [Out=0] * Chain [23]: 0 with precondition: [Out=1] #### Cost of chains of f(V1,V,V2,Out): * Chain [33]: 0 with precondition: [Out=0,V1>=0,V>=0,V2>=0] * Chain [32,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [31,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [30,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [29,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [28,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [27,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [26,33]: 7 with precondition: [V2=2,Out=0,V1+1=V,V1>=0] * Chain [25,33]: 7 with precondition: [Out=0,V1+1=V,V1>=0,V2>=0] #### Cost of chains of encArg(V1,Out): * Chain [40]: 1 with precondition: [Out=0,V1>=0] * Chain [39]: 0 with precondition: [V1=2,Out=1] * Chain [multiple([34,35,36,37,38],[[40],[39]])]: 13*it(34)+1*it([40])+0 Such that:it([40]) =< 2*V1+1 aux(1) =< V1 it(34) =< aux(1) with precondition: [V1>=1,Out>=0,V1>=Out] #### Cost of chains of fun(V1,V,V2,Out): * Chain [41]: 4*s(5)+52*s(6)+4*s(8)+52*s(9)+4*s(11)+52*s(12)+10 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 [44]: 0 with precondition: [Out=0,V1>=0] * Chain [43]: 1 with precondition: [Out=1,V1>=0] * Chain [42]: 1*s(41)+13*s(42)+0 Such that:s(40) =< V1 s(41) =< 2*V1+1 s(42) =< s(40) with precondition: [V1>=1,Out>=1,V1+1>=Out] #### Cost of chains of fun2(V1,Out): * Chain [46]: 1*s(44)+13*s(45)+3 Such that:s(43) =< V1 s(44) =< 2*V1+1 s(45) =< s(43) with precondition: [Out=0,V1>=0] * Chain [45]: 1*s(47)+13*s(48)+2 Such that:s(46) =< V1 s(47) =< 2*V1+1 s(48) =< s(46) with precondition: [V1>=1,Out>=0,V1>=Out] #### Cost of chains of fun3(V1,Out): * Chain [49]: 1*s(50)+13*s(51)+1 Such that:s(49) =< V1 s(50) =< 2*V1+1 s(51) =< s(49) with precondition: [Out=0,V1>=0] * Chain [48]: 2 with precondition: [Out=1,V1>=0] * Chain [47]: 1*s(53)+13*s(54)+1 Such that:s(52) =< V1 s(53) =< 2*V1+1 s(54) =< s(52) with precondition: [V1>=1,Out>=1,V1+1>=Out] #### Cost of chains of fun4(Out): * Chain [51]: 1 with precondition: [Out=0] * Chain [50]: 0 with precondition: [Out=1] #### Cost of chains of start(V1,V,V2): * Chain [52]: 10*s(56)+130*s(57)+4*s(65)+4*s(66)+52*s(67)+52*s(68)+10 Such that:s(60) =< V s(61) =< 2*V+1 s(62) =< V2 s(63) =< 2*V2+1 aux(8) =< V1 aux(9) =< 2*V1+1 s(56) =< aux(9) s(57) =< aux(8) s(65) =< s(61) s(66) =< s(63) s(67) =< s(62) s(68) =< s(60) with precondition: [] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [52] with precondition: [] - Upper bound: nat(V1)*130+10+nat(V)*52+nat(V2)*52+nat(2*V1+1)*10+nat(2*V+1)*4+nat(2*V2+1)*4 - Complexity: n ### Maximum cost of start(V1,V,V2): nat(V1)*130+10+nat(V)*52+nat(V2)*52+nat(2*V1+1)*10+nat(2*V+1)*4+nat(2*V2+1)*4 Asymptotic class: n * Total analysis performed in 406 ms. ---------------------------------------- (16) BOUNDS(1, n^1)