0.05/0.28 WORST_CASE(?,O(n^1)) 0.05/0.28 0.05/0.28 Preprocessing Cost Relations 0.05/0.28 ===================================== 0.05/0.28 0.05/0.28 #### Computed strongly connected components 0.05/0.28 0. recursive : [eval_foo_bb2_in/5,eval_foo_bb3_in/5] 0.05/0.28 1. recursive : [eval_foo_bb1_in/3,eval_foo_bb2_in_loop_cont/4] 0.05/0.28 2. non_recursive : [eval_foo_stop/1] 0.05/0.28 3. non_recursive : [eval_foo_bb4_in/1] 0.05/0.28 4. non_recursive : [eval_foo_bb1_in_loop_cont/2] 0.05/0.28 5. non_recursive : [eval_foo_bb0_in/3] 0.05/0.28 6. non_recursive : [eval_foo_start/4] 0.05/0.28 0.05/0.28 #### Obtained direct recursion through partial evaluation 0.05/0.28 0. SCC is partially evaluated into eval_foo_bb2_in/5 0.05/0.28 1. SCC is partially evaluated into eval_foo_bb1_in/3 0.05/0.28 2. SCC is completely evaluated into other SCCs 0.05/0.28 3. SCC is completely evaluated into other SCCs 0.05/0.28 4. SCC is completely evaluated into other SCCs 0.05/0.28 5. SCC is partially evaluated into eval_foo_bb0_in/3 0.05/0.28 6. SCC is partially evaluated into eval_foo_start/4 0.05/0.28 0.05/0.28 Control-Flow Refinement of Cost Relations 0.05/0.28 ===================================== 0.05/0.28 0.05/0.28 ### Specialization of cost equations eval_foo_bb2_in/5 0.05/0.28 * CE 9 is refined into CE [10] 0.05/0.28 * CE 8 is refined into CE [11] 0.05/0.28 0.05/0.28 0.05/0.28 ### Cost equations --> "Loop" of eval_foo_bb2_in/5 0.05/0.28 * CEs [11] --> Loop 10 0.05/0.28 * CEs [10] --> Loop 11 0.05/0.28 0.05/0.28 ### Ranking functions of CR eval_foo_bb2_in(V__13,V__1,V__0,B,C) 0.05/0.28 * RF of phase [10]: [V__0,-V__13+V__0+1] 0.05/0.28 0.05/0.28 #### Partial ranking functions of CR eval_foo_bb2_in(V__13,V__1,V__0,B,C) 0.05/0.28 * Partial RF of phase [10]: 0.05/0.28 - RF of loop [10:1]: 0.05/0.28 V__0 0.05/0.28 -V__13+V__0+1 0.05/0.28 0.05/0.28 0.05/0.28 ### Specialization of cost equations eval_foo_bb1_in/3 0.05/0.28 * CE 7 is refined into CE [12] 0.05/0.28 * CE 6 is refined into CE [13,14] 0.05/0.28 0.05/0.28 0.05/0.28 ### Cost equations --> "Loop" of eval_foo_bb1_in/3 0.05/0.28 * CEs [14] --> Loop 12 0.05/0.28 * CEs [13] --> Loop 13 0.05/0.28 * CEs [12] --> Loop 14 0.05/0.28 0.05/0.28 ### Ranking functions of CR eval_foo_bb1_in(V__13,V__1,B) 0.05/0.28 * RF of phase [12]: [V__13] 0.05/0.28 0.05/0.28 #### Partial ranking functions of CR eval_foo_bb1_in(V__13,V__1,B) 0.05/0.28 * Partial RF of phase [12]: 0.05/0.28 - RF of loop [12:1]: 0.05/0.28 V__13 0.05/0.28 0.05/0.28 0.05/0.28 ### Specialization of cost equations eval_foo_bb0_in/3 0.05/0.28 * CE 5 is refined into CE [15,16,17,18] 0.05/0.28 * CE 4 is refined into CE [19,20,21] 0.05/0.28 * CE 3 is refined into CE [22,23,24] 0.05/0.28 * CE 2 is refined into CE [25,26] 0.05/0.28 0.05/0.28 0.05/0.28 ### Cost equations --> "Loop" of eval_foo_bb0_in/3 0.05/0.28 * CEs [17] --> Loop 15 0.05/0.28 * CEs [23] --> Loop 16 0.05/0.28 * CEs [18] --> Loop 17 0.05/0.28 * CEs [21] --> Loop 18 0.05/0.28 * CEs [20] --> Loop 19 0.05/0.28 * CEs [25] --> Loop 20 0.05/0.28 * CEs [24] --> Loop 21 0.05/0.28 * CEs [26] --> Loop 22 0.05/0.28 * CEs [15] --> Loop 23 0.05/0.28 * CEs [22] --> Loop 24 0.05/0.28 * CEs [16] --> Loop 25 0.05/0.28 * CEs [19] --> Loop 26 0.05/0.28 0.05/0.28 ### Ranking functions of CR eval_foo_bb0_in(V_x,V_y,B) 0.05/0.28 0.05/0.28 #### Partial ranking functions of CR eval_foo_bb0_in(V_x,V_y,B) 0.05/0.28 0.05/0.28 0.05/0.28 ### Specialization of cost equations eval_foo_start/4 0.05/0.28 * CE 1 is refined into CE [27,28,29,30,31,32,33,34,35,36,37,38] 0.05/0.28 0.05/0.28 0.05/0.28 ### Cost equations --> "Loop" of eval_foo_start/4 0.05/0.28 * CEs [38] --> Loop 27 0.05/0.28 * CEs [37] --> Loop 28 0.05/0.28 * CEs [36] --> Loop 29 0.05/0.28 * CEs [35] --> Loop 30 0.05/0.28 * CEs [34] --> Loop 31 0.05/0.28 * CEs [33] --> Loop 32 0.05/0.28 * CEs [32] --> Loop 33 0.05/0.28 * CEs [31] --> Loop 34 0.05/0.28 * CEs [30] --> Loop 35 0.05/0.28 * CEs [29] --> Loop 36 0.05/0.28 * CEs [28] --> Loop 37 0.05/0.28 * CEs [27] --> Loop 38 0.05/0.28 0.05/0.28 ### Ranking functions of CR eval_foo_start(V_r,V_x,V_y,B) 0.05/0.28 0.05/0.28 #### Partial ranking functions of CR eval_foo_start(V_r,V_x,V_y,B) 0.05/0.28 0.05/0.28 0.05/0.28 Computing Bounds 0.05/0.28 ===================================== 0.05/0.28 0.05/0.28 #### Cost of chains of eval_foo_bb2_in(V__13,V__1,V__0,B,C): 0.05/0.28 * Chain [[10],11]: 1*it(10)+0 0.05/0.28 Such that:it(10) =< -V__13+V__0+1 0.05/0.28 0.05/0.28 with precondition: [B=2,C>=0,V__1>=V__0,V__13>=C+1,V__0>=V__13+C] 0.05/0.28 0.05/0.28 * Chain [11]: 0 0.05/0.28 with precondition: [B=2,V__0=C,V__0>=0,V__13>=V__0+1,V__1>=V__0] 0.05/0.28 0.05/0.28 0.05/0.28 #### Cost of chains of eval_foo_bb1_in(V__13,V__1,B): 0.05/0.28 * Chain [[12],14]: 1*it(12)+1*s(3)+0 0.05/0.28 Such that:it(12) =< V__13 0.05/0.28 s(3) =< V__13+V__1 0.05/0.28 0.05/0.28 with precondition: [B=3,V__13>=1,V__1>=V__13] 0.05/0.28 0.05/0.28 * Chain [14]: 0 0.05/0.28 with precondition: [V__13=0,B=3,V__1>=0] 0.05/0.28 0.05/0.28 * Chain [13,[12],14]: 1*it(12)+1*s(3)+1 0.05/0.28 Such that:s(3) =< V__13+V__1 0.05/0.28 it(12) =< V__1 0.05/0.28 0.05/0.28 with precondition: [B=3,V__1>=1,V__13>=V__1+1] 0.05/0.28 0.05/0.28 * Chain [13,14]: 1 0.05/0.28 with precondition: [V__1=0,B=3,V__13>=1] 0.05/0.28 0.05/0.28 0.05/0.28 #### Cost of chains of eval_foo_bb0_in(V_x,V_y,B): 0.05/0.28 * Chain [26]: 1 0.05/0.28 with precondition: [V_x=0,0>=V_y+1] 0.05/0.28 0.05/0.28 * Chain [25]: 1 0.05/0.28 with precondition: [V_x=0,V_y>=1] 0.05/0.28 0.05/0.28 * Chain [24]: 0 0.05/0.28 with precondition: [V_y=0,0>=V_x+1] 0.05/0.28 0.05/0.28 * Chain [23]: 0 0.05/0.28 with precondition: [V_y=0,V_x>=0] 0.05/0.28 0.05/0.28 * Chain [22]: 1*s(4)+1*s(5)+1 0.05/0.28 Such that:s(5) =< -V_x 0.05/0.28 s(4) =< -V_x-V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_x+1,V_x>=V_y+1] 0.05/0.28 0.05/0.28 * Chain [21]: 1*s(6)+1*s(7)+1 0.05/0.28 Such that:s(7) =< -V_x 0.05/0.28 s(6) =< -V_x+V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_x+1,V_x+V_y>=1] 0.05/0.28 0.05/0.28 * Chain [20]: 1*s(8)+1*s(9)+0 0.05/0.28 Such that:s(9) =< -V_x-V_y 0.05/0.28 s(8) =< -V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_y+1,V_y>=V_x] 0.05/0.28 0.05/0.28 * Chain [19]: 1*s(10)+1*s(11)+0 0.05/0.28 Such that:s(11) =< V_x-V_y 0.05/0.28 s(10) =< -V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_y+1,V_x+V_y>=0] 0.05/0.28 0.05/0.28 * Chain [18]: 1*s(12)+1*s(13)+1 0.05/0.28 Such that:s(13) =< V_x 0.05/0.28 s(12) =< V_x-V_y 0.05/0.28 0.05/0.28 with precondition: [V_x>=1,0>=V_x+V_y+1] 0.05/0.28 0.05/0.28 * Chain [17]: 1*s(14)+1*s(15)+1 0.05/0.28 Such that:s(15) =< V_x 0.05/0.28 s(14) =< V_x+V_y 0.05/0.28 0.05/0.28 with precondition: [V_x>=1,V_y>=V_x+1] 0.05/0.28 0.05/0.28 * Chain [16]: 1*s(16)+1*s(17)+0 0.05/0.28 Such that:s(17) =< -V_x+V_y 0.05/0.28 s(16) =< V_y 0.05/0.28 0.05/0.28 with precondition: [V_y>=1,0>=V_x+V_y] 0.05/0.28 0.05/0.28 * Chain [15]: 1*s(18)+1*s(19)+0 0.05/0.28 Such that:s(19) =< V_x+V_y 0.05/0.28 s(18) =< V_y 0.05/0.28 0.05/0.28 with precondition: [V_y>=1,V_x>=V_y] 0.05/0.28 0.05/0.28 0.05/0.28 #### Cost of chains of eval_foo_start(V_r,V_x,V_y,B): 0.05/0.28 * Chain [38]: 1 0.05/0.28 with precondition: [V_x=0,0>=V_y+1] 0.05/0.28 0.05/0.28 * Chain [37]: 1 0.05/0.28 with precondition: [V_x=0,V_y>=1] 0.05/0.28 0.05/0.28 * Chain [36]: 0 0.05/0.28 with precondition: [V_y=0,0>=V_x+1] 0.05/0.28 0.05/0.28 * Chain [35]: 0 0.05/0.28 with precondition: [V_y=0,V_x>=0] 0.05/0.28 0.05/0.28 * Chain [34]: 1*s(20)+1*s(21)+1 0.05/0.28 Such that:s(20) =< -V_x 0.05/0.28 s(21) =< -V_x-V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_x+1,V_x>=V_y+1] 0.05/0.28 0.05/0.28 * Chain [33]: 1*s(22)+1*s(23)+1 0.05/0.28 Such that:s(22) =< -V_x 0.05/0.28 s(23) =< -V_x+V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_x+1,V_x+V_y>=1] 0.05/0.28 0.05/0.28 * Chain [32]: 1*s(24)+1*s(25)+0 0.05/0.28 Such that:s(24) =< -V_x-V_y 0.05/0.28 s(25) =< -V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_y+1,V_y>=V_x] 0.05/0.28 0.05/0.28 * Chain [31]: 1*s(26)+1*s(27)+0 0.05/0.28 Such that:s(26) =< V_x-V_y 0.05/0.28 s(27) =< -V_y 0.05/0.28 0.05/0.28 with precondition: [0>=V_y+1,V_x+V_y>=0] 0.05/0.28 0.05/0.28 * Chain [30]: 1*s(28)+1*s(29)+1 0.05/0.28 Such that:s(28) =< V_x 0.05/0.28 s(29) =< V_x-V_y 0.05/0.28 0.05/0.28 with precondition: [V_x>=1,0>=V_x+V_y+1] 0.05/0.28 0.05/0.28 * Chain [29]: 1*s(30)+1*s(31)+1 0.05/0.28 Such that:s(30) =< V_x 0.05/0.28 s(31) =< V_x+V_y 0.05/0.28 0.05/0.28 with precondition: [V_x>=1,V_y>=V_x+1] 0.05/0.28 0.05/0.28 * Chain [28]: 1*s(32)+1*s(33)+0 0.05/0.28 Such that:s(32) =< -V_x+V_y 0.05/0.28 s(33) =< V_y 0.05/0.28 0.05/0.28 with precondition: [V_y>=1,0>=V_x+V_y] 0.05/0.28 0.05/0.28 * Chain [27]: 1*s(34)+1*s(35)+0 0.05/0.28 Such that:s(34) =< V_x+V_y 0.05/0.28 s(35) =< V_y 0.05/0.28 0.05/0.28 with precondition: [V_y>=1,V_x>=V_y] 0.05/0.28 0.05/0.28 0.05/0.28 Closed-form bounds of eval_foo_start(V_r,V_x,V_y,B): 0.05/0.28 ------------------------------------- 0.05/0.28 * Chain [38] with precondition: [V_x=0,0>=V_y+1] 0.05/0.28 - Upper bound: 1 0.05/0.28 - Complexity: constant 0.05/0.28 * Chain [37] with precondition: [V_x=0,V_y>=1] 0.05/0.28 - Upper bound: 1 0.05/0.28 - Complexity: constant 0.05/0.28 * Chain [36] with precondition: [V_y=0,0>=V_x+1] 0.05/0.28 - Upper bound: 0 0.05/0.28 - Complexity: constant 0.05/0.28 * Chain [35] with precondition: [V_y=0,V_x>=0] 0.05/0.28 - Upper bound: 0 0.05/0.28 - Complexity: constant 0.05/0.28 * Chain [34] with precondition: [0>=V_x+1,V_x>=V_y+1] 0.05/0.28 - Upper bound: -2*V_x-V_y+1 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [33] with precondition: [0>=V_x+1,V_x+V_y>=1] 0.05/0.28 - Upper bound: -2*V_x+V_y+1 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [32] with precondition: [0>=V_y+1,V_y>=V_x] 0.05/0.28 - Upper bound: -V_x-2*V_y 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [31] with precondition: [0>=V_y+1,V_x+V_y>=0] 0.05/0.28 - Upper bound: V_x-2*V_y 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [30] with precondition: [V_x>=1,0>=V_x+V_y+1] 0.05/0.28 - Upper bound: 2*V_x-V_y+1 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [29] with precondition: [V_x>=1,V_y>=V_x+1] 0.05/0.28 - Upper bound: 2*V_x+V_y+1 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [28] with precondition: [V_y>=1,0>=V_x+V_y] 0.05/0.28 - Upper bound: -V_x+2*V_y 0.05/0.28 - Complexity: n 0.05/0.28 * Chain [27] with precondition: [V_y>=1,V_x>=V_y] 0.05/0.28 - Upper bound: V_x+2*V_y 0.05/0.28 - Complexity: n 0.05/0.28 0.05/0.28 ### Maximum cost of eval_foo_start(V_r,V_x,V_y,B): max([max([max([max([1,nat(-V_y)+max([nat(V_x-V_y),nat(-V_x-V_y)])]),nat(-V_x)+1+max([nat(-V_x+V_y),nat(-V_x-V_y)])]),nat(V_y)+max([nat(V_x+V_y),nat(-V_x+V_y)])]),nat(V_x)+1+max([nat(V_x+V_y),nat(V_x-V_y)])]) 0.05/0.28 Asymptotic class: n 0.05/0.28 * Total analysis performed in 205 ms. 0.05/0.28 0.05/0.38 EOF