Initial Problem

Start: f0
Program_Vars: X₀
Temp_Vars: B
Locations: f0, f12, f5
Transitions:
t₂: f0(X₀) → f12(B) :|: B ≤ 0
t₀: f0(X₀) → f5(B) :|: 1 ≤ B
t₃: f5(X₀) → f12(X₀) :|: 20 ≤ X₀
t₁: f5(X₀) → f5(1+X₀) :|: X₀ ≤ 19

Preprocessing

Found invariant 1 ≤ X₀ for location f5

Problem after Preprocessing

Start: f0
Program_Vars: X₀
Temp_Vars: B
Locations: f0, f12, f5
Transitions:
t₂: f0(X₀) → f12(B) :|: B ≤ 0
t₀: f0(X₀) → f5(B) :|: 1 ≤ B
t₃: f5(X₀) → f12(X₀) :|: 20 ≤ X₀ ∧ 1 ≤ X₀
t₁: f5(X₀) → f5(1+X₀) :|: X₀ ≤ 19 ∧ 1 ≤ X₀

Found invariant 1 ≤ X₀ for location f5

Found invariant X₀ ≤ 20 ∧ 2 ≤ X₀ for location f5_v1

Analysing control-flow refined program

MPRF for transition t₂₀: f5_v1(X₀) → f5_v1(1+X₀) :|: X₀ ≤ 19 ∧ X₀ ≤ 20 ∧ 1 ≤ X₀ ∧ 2 ≤ X₀ of depth 1:

new bound:

41 {O(1)}

MPRF:

• f5_v1: [21-X₀]

CFR: Improvement to new bound with the following program:

method: PartialEvaluation new bound:

O(1)

cfr-program:

Start: f0
Program_Vars: X₀
Temp_Vars: B
Locations: f0, f12, f5, f5_v1
Transitions:
t₂: f0(X₀) → f12(B) :|: B ≤ 0
t₀: f0(X₀) → f5(B) :|: 1 ≤ B
t₃: f5(X₀) → f12(X₀) :|: 20 ≤ X₀ ∧ 1 ≤ X₀
t₁₉: f5(X₀) → f12(X₀) :|: 20 ≤ X₀ ∧ 1 ≤ X₀
t₁₈: f5(X₀) → f5_v1(1+X₀) :|: X₀ ≤ 19 ∧ 1 ≤ X₀
t₂₁: f5_v1(X₀) → f12(X₀) :|: 20 ≤ X₀ ∧ X₀ ≤ 20 ∧ 1 ≤ X₀ ∧ 2 ≤ X₀
t₂₀: f5_v1(X₀) → f5_v1(1+X₀) :|: X₀ ≤ 19 ∧ X₀ ≤ 20 ∧ 1 ≤ X₀ ∧ 2 ≤ X₀

All Bounds

Timebounds

Overall timebound:47 {O(1)}
t₀: 1 {O(1)}
t₂: 1 {O(1)}
t₃: 1 {O(1)}
t₁₈: 1 {O(1)}
t₁₉: 1 {O(1)}
t₂₀: 41 {O(1)}
t₂₁: 1 {O(1)}

Costbounds

Overall costbound: 47 {O(1)}
t₀: 1 {O(1)}
t₂: 1 {O(1)}
t₃: 1 {O(1)}
t₁₈: 1 {O(1)}
t₁₉: 1 {O(1)}
t₂₀: 41 {O(1)}
t₂₁: 1 {O(1)}

Sizebounds

t₁₈, X₀: 20 {O(1)}
t₂₀, X₀: 20 {O(1)}
t₂₁, X₀: 20 {O(1)}