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

#### Computed strongly connected components 
0. recursive  : [f1/4]
1. non_recursive  : [exit_location/1]
2. non_recursive  : [f1_loop_cont/2]
3. non_recursive  : [f3/4]

#### Obtained direct recursion through partial evaluation 
0. SCC is partially evaluated into f1/4
1. SCC is completely evaluated into other SCCs
2. SCC is completely evaluated into other SCCs
3. SCC is partially evaluated into f3/4

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

### Specialization of cost equations f1/4 
* CE 4 is refined into CE [5] 
* CE 3 is refined into CE [6] 
* CE 2 is refined into CE [7] 


### Cost equations --> "Loop" of f1/4 
* CEs [6] --> Loop 5 
* CEs [7] --> Loop 6 
* CEs [5] --> Loop 7 

### Ranking functions of CR f1(A,B,C,D) 
* RF of phase [5]: [B-C-1]
* RF of phase [6]: [A-B]

#### Partial ranking functions of CR f1(A,B,C,D) 
* Partial RF of phase [5]:
  - RF of loop [5:1]:
    B-C-1
* Partial RF of phase [6]:
  - RF of loop [6:1]:
    A-B


### Specialization of cost equations f3/4 
* CE 1 is refined into CE [8,9,10] 


### Cost equations --> "Loop" of f3/4 
* CEs [10] --> Loop 8 
* CEs [9] --> Loop 9 
* CEs [8] --> Loop 10 

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

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


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

#### Cost of chains of f1(A,B,C,D):
* Chain [[6],[5],7]: 1*it(5)+1*it(6)+0
  Such that:it(6) =< A-B
it(5) =< A-C

  with precondition: [D=2,A>=B+1,B>=C+1] 

* Chain [[6],7]: 1*it(6)+0
  Such that:it(6) =< A-B

  with precondition: [D=2,A>=B+1,B>=C+1] 

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

  with precondition: [D=2,B>=A,B>=C+2] 

* Chain [7]: 0
  with precondition: [D=2,B>=C+1] 


#### Cost of chains of f3(A,B,C,D):
* Chain [10]: 1*s(4)+0
  Such that:s(4) =< B-C

  with precondition: [B>=A,B>=C+2] 

* Chain [9]: 1*s(5)+2*s(7)+0
  Such that:s(6) =< A-B
s(5) =< A-C
s(7) =< s(6)

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

* Chain [8]: 0
  with precondition: [B>=C+1] 


Closed-form bounds of f3(A,B,C,D): 
-------------------------------------
* Chain [10] with precondition: [B>=A,B>=C+2] 
    - Upper bound: B-C 
    - Complexity: n 
* Chain [9] with precondition: [A>=B+1,B>=C+1] 
    - Upper bound: 3*A-2*B-C 
    - Complexity: n 
* Chain [8] with precondition: [B>=C+1] 
    - Upper bound: 0 
    - Complexity: constant 

### Maximum cost of f3(A,B,C,D): max([B-C,nat(A-B)*2+nat(A-C)]) 
Asymptotic class: n 
* Total analysis performed in 45 ms.

