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

#### Computed strongly connected components 
0. recursive  : [evalwcet2bb1in/4,evalwcet2bb2in/4]
1. recursive  : [evalwcet2bb2in_loop_cont/6,evalwcet2bb4in/5,evalwcet2bb5in/5]
2. non_recursive  : [evalwcet2stop/3]
3. non_recursive  : [evalwcet2returnin/3]
4. non_recursive  : [exit_location/1]
5. non_recursive  : [evalwcet2bb5in_loop_cont/4]
6. non_recursive  : [evalwcet2entryin/3]
7. non_recursive  : [evalwcet2start/3]

#### Obtained direct recursion through partial evaluation 
0. SCC is partially evaluated into evalwcet2bb2in/4
1. SCC is partially evaluated into evalwcet2bb5in/5
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 evalwcet2bb5in_loop_cont/4
6. SCC is partially evaluated into evalwcet2entryin/3
7. SCC is partially evaluated into evalwcet2start/3

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

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


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

### Ranking functions of CR evalwcet2bb2in(A,B,C,D) 
* RF of phase [13]: [-B+10]

#### Partial ranking functions of CR evalwcet2bb2in(A,B,C,D) 
* Partial RF of phase [13]:
  - RF of loop [13:1]:
    -B+10


### Specialization of cost equations evalwcet2bb5in/5 
* 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] 


### Cost equations --> "Loop" of evalwcet2bb5in/5 
* CEs [22] --> Loop 17 
* CEs [21] --> Loop 18 
* CEs [17] --> Loop 19 
* CEs [18] --> Loop 20 
* CEs [19] --> Loop 21 
* CEs [20] --> Loop 22 

### Ranking functions of CR evalwcet2bb5in(A,B,C,D,E) 
* RF of phase [17]: [-A+5]
* RF of phase [18]: [-A+3]

#### Partial ranking functions of CR evalwcet2bb5in(A,B,C,D,E) 
* Partial RF of phase [17]:
  - RF of loop [17:1]:
    -A+5
* Partial RF of phase [18]:
  - RF of loop [18:1]:
    -A+3


### Specialization of cost equations evalwcet2bb5in_loop_cont/4 
* CE 7 is refined into CE [23] 
* CE 8 is refined into CE [24] 


### Cost equations --> "Loop" of evalwcet2bb5in_loop_cont/4 
* CEs [23] --> Loop 23 
* CEs [24] --> Loop 24 

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

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


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


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

### Ranking functions of CR evalwcet2entryin(A,B,C) 

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


### Specialization of cost equations evalwcet2start/3 
* CE 1 is refined into CE [33,34,35,36,37,38] 


### Cost equations --> "Loop" of evalwcet2start/3 
* CEs [38] --> Loop 31 
* CEs [37] --> Loop 32 
* CEs [36] --> Loop 33 
* CEs [35] --> Loop 34 
* CEs [34] --> Loop 35 
* CEs [33] --> Loop 36 

### Ranking functions of CR evalwcet2start(A,B,C) 

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


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

#### Cost of chains of evalwcet2bb2in(A,B,C,D):
* Chain [[13],15]: 1*it(13)+0
  Such that:it(13) =< -B+10

  with precondition: [C=2,D=10,4>=A,9>=B,A>=3,B>=0] 

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

  with precondition: [C=3,4>=A,9>=B,A>=3,B>=0] 

* Chain [16]: 0
  with precondition: [B=0,C=2,D=0,2>=A] 

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


#### Cost of chains of evalwcet2bb5in(A,B,C,D,E):
* Chain [[18],[17],22]: 1*it(17)+1*it(18)+1*s(3)+0
  Such that:aux(4) =< 2
it(18) =< -A+3
it(17) =< aux(4)
s(3) =< aux(4)*10

  with precondition: [C=3,2>=A] 

* Chain [[18],[17],21]: 1*it(17)+1*it(18)+1*s(3)+0
  Such that:aux(3) =< 1
aux(2) =< 2
it(18) =< -A+3
aux(1) =< aux(2)
it(17) =< aux(2)
aux(1) =< aux(3)
it(17) =< aux(3)
s(3) =< aux(1)*10

  with precondition: [C=3,2>=A] 

* Chain [[18],[17],20]: 1*it(17)+1*it(18)+1*s(3)+1*s(4)+0
  Such that:aux(3) =< 1
aux(2) =< 2
s(4) =< 10
it(18) =< -A+3
aux(1) =< aux(2)
it(17) =< aux(2)
aux(1) =< aux(3)
it(17) =< aux(3)
s(3) =< aux(1)*10

  with precondition: [C=3,2>=A] 

* Chain [[18],[17],19]: 1*it(17)+1*it(18)+1*s(3)+0
  Such that:aux(5) =< 2
it(18) =< -A+3
it(17) =< aux(5)
s(3) =< aux(5)*10

  with precondition: [C=4,D=5,E=10,2>=A] 

* Chain [[18],22]: 1*it(18)+0
  Such that:it(18) =< -A+3

  with precondition: [C=3,2>=A] 

* Chain [[18],21]: 1*it(18)+0
  Such that:it(18) =< -A+3

  with precondition: [C=3,2>=A] 

* Chain [[18],20]: 1*it(18)+1*s(4)+0
  Such that:s(4) =< 10
it(18) =< -A+3

  with precondition: [C=3,2>=A] 

* Chain [[17],22]: 1*it(17)+1*s(3)+0
  Such that:aux(4) =< -A+5
it(17) =< aux(4)
s(3) =< aux(4)*10

  with precondition: [C=3,4>=A,A>=3] 

* Chain [[17],21]: 1*it(17)+1*s(3)+0
  Such that:aux(3) =< 1
aux(2) =< 2
aux(1) =< aux(2)
it(17) =< aux(2)
aux(1) =< aux(3)
it(17) =< aux(3)
s(3) =< aux(1)*10

  with precondition: [A=3,C=3] 

* Chain [[17],20]: 1*it(17)+1*s(3)+1*s(4)+0
  Such that:aux(3) =< 1
aux(2) =< 2
s(4) =< 10
aux(1) =< aux(2)
it(17) =< aux(2)
aux(1) =< aux(3)
it(17) =< aux(3)
s(3) =< aux(1)*10

  with precondition: [A=3,C=3] 

* Chain [[17],19]: 1*it(17)+1*s(3)+0
  Such that:aux(5) =< -A+5
it(17) =< aux(5)
s(3) =< aux(5)*10

  with precondition: [C=4,D=5,E=10,4>=A,A>=3] 

* Chain [22]: 0
  with precondition: [C=3] 

* Chain [21]: 0
  with precondition: [C=3,4>=A] 

* Chain [20]: 1*s(4)+0
  Such that:s(4) =< 10

  with precondition: [C=3,4>=A,A>=3] 

* Chain [19]: 0
  with precondition: [C=4,E=B,A=D,A>=5] 


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

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


#### Cost of chains of evalwcet2entryin(A,B,C):
* Chain [30]: 0
  with precondition: [] 

* Chain [29]: 54
  with precondition: [A=3] 

* Chain [28]: 0
  with precondition: [4>=A] 

* Chain [27]: 1*s(41)+2*s(43)+2*s(44)+0
  Such that:s(41) =< 10
aux(12) =< -A+5
s(43) =< aux(12)
s(44) =< aux(12)*10

  with precondition: [4>=A,A>=3] 

* Chain [26]: 2*s(52)+7*s(53)+2*s(55)+2*s(56)+2*s(57)+2*s(58)+0
  Such that:s(48) =< 1
s(50) =< 10
aux(13) =< 2
aux(14) =< -A+3
s(53) =< aux(14)
s(52) =< s(50)
s(54) =< aux(13)
s(55) =< aux(13)
s(54) =< s(48)
s(55) =< s(48)
s(56) =< s(54)*10
s(57) =< aux(13)
s(58) =< aux(13)*10

  with precondition: [2>=A] 

* Chain [25]: 0
  with precondition: [A>=5] 


#### Cost of chains of evalwcet2start(A,B,C):
* Chain [36]: 0
  with precondition: [] 

* Chain [35]: 54
  with precondition: [A=3] 

* Chain [34]: 0
  with precondition: [4>=A] 

* Chain [33]: 1*s(63)+2*s(65)+2*s(66)+0
  Such that:s(63) =< 10
s(64) =< -A+5
s(65) =< s(64)
s(66) =< s(64)*10

  with precondition: [4>=A,A>=3] 

* Chain [32]: 7*s(71)+2*s(72)+2*s(74)+2*s(75)+2*s(76)+2*s(77)+0
  Such that:s(67) =< 1
s(69) =< 2
s(68) =< 10
s(70) =< -A+3
s(71) =< s(70)
s(72) =< s(68)
s(73) =< s(69)
s(74) =< s(69)
s(73) =< s(67)
s(74) =< s(67)
s(75) =< s(73)*10
s(76) =< s(69)
s(77) =< s(69)*10

  with precondition: [2>=A] 

* Chain [31]: 0
  with precondition: [A>=5] 


Closed-form bounds of evalwcet2start(A,B,C): 
-------------------------------------
* Chain [36] with precondition: [] 
    - Upper bound: 0 
    - Complexity: constant 
* Chain [35] with precondition: [A=3] 
    - Upper bound: 54 
    - Complexity: constant 
* Chain [34] with precondition: [4>=A] 
    - Upper bound: 0 
    - Complexity: constant 
* Chain [33] with precondition: [4>=A,A>=3] 
    - Upper bound: -22*A+120 
    - Complexity: n 
* Chain [32] with precondition: [2>=A] 
    - Upper bound: -7*A+129 
    - Complexity: n 
* Chain [31] with precondition: [A>=5] 
    - Upper bound: 0 
    - Complexity: constant 

### Maximum cost of evalwcet2start(A,B,C): max([54,nat(-A+3)*7+108,nat(-A+5)*22+10]) 
Asymptotic class: n 
* Total analysis performed in 107 ms.

