0.03/0.28 WORST_CASE(?,O(n^2)) 0.03/0.28 0.03/0.28 Preprocessing Cost Relations 0.03/0.28 ===================================== 0.03/0.28 0.03/0.28 #### Computed strongly connected components 0.03/0.28 0. recursive : [evalloopsbb3in/4,evalloopsbb4in/4] 0.03/0.28 1. recursive : [evalloopsbb1in/5,evalloopsbb4in_loop_cont/6,evalloopsbb5in/5,evalloopsbb6in/5] 0.03/0.28 2. non_recursive : [evalloopsstop/3] 0.03/0.28 3. non_recursive : [evalloopsreturnin/3] 0.03/0.28 4. non_recursive : [exit_location/1] 0.03/0.29 5. non_recursive : [evalloopsbb6in_loop_cont/4] 0.03/0.29 6. non_recursive : [evalloopsentryin/3] 0.03/0.29 7. non_recursive : [evalloopsstart/3] 0.03/0.29 0.03/0.29 #### Obtained direct recursion through partial evaluation 0.03/0.29 0. SCC is partially evaluated into evalloopsbb4in/4 0.03/0.29 1. SCC is partially evaluated into evalloopsbb6in/5 0.03/0.29 2. SCC is completely evaluated into other SCCs 0.03/0.29 3. SCC is completely evaluated into other SCCs 0.03/0.29 4. SCC is completely evaluated into other SCCs 0.03/0.29 5. SCC is partially evaluated into evalloopsbb6in_loop_cont/4 0.03/0.29 6. SCC is partially evaluated into evalloopsentryin/3 0.03/0.29 7. SCC is partially evaluated into evalloopsstart/3 0.03/0.29 0.03/0.29 Control-Flow Refinement of Cost Relations 0.03/0.29 ===================================== 0.03/0.29 0.03/0.29 ### Specialization of cost equations evalloopsbb4in/4 0.03/0.29 * CE 13 is refined into CE [14] 0.03/0.29 * CE 12 is refined into CE [15] 0.03/0.29 * CE 11 is refined into CE [16] 0.03/0.29 0.03/0.29 0.03/0.29 ### Cost equations --> "Loop" of evalloopsbb4in/4 0.03/0.29 * CEs [16] --> Loop 14 0.03/0.29 * CEs [14] --> Loop 15 0.03/0.29 * CEs [15] --> Loop 16 0.03/0.29 0.03/0.29 ### Ranking functions of CR evalloopsbb4in(A,B,D,E) 0.03/0.29 * RF of phase [14]: [2*A-2*B-1] 0.03/0.29 0.03/0.29 #### Partial ranking functions of CR evalloopsbb4in(A,B,D,E) 0.03/0.29 * Partial RF of phase [14]: 0.03/0.29 - RF of loop [14:1]: 0.03/0.29 2*A-2*B-1 0.03/0.29 0.03/0.29 0.03/0.29 ### Specialization of cost equations evalloopsbb6in/5 0.03/0.29 * CE 7 is refined into CE [17] 0.03/0.29 * CE 6 is refined into CE [18,19] 0.03/0.29 * CE 8 is refined into CE [20] 0.03/0.29 * CE 5 is refined into CE [21] 0.03/0.29 * CE 4 is refined into CE [22] 0.03/0.29 0.03/0.29 0.03/0.29 ### Cost equations --> "Loop" of evalloopsbb6in/5 0.03/0.29 * CEs [21] --> Loop 17 0.03/0.29 * CEs [22] --> Loop 18 0.03/0.29 * CEs [18,19] --> Loop 19 0.03/0.29 * CEs [20] --> Loop 20 0.03/0.29 * CEs [17] --> Loop 21 0.03/0.29 0.03/0.29 ### Ranking functions of CR evalloopsbb6in(A,B,D,E,F) 0.03/0.29 * RF of phase [17]: [A-1] 0.03/0.29 * RF of phase [18]: [A+1] 0.03/0.29 0.03/0.29 #### Partial ranking functions of CR evalloopsbb6in(A,B,D,E,F) 0.03/0.29 * Partial RF of phase [17]: 0.03/0.29 - RF of loop [17:1]: 0.03/0.29 A-1 0.03/0.29 * Partial RF of phase [18]: 0.03/0.29 - RF of loop [18:1]: 0.03/0.29 A+1 0.03/0.29 0.03/0.29 0.03/0.29 ### Specialization of cost equations evalloopsbb6in_loop_cont/4 0.03/0.29 * CE 9 is refined into CE [23] 0.03/0.29 * CE 10 is refined into CE [24] 0.03/0.29 0.03/0.29 0.03/0.29 ### Cost equations --> "Loop" of evalloopsbb6in_loop_cont/4 0.03/0.29 * CEs [23] --> Loop 22 0.03/0.29 * CEs [24] --> Loop 23 0.03/0.29 0.03/0.29 ### Ranking functions of CR evalloopsbb6in_loop_cont(A,B,C,D) 0.03/0.29 0.03/0.29 #### Partial ranking functions of CR evalloopsbb6in_loop_cont(A,B,C,D) 0.03/0.29 0.03/0.29 0.03/0.29 ### Specialization of cost equations evalloopsentryin/3 0.03/0.29 * CE 3 is refined into CE [25,26,27,28,29,30] 0.03/0.29 * CE 2 is refined into CE [31] 0.03/0.29 0.03/0.29 0.03/0.29 ### Cost equations --> "Loop" of evalloopsentryin/3 0.03/0.29 * CEs [28] --> Loop 24 0.03/0.29 * CEs [27,30] --> Loop 25 0.03/0.29 * CEs [26] --> Loop 26 0.03/0.29 * CEs [31] --> Loop 27 0.03/0.29 * CEs [25,29] --> Loop 28 0.03/0.29 0.03/0.29 ### Ranking functions of CR evalloopsentryin(A,B,D) 0.03/0.29 0.03/0.29 #### Partial ranking functions of CR evalloopsentryin(A,B,D) 0.03/0.29 0.03/0.29 0.03/0.29 ### Specialization of cost equations evalloopsstart/3 0.03/0.29 * CE 1 is refined into CE [32,33,34,35,36] 0.03/0.29 0.03/0.29 0.03/0.29 ### Cost equations --> "Loop" of evalloopsstart/3 0.03/0.29 * CEs [36] --> Loop 29 0.03/0.29 * CEs [35] --> Loop 30 0.03/0.29 * CEs [34] --> Loop 31 0.03/0.29 * CEs [33] --> Loop 32 0.03/0.29 * CEs [32] --> Loop 33 0.03/0.29 0.03/0.29 ### Ranking functions of CR evalloopsstart(A,B,D) 0.03/0.29 0.03/0.29 #### Partial ranking functions of CR evalloopsstart(A,B,D) 0.03/0.29 0.03/0.29 0.03/0.29 Computing Bounds 0.03/0.29 ===================================== 0.03/0.29 0.03/0.29 #### Cost of chains of evalloopsbb4in(A,B,D,E): 0.03/0.29 * Chain [[14],16]: 1*it(14)+0 0.03/0.29 Such that:it(14) =< 2*A-2*B 0.03/0.29 0.03/0.29 with precondition: [D=2,B>=1,E>=2*B,E>=A,2*A>=E+2] 0.03/0.29 0.03/0.29 * Chain [[14],15]: 1*it(14)+0 0.03/0.29 Such that:it(14) =< 2*A-2*B 0.03/0.29 0.03/0.29 with precondition: [D=3,B>=1,A>=B+1] 0.03/0.29 0.03/0.29 * Chain [15]: 0 0.03/0.29 with precondition: [D=3,A>=2,B>=1] 0.03/0.29 0.03/0.29 0.03/0.29 #### Cost of chains of evalloopsbb6in(A,B,D,E,F): 0.03/0.29 * Chain [[18],21]: 1*it(18)+0 0.03/0.29 Such that:it(18) =< A+1 0.03/0.29 0.03/0.29 with precondition: [D=4,E+1=0,1>=A,A>=0] 0.03/0.29 0.03/0.29 * Chain [[18],20]: 1*it(18)+0 0.03/0.29 Such that:it(18) =< A+1 0.03/0.29 0.03/0.29 with precondition: [D=3,1>=A,A>=0] 0.03/0.29 0.03/0.29 * Chain [[17],[18],21]: 1*it(17)+1*it(18)+1*s(3)+0 0.03/0.29 Such that:it(18) =< 2 0.03/0.29 it(17) =< A 0.03/0.29 aux(1) =< 2*A 0.03/0.29 s(3) =< it(17)*aux(1) 0.03/0.29 0.03/0.29 with precondition: [D=4,E+1=0,A>=2] 0.03/0.29 0.03/0.29 * Chain [[17],[18],20]: 1*it(17)+1*it(18)+1*s(3)+0 0.03/0.29 Such that:it(18) =< 2 0.03/0.29 it(17) =< A 0.03/0.29 aux(1) =< 2*A 0.03/0.29 s(3) =< it(17)*aux(1) 0.03/0.29 0.03/0.29 with precondition: [D=3,A>=2] 0.03/0.29 0.03/0.29 * Chain [[17],20]: 1*it(17)+1*s(3)+0 0.03/0.29 Such that:it(17) =< A 0.03/0.29 aux(1) =< 2*A 0.03/0.29 s(3) =< it(17)*aux(1) 0.03/0.29 0.03/0.29 with precondition: [D=3,A>=2] 0.03/0.29 0.03/0.29 * Chain [[17],19]: 1*it(17)+1*s(3)+1*s(4)+0 0.03/0.29 Such that:it(17) =< A 0.03/0.29 aux(2) =< 2*A 0.03/0.29 it(17) =< aux(2) 0.03/0.29 s(4) =< aux(2) 0.03/0.29 s(3) =< it(17)*aux(2) 0.03/0.29 0.03/0.29 with precondition: [D=3,A>=3] 0.03/0.29 0.03/0.29 * Chain [20]: 0 0.03/0.29 with precondition: [D=3,A+1>=0] 0.03/0.29 0.03/0.29 * Chain [19]: 1*s(4)+0 0.03/0.29 Such that:s(4) =< 2*A 0.03/0.29 0.03/0.29 with precondition: [D=3,A>=2] 0.03/0.29 0.03/0.29 0.03/0.29 #### Cost of chains of evalloopsbb6in_loop_cont(A,B,C,D): 0.03/0.29 * Chain [23]: 0 0.03/0.29 with precondition: [A=3] 0.03/0.29 0.03/0.29 * Chain [22]: 0 0.03/0.29 with precondition: [A=4] 0.03/0.29 0.03/0.29 0.03/0.29 #### Cost of chains of evalloopsentryin(A,B,D): 0.03/0.29 * Chain [28]: 2*s(13)+0 0.03/0.29 Such that:aux(5) =< A+1 0.03/0.29 s(13) =< aux(5) 0.03/0.29 0.03/0.29 with precondition: [1>=A,A>=0] 0.03/0.29 0.03/0.29 * Chain [27]: 0 0.03/0.29 with precondition: [0>=A+1] 0.03/0.29 0.03/0.29 * Chain [26]: 0 0.03/0.29 with precondition: [A>=0] 0.03/0.29 0.03/0.29 * Chain [25]: 2*s(15)+3*s(18)+1*s(19)+3*s(20)+0 0.03/0.29 Such that:aux(6) =< 2 0.03/0.29 aux(7) =< A 0.03/0.29 aux(8) =< 2*A 0.03/0.29 s(15) =< aux(6) 0.03/0.29 s(18) =< aux(7) 0.03/0.29 s(19) =< aux(8) 0.03/0.29 s(20) =< s(18)*aux(8) 0.03/0.29 0.03/0.29 with precondition: [A>=2] 0.03/0.29 0.03/0.29 * Chain [24]: 1*s(25)+1*s(27)+1*s(28)+0 0.03/0.29 Such that:s(25) =< A 0.03/0.29 s(26) =< 2*A 0.03/0.29 s(25) =< s(26) 0.03/0.29 s(27) =< s(26) 0.03/0.29 s(28) =< s(25)*s(26) 0.03/0.29 0.03/0.29 with precondition: [A>=3] 0.03/0.29 0.03/0.29 0.03/0.29 #### Cost of chains of evalloopsstart(A,B,D): 0.03/0.29 * Chain [33]: 2*s(30)+0 0.03/0.29 Such that:s(29) =< A+1 0.03/0.29 s(30) =< s(29) 0.03/0.29 0.03/0.29 with precondition: [1>=A,A>=0] 0.03/0.29 0.03/0.29 * Chain [32]: 0 0.03/0.29 with precondition: [0>=A+1] 0.03/0.29 0.03/0.29 * Chain [31]: 0 0.03/0.29 with precondition: [A>=0] 0.03/0.29 0.03/0.29 * Chain [30]: 2*s(34)+3*s(35)+1*s(36)+3*s(37)+0 0.03/0.29 Such that:s(31) =< 2 0.03/0.29 s(32) =< A 0.03/0.29 s(33) =< 2*A 0.03/0.29 s(34) =< s(31) 0.03/0.29 s(35) =< s(32) 0.03/0.29 s(36) =< s(33) 0.03/0.29 s(37) =< s(35)*s(33) 0.03/0.29 0.03/0.29 with precondition: [A>=2] 0.03/0.29 0.03/0.29 * Chain [29]: 1*s(38)+1*s(40)+1*s(41)+0 0.03/0.29 Such that:s(38) =< A 0.03/0.29 s(39) =< 2*A 0.03/0.29 s(38) =< s(39) 0.03/0.29 s(40) =< s(39) 0.03/0.29 s(41) =< s(38)*s(39) 0.03/0.29 0.03/0.29 with precondition: [A>=3] 0.03/0.29 0.03/0.29 0.03/0.29 Closed-form bounds of evalloopsstart(A,B,D): 0.03/0.29 ------------------------------------- 0.03/0.29 * Chain [33] with precondition: [1>=A,A>=0] 0.03/0.29 - Upper bound: 2*A+2 0.03/0.29 - Complexity: n 0.03/0.29 * Chain [32] with precondition: [0>=A+1] 0.03/0.29 - Upper bound: 0 0.03/0.29 - Complexity: constant 0.03/0.29 * Chain [31] with precondition: [A>=0] 0.03/0.29 - Upper bound: 0 0.03/0.29 - Complexity: constant 0.03/0.29 * Chain [30] with precondition: [A>=2] 0.03/0.29 - Upper bound: 3*A+4+3*A*(2*A)+2*A 0.03/0.29 - Complexity: n^2 0.03/0.29 * Chain [29] with precondition: [A>=3] 0.03/0.29 - Upper bound: 2*A*A+A+2*A 0.03/0.29 - Complexity: n^2 0.03/0.29 0.03/0.29 ### Maximum cost of evalloopsstart(A,B,D): max([nat(A+1)*2,nat(2*A)*nat(A)+nat(A)+nat(2*A)+(nat(A)*2+4+nat(A)*2*nat(2*A))]) 0.03/0.29 Asymptotic class: n^2 0.03/0.29 * Total analysis performed in 220 ms. 0.03/0.29 0.03/0.39 EOF