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

#### Computed strongly connected components 
0. recursive  : [evalrealheapsortstep1bb2in/3,evalrealheapsortstep1bb3in/3,evalrealheapsortstep1bb4in/3]
1. recursive  : [evalrealheapsortstep1bb3in_loop_cont/7,evalrealheapsortstep1bb5in/6,evalrealheapsortstep1bb6in/6]
2. non_recursive  : [evalrealheapsortstep1stop/4]
3. non_recursive  : [evalrealheapsortstep1returnin/4]
4. non_recursive  : [exit_location/1]
5. non_recursive  : [evalrealheapsortstep1bb6in_loop_cont/5]
6. non_recursive  : [evalrealheapsortstep1entryin/4]
7. non_recursive  : [evalrealheapsortstep1start/4]

#### Obtained direct recursion through partial evaluation 
0. SCC is partially evaluated into evalrealheapsortstep1bb3in/3
1. SCC is partially evaluated into evalrealheapsortstep1bb6in/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 evalrealheapsortstep1bb6in_loop_cont/5
6. SCC is partially evaluated into evalrealheapsortstep1entryin/4
7. SCC is partially evaluated into evalrealheapsortstep1start/4

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

### Specialization of cost equations evalrealheapsortstep1bb3in/3 
* CE 13 is refined into CE [14] 
* CE 10 is refined into CE [15] 
* CE 12 is refined into CE [16] 
* CE 11 is refined into CE [17] 


### Cost equations --> "Loop" of evalrealheapsortstep1bb3in/3 
* CEs [17] --> Loop 14 
* CEs [14] --> Loop 15 
* CEs [15] --> Loop 16 
* CEs [16] --> Loop 17 

### Ranking functions of CR evalrealheapsortstep1bb3in(C,G,H) 
* RF of phase [14]: [C]

#### Partial ranking functions of CR evalrealheapsortstep1bb3in(C,G,H) 
* Partial RF of phase [14]:
  - RF of loop [14:1]:
    C


### Specialization of cost equations evalrealheapsortstep1bb6in/6 
* CE 6 is refined into CE [18] 
* CE 4 is refined into CE [19,20] 
* CE 7 is refined into CE [21] 
* CE 5 is refined into CE [22,23,24] 


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

### Ranking functions of CR evalrealheapsortstep1bb6in(A,B,C,G,H,I) 
* RF of phase [18,19,20]: [A-B]

#### Partial ranking functions of CR evalrealheapsortstep1bb6in(A,B,C,G,H,I) 
* Partial RF of phase [18,19,20]:
  - RF of loop [18:1,19:1,20:1]:
    A-B


### Specialization of cost equations evalrealheapsortstep1bb6in_loop_cont/5 
* CE 8 is refined into CE [25] 
* CE 9 is refined into CE [26] 


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

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

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


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


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

### Ranking functions of CR evalrealheapsortstep1entryin(A,B,C,G) 

#### Partial ranking functions of CR evalrealheapsortstep1entryin(A,B,C,G) 


### Specialization of cost equations evalrealheapsortstep1start/4 
* CE 1 is refined into CE [32,33] 


### Cost equations --> "Loop" of evalrealheapsortstep1start/4 
* CEs [33] --> Loop 28 
* CEs [32] --> Loop 29 

### Ranking functions of CR evalrealheapsortstep1start(A,B,C,G) 

#### Partial ranking functions of CR evalrealheapsortstep1start(A,B,C,G) 


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

#### Cost of chains of evalrealheapsortstep1bb3in(C,G,H):
* Chain [[14],17]: 1*it(14)+0
  Such that:it(14) =< C

  with precondition: [G=2,0>=H,C>=1,2*H+1>=0] 

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

  with precondition: [G=2,H>=1,C>=2*H+1] 

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

  with precondition: [G=3,C>=1] 

* Chain [16]: 0
  with precondition: [G=2,C=H,C>=1] 

* Chain [15]: 0
  with precondition: [G=3,2*C+1>=0] 


#### Cost of chains of evalrealheapsortstep1bb6in(A,B,C,G,H,I):
* Chain [[18,19,20],23]: 3*it(18)+1*s(5)+1*s(6)+0
  Such that:aux(1) =< A
aux(5) =< A-B
it(18) =< aux(5)
aux(2) =< aux(1)+1
s(5) =< it(18)*aux(1)
s(6) =< it(18)*aux(2)

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

* Chain [[18,19,20],22]: 3*it(18)+1*s(5)+1*s(6)+1*s(7)+0
  Such that:aux(6) =< A
aux(7) =< A-B
s(7) =< aux(6)
it(18) =< aux(7)
aux(2) =< aux(6)+1
s(5) =< it(18)*aux(6)
s(6) =< it(18)*aux(2)

  with precondition: [G=3,B>=1,A>=B+2] 

* Chain [[18,19,20],21]: 3*it(18)+1*s(5)+1*s(6)+0
  Such that:aux(1) =< H
aux(8) =< -B+H
it(18) =< aux(8)
aux(2) =< aux(1)+1
s(5) =< it(18)*aux(1)
s(6) =< it(18)*aux(2)

  with precondition: [G=4,A=H,A>=3,B>=1,2*I+1>=0,A>=B+1,A>=I+1] 

* Chain [23]: 0
  with precondition: [G=3,A>=3,B>=1] 

* Chain [22]: 1*s(7)+0
  Such that:s(7) =< B

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


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

* Chain [24]: 0
  with precondition: [A=4,B>=3] 


#### Cost of chains of evalrealheapsortstep1entryin(A,B,C,G):
* Chain [27]: 0
  with precondition: [2>=A] 

* Chain [26]: 1*s(17)+10*s(18)+3*s(20)+3*s(21)+0
  Such that:s(17) =< 1
aux(12) =< A
s(18) =< aux(12)
s(19) =< aux(12)+1
s(20) =< s(18)*aux(12)
s(21) =< s(18)*s(19)

  with precondition: [A>=3] 


#### Cost of chains of evalrealheapsortstep1start(A,B,C,G):
* Chain [29]: 0
  with precondition: [2>=A] 

* Chain [28]: 1*s(35)+10*s(37)+3*s(39)+3*s(40)+0
  Such that:s(35) =< 1
s(36) =< A
s(37) =< s(36)
s(38) =< s(36)+1
s(39) =< s(37)*s(36)
s(40) =< s(37)*s(38)

  with precondition: [A>=3] 


Closed-form bounds of evalrealheapsortstep1start(A,B,C,G): 
-------------------------------------
* Chain [29] with precondition: [2>=A] 
    - Upper bound: 0 
    - Complexity: constant 
* Chain [28] with precondition: [A>=3] 
    - Upper bound: 13*A+1+6*A*A 
    - Complexity: n^2 

### Maximum cost of evalrealheapsortstep1start(A,B,C,G): nat(A)*13+1+nat(A)*6*nat(A) 
Asymptotic class: n^2 
* Total analysis performed in 123 ms.

