Initial Problem

Start: l0
Program_Vars: X₀, X₁, X₂, X₃
Temp_Vars:
Locations: l0, l1, l2, l3, l4, l5
Transitions:
t₀: l0(X₀, X₁, X₂, X₃) → l2(X₀, X₁, X₂, X₃)
t₂: l1(X₀, X₁, X₂, X₃) → l3(X₀, X₁, X₂, X₃) :|: X₀ < X₁
t₃: l1(X₀, X₁, X₂, X₃) → l4(X₀, X₁, X₂, X₃) :|: X₁ ≤ X₀
t₁: l2(X₀, X₁, X₂, X₃) → l1(0, X₁, X₂, X₃)
t₄: l3(X₀, X₁, X₂, X₃) → l1(X₀+1, X₁, X₂, X₃)
t₅: l4(X₀, X₁, X₂, X₃) → l5(X₀, X₁, X₂, X₃)

Preprocessing

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

Found invariant X₁ ≤ X₀ ∧ 0 ≤ X₀ for location l5

Found invariant 0 ≤ X₀ for location l1

Found invariant X₁ ≤ X₀ ∧ 0 ≤ X₀ for location l4

Found invariant 1 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1+X₀ ≤ X₁ ∧ 0 ≤ X₀ for location l3

Problem after Preprocessing

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

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

new bound:

X₁ {O(n)}

MPRF:

l3 [X₁-X₀-1 ]
l1 [X₁-X₀ ]

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

new bound:

X₁ {O(n)}

MPRF:

l3 [X₁-X₀ ]
l1 [X₁-X₀ ]

All Bounds

Timebounds

Overall timebound:2⋅X₁+4 {O(n)}
t₁₂: 1 {O(1)}
t₁₃: X₁ {O(n)}
t₁₄: 1 {O(1)}
t₁₅: 1 {O(1)}
t₁₆: X₁ {O(n)}
t₁₇: 1 {O(1)}

Costbounds

Overall costbound: 2⋅X₁+4 {O(n)}
t₁₂: 1 {O(1)}
t₁₃: X₁ {O(n)}
t₁₄: 1 {O(1)}
t₁₅: 1 {O(1)}
t₁₆: X₁ {O(n)}
t₁₇: 1 {O(1)}

Sizebounds

t₁₂, X₀: X₀ {O(n)}
t₁₂, X₁: X₁ {O(n)}
t₁₃, X₀: X₁ {O(n)}
t₁₃, X₁: X₁ {O(n)}
t₁₄, X₀: X₁ {O(n)}
t₁₄, X₁: 2⋅X₁ {O(n)}
t₁₅, X₀: 0 {O(1)}
t₁₅, X₁: X₁ {O(n)}
t₁₆, X₀: X₁ {O(n)}
t₁₆, X₁: X₁ {O(n)}
t₁₇, X₀: X₁ {O(n)}
t₁₇, X₁: 2⋅X₁ {O(n)}