0.03/0.17 WORST_CASE(?,O(n^1)) 0.03/0.17 0.03/0.17 Preprocessing Cost Relations 0.03/0.17 ===================================== 0.03/0.17 0.03/0.17 #### Computed strongly connected components 0.03/0.17 0. recursive : [eval/3] 0.03/0.17 1. non_recursive : [exit_location/1] 0.03/0.17 2. non_recursive : [eval_loop_cont/2] 0.03/0.17 3. non_recursive : [start/3] 0.03/0.17 0.03/0.17 #### Obtained direct recursion through partial evaluation 0.03/0.17 0. SCC is partially evaluated into eval/3 0.03/0.17 1. SCC is completely evaluated into other SCCs 0.03/0.17 2. SCC is completely evaluated into other SCCs 0.03/0.17 3. SCC is partially evaluated into start/3 0.03/0.17 0.03/0.17 Control-Flow Refinement of Cost Relations 0.03/0.17 ===================================== 0.03/0.17 0.03/0.17 ### Specialization of cost equations eval/3 0.03/0.17 * CE 5 is refined into CE [6] 0.03/0.17 * CE 2 is refined into CE [7] 0.03/0.17 * CE 4 is refined into CE [8] 0.03/0.17 * CE 3 is refined into CE [9] 0.03/0.17 0.03/0.17 0.03/0.17 ### Cost equations --> "Loop" of eval/3 0.03/0.17 * CEs [7] --> Loop 6 0.03/0.17 * CEs [8] --> Loop 7 0.03/0.17 * CEs [9] --> Loop 8 0.03/0.17 * CEs [6] --> Loop 9 0.03/0.17 0.03/0.17 ### Ranking functions of CR eval(A,B,C) 0.03/0.17 * RF of phase [6]: [A,A-B,A+B] 0.03/0.17 * RF of phase [7,8]: [A+B] 0.03/0.17 0.03/0.17 #### Partial ranking functions of CR eval(A,B,C) 0.03/0.17 * Partial RF of phase [6]: 0.03/0.17 - RF of loop [6:1]: 0.03/0.17 A 0.03/0.17 A-B 0.03/0.17 A+B 0.03/0.17 * Partial RF of phase [7,8]: 0.03/0.17 - RF of loop [7:1]: 0.03/0.17 -A+B depends on loops [8:1] 0.03/0.17 A+B 0.03/0.17 B 0.03/0.17 - RF of loop [8:1]: 0.03/0.17 A+1 0.03/0.17 A-B+1 depends on loops [7:1] 0.03/0.17 0.03/0.17 0.03/0.17 ### Specialization of cost equations start/3 0.03/0.17 * CE 1 is refined into CE [10,11,12,13] 0.03/0.17 0.03/0.17 0.03/0.17 ### Cost equations --> "Loop" of start/3 0.03/0.17 * CEs [13] --> Loop 10 0.03/0.17 * CEs [12] --> Loop 11 0.03/0.17 * CEs [11] --> Loop 12 0.03/0.17 * CEs [10] --> Loop 13 0.03/0.17 0.03/0.17 ### Ranking functions of CR start(A,B,C) 0.03/0.17 0.03/0.17 #### Partial ranking functions of CR start(A,B,C) 0.03/0.17 0.03/0.17 0.03/0.17 Computing Bounds 0.03/0.17 ===================================== 0.03/0.17 0.03/0.17 #### Cost of chains of eval(A,B,C): 0.03/0.17 * Chain [[7,8],9]: 1*it(7)+1*it(8)+0 0.03/0.17 Such that:it(8) =< A+1 0.03/0.17 it(7) =< B 0.03/0.17 aux(7) =< A+B 0.03/0.17 it(7) =< aux(7) 0.03/0.17 it(8) =< aux(7) 0.03/0.17 0.03/0.17 with precondition: [C=2,B>=A,A+B>=1] 0.03/0.17 0.03/0.17 * Chain [[6],[7,8],9]: 1*it(6)+1*it(7)+1*it(8)+0 0.03/0.17 Such that:it(6) =< A-B 0.03/0.17 it(7) =< B 0.03/0.17 it(8) =< B+1 0.03/0.17 aux(7) =< 2*B 0.03/0.17 it(7) =< aux(7) 0.03/0.17 it(8) =< aux(7) 0.03/0.17 0.03/0.17 with precondition: [C=2,2*B>=1,A>=B+1] 0.03/0.17 0.03/0.17 * Chain [[6],9]: 1*it(6)+0 0.03/0.17 Such that:it(6) =< A-B 0.03/0.17 it(6) =< A+B 0.03/0.17 0.03/0.17 with precondition: [C=2,A>=B+1,A+B>=1] 0.03/0.17 0.03/0.17 * Chain [9]: 0 0.03/0.17 with precondition: [C=2] 0.03/0.17 0.03/0.17 0.03/0.17 #### Cost of chains of start(A,B,C): 0.03/0.17 * Chain [13]: 0 0.03/0.17 with precondition: [] 0.03/0.17 0.03/0.17 * Chain [12]: 1*s(1)+1*s(2)+1*s(3)+0 0.03/0.17 Such that:s(1) =< A-B 0.03/0.17 s(2) =< B 0.03/0.17 s(3) =< B+1 0.03/0.17 s(4) =< 2*B 0.03/0.17 s(2) =< s(4) 0.03/0.17 s(3) =< s(4) 0.03/0.17 0.03/0.17 with precondition: [2*B>=1,A>=B+1] 0.03/0.17 0.03/0.17 * Chain [11]: 1*s(5)+1*s(6)+0 0.03/0.17 Such that:s(5) =< A+1 0.03/0.17 s(7) =< A+B 0.03/0.17 s(6) =< B 0.03/0.17 s(5) =< B+1 0.03/0.17 s(6) =< s(7) 0.03/0.17 s(5) =< s(7) 0.03/0.17 0.03/0.17 with precondition: [B>=A,A+B>=1] 0.03/0.17 0.03/0.17 * Chain [10]: 1*s(8)+0 0.03/0.17 Such that:s(8) =< A-B 0.03/0.17 s(8) =< A+B 0.03/0.17 0.03/0.17 with precondition: [A>=B+1,A+B>=1] 0.03/0.17 0.03/0.17 0.03/0.17 Closed-form bounds of start(A,B,C): 0.03/0.17 ------------------------------------- 0.03/0.17 * Chain [13] with precondition: [] 0.03/0.17 - Upper bound: 0 0.03/0.17 - Complexity: constant 0.03/0.17 * Chain [12] with precondition: [2*B>=1,A>=B+1] 0.03/0.17 - Upper bound: A+B+1 0.03/0.17 - Complexity: n 0.03/0.17 * Chain [11] with precondition: [B>=A,A+B>=1] 0.03/0.17 - Upper bound: nat(A+1)+B 0.03/0.17 - Complexity: n 0.03/0.17 * Chain [10] with precondition: [A>=B+1,A+B>=1] 0.03/0.17 - Upper bound: A-B 0.03/0.17 - Complexity: n 0.03/0.17 0.03/0.17 ### Maximum cost of start(A,B,C): max([nat(A-B),nat(B)+max([nat(A+1),nat(A-B)+nat(B+1)])]) 0.03/0.17 Asymptotic class: n 0.03/0.17 * Total analysis performed in 110 ms. 0.03/0.17 0.03/0.27 EOF