/export/starexec/sandbox/solver/bin/starexec_run_c_complexity /export/starexec/sandbox/benchmark/theBenchmark.c /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(n^1)) proof of /export/starexec/sandbox/output/output_files/bench.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, 50 ms] (2) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: Complexity Int TRS consisting of the following rules: eval_ndecr_start(v_i.0, v_n) -> Com_1(eval_ndecr_bb0_in(v_i.0, v_n)) :|: TRUE eval_ndecr_bb0_in(v_i.0, v_n) -> Com_1(eval_ndecr_bb1_in(v_n - 1, v_n)) :|: TRUE eval_ndecr_bb1_in(v_i.0, v_n) -> Com_1(eval_ndecr_bb2_in(v_i.0, v_n)) :|: v_i.0 > 1 eval_ndecr_bb1_in(v_i.0, v_n) -> Com_1(eval_ndecr_bb3_in(v_i.0, v_n)) :|: v_i.0 <= 1 eval_ndecr_bb2_in(v_i.0, v_n) -> Com_1(eval_ndecr_bb1_in(v_i.0 - 1, v_n)) :|: TRUE eval_ndecr_bb3_in(v_i.0, v_n) -> Com_1(eval_ndecr_stop(v_i.0, v_n)) :|: TRUE The start-symbols are:[eval_ndecr_start_2] ---------------------------------------- (1) Koat Proof (FINISHED) YES(?, 2*Ar_1 + 6) Initial complexity problem: 1: T: (Comp: ?, Cost: 1) evalndecrstart(Ar_0, Ar_1) -> Com_1(evalndecrbb0in(Ar_0, Ar_1)) (Comp: ?, Cost: 1) evalndecrbb0in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_1 - 1, Ar_1)) (Comp: ?, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb2in(Ar_0, Ar_1)) [ Ar_0 >= 2 ] (Comp: ?, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb3in(Ar_0, Ar_1)) [ 1 >= Ar_0 ] (Comp: ?, Cost: 1) evalndecrbb2in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_0 - 1, Ar_1)) (Comp: ?, Cost: 1) evalndecrbb3in(Ar_0, Ar_1) -> Com_1(evalndecrstop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalndecrstart(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) evalndecrstart(Ar_0, Ar_1) -> Com_1(evalndecrbb0in(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalndecrbb0in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_1 - 1, Ar_1)) (Comp: ?, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb2in(Ar_0, Ar_1)) [ Ar_0 >= 2 ] (Comp: ?, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb3in(Ar_0, Ar_1)) [ 1 >= Ar_0 ] (Comp: ?, Cost: 1) evalndecrbb2in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_0 - 1, Ar_1)) (Comp: ?, Cost: 1) evalndecrbb3in(Ar_0, Ar_1) -> Com_1(evalndecrstop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalndecrstart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 A polynomial rank function with Pol(evalndecrstart) = 2 Pol(evalndecrbb0in) = 2 Pol(evalndecrbb1in) = 2 Pol(evalndecrbb2in) = 2 Pol(evalndecrbb3in) = 1 Pol(evalndecrstop) = 0 Pol(koat_start) = 2 orients all transitions weakly and the transitions evalndecrbb3in(Ar_0, Ar_1) -> Com_1(evalndecrstop(Ar_0, Ar_1)) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb3in(Ar_0, Ar_1)) [ 1 >= Ar_0 ] strictly and produces the following problem: 3: T: (Comp: 1, Cost: 1) evalndecrstart(Ar_0, Ar_1) -> Com_1(evalndecrbb0in(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalndecrbb0in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_1 - 1, Ar_1)) (Comp: ?, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb2in(Ar_0, Ar_1)) [ Ar_0 >= 2 ] (Comp: 2, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb3in(Ar_0, Ar_1)) [ 1 >= Ar_0 ] (Comp: ?, Cost: 1) evalndecrbb2in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_0 - 1, Ar_1)) (Comp: 2, Cost: 1) evalndecrbb3in(Ar_0, Ar_1) -> Com_1(evalndecrstop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalndecrstart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 A polynomial rank function with Pol(evalndecrstart) = V_2 Pol(evalndecrbb0in) = V_2 Pol(evalndecrbb1in) = V_1 + 1 Pol(evalndecrbb2in) = V_1 Pol(evalndecrbb3in) = V_1 Pol(evalndecrstop) = V_1 Pol(koat_start) = V_2 orients all transitions weakly and the transition evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb2in(Ar_0, Ar_1)) [ Ar_0 >= 2 ] strictly and produces the following problem: 4: T: (Comp: 1, Cost: 1) evalndecrstart(Ar_0, Ar_1) -> Com_1(evalndecrbb0in(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalndecrbb0in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_1 - 1, Ar_1)) (Comp: Ar_1, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb2in(Ar_0, Ar_1)) [ Ar_0 >= 2 ] (Comp: 2, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb3in(Ar_0, Ar_1)) [ 1 >= Ar_0 ] (Comp: ?, Cost: 1) evalndecrbb2in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_0 - 1, Ar_1)) (Comp: 2, Cost: 1) evalndecrbb3in(Ar_0, Ar_1) -> Com_1(evalndecrstop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalndecrstart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Repeatedly propagating knowledge in problem 4 produces the following problem: 5: T: (Comp: 1, Cost: 1) evalndecrstart(Ar_0, Ar_1) -> Com_1(evalndecrbb0in(Ar_0, Ar_1)) (Comp: 1, Cost: 1) evalndecrbb0in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_1 - 1, Ar_1)) (Comp: Ar_1, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb2in(Ar_0, Ar_1)) [ Ar_0 >= 2 ] (Comp: 2, Cost: 1) evalndecrbb1in(Ar_0, Ar_1) -> Com_1(evalndecrbb3in(Ar_0, Ar_1)) [ 1 >= Ar_0 ] (Comp: Ar_1, Cost: 1) evalndecrbb2in(Ar_0, Ar_1) -> Com_1(evalndecrbb1in(Ar_0 - 1, Ar_1)) (Comp: 2, Cost: 1) evalndecrbb3in(Ar_0, Ar_1) -> Com_1(evalndecrstop(Ar_0, Ar_1)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1) -> Com_1(evalndecrstart(Ar_0, Ar_1)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Complexity upper bound 2*Ar_1 + 6 Time: 0.035 sec (SMT: 0.028 sec) ---------------------------------------- (2) BOUNDS(1, n^1)