0.05/0.37 WORST_CASE(?,O(n^4)) 0.05/0.37 0.05/0.37 Preprocessing Cost Relations 0.05/0.37 ===================================== 0.05/0.37 0.05/0.37 #### Computed strongly connected components 0.05/0.37 0. recursive : [eval_textbook_ex3_bb4_in/4,eval_textbook_ex3_bb5_in/4] 0.05/0.37 1. recursive : [eval_textbook_ex3_bb3_in/5,eval_textbook_ex3_bb4_in_loop_cont/6] 0.05/0.37 2. recursive : [eval_textbook_ex3_bb2_in/5,eval_textbook_ex3_bb3_in_loop_cont/8,eval_textbook_ex3_bb6_in/7] 0.05/0.37 3. recursive : [eval_textbook_ex3_bb1_in/3,eval_textbook_ex3_bb2_in_loop_cont/5,eval_textbook_ex3_bb7_in/4] 0.05/0.37 4. non_recursive : [eval_textbook_ex3_stop/1] 0.05/0.37 5. non_recursive : [eval_textbook_ex3_bb8_in/1] 0.05/0.37 6. non_recursive : [eval_textbook_ex3_bb1_in_loop_cont/2] 0.05/0.37 7. non_recursive : [eval_textbook_ex3_bb0_in/2] 0.05/0.37 8. non_recursive : [eval_textbook_ex3_start/2] 0.05/0.37 0.05/0.37 #### Obtained direct recursion through partial evaluation 0.05/0.37 0. SCC is partially evaluated into eval_textbook_ex3_bb4_in/4 0.05/0.37 1. SCC is partially evaluated into eval_textbook_ex3_bb3_in/5 0.05/0.37 2. SCC is partially evaluated into eval_textbook_ex3_bb2_in/5 0.05/0.37 3. SCC is partially evaluated into eval_textbook_ex3_bb1_in/3 0.05/0.37 4. SCC is completely evaluated into other SCCs 0.05/0.37 5. SCC is completely evaluated into other SCCs 0.05/0.37 6. SCC is completely evaluated into other SCCs 0.05/0.37 7. SCC is partially evaluated into eval_textbook_ex3_bb0_in/2 0.05/0.37 8. SCC is partially evaluated into eval_textbook_ex3_start/2 0.05/0.37 0.05/0.37 Control-Flow Refinement of Cost Relations 0.05/0.37 ===================================== 0.05/0.37 0.05/0.37 ### Specialization of cost equations eval_textbook_ex3_bb4_in/4 0.05/0.37 * CE 10 is refined into CE [11] 0.05/0.37 * CE 9 is refined into CE [12] 0.05/0.37 0.05/0.37 0.05/0.37 ### Cost equations --> "Loop" of eval_textbook_ex3_bb4_in/4 0.05/0.37 * CEs [12] --> Loop 11 0.05/0.37 * CEs [11] --> Loop 12 0.05/0.37 0.05/0.37 ### Ranking functions of CR eval_textbook_ex3_bb4_in(V_i_0_sink,V_2,V_l_0,B) 0.05/0.37 * RF of phase [11]: [V_2-V_l_0+1,V_i_0_sink-V_l_0+2] 0.05/0.37 0.05/0.37 #### Partial ranking functions of CR eval_textbook_ex3_bb4_in(V_i_0_sink,V_2,V_l_0,B) 0.05/0.37 * Partial RF of phase [11]: 0.05/0.37 - RF of loop [11:1]: 0.05/0.37 V_2-V_l_0+1 0.05/0.37 V_i_0_sink-V_l_0+2 0.05/0.37 0.05/0.37 0.05/0.37 ### Specialization of cost equations eval_textbook_ex3_bb3_in/5 0.05/0.37 * CE 8 is refined into CE [13] 0.05/0.37 * CE 7 is refined into CE [14] 0.05/0.37 0.05/0.37 0.05/0.37 ### Cost equations --> "Loop" of eval_textbook_ex3_bb3_in/5 0.05/0.37 * CEs [14] --> Loop 13 0.05/0.37 * CEs [13] --> Loop 14 0.05/0.37 0.05/0.37 ### Ranking functions of CR eval_textbook_ex3_bb3_in(V_m,V_i_0_sink,B,C,D) 0.05/0.37 * RF of phase [13]: [V_m-V_i_0_sink] 0.05/0.37 0.05/0.37 #### Partial ranking functions of CR eval_textbook_ex3_bb3_in(V_m,V_i_0_sink,B,C,D) 0.05/0.37 * Partial RF of phase [13]: 0.05/0.37 - RF of loop [13:1]: 0.05/0.37 V_m-V_i_0_sink 0.05/0.37 0.05/0.37 0.05/0.37 ### Specialization of cost equations eval_textbook_ex3_bb2_in/5 0.05/0.37 * CE 6 is refined into CE [15] 0.05/0.37 * CE 5 is refined into CE [16,17] 0.05/0.37 0.05/0.37 0.05/0.37 ### Cost equations --> "Loop" of eval_textbook_ex3_bb2_in/5 0.05/0.37 * CEs [17] --> Loop 15 0.05/0.37 * CEs [16] --> Loop 16 0.05/0.37 * CEs [15] --> Loop 17 0.05/0.37 0.05/0.37 ### Ranking functions of CR eval_textbook_ex3_bb2_in(V_m,V_i_0,V_j_0,B,C) 0.05/0.37 * RF of phase [15]: [V_i_0-V_j_0+1,V_m-V_j_0] 0.05/0.37 * RF of phase [16]: [V_i_0-V_j_0+1,V_m-V_j_0+1] 0.05/0.37 0.05/0.37 #### Partial ranking functions of CR eval_textbook_ex3_bb2_in(V_m,V_i_0,V_j_0,B,C) 0.05/0.37 * Partial RF of phase [15]: 0.05/0.37 - RF of loop [15:1]: 0.05/0.37 V_i_0-V_j_0+1 0.05/0.37 V_m-V_j_0 0.05/0.37 * Partial RF of phase [16]: 0.05/0.37 - RF of loop [16:1]: 0.05/0.37 V_i_0-V_j_0+1 0.05/0.37 V_m-V_j_0+1 0.05/0.37 0.05/0.37 0.05/0.37 ### Specialization of cost equations eval_textbook_ex3_bb1_in/3 0.05/0.37 * CE 4 is refined into CE [18] 0.05/0.37 * CE 3 is refined into CE [19,20] 0.05/0.37 0.05/0.37 0.05/0.37 ### Cost equations --> "Loop" of eval_textbook_ex3_bb1_in/3 0.05/0.37 * CEs [20] --> Loop 18 0.05/0.37 * CEs [19] --> Loop 19 0.05/0.37 * CEs [18] --> Loop 20 0.05/0.37 0.05/0.37 ### Ranking functions of CR eval_textbook_ex3_bb1_in(V_m,V_i_0,B) 0.05/0.37 * RF of phase [18]: [V_m-V_i_0] 0.05/0.37 0.05/0.37 #### Partial ranking functions of CR eval_textbook_ex3_bb1_in(V_m,V_i_0,B) 0.05/0.37 * Partial RF of phase [18]: 0.05/0.37 - RF of loop [18:1]: 0.05/0.37 V_m-V_i_0 0.05/0.37 0.05/0.37 0.05/0.37 ### Specialization of cost equations eval_textbook_ex3_bb0_in/2 0.05/0.37 * CE 2 is refined into CE [21,22,23] 0.05/0.37 0.05/0.37 0.05/0.37 ### Cost equations --> "Loop" of eval_textbook_ex3_bb0_in/2 0.05/0.37 * CEs [23] --> Loop 21 0.05/0.37 * CEs [22] --> Loop 22 0.05/0.37 * CEs [21] --> Loop 23 0.05/0.37 0.05/0.37 ### Ranking functions of CR eval_textbook_ex3_bb0_in(V_m,B) 0.05/0.37 0.05/0.37 #### Partial ranking functions of CR eval_textbook_ex3_bb0_in(V_m,B) 0.05/0.37 0.05/0.37 0.05/0.37 ### Specialization of cost equations eval_textbook_ex3_start/2 0.05/0.37 * CE 1 is refined into CE [24,25,26] 0.05/0.37 0.05/0.37 0.05/0.37 ### Cost equations --> "Loop" of eval_textbook_ex3_start/2 0.05/0.37 * CEs [26] --> Loop 24 0.05/0.37 * CEs [25] --> Loop 25 0.05/0.37 * CEs [24] --> Loop 26 0.05/0.37 0.05/0.37 ### Ranking functions of CR eval_textbook_ex3_start(V_m,B) 0.05/0.37 0.05/0.37 #### Partial ranking functions of CR eval_textbook_ex3_start(V_m,B) 0.05/0.37 0.05/0.37 0.05/0.37 Computing Bounds 0.05/0.37 ===================================== 0.05/0.37 0.05/0.37 #### Cost of chains of eval_textbook_ex3_bb4_in(V_i_0_sink,V_2,V_l_0,B): 0.05/0.37 * Chain [[11],12]: 1*it(11)+0 0.05/0.37 Such that:it(11) =< V_i_0_sink-V_l_0+2 0.05/0.37 0.05/0.37 with precondition: [B=2,V_i_0_sink+1=V_2,V_i_0_sink>=1,V_l_0>=1,V_i_0_sink+1>=V_l_0] 0.05/0.37 0.05/0.37 0.05/0.37 #### Cost of chains of eval_textbook_ex3_bb3_in(V_m,V_i_0_sink,B,C,D): 0.05/0.37 * Chain [[13],14]: 1*it(13)+1*s(3)+0 0.05/0.37 Such that:it(13) =< -V_i_0_sink+D 0.05/0.37 aux(1) =< D 0.05/0.37 s(3) =< it(13)*aux(1) 0.05/0.37 0.05/0.37 with precondition: [B=3,V_m=C,V_m+1=D,V_i_0_sink>=1,V_m>=V_i_0_sink+1] 0.05/0.37 0.05/0.37 * Chain [14]: 0 0.05/0.37 with precondition: [B=3,V_i_0_sink=V_m,V_i_0_sink=C,V_i_0_sink+1=D,V_i_0_sink>=1] 0.05/0.37 0.05/0.37 0.05/0.37 #### Cost of chains of eval_textbook_ex3_bb2_in(V_m,V_i_0,V_j_0,B,C): 0.05/0.37 * Chain [[16],17]: 1*it(16)+0 0.05/0.37 Such that:it(16) =< -V_j_0+C 0.05/0.37 0.05/0.37 with precondition: [B=4,V_m=V_i_0,V_m+1=C,V_j_0>=1,V_m>=V_j_0] 0.05/0.37 0.05/0.37 * Chain [[15],17]: 1*it(15)+1*s(10)+1*s(11)+0 0.05/0.37 Such that:s(7) =< V_m+1 0.05/0.37 aux(2) =< V_m-C+2 0.05/0.37 it(15) =< -V_j_0+C 0.05/0.37 s(10) =< it(15)*aux(2) 0.05/0.37 s(11) =< s(10)*s(7) 0.05/0.37 0.05/0.37 with precondition: [B=4,V_i_0+1=C,V_j_0>=1,V_m>=V_i_0+1,V_i_0>=V_j_0] 0.05/0.37 0.05/0.37 0.05/0.37 #### Cost of chains of eval_textbook_ex3_bb1_in(V_m,V_i_0,B): 0.05/0.37 * Chain [[18],19,20]: 1*it(18)+1*s(12)+1*s(23)+1*s(24)+1*s(25)+1 0.05/0.37 Such that:aux(3) =< V_m 0.05/0.37 it(18) =< V_m-V_i_0 0.05/0.37 s(19) =< V_m-V_i_0+1 0.05/0.37 aux(4) =< V_m+1 0.05/0.37 s(12) =< aux(4) 0.05/0.37 aux(3) =< aux(4)-1 0.05/0.37 s(23) =< it(18)*aux(3) 0.05/0.37 s(24) =< s(23)*s(19) 0.05/0.37 s(25) =< s(24)*aux(4) 0.05/0.37 0.05/0.37 with precondition: [B=5,V_i_0>=1,V_m>=V_i_0+1] 0.05/0.37 0.05/0.37 * Chain [20]: 0 0.05/0.37 with precondition: [B=5,V_i_0>=1,V_i_0>=V_m+1] 0.05/0.37 0.05/0.37 * Chain [19,20]: 1*s(12)+1 0.05/0.37 Such that:s(12) =< V_m+1 0.05/0.37 0.05/0.37 with precondition: [B=5,V_m=V_i_0,V_m>=1] 0.05/0.37 0.05/0.37 0.05/0.37 #### Cost of chains of eval_textbook_ex3_bb0_in(V_m,B): 0.05/0.37 * Chain [23]: 1*s(26)+1 0.05/0.37 Such that:s(26) =< 2 0.05/0.37 0.05/0.37 with precondition: [V_m=1] 0.05/0.37 0.05/0.37 * Chain [22]: 0 0.05/0.37 with precondition: [0>=V_m] 0.05/0.37 0.05/0.37 * Chain [21]: 1*s(28)+1*s(31)+1*s(32)+1*s(33)+1*s(34)+1 0.05/0.37 Such that:s(30) =< V_m+1 0.05/0.37 aux(5) =< V_m 0.05/0.37 s(27) =< aux(5) 0.05/0.37 s(28) =< aux(5) 0.05/0.37 s(31) =< s(30) 0.05/0.37 s(27) =< s(30)-1 0.05/0.37 s(32) =< s(28)*s(27) 0.05/0.37 s(33) =< s(32)*aux(5) 0.05/0.37 s(34) =< s(33)*s(30) 0.05/0.37 0.05/0.37 with precondition: [V_m>=2] 0.05/0.37 0.05/0.37 0.05/0.37 #### Cost of chains of eval_textbook_ex3_start(V_m,B): 0.05/0.37 * Chain [26]: 1*s(35)+1 0.05/0.37 Such that:s(35) =< 2 0.05/0.37 0.05/0.37 with precondition: [V_m=1] 0.05/0.37 0.05/0.37 * Chain [25]: 0 0.05/0.37 with precondition: [0>=V_m] 0.05/0.37 0.05/0.37 * Chain [24]: 1*s(39)+1*s(40)+1*s(41)+1*s(42)+1*s(43)+1 0.05/0.37 Such that:s(37) =< V_m 0.05/0.37 s(36) =< V_m+1 0.05/0.37 s(38) =< s(37) 0.05/0.37 s(39) =< s(37) 0.05/0.37 s(40) =< s(36) 0.05/0.37 s(38) =< s(36)-1 0.05/0.37 s(41) =< s(39)*s(38) 0.05/0.37 s(42) =< s(41)*s(37) 0.05/0.37 s(43) =< s(42)*s(36) 0.05/0.37 0.05/0.37 with precondition: [V_m>=2] 0.05/0.37 0.05/0.37 0.05/0.37 Closed-form bounds of eval_textbook_ex3_start(V_m,B): 0.05/0.37 ------------------------------------- 0.05/0.37 * Chain [26] with precondition: [V_m=1] 0.05/0.37 - Upper bound: 3 0.05/0.37 - Complexity: constant 0.05/0.37 * Chain [25] with precondition: [0>=V_m] 0.05/0.37 - Upper bound: 0 0.05/0.37 - Complexity: constant 0.05/0.37 * Chain [24] with precondition: [V_m>=2] 0.05/0.37 - Upper bound: V_m+1+V_m*V_m+V_m*V_m*V_m+(V_m+1)*(V_m*V_m*V_m)+(V_m+1) 0.05/0.37 - Complexity: n^4 0.05/0.37 0.05/0.37 ### Maximum cost of eval_textbook_ex3_start(V_m,B): max([3,nat(V_m)+1+nat(V_m)*nat(V_m)+nat(V_m)*nat(V_m)*nat(V_m)+nat(V_m)*nat(V_m)*nat(V_m)*nat(V_m+1)+nat(V_m+1)]) 0.05/0.37 Asymptotic class: n^4 0.05/0.37 * Total analysis performed in 283 ms. 0.05/0.37 0.05/0.47 EOF