/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/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)), 69 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: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, z0) ifappend(z0, z1, nil) -> z1 ifappend(z0, z1, cons(z2, z3)) -> cons(z2, append(z3, z1)) Tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, nil) -> c5 IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, nil) -> c5 IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: IS_EMPTY_1, HD_1, TL_1, APPEND_2, IFAPPEND_3 Compound Symbols: c, c1, c2, c3, c4_1, c5, c6_1 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 5 trailing nodes: IFAPPEND(z0, z1, nil) -> c5 TL(cons(z0, z1)) -> c3 IS_EMPTY(nil) -> c HD(cons(z0, z1)) -> c2 IS_EMPTY(cons(z0, z1)) -> c1 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, z0) ifappend(z0, z1, nil) -> z1 ifappend(z0, z1, cons(z2, z3)) -> cons(z2, append(z3, z1)) Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c6_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, z0) ifappend(z0, z1, nil) -> z1 ifappend(z0, z1, cons(z2, z3)) -> cons(z2, append(z3, z1)) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c6_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. IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) We considered the (Usable) Rules:none And the Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(APPEND(x_1, x_2)) = [1] + x_1 POL(IFAPPEND(x_1, x_2, x_3)) = [1] + x_3 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(cons(x_1, x_2)) = [1] + x_2 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) K tuples: IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) Defined Rule Symbols:none Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c6_1 ---------------------------------------- (9) CdtKnowledgeProof (FINISHED) The following tuples could be moved from S to K by knowledge propagation: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, z0)) IFAPPEND(z0, z1, cons(z2, z3)) -> c6(APPEND(z3, z1)) 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: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) 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 append(cons(x3_0, l4_0), l2) ->^+ cons(x3_0, append(l4_0, l2)) gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. The pumping substitution is [l4_0 / cons(x3_0, l4_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: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) 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: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, l1) ifappend(l1, l2, nil) -> l2 ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2)) S is empty. Rewrite Strategy: INNERMOST