/export/starexec/sandbox/solver/bin/starexec_run_c_complexity /export/starexec/sandbox/benchmark/theBenchmark.c /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(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, 1). (0) CpxIntTrs (1) Koat Proof [FINISHED, 52 ms] (2) BOUNDS(1, 1) ---------------------------------------- (0) Obligation: Complexity Int TRS consisting of the following rules: eval_foo_start(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb0_in(v_., v_.2, v_i, v_x, v_y)) :|: TRUE eval_foo_bb0_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb1_in(1, 0, v_i, v_x, v_y)) :|: v_i > 10 eval_foo_bb0_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb1_in(1, 1, v_i, v_x, v_y)) :|: v_i > 10 && v_i <= 10 eval_foo_bb0_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb1_in(0, 0, v_i, v_x, v_y)) :|: v_i <= 10 && v_i > 10 eval_foo_bb0_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb1_in(0, 1, v_i, v_x, v_y)) :|: v_i <= 10 eval_foo_bb1_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb1_in(v_., v_.2, v_i, v_x, v_y)) :|: v_. >= v_.2 && v_. <= v_.2 eval_foo_bb1_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb2_in(v_., v_.2, v_i, v_x, v_y)) :|: v_. < v_.2 eval_foo_bb1_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_bb2_in(v_., v_.2, v_i, v_x, v_y)) :|: v_. > v_.2 eval_foo_bb2_in(v_., v_.2, v_i, v_x, v_y) -> Com_1(eval_foo_stop(v_., v_.2, v_i, v_x, v_y)) :|: TRUE The start-symbols are:[eval_foo_start_5] ---------------------------------------- (1) Koat Proof (FINISHED) YES(?, 7) Initial complexity problem: 1: T: (Comp: ?, Cost: 1) evalfoostart(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb0in(Ar_0, Ar_1, Ar_2)) (Comp: ?, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 1, 0)) [ Ar_0 >= 11 ] (Comp: ?, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 1, 1)) [ Ar_0 >= 11 /\ 10 >= Ar_0 ] (Comp: ?, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 0, 0)) [ 10 >= Ar_0 /\ Ar_0 >= 11 ] (Comp: ?, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 0, 1)) [ 10 >= Ar_0 ] (Comp: ?, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, Ar_1, Ar_2)) [ Ar_1 = Ar_2 ] (Comp: ?, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb2in(Ar_0, Ar_1, Ar_2)) [ Ar_2 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb2in(Ar_0, Ar_1, Ar_2)) [ Ar_1 >= Ar_2 + 1 ] (Comp: ?, Cost: 1) evalfoobb2in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoostop(Ar_0, Ar_1, Ar_2)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoostart(Ar_0, Ar_1, Ar_2)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Testing for reachability in the complexity graph removes the following transitions from problem 1: evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 1, 1)) [ Ar_0 >= 11 /\ 10 >= Ar_0 ] evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 0, 0)) [ 10 >= Ar_0 /\ Ar_0 >= 11 ] evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, Ar_1, Ar_2)) [ Ar_1 = Ar_2 ] We thus obtain the following problem: 2: T: (Comp: ?, Cost: 1) evalfoobb2in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoostop(Ar_0, Ar_1, Ar_2)) (Comp: ?, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb2in(Ar_0, Ar_1, Ar_2)) [ Ar_2 >= Ar_1 + 1 ] (Comp: ?, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb2in(Ar_0, Ar_1, Ar_2)) [ Ar_1 >= Ar_2 + 1 ] (Comp: ?, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 0, 1)) [ 10 >= Ar_0 ] (Comp: ?, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 1, 0)) [ Ar_0 >= 11 ] (Comp: ?, Cost: 1) evalfoostart(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb0in(Ar_0, Ar_1, Ar_2)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoostart(Ar_0, Ar_1, Ar_2)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Repeatedly propagating knowledge in problem 2 produces the following problem: 3: T: (Comp: 2, Cost: 1) evalfoobb2in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoostop(Ar_0, Ar_1, Ar_2)) (Comp: 1, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb2in(Ar_0, Ar_1, Ar_2)) [ Ar_2 >= Ar_1 + 1 ] (Comp: 1, Cost: 1) evalfoobb1in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb2in(Ar_0, Ar_1, Ar_2)) [ Ar_1 >= Ar_2 + 1 ] (Comp: 1, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 0, 1)) [ 10 >= Ar_0 ] (Comp: 1, Cost: 1) evalfoobb0in(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb1in(Ar_0, 1, 0)) [ Ar_0 >= 11 ] (Comp: 1, Cost: 1) evalfoostart(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoobb0in(Ar_0, Ar_1, Ar_2)) (Comp: 1, Cost: 0) koat_start(Ar_0, Ar_1, Ar_2) -> Com_1(evalfoostart(Ar_0, Ar_1, Ar_2)) [ 0 <= 0 ] start location: koat_start leaf cost: 0 Complexity upper bound 7 Time: 0.030 sec (SMT: 0.025 sec) ---------------------------------------- (2) BOUNDS(1, 1)