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