/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.koat /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.koat # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(n^1, n^1). (0) CpxIntTrs (1) Koat Proof [FINISHED, 124 ms] (2) BOUNDS(1, n^1) (3) Loat Proof [FINISHED, 543 ms] (4) BOUNDS(n^1, INF) ---------------------------------------- (0) Obligation: Complexity Int TRS consisting of the following rules: evalwisestart(A, B) -> Com_1(evalwiseentryin(A, B)) :|: TRUE evalwiseentryin(A, B) -> Com_1(evalwisereturnin(A, B)) :|: 0 >= A + 1 evalwiseentryin(A, B) -> Com_1(evalwisereturnin(A, B)) :|: 0 >= B + 1 evalwiseentryin(A, B) -> Com_1(evalwisebb6in(B, A)) :|: A >= 0 && B >= 0 evalwisebb6in(A, B) -> Com_1(evalwisebb3in(A, B)) :|: B >= A + 3 evalwisebb6in(A, B) -> Com_1(evalwisebb3in(A, B)) :|: A >= B + 3 evalwisebb6in(A, B) -> Com_1(evalwisereturnin(A, B)) :|: 2 + A >= B && 2 + B >= A evalwisebb3in(A, B) -> Com_1(evalwisebb4in(A, B)) :|: A >= B + 1 evalwisebb3in(A, B) -> Com_1(evalwisebb5in(A, B)) :|: B >= A evalwisebb4in(A, B) -> Com_1(evalwisebb6in(A, B + 1)) :|: TRUE evalwisebb5in(A, B) -> Com_1(evalwisebb6in(A + 1, B)) :|: TRUE evalwisereturnin(A, B) -> Com_1(evalwisestop(A, B)) :|: TRUE The start-symbols are:[evalwisestart_2] ---------------------------------------- (1) Koat Proof (FINISHED) YES(?, 18*Ar_1 + 18*Ar_0 + 20) Initial complexity problem: 1: T: (Comp: ?, Cost: 1) evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1)) (Comp: ?, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ] (Comp: ?, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\ Ar_1 >= 0 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 + 3 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 3 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ Ar_0 + 2 >= Ar_1 /\ Ar_1 + 2 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) (Comp: ?, Cost: 1) evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) (Comp: ?, Cost: 1) evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Repeatedly propagating knowledge in problem 1 produces the following problem: 2: T: (Comp: 1, Cost: 1) evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\ Ar_1 >= 0 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 + 3 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 3 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ Ar_0 + 2 >= Ar_1 /\ Ar_1 + 2 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) (Comp: ?, Cost: 1) evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) (Comp: ?, Cost: 1) evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 A polynomial rank function with Pol(evalwisestart) = 2 Pol(evalwiseentryin) = 2 Pol(evalwisereturnin) = 1 Pol(evalwisebb6in) = 2 Pol(evalwisebb3in) = 2 Pol(evalwisebb4in) = 2 Pol(evalwisebb5in) = 2 Pol(evalwisestop) = 0 Pol(koat_start) = 2 orients all transitions weakly and the transitions evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1)) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ Ar_0 + 2 >= Ar_1 /\ Ar_1 + 2 >= Ar_0 ] strictly and produces the following problem: 3: T: (Comp: 1, Cost: 1) evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\ Ar_1 >= 0 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 + 3 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 3 ] (Comp: 2, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ Ar_0 + 2 >= Ar_1 /\ Ar_1 + 2 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) (Comp: ?, Cost: 1) evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) (Comp: 2, Cost: 1) evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Applied AI with 'oct' on problem 3 to obtain the following invariants: For symbol evalwisebb3in: X_2 >= 0 /\ X_1 + X_2 - 3 >= 0 /\ X_1 >= 0 For symbol evalwisebb4in: X_1 - X_2 - 1 >= 0 /\ X_2 >= 0 /\ X_1 + X_2 - 3 >= 0 /\ X_1 - 2 >= 0 For symbol evalwisebb5in: X_2 - 1 >= 0 /\ X_1 + X_2 - 3 >= 0 /\ -X_1 + X_2 >= 0 /\ X_1 >= 0 For symbol evalwisebb6in: X_2 >= 0 /\ X_1 + X_2 >= 0 /\ X_1 >= 0 This yielded the following problem: 4: T: (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ] (Comp: 2, Cost: 1) evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1)) (Comp: ?, Cost: 1) evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 ] (Comp: ?, Cost: 1) evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 1 ] (Comp: 2, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_0 + 2 >= Ar_1 /\ Ar_1 + 2 >= Ar_0 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 3 ] (Comp: ?, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 + 3 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\ Ar_1 >= 0 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1)) start location: koat_start leaf cost: 0 A polynomial rank function with Pol(evalwisebb5in) = -3*V_1 + 3*V_2 + 1 Pol(evalwisebb6in) = -3*V_1 + 3*V_2 + 3 Pol(evalwisebb3in) = -3*V_1 + 3*V_2 + 2 and size complexities S("evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1))", 0-0) = Ar_0 S("evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1))", 0-1) = Ar_1 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ]", 0-0) = Ar_0 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ]", 0-1) = Ar_1 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ]", 0-0) = Ar_0 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ]", 0-1) = Ar_1 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\\ Ar_1 >= 0 ]", 0-0) = Ar_1 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\\ Ar_1 >= 0 ]", 0-1) = Ar_0 S("evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\\ Ar_0 + Ar_1 >= 0 /\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ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1))", 0-1) = Ar_0 + Ar_1 S("koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ]", 0-0) = Ar_0 S("koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ]", 0-1) = Ar_1 orients the transitions evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 ] evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 ] evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 + 3 ] weakly and the transitions evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 + 3 ] evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 ] evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 ] strictly and produces the following problem: 5: T: (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar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cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 + 3 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\ Ar_1 >= 0 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1)) start location: koat_start leaf cost: 0 A polynomial rank function with Pol(evalwisebb6in) = 3*V_1 - 3*V_2 + 1 Pol(evalwisebb3in) = 3*V_1 - 3*V_2 Pol(evalwisebb4in) = 3*V_1 - 3*V_2 - 1 and size complexities S("evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1))", 0-0) = Ar_0 S("evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1))", 0-1) = Ar_1 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ]", 0-0) = Ar_0 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ]", 0-1) = Ar_1 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ]", 0-0) = Ar_0 S("evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ]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1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) [ Ar_1 - 1 >= 0 /\\ Ar_0 + Ar_1 - 3 >= 0 /\\ -Ar_0 + Ar_1 >= 0 /\\ Ar_0 >= 0 ]", 0-0) = 4*Ar_0 + 4*Ar_1 + 48 S("evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) [ Ar_1 - 1 >= 0 /\\ Ar_0 + Ar_1 - 3 >= 0 /\\ -Ar_0 + Ar_1 >= 0 /\\ Ar_0 >= 0 ]", 0-1) = Ar_0 S("evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1))", 0-0) = 4*Ar_0 + 4*Ar_1 + 768 S("evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1))", 0-1) = Ar_0 + Ar_1 S("koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ]", 0-0) = Ar_0 S("koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ]", 0-1) = Ar_1 orients the transitions evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 3 ] evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 1 ] weakly and the transitions evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 3 ] evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 1 ] strictly and produces the following problem: 6: T: (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalwisestart(Ar_0, Ar_1)) [ 0 <= 0 ] (Comp: 2, Cost: 1) evalwisereturnin(Ar_0, Ar_1) -> Com_1(evalwisestop(Ar_0, Ar_1)) (Comp: 3*Ar_1 + 3*Ar_0 + 3, Cost: 1) evalwisebb5in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0 + 1, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 ] (Comp: 3*Ar_1 + 3*Ar_0 + 1, Cost: 1) evalwisebb4in(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_0, Ar_1 + 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] (Comp: 3*Ar_1 + 3*Ar_0 + 3, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb5in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 ] (Comp: 3*Ar_1 + 3*Ar_0 + 1, Cost: 1) evalwisebb3in(Ar_0, Ar_1) -> Com_1(evalwisebb4in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 1 ] (Comp: 2, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_0 + 2 >= Ar_1 /\ Ar_1 + 2 >= Ar_0 ] (Comp: 3*Ar_1 + 3*Ar_0 + 1, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_0 >= Ar_1 + 3 ] (Comp: 3*Ar_1 + 3*Ar_0 + 3, Cost: 1) evalwisebb6in(Ar_0, Ar_1) -> Com_1(evalwisebb3in(Ar_0, Ar_1)) [ Ar_1 >= 0 /\ Ar_0 + Ar_1 >= 0 /\ Ar_0 >= 0 /\ Ar_1 >= Ar_0 + 3 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisebb6in(Ar_1, Ar_0)) [ Ar_0 >= 0 /\ Ar_1 >= 0 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_1 + 1 ] (Comp: 1, Cost: 1) evalwiseentryin(Ar_0, Ar_1) -> Com_1(evalwisereturnin(Ar_0, Ar_1)) [ 0 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalwisestart(Ar_0, Ar_1) -> Com_1(evalwiseentryin(Ar_0, Ar_1)) start location: koat_start leaf cost: 0 Complexity upper bound 18*Ar_1 + 18*Ar_0 + 20 Time: 0.178 sec (SMT: 0.149 sec) ---------------------------------------- (2) BOUNDS(1, n^1) ---------------------------------------- (3) Loat Proof (FINISHED) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: evalwisestart 0: evalwisestart -> evalwiseentryin : [], cost: 1 1: evalwiseentryin -> evalwisereturnin : [ 0>=1+A ], cost: 1 2: evalwiseentryin -> evalwisereturnin : [ 0>=1+B ], cost: 1 3: evalwiseentryin -> evalwisebb6in : A'=B, B'=A, [ A>=0 && B>=0 ], cost: 1 4: evalwisebb6in -> evalwisebb3in : [ B>=3+A ], cost: 1 5: evalwisebb6in -> evalwisebb3in : [ A>=3+B ], cost: 1 6: evalwisebb6in -> evalwisereturnin : [ 2+A>=B && 2+B>=A ], cost: 1 7: evalwisebb3in -> evalwisebb4in : [ A>=1+B ], cost: 1 8: evalwisebb3in -> evalwisebb5in : [ B>=A ], cost: 1 9: evalwisebb4in -> evalwisebb6in : B'=1+B, [], cost: 1 10: evalwisebb5in -> evalwisebb6in : A'=1+A, [], cost: 1 11: evalwisereturnin -> evalwisestop : [], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 0: evalwisestart -> evalwiseentryin : [], cost: 1 Removed unreachable and leaf rules: Start location: evalwisestart 0: evalwisestart -> evalwiseentryin : [], cost: 1 3: evalwiseentryin -> evalwisebb6in : A'=B, B'=A, [ A>=0 && B>=0 ], cost: 1 4: evalwisebb6in -> evalwisebb3in : [ B>=3+A ], cost: 1 5: evalwisebb6in -> evalwisebb3in : [ A>=3+B ], cost: 1 7: evalwisebb3in -> evalwisebb4in : [ A>=1+B ], cost: 1 8: evalwisebb3in -> evalwisebb5in : [ B>=A ], cost: 1 9: evalwisebb4in -> evalwisebb6in : B'=1+B, [], cost: 1 10: evalwisebb5in -> evalwisebb6in : A'=1+A, [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: evalwisestart 12: evalwisestart -> evalwisebb6in : A'=B, B'=A, [ A>=0 && B>=0 ], cost: 2 4: evalwisebb6in -> evalwisebb3in : [ B>=3+A ], cost: 1 5: evalwisebb6in -> evalwisebb3in : [ A>=3+B ], cost: 1 13: evalwisebb3in -> evalwisebb6in : B'=1+B, [ A>=1+B ], cost: 2 14: evalwisebb3in -> evalwisebb6in : A'=1+A, [ B>=A ], cost: 2 Eliminated locations (on tree-shaped paths): Start location: evalwisestart 12: evalwisestart -> evalwisebb6in : A'=B, B'=A, [ A>=0 && B>=0 ], cost: 2 15: evalwisebb6in -> evalwisebb6in : A'=1+A, [ B>=3+A ], cost: 3 16: evalwisebb6in -> evalwisebb6in : B'=1+B, [ A>=3+B ], cost: 3 Accelerating simple loops of location 2. Accelerating the following rules: 15: evalwisebb6in -> evalwisebb6in : A'=1+A, [ B>=3+A ], cost: 3 16: evalwisebb6in -> evalwisebb6in : B'=1+B, [ A>=3+B ], cost: 3 Accelerated rule 15 with metering function -2-A+B, yielding the new rule 17. Accelerated rule 16 with metering function -2+A-B, yielding the new rule 18. Removing the simple loops: 15 16. Accelerated all simple loops using metering functions (where possible): Start location: evalwisestart 12: evalwisestart -> evalwisebb6in : A'=B, B'=A, [ A>=0 && B>=0 ], cost: 2 17: evalwisebb6in -> evalwisebb6in : A'=-2+B, [ B>=3+A ], cost: -6-3*A+3*B 18: evalwisebb6in -> evalwisebb6in : B'=-2+A, [ A>=3+B ], cost: -6+3*A-3*B Chained accelerated rules (with incoming rules): Start location: evalwisestart 12: evalwisestart -> evalwisebb6in : A'=B, B'=A, [ A>=0 && B>=0 ], cost: 2 19: evalwisestart -> evalwisebb6in : A'=-2+A, B'=A, [ A>=0 && B>=0 && A>=3+B ], cost: -4+3*A-3*B 20: evalwisestart -> evalwisebb6in : A'=B, B'=-2+B, [ A>=0 && B>=0 && B>=3+A ], cost: -4-3*A+3*B Removed unreachable locations (and leaf rules with constant cost): Start location: evalwisestart 19: evalwisestart -> evalwisebb6in : A'=-2+A, B'=A, [ A>=0 && B>=0 && A>=3+B ], cost: -4+3*A-3*B 20: evalwisestart -> evalwisebb6in : A'=B, B'=-2+B, [ A>=0 && B>=0 && B>=3+A ], cost: -4-3*A+3*B ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: evalwisestart 19: evalwisestart -> evalwisebb6in : A'=-2+A, B'=A, [ A>=0 && B>=0 && A>=3+B ], cost: -4+3*A-3*B 20: evalwisestart -> evalwisebb6in : A'=B, B'=-2+B, [ A>=0 && B>=0 && B>=3+A ], cost: -4-3*A+3*B Computing asymptotic complexity for rule 19 Simplified the guard: 19: evalwisestart -> evalwisebb6in : A'=-2+A, B'=A, [ B>=0 && A>=3+B ], cost: -4+3*A-3*B Solved the limit problem by the following transformations: Created initial limit problem: 1+B (+/+!), -4+3*A-3*B (+), -2+A-B (+/+!) [not solved] removing all constraints (solved by SMT) resulting limit problem: [solved] applying transformation rule (C) using substitution {A==2*n,B==n} resulting limit problem: [solved] Solution: A / 2*n B / n Resulting cost -4+3*n has complexity: Poly(n^1) Found new complexity Poly(n^1). Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Poly(n^1) Cpx degree: 1 Solved cost: -4+3*n Rule cost: -4+3*A-3*B Rule guard: [ B>=0 && A>=3+B ] WORST_CASE(Omega(n^1),?) ---------------------------------------- (4) BOUNDS(n^1, INF)