0.05/0.21 WORST_CASE(?,O(n^2)) 0.05/0.21 0.05/0.21 Preprocessing Cost Relations 0.05/0.21 ===================================== 0.05/0.21 0.05/0.21 #### Computed strongly connected components 0.05/0.21 0. recursive : [eval_insertsort_3/4,eval_insertsort_4/5,eval_insertsort_bb3_in/4,eval_insertsort_bb4_in/4,eval_insertsort_bb5_in/5] 0.05/0.21 1. recursive : [eval_insertsort_0/3,eval_insertsort_1/4,eval_insertsort_bb1_in/3,eval_insertsort_bb2_in/3,eval_insertsort_bb3_in_loop_cont/6,eval_insertsort_bb6_in/5] 0.05/0.21 2. non_recursive : [eval_insertsort_stop/1] 0.05/0.21 3. non_recursive : [eval_insertsort_bb7_in/1] 0.05/0.21 4. non_recursive : [eval_insertsort_bb1_in_loop_cont/2] 0.05/0.21 5. non_recursive : [eval_insertsort_bb0_in/2] 0.05/0.21 6. non_recursive : [eval_insertsort_start/2] 0.05/0.21 0.05/0.21 #### Obtained direct recursion through partial evaluation 0.05/0.21 0. SCC is partially evaluated into eval_insertsort_bb3_in/4 0.05/0.21 1. SCC is partially evaluated into eval_insertsort_bb1_in/3 0.05/0.21 2. SCC is completely evaluated into other SCCs 0.05/0.21 3. SCC is completely evaluated into other SCCs 0.05/0.21 4. SCC is completely evaluated into other SCCs 0.05/0.21 5. SCC is partially evaluated into eval_insertsort_bb0_in/2 0.05/0.21 6. SCC is partially evaluated into eval_insertsort_start/2 0.05/0.21 0.05/0.21 Control-Flow Refinement of Cost Relations 0.05/0.21 ===================================== 0.05/0.21 0.05/0.21 ### Specialization of cost equations eval_insertsort_bb3_in/4 0.05/0.21 * CE 5 is refined into CE [8] 0.05/0.21 * CE 7 is refined into CE [9] 0.05/0.21 * CE 6 is refined into CE [10] 0.05/0.21 0.05/0.21 0.05/0.21 ### Cost equations --> "Loop" of eval_insertsort_bb3_in/4 0.05/0.21 * CEs [10] --> Loop 8 0.05/0.21 * CEs [8] --> Loop 9 0.05/0.21 * CEs [9] --> Loop 10 0.05/0.21 0.05/0.21 ### Ranking functions of CR eval_insertsort_bb3_in(V_1,V_j_0,B,C) 0.05/0.21 * RF of phase [8]: [V_j_0+1] 0.05/0.21 0.05/0.21 #### Partial ranking functions of CR eval_insertsort_bb3_in(V_1,V_j_0,B,C) 0.05/0.21 * Partial RF of phase [8]: 0.05/0.21 - RF of loop [8:1]: 0.05/0.21 V_j_0+1 0.05/0.21 0.05/0.21 0.05/0.21 ### Specialization of cost equations eval_insertsort_bb1_in/3 0.05/0.21 * CE 4 is refined into CE [11] 0.05/0.21 * CE 3 is refined into CE [12,13,14] 0.05/0.21 0.05/0.21 0.05/0.21 ### Cost equations --> "Loop" of eval_insertsort_bb1_in/3 0.05/0.21 * CEs [14] --> Loop 11 0.05/0.21 * CEs [12,13] --> Loop 12 0.05/0.21 * CEs [11] --> Loop 13 0.05/0.21 0.05/0.21 ### Ranking functions of CR eval_insertsort_bb1_in(V_length,V_i_0,B) 0.05/0.21 * RF of phase [11,12]: [V_length-V_i_0] 0.05/0.21 0.05/0.21 #### Partial ranking functions of CR eval_insertsort_bb1_in(V_length,V_i_0,B) 0.05/0.21 * Partial RF of phase [11,12]: 0.05/0.21 - RF of loop [11:1,12:1]: 0.05/0.21 V_length-V_i_0 0.05/0.21 0.05/0.21 0.05/0.21 ### Specialization of cost equations eval_insertsort_bb0_in/2 0.05/0.21 * CE 2 is refined into CE [15,16] 0.05/0.21 0.05/0.21 0.05/0.21 ### Cost equations --> "Loop" of eval_insertsort_bb0_in/2 0.05/0.21 * CEs [16] --> Loop 14 0.05/0.21 * CEs [15] --> Loop 15 0.05/0.21 0.05/0.21 ### Ranking functions of CR eval_insertsort_bb0_in(V_length,B) 0.05/0.21 0.05/0.21 #### Partial ranking functions of CR eval_insertsort_bb0_in(V_length,B) 0.05/0.21 0.05/0.21 0.05/0.21 ### Specialization of cost equations eval_insertsort_start/2 0.05/0.21 * CE 1 is refined into CE [17,18] 0.05/0.21 0.05/0.21 0.05/0.21 ### Cost equations --> "Loop" of eval_insertsort_start/2 0.05/0.21 * CEs [18] --> Loop 16 0.05/0.21 * CEs [17] --> Loop 17 0.05/0.21 0.05/0.21 ### Ranking functions of CR eval_insertsort_start(V_length,B) 0.05/0.21 0.05/0.21 #### Partial ranking functions of CR eval_insertsort_start(V_length,B) 0.05/0.21 0.05/0.21 0.05/0.21 Computing Bounds 0.05/0.21 ===================================== 0.05/0.21 0.05/0.21 #### Cost of chains of eval_insertsort_bb3_in(V_1,V_j_0,B,C): 0.05/0.21 * Chain [[8],10]: 1*it(8)+0 0.05/0.21 Such that:it(8) =< V_j_0+1 0.05/0.21 0.05/0.21 with precondition: [B=2,C+1=0,V_j_0>=0] 0.05/0.21 0.05/0.21 * Chain [[8],9]: 1*it(8)+0 0.05/0.21 Such that:it(8) =< V_j_0-C 0.05/0.21 0.05/0.21 with precondition: [B=2,C>=0,V_j_0>=C+1] 0.05/0.21 0.05/0.21 * Chain [9]: 0 0.05/0.21 with precondition: [B=2,V_j_0=C,V_j_0>=0] 0.05/0.21 0.05/0.21 0.05/0.21 #### Cost of chains of eval_insertsort_bb1_in(V_length,V_i_0,B): 0.05/0.21 * Chain [[11,12],13]: 2*it(11)+1*s(5)+1*s(6)+0 0.05/0.21 Such that:aux(1) =< V_length 0.05/0.21 aux(5) =< V_length-V_i_0 0.05/0.21 it(11) =< aux(5) 0.05/0.21 aux(2) =< aux(1) 0.05/0.21 s(5) =< it(11)*aux(1) 0.05/0.21 s(6) =< it(11)*aux(2) 0.05/0.21 0.05/0.21 with precondition: [B=3,V_i_0>=1,V_length>=V_i_0+1] 0.05/0.21 0.05/0.21 * Chain [13]: 0 0.05/0.21 with precondition: [B=3,V_i_0>=1,V_i_0>=V_length] 0.05/0.21 0.05/0.21 0.05/0.21 #### Cost of chains of eval_insertsort_bb0_in(V_length,B): 0.05/0.21 * Chain [15]: 0 0.05/0.21 with precondition: [1>=V_length] 0.05/0.21 0.05/0.21 * Chain [14]: 2*s(9)+1*s(11)+1*s(12)+0 0.05/0.21 Such that:aux(6) =< V_length 0.05/0.21 s(9) =< aux(6) 0.05/0.21 s(10) =< aux(6) 0.05/0.21 s(11) =< s(9)*aux(6) 0.05/0.21 s(12) =< s(9)*s(10) 0.05/0.21 0.05/0.21 with precondition: [V_length>=2] 0.05/0.21 0.05/0.21 0.05/0.21 #### Cost of chains of eval_insertsort_start(V_length,B): 0.05/0.21 * Chain [17]: 0 0.05/0.21 with precondition: [1>=V_length] 0.05/0.21 0.05/0.21 * Chain [16]: 2*s(14)+1*s(16)+1*s(17)+0 0.05/0.21 Such that:s(13) =< V_length 0.05/0.21 s(14) =< s(13) 0.05/0.21 s(15) =< s(13) 0.05/0.21 s(16) =< s(14)*s(13) 0.05/0.21 s(17) =< s(14)*s(15) 0.05/0.21 0.05/0.21 with precondition: [V_length>=2] 0.05/0.21 0.05/0.21 0.05/0.21 Closed-form bounds of eval_insertsort_start(V_length,B): 0.05/0.21 ------------------------------------- 0.05/0.21 * Chain [17] with precondition: [1>=V_length] 0.05/0.21 - Upper bound: 0 0.05/0.21 - Complexity: constant 0.05/0.21 * Chain [16] with precondition: [V_length>=2] 0.05/0.21 - Upper bound: 2*V_length*V_length+2*V_length 0.05/0.21 - Complexity: n^2 0.05/0.21 0.05/0.21 ### Maximum cost of eval_insertsort_start(V_length,B): nat(V_length)*2*nat(V_length)+nat(V_length)*2 0.05/0.21 Asymptotic class: n^2 0.05/0.21 * Total analysis performed in 129 ms. 0.05/0.21 0.05/0.31 EOF