Initial Problem

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

Preprocessing

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

Found invariant X₁ ≤ X₀ for location l2

Problem after Preprocessing

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

MPRF for transition t₁₃: l1(X₀, X₁) → l1(1+X₀, X₁) :|: 1 ≤ E ∧ 1+X₀ ≤ X₁ of depth 1:

new bound:

X₀+X₁ {O(n)}

MPRF:

l1 [X₁-X₀ ]

MPRF for transition t₁₄: l1(X₀, X₁) → l1(1+X₀, X₁) :|: E+1 ≤ 0 ∧ 1+X₀ ≤ X₁ of depth 1:

new bound:

X₀+X₁ {O(n)}

MPRF:

l1 [X₁-X₀ ]

Analysing control-flow refined program

Cut unsatisfiable transition t₈₈: n_l1___1→l2

Found invariant X₁ ≤ X₀ for location l2

Found invariant X₀ ≤ X₁ for location n_l1___2

Found invariant 1+X₀ ≤ X₁ for location n_l1___1

MPRF for transition t₆₈: n_l1___1(X₀, X₁) → n_l1___2(X₀+1, X₁) :|: 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ of depth 1:

new bound:

3⋅X₀+3⋅X₁+5 {O(n)}

MPRF:

n_l1___1 [X₁+1-X₀ ]
n_l1___2 [X₁+1-X₀ ]

MPRF for transition t₆₉: n_l1___1(X₀, X₁) → n_l1___2(X₀+1, X₁) :|: 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ of depth 1:

new bound:

3⋅X₀+3⋅X₁+5 {O(n)}

MPRF:

n_l1___1 [X₁+1-X₀ ]
n_l1___2 [X₁+1-X₀ ]

MPRF for transition t₇₀: n_l1___2(X₀, X₁) → n_l1___1(X₀, X₁) :|: X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ of depth 1:

new bound:

3⋅X₀+3⋅X₁+4 {O(n)}

MPRF:

n_l1___1 [X₁-X₀ ]
n_l1___2 [X₁+1-X₀ ]

MPRF for transition t₇₁: n_l1___2(X₀, X₁) → n_l1___2(X₀+1, X₁) :|: X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ of depth 1:

new bound:

3⋅X₀+3⋅X₁+4 {O(n)}

MPRF:

n_l1___1 [X₁-X₀ ]
n_l1___2 [X₁+1-X₀ ]

MPRF for transition t₇₂: n_l1___2(X₀, X₁) → n_l1___2(X₀+1, X₁) :|: X₀ ≤ X₁ ∧ X₀ ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ X₀ ≤ X₁ of depth 1:

new bound:

3⋅X₀+3⋅X₁+4 {O(n)}

MPRF:

n_l1___1 [X₁-X₀ ]
n_l1___2 [X₁+1-X₀ ]

CFR did not improve the program. Rolling back

All Bounds

Timebounds

Overall timebound:inf {Infinity}
t₁₂: 1 {O(1)}
t₁₃: X₀+X₁ {O(n)}
t₁₄: X₀+X₁ {O(n)}
t₁₅: inf {Infinity}
t₁₆: 1 {O(1)}

Costbounds

Overall costbound: inf {Infinity}
t₁₂: 1 {O(1)}
t₁₃: X₀+X₁ {O(n)}
t₁₄: X₀+X₁ {O(n)}
t₁₅: inf {Infinity}
t₁₆: 1 {O(1)}

Sizebounds

t₁₂, X₀: X₀ {O(n)}
t₁₂, X₁: X₁ {O(n)}
t₁₃, X₀: 2⋅X₁+5⋅X₀ {O(n)}
t₁₃, X₁: 3⋅X₁ {O(n)}
t₁₄, X₀: 2⋅X₁+5⋅X₀ {O(n)}
t₁₄, X₁: 3⋅X₁ {O(n)}
t₁₅, X₀: 2⋅X₁+5⋅X₀ {O(n)}
t₁₅, X₁: 3⋅X₁ {O(n)}
t₁₆, X₀: 11⋅X₀+4⋅X₁ {O(n)}
t₁₆, X₁: 7⋅X₁ {O(n)}