
Preprocessing Cost Relations
=====================================

#### Computed strongly connected components 
0. recursive  : [evalNestedSinglebb1in/4,evalNestedSinglebb2in/4,evalNestedSinglebb3in/4]
1. recursive  : [evalNestedSinglebb2in_loop_cont/7,evalNestedSinglebb4in/6,evalNestedSinglebb5in/6]
2. non_recursive  : [evalNestedSinglestop/4]
3. non_recursive  : [evalNestedSinglereturnin/4]
4. non_recursive  : [exit_location/1]
5. non_recursive  : [evalNestedSinglebb5in_loop_cont/5]
6. non_recursive  : [evalNestedSingleentryin/4]
7. non_recursive  : [evalNestedSinglestart/4]

#### Obtained direct recursion through partial evaluation 
0. SCC is partially evaluated into evalNestedSinglebb2in/4
1. SCC is partially evaluated into evalNestedSinglebb5in/6
2. SCC is completely evaluated into other SCCs
3. SCC is completely evaluated into other SCCs
4. SCC is completely evaluated into other SCCs
5. SCC is partially evaluated into evalNestedSinglebb5in_loop_cont/5
6. SCC is partially evaluated into evalNestedSingleentryin/4
7. SCC is partially evaluated into evalNestedSinglestart/4

Control-Flow Refinement of Cost Relations
=====================================

### Specialization of cost equations evalNestedSinglebb2in/4 
* CE 12 is refined into CE [13] 
* CE 9 is refined into CE [14] 
* CE 11 is refined into CE [15] 
* CE 10 is refined into CE [16] 


### Cost equations --> "Loop" of evalNestedSinglebb2in/4 
* CEs [16] --> Loop 13 
* CEs [13] --> Loop 14 
* CEs [14] --> Loop 15 
* CEs [15] --> Loop 16 

### Ranking functions of CR evalNestedSinglebb2in(B,C,E,F) 
* RF of phase [13]: [B-C]

#### Partial ranking functions of CR evalNestedSinglebb2in(B,C,E,F) 
* Partial RF of phase [13]:
  - RF of loop [13:1]:
    B-C


### Specialization of cost equations evalNestedSinglebb5in/6 
* CE 5 is refined into CE [17] 
* CE 3 is refined into CE [18,19] 
* CE 6 is refined into CE [20] 
* CE 4 is refined into CE [21,22,23] 


### Cost equations --> "Loop" of evalNestedSinglebb5in/6 
* CEs [23] --> Loop 17 
* CEs [21] --> Loop 18 
* CEs [22] --> Loop 19 
* CEs [17] --> Loop 20 
* CEs [18,19] --> Loop 21 
* CEs [20] --> Loop 22 

### Ranking functions of CR evalNestedSinglebb5in(A,B,C,E,F,G) 
* RF of phase [17,19]: [-A+B]

#### Partial ranking functions of CR evalNestedSinglebb5in(A,B,C,E,F,G) 
* Partial RF of phase [17,19]:
  - RF of loop [17:1]:
    -A/2+B/2-1/2
  - RF of loop [19:1]:
    -A+B


### Specialization of cost equations evalNestedSinglebb5in_loop_cont/5 
* CE 7 is refined into CE [24] 
* CE 8 is refined into CE [25] 


### Cost equations --> "Loop" of evalNestedSinglebb5in_loop_cont/5 
* CEs [24] --> Loop 23 
* CEs [25] --> Loop 24 

### Ranking functions of CR evalNestedSinglebb5in_loop_cont(A,B,C,D,E) 

#### Partial ranking functions of CR evalNestedSinglebb5in_loop_cont(A,B,C,D,E) 


### Specialization of cost equations evalNestedSingleentryin/4 
* CE 2 is refined into CE [26,27,28,29,30,31,32] 


### Cost equations --> "Loop" of evalNestedSingleentryin/4 
* CEs [28,31] --> Loop 25 
* CEs [27,30,32] --> Loop 26 
* CEs [29] --> Loop 27 
* CEs [26] --> Loop 28 

### Ranking functions of CR evalNestedSingleentryin(A,B,C,E) 

#### Partial ranking functions of CR evalNestedSingleentryin(A,B,C,E) 


### Specialization of cost equations evalNestedSinglestart/4 
* CE 1 is refined into CE [33,34,35,36] 


### Cost equations --> "Loop" of evalNestedSinglestart/4 
* CEs [36] --> Loop 29 
* CEs [35] --> Loop 30 
* CEs [34] --> Loop 31 
* CEs [33] --> Loop 32 

### Ranking functions of CR evalNestedSinglestart(A,B,C,E) 

#### Partial ranking functions of CR evalNestedSinglestart(A,B,C,E) 


Computing Bounds
=====================================

#### Cost of chains of evalNestedSinglebb2in(B,C,E,F):
* Chain [[13],16]: 1*it(13)+0
  Such that:it(13) =< B-C

  with precondition: [E=2,B=F,B>=C+1] 

* Chain [[13],15]: 1*it(13)+0
  Such that:it(13) =< -C+F

  with precondition: [E=2,F>=C+1,B>=F+1] 

* Chain [[13],14]: 1*it(13)+0
  Such that:it(13) =< B-C

  with precondition: [E=3,B>=C+1] 

* Chain [15]: 0
  with precondition: [E=2,C=F,B>=C+1] 

* Chain [14]: 0
  with precondition: [E=3,B>=C] 


#### Cost of chains of evalNestedSinglebb5in(A,B,C,E,F,G):
* Chain [[17,19],22]: 1*it(17)+2*it(19)+0
  Such that:it(17) =< -A/2+B/2
aux(3) =< -A+B
it(17) =< aux(3)
it(19) =< aux(3)

  with precondition: [E=3,A>=0,B>=A+1] 

* Chain [[17,19],21]: 1*it(17)+3*it(19)+0
  Such that:it(17) =< -A/2+B/2
aux(4) =< -A+B
it(17) =< aux(4)
it(19) =< aux(4)

  with precondition: [E=3,A>=0,B>=A+2] 

* Chain [[17,19],20]: 1*it(17)+2*it(19)+0
  Such that:it(17) =< -A/2+F/2
aux(5) =< -A+F
it(17) =< aux(5)
it(19) =< aux(5)

  with precondition: [E=4,B=F,B=G+1,A>=0,B>=A+1] 

* Chain [[17,19],18,22]: 1*it(17)+3*it(19)+1
  Such that:it(17) =< -A/2+B/2
aux(6) =< -A+B
it(17) =< aux(6)
it(19) =< aux(6)

  with precondition: [E=3,A>=0,B>=A+2] 

* Chain [[17,19],18,20]: 1*it(17)+3*it(19)+1
  Such that:it(17) =< -A/2+F/2
aux(7) =< -A+F
it(17) =< aux(7)
it(19) =< aux(7)

  with precondition: [E=4,B+1=F,B=G,A>=0,B>=A+2] 

* Chain [22]: 0
  with precondition: [E=3,A>=0] 

* Chain [21]: 1*s(4)+0
  Such that:s(4) =< -A+B

  with precondition: [E=3,A>=0,B>=A+1] 

* Chain [20]: 0
  with precondition: [E=4,G=C,A=F,A>=0,A>=B] 

* Chain [18,22]: 1*s(5)+1
  Such that:s(5) =< -A+B

  with precondition: [E=3,A>=0,B>=A+1] 

* Chain [18,20]: 1*s(5)+1
  Such that:s(5) =< -A+F

  with precondition: [E=4,B+1=F,B=G,A>=0,B>=A+1] 


#### Cost of chains of evalNestedSinglebb5in_loop_cont(A,B,C,D,E):
* Chain [24]: 0
  with precondition: [A=3] 

* Chain [23]: 0
  with precondition: [A=4] 


#### Cost of chains of evalNestedSingleentryin(A,B,C,E):
* Chain [28]: 0
  with precondition: [] 

* Chain [27]: 0
  with precondition: [0>=B] 

* Chain [26]: 2*s(17)+6*s(19)+1*s(20)+1
  Such that:s(20) =< B+1
aux(11) =< B
aux(12) =< B/2
s(17) =< aux(12)
s(19) =< aux(11)
s(17) =< aux(11)

  with precondition: [B>=1] 

* Chain [25]: 2*s(26)+6*s(27)+1*s(28)+3*s(30)+1
  Such that:s(24) =< B
s(29) =< B+1
s(25) =< B/2
s(28) =< B/2+1/2
s(26) =< s(25)
s(26) =< s(24)
s(27) =< s(24)
s(28) =< s(29)
s(30) =< s(29)

  with precondition: [B>=2] 


#### Cost of chains of evalNestedSinglestart(A,B,C,E):
* Chain [32]: 0
  with precondition: [] 

* Chain [31]: 0
  with precondition: [0>=B] 

* Chain [30]: 1*s(31)+2*s(34)+6*s(35)+1
  Such that:s(32) =< B
s(31) =< B+1
s(33) =< B/2
s(34) =< s(33)
s(35) =< s(32)
s(34) =< s(32)

  with precondition: [B>=1] 

* Chain [29]: 1*s(39)+2*s(40)+6*s(41)+3*s(42)+1
  Such that:s(36) =< B
s(37) =< B+1
s(38) =< B/2
s(39) =< B/2+1/2
s(40) =< s(38)
s(40) =< s(36)
s(41) =< s(36)
s(39) =< s(37)
s(42) =< s(37)

  with precondition: [B>=2] 


Closed-form bounds of evalNestedSinglestart(A,B,C,E): 
-------------------------------------
* Chain [32] with precondition: [] 
    - Upper bound: 0 
    - Complexity: constant 
* Chain [31] with precondition: [0>=B] 
    - Upper bound: 0 
    - Complexity: constant 
* Chain [30] with precondition: [B>=1] 
    - Upper bound: 8*B+2 
    - Complexity: n 
* Chain [29] with precondition: [B>=2] 
    - Upper bound: 21/2*B+9/2 
    - Complexity: n 

### Maximum cost of evalNestedSinglestart(A,B,C,E): nat(B)*6+1+nat(B+1)+nat(B/2)*2+(nat(B+1)*2+nat(B/2+1/2)) 
Asymptotic class: n 
* Total analysis performed in 123 ms.

