0.04/0.33 WORST_CASE(?,O(n^2)) 0.04/0.33 0.04/0.33 Preprocessing Cost Relations 0.04/0.33 ===================================== 0.04/0.33 0.04/0.33 #### Computed strongly connected components 0.04/0.33 0. recursive : [eval_foo_bb1_in/3,eval_foo_bb2_in/3] 0.04/0.33 1. non_recursive : [eval_foo_stop/1] 0.04/0.33 2. non_recursive : [eval_foo_bb3_in/1] 0.04/0.33 3. non_recursive : [eval_foo_bb1_in_loop_cont/2] 0.04/0.33 4. non_recursive : [eval_foo_bb0_in/3] 0.04/0.33 5. non_recursive : [eval_foo_start/3] 0.04/0.33 0.04/0.33 #### Obtained direct recursion through partial evaluation 0.04/0.33 0. SCC is partially evaluated into eval_foo_bb1_in/3 0.04/0.33 1. SCC is completely evaluated into other SCCs 0.04/0.33 2. SCC is completely evaluated into other SCCs 0.04/0.33 3. SCC is completely evaluated into other SCCs 0.04/0.33 4. SCC is partially evaluated into eval_foo_bb0_in/3 0.04/0.33 5. SCC is partially evaluated into eval_foo_start/3 0.04/0.33 0.04/0.33 Control-Flow Refinement of Cost Relations 0.04/0.33 ===================================== 0.04/0.33 0.04/0.33 ### Specialization of cost equations eval_foo_bb1_in/3 0.04/0.33 * CE 5 is refined into CE [6] 0.04/0.33 * CE 3 is refined into CE [7] 0.04/0.33 * CE 4 is refined into CE [8] 0.04/0.33 0.04/0.33 0.04/0.33 ### Cost equations --> "Loop" of eval_foo_bb1_in/3 0.04/0.33 * CEs [7] --> Loop 6 0.04/0.33 * CEs [8] --> Loop 7 0.04/0.33 * CEs [6] --> Loop 8 0.04/0.33 0.04/0.33 ### Ranking functions of CR eval_foo_bb1_in(V__01,V__0,B) 0.04/0.33 0.04/0.33 #### Partial ranking functions of CR eval_foo_bb1_in(V__01,V__0,B) 0.04/0.33 * Partial RF of phase [6,7]: 0.04/0.33 - RF of loop [6:1]: 0.04/0.33 V__0+1 depends on loops [7:1] 0.04/0.33 -V__01/2 depends on loops [7:1] 0.04/0.33 - RF of loop [7:1]: 0.04/0.33 V__01+1 depends on loops [6:1] 0.04/0.33 V__01+2*V__0+1 0.04/0.33 0.04/0.33 0.04/0.33 ### Specialization of cost equations eval_foo_bb0_in/3 0.04/0.33 * CE 2 is refined into CE [9,10] 0.04/0.33 0.04/0.33 0.04/0.33 ### Cost equations --> "Loop" of eval_foo_bb0_in/3 0.04/0.33 * CEs [10] --> Loop 9 0.04/0.33 * CEs [9] --> Loop 10 0.04/0.33 0.04/0.33 ### Ranking functions of CR eval_foo_bb0_in(V_a,V_b,B) 0.04/0.33 0.04/0.33 #### Partial ranking functions of CR eval_foo_bb0_in(V_a,V_b,B) 0.04/0.33 0.04/0.33 0.04/0.33 ### Specialization of cost equations eval_foo_start/3 0.04/0.33 * CE 1 is refined into CE [11,12] 0.04/0.33 0.04/0.33 0.04/0.33 ### Cost equations --> "Loop" of eval_foo_start/3 0.04/0.33 * CEs [12] --> Loop 11 0.04/0.33 * CEs [11] --> Loop 12 0.04/0.33 0.04/0.33 ### Ranking functions of CR eval_foo_start(V_a,V_b,B) 0.04/0.33 0.04/0.33 #### Partial ranking functions of CR eval_foo_start(V_a,V_b,B) 0.04/0.33 0.04/0.33 0.04/0.33 Computing Bounds 0.04/0.33 ===================================== 0.04/0.33 0.04/0.33 #### Cost of chains of eval_foo_bb1_in(V__01,V__0,B): 0.04/0.33 * Chain [[6,7],8]: 1*it(6)+1*it(7)+0 0.04/0.33 Such that:aux(29) =< V__01+2*V__0 0.04/0.33 it(7) =< V__01+2*V__0+1 0.04/0.33 aux(52) =< V__01+2*V__0+1/2 0.04/0.33 aux(2) =< -V__01/2 0.04/0.33 aux(4) =< V__0+1 0.04/0.33 aux(50) =< aux(29) 0.04/0.33 aux(42) =< aux(29)+1/2 0.04/0.33 aux(1) =< it(7)*aux(52) 0.04/0.33 aux(3) =< it(7)*aux(50) 0.04/0.33 aux(1) =< it(7)*aux(42) 0.04/0.33 aux(3) =< it(7)*aux(29) 0.04/0.33 it(6) =< aux(3)+aux(4) 0.04/0.33 it(6) =< aux(1)+aux(2) 0.04/0.33 0.04/0.33 with precondition: [B=2,V__0>=0] 0.04/0.33 0.04/0.33 * Chain [8]: 0 0.04/0.33 with precondition: [B=2,0>=V__0+1] 0.04/0.33 0.04/0.33 0.04/0.33 #### Cost of chains of eval_foo_bb0_in(V_a,V_b,B): 0.04/0.33 * Chain [10]: 0 0.04/0.33 with precondition: [0>=V_a+1] 0.04/0.33 0.04/0.33 * Chain [9]: 1*s(2)+1*s(10)+0 0.04/0.33 Such that:s(5) =< V_a+1 0.04/0.33 s(1) =< 2*V_a+V_b 0.04/0.33 s(2) =< 2*V_a+V_b+1 0.04/0.33 s(3) =< 2*V_a+V_b+1/2 0.04/0.33 s(4) =< -V_b/2 0.04/0.33 s(6) =< s(1) 0.04/0.33 s(7) =< s(1)+1/2 0.04/0.33 s(8) =< s(2)*s(3) 0.04/0.33 s(9) =< s(2)*s(6) 0.04/0.33 s(8) =< s(2)*s(7) 0.04/0.33 s(9) =< s(2)*s(1) 0.04/0.33 s(10) =< s(9)+s(5) 0.04/0.33 s(10) =< s(8)+s(4) 0.04/0.33 0.04/0.33 with precondition: [V_a>=0] 0.04/0.33 0.04/0.33 0.04/0.33 #### Cost of chains of eval_foo_start(V_a,V_b,B): 0.04/0.33 * Chain [12]: 0 0.04/0.33 with precondition: [0>=V_a+1] 0.04/0.33 0.04/0.33 * Chain [11]: 1*s(13)+1*s(20)+0 0.04/0.33 Such that:s(11) =< V_a+1 0.04/0.33 s(12) =< 2*V_a+V_b 0.04/0.33 s(13) =< 2*V_a+V_b+1 0.04/0.33 s(14) =< 2*V_a+V_b+1/2 0.04/0.33 s(15) =< -V_b/2 0.04/0.33 s(16) =< s(12) 0.04/0.33 s(17) =< s(12)+1/2 0.04/0.33 s(18) =< s(13)*s(14) 0.04/0.33 s(19) =< s(13)*s(16) 0.04/0.33 s(18) =< s(13)*s(17) 0.04/0.33 s(19) =< s(13)*s(12) 0.04/0.33 s(20) =< s(19)+s(11) 0.04/0.33 s(20) =< s(18)+s(15) 0.04/0.33 0.04/0.33 with precondition: [V_a>=0] 0.04/0.33 0.04/0.33 0.04/0.33 Closed-form bounds of eval_foo_start(V_a,V_b,B): 0.04/0.33 ------------------------------------- 0.04/0.33 * Chain [12] with precondition: [0>=V_a+1] 0.04/0.33 - Upper bound: 0 0.04/0.33 - Complexity: constant 0.04/0.33 * Chain [11] with precondition: [V_a>=0] 0.04/0.33 - Upper bound: V_a+1+nat(2*V_a+V_b+1)*nat(2*V_a+V_b)+nat(2*V_a+V_b+1) 0.04/0.33 - Complexity: n^2 0.04/0.33 0.04/0.33 ### Maximum cost of eval_foo_start(V_a,V_b,B): nat(2*V_a+V_b+1)*nat(2*V_a+V_b)+nat(V_a+1)+nat(2*V_a+V_b+1) 0.04/0.33 Asymptotic class: n^2 0.04/0.33 * Total analysis performed in 226 ms. 0.04/0.33 0.04/0.43 EOF