Initial Problem

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

Preprocessing

Found invariant 4 ≤ X₀ for location f12

Problem after Preprocessing

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

knowledge_propagation leads to new time bound 1 {O(1)} for transition t₂: f4(X₀) → f4(1) :|: X₀ ≤ 3 ∧ X₀ ≤ 0

Found invariant X₀ ≤ 2 ∧ 2 ≤ X₀ for location f4_v3

Found invariant X₀ ≤ 4 ∧ 2 ≤ X₀ for location f4_v2

Found invariant 4 ≤ X₀ for location f12

Found invariant X₀ ≤ 1 ∧ 1 ≤ X₀ for location f4_v1

Analysing control-flow refined program

MPRF for transition t₃₂: f4_v2(X₀) → f4_v2(1+X₀) :|: X₀ ≤ 3 ∧ 1 ≤ X₀ ∧ X₀ ≤ 4 ∧ 2 ≤ X₀ of depth 1:

new bound:

17 {O(1)}

MPRF:

• f4_v2: [5-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, f4, f4_v1, f4_v2, f4_v3
Transitions:
t₀: f0(X₀) → f4(B)
t₃: f4(X₀) → f12(X₀) :|: 4 ≤ X₀
t₃₁: f4(X₀) → f12(X₀) :|: 4 ≤ X₀
t₂₉: f4(X₀) → f4_v1(1) :|: X₀ ≤ 3 ∧ X₀ ≤ 0
t₃₀: f4(X₀) → f4_v2(1+X₀) :|: X₀ ≤ 3 ∧ 1 ≤ X₀
t₃₄: f4_v1(X₀) → f4_v3(1+X₀) :|: X₀ ≤ 3 ∧ 1 ≤ X₀ ∧ X₀ ≤ 4 ∧ X₀ ≤ 1
t₃₃: f4_v2(X₀) → f12(X₀) :|: 4 ≤ X₀ ∧ X₀ ≤ 4 ∧ 1 ≤ X₀ ∧ 2 ≤ X₀
t₃₂: f4_v2(X₀) → f4_v2(1+X₀) :|: X₀ ≤ 3 ∧ 1 ≤ X₀ ∧ X₀ ≤ 4 ∧ 2 ≤ X₀
t₃₅: f4_v3(X₀) → f4_v2(1+X₀) :|: X₀ ≤ 3 ∧ 1 ≤ X₀ ∧ X₀ ≤ 4 ∧ X₀ ≤ 2 ∧ 2 ≤ X₀

All Bounds

Timebounds

Overall timebound:25 {O(1)}
t₀: 1 {O(1)}
t₃: 1 {O(1)}
t₂₉: 1 {O(1)}
t₃₀: 1 {O(1)}
t₃₁: 1 {O(1)}
t₃₂: 17 {O(1)}
t₃₃: 1 {O(1)}
t₃₄: 1 {O(1)}
t₃₅: 1 {O(1)}

Costbounds

Overall costbound: 25 {O(1)}
t₀: 1 {O(1)}
t₃: 1 {O(1)}
t₂₉: 1 {O(1)}
t₃₀: 1 {O(1)}
t₃₁: 1 {O(1)}
t₃₂: 17 {O(1)}
t₃₃: 1 {O(1)}
t₃₄: 1 {O(1)}
t₃₅: 1 {O(1)}

Sizebounds

t₂₉, X₀: 1 {O(1)}
t₃₀, X₀: 4 {O(1)}
t₃₂, X₀: 4 {O(1)}
t₃₃, X₀: 4 {O(1)}
t₃₄, X₀: 2 {O(1)}
t₃₅, X₀: 3 {O(1)}