/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(NON_POLY, ?) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) SlicingProof [LOWER BOUND(ID), 0 ms] (4) CpxTRS (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) typed CpxTrs (7) OrderProof [LOWER BOUND(ID), 0 ms] (8) typed CpxTrs (9) RewriteLemmaProof [LOWER BOUND(ID), 205 ms] (10) BEST (11) proven lower bound (12) LowerBoundPropagationProof [FINISHED, 0 ms] (13) BOUNDS(n^1, INF) (14) typed CpxTrs (15) RewriteLemmaProof [FINISHED, 81 ms] (16) BOUNDS(EXP, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). The TRS R consists of the following rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1(x, l), rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). The TRS R consists of the following rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1(x, l), rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) SlicingProof (LOWER BOUND(ID)) Sliced the following arguments: rev1/0 rev1/1 ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). The TRS R consists of the following rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1, rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: Innermost TRS: Rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1, rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) Types: empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: rev1 -> nil:cons -> nil:cons false :: true:false head :: nil:cons -> rev1 tail :: nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: rev1 rev2 :: rev1 -> nil:cons -> nil:cons last :: rev1 -> nil:cons -> rev1 if :: true:false -> rev1 -> nil:cons -> rev1 hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_rev13_0 :: rev1 gen_nil:cons4_0 :: Nat -> nil:cons ---------------------------------------- (7) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: rev, rev2, last They will be analysed ascendingly in the following order: rev = rev2 ---------------------------------------- (8) Obligation: Innermost TRS: Rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1, rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) Types: empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: rev1 -> nil:cons -> nil:cons false :: true:false head :: nil:cons -> rev1 tail :: nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: rev1 rev2 :: rev1 -> nil:cons -> nil:cons last :: rev1 -> nil:cons -> rev1 if :: true:false -> rev1 -> nil:cons -> rev1 hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_rev13_0 :: rev1 gen_nil:cons4_0 :: Nat -> nil:cons Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(rev1, gen_nil:cons4_0(x)) The following defined symbols remain to be analysed: last, rev, rev2 They will be analysed ascendingly in the following order: rev = rev2 ---------------------------------------- (9) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: last(rev1, gen_nil:cons4_0(n6_0)) -> rev1, rt in Omega(1 + n6_0) Induction Base: last(rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) if(empty(gen_nil:cons4_0(0)), rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) if(true, rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) rev1 Induction Step: last(rev1, gen_nil:cons4_0(+(n6_0, 1))) ->_R^Omega(1) if(empty(gen_nil:cons4_0(+(n6_0, 1))), rev1, gen_nil:cons4_0(+(n6_0, 1))) ->_R^Omega(1) if(false, rev1, gen_nil:cons4_0(+(1, n6_0))) ->_R^Omega(1) last(head(gen_nil:cons4_0(+(1, n6_0))), tail(gen_nil:cons4_0(+(1, n6_0)))) ->_R^Omega(1) last(rev1, tail(gen_nil:cons4_0(+(1, n6_0)))) ->_R^Omega(1) last(rev1, gen_nil:cons4_0(n6_0)) ->_IH rev1 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (10) Complex Obligation (BEST) ---------------------------------------- (11) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1, rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) Types: empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: rev1 -> nil:cons -> nil:cons false :: true:false head :: nil:cons -> rev1 tail :: nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: rev1 rev2 :: rev1 -> nil:cons -> nil:cons last :: rev1 -> nil:cons -> rev1 if :: true:false -> rev1 -> nil:cons -> rev1 hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_rev13_0 :: rev1 gen_nil:cons4_0 :: Nat -> nil:cons Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(rev1, gen_nil:cons4_0(x)) The following defined symbols remain to be analysed: last, rev, rev2 They will be analysed ascendingly in the following order: rev = rev2 ---------------------------------------- (12) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (13) BOUNDS(n^1, INF) ---------------------------------------- (14) Obligation: Innermost TRS: Rules: empty(nil) -> true empty(cons(x, l)) -> false head(cons(x, l)) -> x tail(nil) -> nil tail(cons(x, l)) -> l rev(nil) -> nil rev(cons(x, l)) -> cons(rev1, rev2(x, l)) last(x, l) -> if(empty(l), x, l) if(true, x, l) -> x if(false, x, l) -> last(head(l), tail(l)) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) Types: empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: rev1 -> nil:cons -> nil:cons false :: true:false head :: nil:cons -> rev1 tail :: nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: rev1 rev2 :: rev1 -> nil:cons -> nil:cons last :: rev1 -> nil:cons -> rev1 if :: true:false -> rev1 -> nil:cons -> rev1 hole_true:false1_0 :: true:false hole_nil:cons2_0 :: nil:cons hole_rev13_0 :: rev1 gen_nil:cons4_0 :: Nat -> nil:cons Lemmas: last(rev1, gen_nil:cons4_0(n6_0)) -> rev1, rt in Omega(1 + n6_0) Generator Equations: gen_nil:cons4_0(0) <=> nil gen_nil:cons4_0(+(x, 1)) <=> cons(rev1, gen_nil:cons4_0(x)) The following defined symbols remain to be analysed: rev2, rev They will be analysed ascendingly in the following order: rev = rev2 ---------------------------------------- (15) RewriteLemmaProof (FINISHED) Proved the following rewrite lemma: rev2(rev1, gen_nil:cons4_0(n341_0)) -> gen_nil:cons4_0(n341_0), rt in Omega(EXP) Induction Base: rev2(rev1, gen_nil:cons4_0(0)) ->_R^Omega(1) nil Induction Step: rev2(rev1, gen_nil:cons4_0(+(n341_0, 1))) ->_R^Omega(1) rev(cons(rev1, rev2(rev1, gen_nil:cons4_0(n341_0)))) ->_IH rev(cons(rev1, gen_nil:cons4_0(c342_0))) ->_R^Omega(1) cons(rev1, rev2(rev1, gen_nil:cons4_0(n341_0))) ->_IH cons(rev1, gen_nil:cons4_0(c342_0)) We have rt in EXP and sz in O(n). Thus, we have irc_R in EXP ---------------------------------------- (16) BOUNDS(EXP, INF)