/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 91 ms] (8) CdtProblem (9) CdtKnowledgeProof [FINISHED, 0 ms] (10) BOUNDS(1, 1) (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (12) TRS for Loop Detection (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (14) BEST (15) proven lower bound (16) LowerBoundPropagationProof [FINISHED, 0 ms] (17) BOUNDS(n^1, INF) (18) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, n__fst(activate(X), activate(Z))) from(X) -> cons(X, n__from(s(X))) add(0, X) -> X add(s(X), Y) -> s(n__add(activate(X), Y)) len(nil) -> 0 len(cons(X, Z)) -> s(n__len(activate(Z))) fst(X1, X2) -> n__fst(X1, X2) from(X) -> n__from(X) add(X1, X2) -> n__add(X1, X2) len(X) -> n__len(X) activate(n__fst(X1, X2)) -> fst(X1, X2) activate(n__from(X)) -> from(X) activate(n__add(X1, X2)) -> add(X1, X2) activate(n__len(X)) -> len(X) activate(X) -> X S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: fst(0, z0) -> nil fst(s(z0), cons(z1, z2)) -> cons(z1, n__fst(activate(z0), activate(z2))) fst(z0, z1) -> n__fst(z0, z1) from(z0) -> cons(z0, n__from(s(z0))) from(z0) -> n__from(z0) add(0, z0) -> z0 add(s(z0), z1) -> s(n__add(activate(z0), z1)) add(z0, z1) -> n__add(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(n__len(activate(z1))) len(z0) -> n__len(z0) activate(n__fst(z0, z1)) -> fst(z0, z1) activate(n__from(z0)) -> from(z0) activate(n__add(z0, z1)) -> add(z0, z1) activate(n__len(z0)) -> len(z0) activate(z0) -> z0 Tuples: FST(0, z0) -> c FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) FST(z0, z1) -> c2 FROM(z0) -> c3 FROM(z0) -> c4 ADD(0, z0) -> c5 ADD(s(z0), z1) -> c6(ACTIVATE(z0)) ADD(z0, z1) -> c7 LEN(nil) -> c8 LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) LEN(z0) -> c10 ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__from(z0)) -> c12(FROM(z0)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) ACTIVATE(z0) -> c15 S tuples: FST(0, z0) -> c FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) FST(z0, z1) -> c2 FROM(z0) -> c3 FROM(z0) -> c4 ADD(0, z0) -> c5 ADD(s(z0), z1) -> c6(ACTIVATE(z0)) ADD(z0, z1) -> c7 LEN(nil) -> c8 LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) LEN(z0) -> c10 ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__from(z0)) -> c12(FROM(z0)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) ACTIVATE(z0) -> c15 K tuples:none Defined Rule Symbols: fst_2, from_1, add_2, len_1, activate_1 Defined Pair Symbols: FST_2, FROM_1, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c, c1_2, c2, c3, c4, c5, c6_1, c7, c8, c9_1, c10, c11_1, c12_1, c13_1, c14_1, c15 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 10 trailing nodes: LEN(z0) -> c10 ACTIVATE(n__from(z0)) -> c12(FROM(z0)) ACTIVATE(z0) -> c15 FST(0, z0) -> c LEN(nil) -> c8 FROM(z0) -> c4 FST(z0, z1) -> c2 ADD(z0, z1) -> c7 ADD(0, z0) -> c5 FROM(z0) -> c3 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: fst(0, z0) -> nil fst(s(z0), cons(z1, z2)) -> cons(z1, n__fst(activate(z0), activate(z2))) fst(z0, z1) -> n__fst(z0, z1) from(z0) -> cons(z0, n__from(s(z0))) from(z0) -> n__from(z0) add(0, z0) -> z0 add(s(z0), z1) -> s(n__add(activate(z0), z1)) add(z0, z1) -> n__add(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(n__len(activate(z1))) len(z0) -> n__len(z0) activate(n__fst(z0, z1)) -> fst(z0, z1) activate(n__from(z0)) -> from(z0) activate(n__add(z0, z1)) -> add(z0, z1) activate(n__len(z0)) -> len(z0) activate(z0) -> z0 Tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) S tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) K tuples:none Defined Rule Symbols: fst_2, from_1, add_2, len_1, activate_1 Defined Pair Symbols: FST_2, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c1_2, c6_1, c9_1, c11_1, c13_1, c14_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: fst(0, z0) -> nil fst(s(z0), cons(z1, z2)) -> cons(z1, n__fst(activate(z0), activate(z2))) fst(z0, z1) -> n__fst(z0, z1) from(z0) -> cons(z0, n__from(s(z0))) from(z0) -> n__from(z0) add(0, z0) -> z0 add(s(z0), z1) -> s(n__add(activate(z0), z1)) add(z0, z1) -> n__add(z0, z1) len(nil) -> 0 len(cons(z0, z1)) -> s(n__len(activate(z1))) len(z0) -> n__len(z0) activate(n__fst(z0, z1)) -> fst(z0, z1) activate(n__from(z0)) -> from(z0) activate(n__add(z0, z1)) -> add(z0, z1) activate(n__len(z0)) -> len(z0) activate(z0) -> z0 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) S tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: FST_2, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c1_2, c6_1, c9_1, c11_1, c13_1, c14_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) We considered the (Usable) Rules:none And the Tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) The order we found is given by the following interpretation: Polynomial interpretation : POL(ACTIVATE(x_1)) = [1] + x_1 POL(ADD(x_1, x_2)) = [1] + x_1 + x_2 POL(FST(x_1, x_2)) = x_1 + x_2 POL(LEN(x_1)) = [1] + x_1 POL(c1(x_1, x_2)) = x_1 + x_2 POL(c11(x_1)) = x_1 POL(c13(x_1)) = x_1 POL(c14(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c9(x_1)) = x_1 POL(cons(x_1, x_2)) = [1] + x_2 POL(n__add(x_1, x_2)) = [1] + x_1 + x_2 POL(n__fst(x_1, x_2)) = [1] + x_1 + x_2 POL(n__len(x_1)) = [1] + x_1 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) S tuples: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) K tuples: ADD(s(z0), z1) -> c6(ACTIVATE(z0)) LEN(cons(z0, z1)) -> c9(ACTIVATE(z1)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) Defined Rule Symbols:none Defined Pair Symbols: FST_2, ADD_2, LEN_1, ACTIVATE_1 Compound Symbols: c1_2, c6_1, c9_1, c11_1, c13_1, c14_1 ---------------------------------------- (9) CdtKnowledgeProof (FINISHED) The following tuples could be moved from S to K by knowledge propagation: FST(s(z0), cons(z1, z2)) -> c1(ACTIVATE(z0), ACTIVATE(z2)) ACTIVATE(n__fst(z0, z1)) -> c11(FST(z0, z1)) ACTIVATE(n__add(z0, z1)) -> c13(ADD(z0, z1)) ACTIVATE(n__len(z0)) -> c14(LEN(z0)) Now S is empty ---------------------------------------- (10) BOUNDS(1, 1) ---------------------------------------- (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (12) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, n__fst(activate(X), activate(Z))) from(X) -> cons(X, n__from(s(X))) add(0, X) -> X add(s(X), Y) -> s(n__add(activate(X), Y)) len(nil) -> 0 len(cons(X, Z)) -> s(n__len(activate(Z))) fst(X1, X2) -> n__fst(X1, X2) from(X) -> n__from(X) add(X1, X2) -> n__add(X1, X2) len(X) -> n__len(X) activate(n__fst(X1, X2)) -> fst(X1, X2) activate(n__from(X)) -> from(X) activate(n__add(X1, X2)) -> add(X1, X2) activate(n__len(X)) -> len(X) activate(X) -> X S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence activate(n__fst(s(X1_0), cons(Y2_0, Z3_0))) ->^+ cons(Y2_0, n__fst(activate(X1_0), activate(Z3_0))) gives rise to a decreasing loop by considering the right hand sides subterm at position [1,0]. The pumping substitution is [X1_0 / n__fst(s(X1_0), cons(Y2_0, Z3_0))]. The result substitution is [ ]. ---------------------------------------- (14) Complex Obligation (BEST) ---------------------------------------- (15) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, n__fst(activate(X), activate(Z))) from(X) -> cons(X, n__from(s(X))) add(0, X) -> X add(s(X), Y) -> s(n__add(activate(X), Y)) len(nil) -> 0 len(cons(X, Z)) -> s(n__len(activate(Z))) fst(X1, X2) -> n__fst(X1, X2) from(X) -> n__from(X) add(X1, X2) -> n__add(X1, X2) len(X) -> n__len(X) activate(n__fst(X1, X2)) -> fst(X1, X2) activate(n__from(X)) -> from(X) activate(n__add(X1, X2)) -> add(X1, X2) activate(n__len(X)) -> len(X) activate(X) -> X S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (16) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (17) BOUNDS(n^1, INF) ---------------------------------------- (18) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: fst(0, Z) -> nil fst(s(X), cons(Y, Z)) -> cons(Y, n__fst(activate(X), activate(Z))) from(X) -> cons(X, n__from(s(X))) add(0, X) -> X add(s(X), Y) -> s(n__add(activate(X), Y)) len(nil) -> 0 len(cons(X, Z)) -> s(n__len(activate(Z))) fst(X1, X2) -> n__fst(X1, X2) from(X) -> n__from(X) add(X1, X2) -> n__add(X1, X2) len(X) -> n__len(X) activate(n__fst(X1, X2)) -> fst(X1, X2) activate(n__from(X)) -> from(X) activate(n__add(X1, X2)) -> add(X1, X2) activate(n__len(X)) -> len(X) activate(X) -> X S is empty. Rewrite Strategy: INNERMOST