0.06/0.47 WORST_CASE(?,O(n^2)) 0.06/0.47 0.06/0.47 Preprocessing Cost Relations 0.06/0.47 ===================================== 0.06/0.47 0.06/0.47 #### Computed strongly connected components 0.06/0.47 0. recursive : [eval_foo_bb4_in/6,eval_foo_bb5_in/6] 0.06/0.47 1. recursive : [eval_foo_bb2_in/7,eval_foo_bb3_in/7,eval_foo_bb4_in_loop_cont/8] 0.06/0.47 2. recursive : [eval_foo_bb1_in/5,eval_foo_bb2_in_loop_cont/8,eval_foo_bb6_in/7] 0.06/0.47 3. non_recursive : [eval_foo_stop/1] 0.06/0.47 4. non_recursive : [eval_foo_bb7_in/1] 0.06/0.47 5. non_recursive : [eval_foo_bb1_in_loop_cont/2] 0.06/0.47 6. non_recursive : [eval_foo_bb0_in/4] 0.06/0.47 7. non_recursive : [eval_foo_start/7] 0.06/0.47 0.06/0.47 #### Obtained direct recursion through partial evaluation 0.06/0.47 0. SCC is partially evaluated into eval_foo_bb4_in/6 0.06/0.47 1. SCC is partially evaluated into eval_foo_bb2_in/7 0.06/0.47 2. SCC is partially evaluated into eval_foo_bb1_in/5 0.06/0.47 3. SCC is completely evaluated into other SCCs 0.06/0.47 4. SCC is completely evaluated into other SCCs 0.06/0.47 5. SCC is completely evaluated into other SCCs 0.06/0.47 6. SCC is partially evaluated into eval_foo_bb0_in/4 0.06/0.47 7. SCC is partially evaluated into eval_foo_start/7 0.06/0.47 0.06/0.47 Control-Flow Refinement of Cost Relations 0.06/0.47 ===================================== 0.06/0.47 0.06/0.47 ### Specialization of cost equations eval_foo_bb4_in/6 0.06/0.47 * CE 11 is refined into CE [12] 0.06/0.47 * CE 10 is refined into CE [13] 0.06/0.47 0.06/0.47 0.06/0.47 ### Cost equations --> "Loop" of eval_foo_bb4_in/6 0.06/0.47 * CEs [13] --> Loop 12 0.06/0.47 * CEs [12] --> Loop 13 0.06/0.47 0.06/0.47 ### Ranking functions of CR eval_foo_bb4_in(V_N,V__01,V__1,V__02,B,C) 0.06/0.47 * RF of phase [12]: [V_N-V__02] 0.06/0.47 0.06/0.47 #### Partial ranking functions of CR eval_foo_bb4_in(V_N,V__01,V__1,V__02,B,C) 0.06/0.47 * Partial RF of phase [12]: 0.06/0.47 - RF of loop [12:1]: 0.06/0.47 V_N-V__02 0.06/0.47 0.06/0.47 0.06/0.47 ### Specialization of cost equations eval_foo_bb2_in/7 0.06/0.47 * CE 9 is refined into CE [14] 0.06/0.47 * CE 8 is refined into CE [15,16] 0.06/0.47 0.06/0.47 0.06/0.47 ### Cost equations --> "Loop" of eval_foo_bb2_in/7 0.06/0.47 * CEs [16] --> Loop 14 0.06/0.47 * CEs [15] --> Loop 15 0.06/0.47 * CEs [14] --> Loop 16 0.06/0.47 0.06/0.47 ### Ranking functions of CR eval_foo_bb2_in(V_m,V_N,V__01,V__1,B,C,D) 0.06/0.47 * RF of phase [14]: [V_m-V__01] 0.06/0.47 0.06/0.47 #### Partial ranking functions of CR eval_foo_bb2_in(V_m,V_N,V__01,V__1,B,C,D) 0.06/0.47 * Partial RF of phase [14]: 0.06/0.47 - RF of loop [14:1]: 0.06/0.47 V_m-V__01 0.06/0.47 0.06/0.47 0.06/0.47 ### Specialization of cost equations eval_foo_bb1_in/5 0.06/0.47 * CE 7 is refined into CE [17] 0.06/0.47 * CE 6 is refined into CE [18,19,20,21] 0.06/0.47 0.06/0.47 0.06/0.47 ### Cost equations --> "Loop" of eval_foo_bb1_in/5 0.06/0.47 * CEs [21] --> Loop 17 0.06/0.47 * CEs [19] --> Loop 18 0.06/0.47 * CEs [18] --> Loop 19 0.06/0.47 * CEs [20] --> Loop 20 0.06/0.47 * CEs [17] --> Loop 21 0.06/0.47 0.06/0.47 ### Ranking functions of CR eval_foo_bb1_in(V_m,V_n,V_N,V__0,B) 0.06/0.47 * RF of phase [17]: [V_n-V__0] 0.06/0.47 * RF of phase [20]: [V_n-V__0] 0.06/0.47 0.06/0.47 #### Partial ranking functions of CR eval_foo_bb1_in(V_m,V_n,V_N,V__0,B) 0.06/0.47 * Partial RF of phase [17]: 0.06/0.47 - RF of loop [17:1]: 0.06/0.47 V_n-V__0 0.06/0.47 * Partial RF of phase [20]: 0.06/0.47 - RF of loop [20:1]: 0.06/0.47 V_n-V__0 0.06/0.47 0.06/0.47 0.06/0.47 ### Specialization of cost equations eval_foo_bb0_in/4 0.06/0.47 * CE 5 is refined into CE [22,23,24,25,26,27,28] 0.06/0.47 * CE 4 is refined into CE [29] 0.06/0.47 * CE 2 is refined into CE [30] 0.06/0.47 * CE 3 is refined into CE [31] 0.06/0.47 0.06/0.47 0.06/0.47 ### Cost equations --> "Loop" of eval_foo_bb0_in/4 0.06/0.47 * CEs [26] --> Loop 22 0.06/0.47 * CEs [25] --> Loop 23 0.06/0.47 * CEs [29] --> Loop 24 0.06/0.47 * CEs [30] --> Loop 25 0.06/0.47 * CEs [31] --> Loop 26 0.06/0.47 * CEs [28] --> Loop 27 0.06/0.47 * CEs [27] --> Loop 28 0.06/0.47 * CEs [24] --> Loop 29 0.06/0.47 * CEs [23] --> Loop 30 0.06/0.47 * CEs [22] --> Loop 31 0.06/0.47 0.06/0.47 ### Ranking functions of CR eval_foo_bb0_in(V_m,V_n,V_N,B) 0.06/0.47 0.06/0.47 #### Partial ranking functions of CR eval_foo_bb0_in(V_m,V_n,V_N,B) 0.06/0.47 0.06/0.47 0.06/0.47 ### Specialization of cost equations eval_foo_start/7 0.06/0.47 * CE 1 is refined into CE [32,33,34,35,36,37,38,39,40,41] 0.06/0.47 0.06/0.47 0.06/0.47 ### Cost equations --> "Loop" of eval_foo_start/7 0.06/0.47 * CEs [41] --> Loop 32 0.06/0.47 * CEs [40] --> Loop 33 0.06/0.47 * CEs [39] --> Loop 34 0.06/0.47 * CEs [38] --> Loop 35 0.06/0.47 * CEs [37] --> Loop 36 0.06/0.47 * CEs [36] --> Loop 37 0.06/0.47 * CEs [35] --> Loop 38 0.06/0.47 * CEs [34] --> Loop 39 0.06/0.47 * CEs [33] --> Loop 40 0.06/0.47 * CEs [32] --> Loop 41 0.06/0.47 0.06/0.47 ### Ranking functions of CR eval_foo_start(V_i,V_j,V_k,V_m,V_n,V_N,B) 0.06/0.47 0.06/0.47 #### Partial ranking functions of CR eval_foo_start(V_i,V_j,V_k,V_m,V_n,V_N,B) 0.06/0.47 0.06/0.47 0.06/0.47 Computing Bounds 0.06/0.47 ===================================== 0.06/0.47 0.06/0.47 #### Cost of chains of eval_foo_bb4_in(V_N,V__01,V__1,V__02,B,C): 0.06/0.47 * Chain [[12],13]: 1*it(12)+0 0.06/0.47 Such that:it(12) =< -V__02+C 0.06/0.47 0.06/0.47 with precondition: [B=2,V_N=C,V_N>=0,V__01>=0,V__02>=V__1,V_N>=V__02+1] 0.06/0.47 0.06/0.47 * Chain [13]: 0 0.06/0.47 with precondition: [B=2,V__02=C,V_N>=0,V__01>=0,V__02>=V_N,V__02>=V__1] 0.06/0.47 0.06/0.47 0.06/0.47 #### Cost of chains of eval_foo_bb2_in(V_m,V_N,V__01,V__1,B,C,D): 0.06/0.47 * Chain [[14],16]: 1*it(14)+0 0.06/0.47 Such that:it(14) =< -V__01+C 0.06/0.47 0.06/0.47 with precondition: [B=3,V_m=C,V__1=D,V_N>=0,V__01>=0,V__1>=V_N,V_m>=V__01+1] 0.06/0.47 0.06/0.47 * Chain [16]: 0 0.06/0.47 with precondition: [B=3,V__01=V_m,D=V__1,V__01=C,V_N>=0,V__01>=0] 0.06/0.47 0.06/0.47 * Chain [15,[14],16]: 1*it(14)+1*s(1)+1 0.06/0.47 Such that:s(1) =< -V__1+D 0.06/0.47 it(14) =< C 0.06/0.47 0.06/0.47 with precondition: [V__01=0,B=3,V_m=C,V_N=D,V_m>=2,V_N>=0,V_N>=V__1+1] 0.06/0.47 0.06/0.47 * Chain [15,16]: 1*s(1)+1 0.06/0.47 Such that:s(1) =< -V__1+D 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V__01=0,B=3,C=1,V_N=D,V_N>=0,V_N>=V__1+1] 0.06/0.47 0.06/0.47 0.06/0.47 #### Cost of chains of eval_foo_bb1_in(V_m,V_n,V_N,V__0,B): 0.06/0.47 * Chain [[20],21]: 1*it(20)+0 0.06/0.47 Such that:it(20) =< V_n-V__0 0.06/0.47 0.06/0.47 with precondition: [V_m=0,B=4,V_N>=0,V__0>=0,V_n>=V__0+1] 0.06/0.47 0.06/0.47 * Chain [[17],21]: 1*it(17)+1*s(4)+0 0.06/0.47 Such that:aux(1) =< V_m 0.06/0.47 it(17) =< V_n-V__0 0.06/0.47 s(4) =< it(17)*aux(1) 0.06/0.47 0.06/0.47 with precondition: [B=4,V_m>=1,V_N>=0,V__0>=V_N,V_n>=V__0+1] 0.06/0.47 0.06/0.47 * Chain [21]: 0 0.06/0.47 with precondition: [B=4,V_m>=0,V_n>=0,V_N>=0,V__0>=V_n] 0.06/0.47 0.06/0.47 * Chain [19,[17],21]: 1*it(17)+1*s(4)+1*s(5)+2 0.06/0.47 Such that:aux(1) =< 1 0.06/0.47 it(17) =< V_n-V_N 0.06/0.47 s(5) =< V_N+1 0.06/0.47 s(4) =< it(17)*aux(1) 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V__0=0,B=4,V_N>=1,V_n>=V_N+2] 0.06/0.47 0.06/0.47 * Chain [19,21]: 1*s(5)+2 0.06/0.47 Such that:s(5) =< V_N+1 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V__0=0,B=4,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 0.06/0.47 * Chain [18,[17],21]: 1*it(17)+1*s(4)+1*s(6)+1*s(7)+2 0.06/0.47 Such that:it(17) =< V_n-V_N 0.06/0.47 s(6) =< V_N+1 0.06/0.47 aux(2) =< V_m 0.06/0.47 s(7) =< aux(2) 0.06/0.47 s(4) =< it(17)*aux(2) 0.06/0.47 0.06/0.47 with precondition: [V__0=0,B=4,V_m>=2,V_N>=1,V_n>=V_N+2] 0.06/0.47 0.06/0.47 * Chain [18,21]: 1*s(6)+1*s(7)+2 0.06/0.47 Such that:s(7) =< V_m 0.06/0.47 s(6) =< V_N+1 0.06/0.47 0.06/0.47 with precondition: [V__0=0,B=4,V_m>=2,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 0.06/0.47 0.06/0.47 #### Cost of chains of eval_foo_bb0_in(V_m,V_n,V_N,B): 0.06/0.47 * Chain [31]: 1*s(8)+0 0.06/0.47 Such that:s(8) =< V_n 0.06/0.47 0.06/0.47 with precondition: [V_m=0,V_n>=1,V_N>=0] 0.06/0.47 0.06/0.47 * Chain [30]: 1*s(9)+2 0.06/0.47 Such that:s(9) =< V_N+1 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 0.06/0.47 * Chain [29]: 1*s(11)+1*s(12)+1*s(13)+2 0.06/0.47 Such that:s(10) =< 1 0.06/0.47 s(11) =< V_n-V_N 0.06/0.47 s(12) =< V_N+1 0.06/0.47 s(13) =< s(11)*s(10) 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V_N>=1,V_n>=V_N+2] 0.06/0.47 0.06/0.47 * Chain [28]: 0 0.06/0.47 with precondition: [V_n=0,V_m>=0,V_N>=0] 0.06/0.47 0.06/0.47 * Chain [27]: 1*s(15)+1*s(16)+0 0.06/0.47 Such that:s(14) =< V_m 0.06/0.47 s(15) =< V_n 0.06/0.47 s(16) =< s(15)*s(14) 0.06/0.47 0.06/0.47 with precondition: [V_N=0,V_m>=1,V_n>=1] 0.06/0.47 0.06/0.47 * Chain [26]: 0 0.06/0.47 with precondition: [0>=V_m+1] 0.06/0.47 0.06/0.47 * Chain [25]: 0 0.06/0.47 with precondition: [0>=V_n+1] 0.06/0.47 0.06/0.47 * Chain [24]: 0 0.06/0.47 with precondition: [0>=V_N+1] 0.06/0.47 0.06/0.47 * Chain [23]: 1*s(17)+1*s(18)+2 0.06/0.47 Such that:s(17) =< V_m 0.06/0.47 s(18) =< V_N+1 0.06/0.47 0.06/0.47 with precondition: [V_m>=2,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 0.06/0.47 * Chain [22]: 1*s(19)+1*s(20)+1*s(22)+1*s(23)+2 0.06/0.47 Such that:s(21) =< V_m 0.06/0.47 s(19) =< V_n-V_N 0.06/0.47 s(20) =< V_N+1 0.06/0.47 s(22) =< s(21) 0.06/0.47 s(23) =< s(19)*s(21) 0.06/0.47 0.06/0.47 with precondition: [V_m>=2,V_N>=1,V_n>=V_N+2] 0.06/0.47 0.06/0.47 0.06/0.47 #### Cost of chains of eval_foo_start(V_i,V_j,V_k,V_m,V_n,V_N,B): 0.06/0.47 * Chain [41]: 1*s(24)+0 0.06/0.47 Such that:s(24) =< V_n 0.06/0.47 0.06/0.47 with precondition: [V_m=0,V_n>=1,V_N>=0] 0.06/0.47 0.06/0.47 * Chain [40]: 1*s(25)+2 0.06/0.47 Such that:s(25) =< V_N+1 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 0.06/0.47 * Chain [39]: 1*s(27)+1*s(28)+1*s(29)+2 0.06/0.47 Such that:s(26) =< 1 0.06/0.47 s(27) =< V_n-V_N 0.06/0.47 s(28) =< V_N+1 0.06/0.47 s(29) =< s(27)*s(26) 0.06/0.47 0.06/0.47 with precondition: [V_m=1,V_N>=1,V_n>=V_N+2] 0.06/0.47 0.06/0.47 * Chain [38]: 0 0.06/0.47 with precondition: [V_n=0,V_m>=0,V_N>=0] 0.06/0.47 0.06/0.47 * Chain [37]: 1*s(31)+1*s(32)+0 0.06/0.47 Such that:s(30) =< V_m 0.06/0.47 s(31) =< V_n 0.06/0.47 s(32) =< s(31)*s(30) 0.06/0.47 0.06/0.47 with precondition: [V_N=0,V_m>=1,V_n>=1] 0.06/0.47 0.06/0.47 * Chain [36]: 0 0.06/0.47 with precondition: [0>=V_m+1] 0.06/0.47 0.06/0.47 * Chain [35]: 0 0.06/0.47 with precondition: [0>=V_n+1] 0.06/0.47 0.06/0.47 * Chain [34]: 0 0.06/0.47 with precondition: [0>=V_N+1] 0.06/0.47 0.06/0.47 * Chain [33]: 1*s(33)+1*s(34)+2 0.06/0.47 Such that:s(33) =< V_m 0.06/0.47 s(34) =< V_N+1 0.06/0.47 0.06/0.47 with precondition: [V_m>=2,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 0.06/0.47 * Chain [32]: 1*s(36)+1*s(37)+1*s(38)+1*s(39)+2 0.06/0.47 Such that:s(35) =< V_m 0.06/0.47 s(36) =< V_n-V_N 0.06/0.47 s(37) =< V_N+1 0.06/0.47 s(38) =< s(35) 0.06/0.47 s(39) =< s(36)*s(35) 0.06/0.47 0.06/0.47 with precondition: [V_m>=2,V_N>=1,V_n>=V_N+2] 0.06/0.47 0.06/0.47 0.06/0.47 Closed-form bounds of eval_foo_start(V_i,V_j,V_k,V_m,V_n,V_N,B): 0.06/0.47 ------------------------------------- 0.06/0.47 * Chain [41] with precondition: [V_m=0,V_n>=1,V_N>=0] 0.06/0.47 - Upper bound: V_n 0.06/0.47 - Complexity: n 0.06/0.47 * Chain [40] with precondition: [V_m=1,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 - Upper bound: V_N+3 0.06/0.47 - Complexity: n 0.06/0.47 * Chain [39] with precondition: [V_m=1,V_N>=1,V_n>=V_N+2] 0.06/0.47 - Upper bound: 2*V_n-V_N+3 0.06/0.47 - Complexity: n 0.06/0.47 * Chain [38] with precondition: [V_n=0,V_m>=0,V_N>=0] 0.06/0.47 - Upper bound: 0 0.06/0.47 - Complexity: constant 0.06/0.47 * Chain [37] with precondition: [V_N=0,V_m>=1,V_n>=1] 0.06/0.47 - Upper bound: V_n*V_m+V_n 0.06/0.47 - Complexity: n^2 0.06/0.47 * Chain [36] with precondition: [0>=V_m+1] 0.06/0.47 - Upper bound: 0 0.06/0.47 - Complexity: constant 0.06/0.47 * Chain [35] with precondition: [0>=V_n+1] 0.06/0.47 - Upper bound: 0 0.06/0.47 - Complexity: constant 0.06/0.47 * Chain [34] with precondition: [0>=V_N+1] 0.06/0.47 - Upper bound: 0 0.06/0.47 - Complexity: constant 0.06/0.47 * Chain [33] with precondition: [V_m>=2,V_n>=1,V_N>=1,V_N+1>=V_n] 0.06/0.47 - Upper bound: V_m+V_N+3 0.06/0.47 - Complexity: n 0.06/0.47 * Chain [32] with precondition: [V_m>=2,V_N>=1,V_n>=V_N+2] 0.06/0.47 - Upper bound: V_n-V_N+(V_m+2+(V_n-V_N)*V_m+(V_N+1)) 0.06/0.47 - Complexity: n^2 0.06/0.47 0.06/0.47 ### Maximum cost of eval_foo_start(V_i,V_j,V_k,V_m,V_n,V_N,B): max([nat(V_n)*nat(V_m)+nat(V_n),nat(V_N+1)+2+max([nat(V_n-V_N)*2,nat(V_n-V_N)*nat(V_m)+nat(V_n-V_N)+nat(V_m)])]) 0.06/0.47 Asymptotic class: n^2 0.06/0.47 * Total analysis performed in 384 ms. 0.06/0.47 0.06/0.58 EOF