/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.koat /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(n^1)) proof of /export/starexec/sandbox/benchmark/theBenchmark.koat # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(1, n^1). (0) CpxIntTrs (1) Koat Proof [FINISHED, 110 ms] (2) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: Complexity Int TRS consisting of the following rules: evalspeedpldi4start(A, B) -> Com_1(evalspeedpldi4entryin(A, B)) :|: TRUE evalspeedpldi4entryin(A, B) -> Com_1(evalspeedpldi4returnin(A, B)) :|: 0 >= A evalspeedpldi4entryin(A, B) -> Com_1(evalspeedpldi4returnin(A, B)) :|: A >= B evalspeedpldi4entryin(A, B) -> Com_1(evalspeedpldi4bb5in(A, B)) :|: A >= 1 && B >= A + 1 evalspeedpldi4bb5in(A, B) -> Com_1(evalspeedpldi4bb2in(A, B)) :|: B >= 1 evalspeedpldi4bb5in(A, B) -> Com_1(evalspeedpldi4returnin(A, B)) :|: 0 >= B evalspeedpldi4bb2in(A, B) -> Com_1(evalspeedpldi4bb3in(A, B)) :|: A >= B + 1 evalspeedpldi4bb2in(A, B) -> Com_1(evalspeedpldi4bb4in(A, B)) :|: B >= A evalspeedpldi4bb3in(A, B) -> Com_1(evalspeedpldi4bb5in(A, B - 1)) :|: TRUE evalspeedpldi4bb4in(A, B) -> Com_1(evalspeedpldi4bb5in(A, B - A)) :|: TRUE evalspeedpldi4returnin(A, B) -> Com_1(evalspeedpldi4stop(A, B)) :|: TRUE The start-symbols are:[evalspeedpldi4start_2] ---------------------------------------- (1) Koat Proof (FINISHED) YES(?, 15*Ar_0 + 15*Ar_1 + 8) Initial complexity problem: 1: T: (Comp: ?, Cost: 1) evalspeedpldi4start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4entryin(Ar_0, Ar_1)) (Comp: ?, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_0 ] (Comp: ?, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 ] (Comp: ?, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1)) [ Ar_0 >= 1 /\ Ar_1 >= Ar_0 + 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb2in(Ar_0, Ar_1)) [ Ar_1 >= 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb3in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb4in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalspeedpldi4bb3in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - 1)) (Comp: ?, Cost: 1) evalspeedpldi4bb4in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - Ar_0)) (Comp: ?, Cost: 1) evalspeedpldi4returnin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4stop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4start(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) evalspeedpldi4start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4entryin(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_0 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1)) [ Ar_0 >= 1 /\ Ar_1 >= Ar_0 + 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb2in(Ar_0, Ar_1)) [ Ar_1 >= 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb3in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb4in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalspeedpldi4bb3in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - 1)) (Comp: ?, Cost: 1) evalspeedpldi4bb4in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - Ar_0)) (Comp: ?, Cost: 1) evalspeedpldi4returnin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4stop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4start(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 A polynomial rank function with Pol(evalspeedpldi4start) = 2 Pol(evalspeedpldi4entryin) = 2 Pol(evalspeedpldi4returnin) = 1 Pol(evalspeedpldi4bb5in) = 2 Pol(evalspeedpldi4bb2in) = 2 Pol(evalspeedpldi4bb3in) = 2 Pol(evalspeedpldi4bb4in) = 2 Pol(evalspeedpldi4stop) = 0 Pol(koat_start) = 2 orients all transitions weakly and the transitions evalspeedpldi4returnin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4stop(Ar_0, Ar_1)) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_1 ] strictly and produces the following problem: 3: T: (Comp: 1, Cost: 1) evalspeedpldi4start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4entryin(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_0 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1)) [ Ar_0 >= 1 /\ Ar_1 >= Ar_0 + 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb2in(Ar_0, Ar_1)) [ Ar_1 >= 1 ] (Comp: 2, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb3in(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb4in(Ar_0, Ar_1)) [ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalspeedpldi4bb3in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - 1)) (Comp: ?, Cost: 1) evalspeedpldi4bb4in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - Ar_0)) (Comp: 2, Cost: 1) evalspeedpldi4returnin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4stop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4start(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 evalspeedpldi4bb2in: X_2 - 1 >= 0 /\ X_1 + X_2 - 2 >= 0 /\ X_1 - 1 >= 0 For symbol evalspeedpldi4bb3in: X_1 - X_2 - 1 >= 0 /\ X_2 - 1 >= 0 /\ X_1 + X_2 - 3 >= 0 /\ X_1 - 2 >= 0 For symbol evalspeedpldi4bb4in: X_2 - 1 >= 0 /\ X_1 + X_2 - 2 >= 0 /\ -X_1 + X_2 >= 0 /\ X_1 - 1 >= 0 For symbol evalspeedpldi4bb5in: X_1 - 1 >= 0 This yielded the following problem: 4: T: (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4start(Ar_0, Ar_1)) [ 0 <= 0 ] (Comp: 2, Cost: 1) evalspeedpldi4returnin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4stop(Ar_0, Ar_1)) (Comp: ?, Cost: 1) evalspeedpldi4bb4in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - Ar_0)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 - 1 >= 0 ] (Comp: ?, Cost: 1) evalspeedpldi4bb3in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb4in(Ar_0, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ Ar_0 - 1 >= 0 /\ Ar_1 >= Ar_0 ] (Comp: ?, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb3in(Ar_0, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ Ar_0 - 1 >= 0 /\ Ar_0 >= Ar_1 + 1 ] (Comp: 2, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 - 1 >= 0 /\ 0 >= Ar_1 ] (Comp: ?, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb2in(Ar_0, Ar_1)) [ Ar_0 - 1 >= 0 /\ Ar_1 >= 1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1)) [ Ar_0 >= 1 /\ Ar_1 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_0 ] (Comp: 1, Cost: 1) evalspeedpldi4start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4entryin(Ar_0, Ar_1)) start location: koat_start leaf cost: 0 A polynomial rank function with Pol(koat_start) = 3*V_1 + 3*V_2 Pol(evalspeedpldi4start) = 3*V_1 + 3*V_2 Pol(evalspeedpldi4returnin) = 3*V_1 + 3*V_2 Pol(evalspeedpldi4stop) = 3*V_1 + 3*V_2 Pol(evalspeedpldi4bb4in) = 3*V_2 + 1 Pol(evalspeedpldi4bb5in) = 3*V_1 + 3*V_2 Pol(evalspeedpldi4bb3in) = 3*V_1 + 3*V_2 - 2 Pol(evalspeedpldi4bb2in) = 3*V_1 + 3*V_2 - 1 Pol(evalspeedpldi4entryin) = 3*V_1 + 3*V_2 orients all transitions weakly and the transitions evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb2in(Ar_0, Ar_1)) [ Ar_0 - 1 >= 0 /\ Ar_1 >= 1 ] evalspeedpldi4bb4in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - Ar_0)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 - 1 >= 0 ] evalspeedpldi4bb3in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb4in(Ar_0, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ Ar_0 - 1 >= 0 /\ Ar_1 >= Ar_0 ] evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb3in(Ar_0, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ Ar_0 - 1 >= 0 /\ Ar_0 >= Ar_1 + 1 ] strictly and produces the following problem: 5: T: (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4start(Ar_0, Ar_1)) [ 0 <= 0 ] (Comp: 2, Cost: 1) evalspeedpldi4returnin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4stop(Ar_0, Ar_1)) (Comp: 3*Ar_0 + 3*Ar_1, Cost: 1) evalspeedpldi4bb4in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - Ar_0)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ -Ar_0 + Ar_1 >= 0 /\ Ar_0 - 1 >= 0 ] (Comp: 3*Ar_0 + 3*Ar_1, Cost: 1) evalspeedpldi4bb3in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1 - 1)) [ Ar_0 - Ar_1 - 1 >= 0 /\ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 3 >= 0 /\ Ar_0 - 2 >= 0 ] (Comp: 3*Ar_0 + 3*Ar_1, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb4in(Ar_0, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ Ar_0 - 1 >= 0 /\ Ar_1 >= Ar_0 ] (Comp: 3*Ar_0 + 3*Ar_1, Cost: 1) evalspeedpldi4bb2in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb3in(Ar_0, Ar_1)) [ Ar_1 - 1 >= 0 /\ Ar_0 + Ar_1 - 2 >= 0 /\ Ar_0 - 1 >= 0 /\ Ar_0 >= Ar_1 + 1 ] (Comp: 2, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 - 1 >= 0 /\ 0 >= Ar_1 ] (Comp: 3*Ar_0 + 3*Ar_1, Cost: 1) evalspeedpldi4bb5in(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb2in(Ar_0, Ar_1)) [ Ar_0 - 1 >= 0 /\ Ar_1 >= 1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4bb5in(Ar_0, Ar_1)) [ Ar_0 >= 1 /\ Ar_1 >= Ar_0 + 1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ Ar_0 >= Ar_1 ] (Comp: 1, Cost: 1) evalspeedpldi4entryin(Ar_0, Ar_1) -> Com_1(evalspeedpldi4returnin(Ar_0, Ar_1)) [ 0 >= Ar_0 ] (Comp: 1, Cost: 1) evalspeedpldi4start(Ar_0, Ar_1) -> Com_1(evalspeedpldi4entryin(Ar_0, Ar_1)) start location: koat_start leaf cost: 0 Complexity upper bound 15*Ar_0 + 15*Ar_1 + 8 Time: 0.163 sec (SMT: 0.141 sec) ---------------------------------------- (2) BOUNDS(1, n^1)