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