Initial Problem

Start: l0
Program_Vars: X₀, X₁, X₂, X₃, X₄
Temp_Vars: F
Locations: l0, l1, l2
Transitions:
t₀: l0(X₀, X₁, X₂, X₃, X₄) → l1(0, 0, X₂, X₃, X₄)
t₁: l1(X₀, X₁, X₂, X₃, X₄) → l1(X₀, X₁, X₂-1, F, X₄) :|: 1 ≤ X₂ ∧ 1 ≤ F
t₂: l1(X₀, X₁, X₂, X₃, X₄) → l1(X₀, X₁, X₂-2, F, X₄) :|: 1 ≤ X₂ ∧ F ≤ 0
t₃: l1(X₀, X₁, X₂, X₃, X₄) → l2(X₀, X₁, X₂, X₃, F) :|: X₂ ≤ 0
t₄: l2(X₀, X₁, X₂, X₃, X₄) → l2(1, X₁, X₂, X₃, F) :|: 1 ≤ X₄
t₅: l2(X₀, X₁, X₂, X₃, X₄) → l2(0, X₁, X₂, X₃, F) :|: X₄ ≤ 0

Preprocessing

Eliminate variables {X₀,X₁,X₃} that do not contribute to the problem

Found invariant X₂ ≤ 0 for location l2

Problem after Preprocessing

Start: l0
Program_Vars: X₂, X₄
Temp_Vars: F
Locations: l0, l1, l2
Transitions:
t₁₄: l0(X₂, X₄) → l1(X₂, X₄)
t₁₅: l1(X₂, X₄) → l1(X₂-1, X₄) :|: 1 ≤ X₂ ∧ 1 ≤ F
t₁₆: l1(X₂, X₄) → l1(X₂-2, X₄) :|: 1 ≤ X₂ ∧ F ≤ 0
t₁₇: l1(X₂, X₄) → l2(X₂, F) :|: X₂ ≤ 0
t₁₈: l2(X₂, X₄) → l2(X₂, F) :|: 1 ≤ X₄ ∧ X₂ ≤ 0
t₁₉: l2(X₂, X₄) → l2(X₂, F) :|: X₄ ≤ 0 ∧ X₂ ≤ 0

MPRF for transition t₁₅: l1(X₂, X₄) → l1(X₂-1, X₄) :|: 1 ≤ X₂ ∧ 1 ≤ F of depth 1:

new bound:

X₂ {O(n)}

MPRF:

l1 [X₂ ]

MPRF for transition t₁₆: l1(X₂, X₄) → l1(X₂-2, X₄) :|: 1 ≤ X₂ ∧ F ≤ 0 of depth 1:

new bound:

X₂ {O(n)}

MPRF:

l1 [X₂ ]

Analysing control-flow refined program

Found invariant X₂ ≤ 0 for location l2

CFR did not improve the program. Rolling back

All Bounds

Timebounds

Overall timebound:inf {Infinity}
t₁₄: 1 {O(1)}
t₁₅: X₂ {O(n)}
t₁₆: X₂ {O(n)}
t₁₇: 1 {O(1)}
t₁₈: inf {Infinity}
t₁₉: inf {Infinity}

Costbounds

Overall costbound: inf {Infinity}
t₁₄: 1 {O(1)}
t₁₅: X₂ {O(n)}
t₁₆: X₂ {O(n)}
t₁₇: 1 {O(1)}
t₁₈: inf {Infinity}
t₁₉: inf {Infinity}

Sizebounds

t₁₄, X₂: X₂ {O(n)}
t₁₄, X₄: X₄ {O(n)}
t₁₅, X₂: 2⋅X₂ {O(n)}
t₁₅, X₄: 2⋅X₄ {O(n)}
t₁₆, X₂: 2⋅X₂ {O(n)}
t₁₆, X₄: 2⋅X₄ {O(n)}
t₁₇, X₂: 5⋅X₂ {O(n)}
t₁₈, X₂: 10⋅X₂ {O(n)}
t₁₉, X₂: 10⋅X₂ {O(n)}