Initial Problem

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

Preprocessing

Cut unreachable locations [l3] from the program graph

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

Found invariant X₂ ≤ 999 ∧ X₂ ≤ 1000+X₁ ∧ X₁+X₂ ≤ 998 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁ for location l2

Found invariant X₁ ≤ 999 ∧ 0 ≤ 1+X₁ for location l1

Found invariant 1+X₂ ≤ 0 ∧ X₂ ≤ X₁ ∧ 2+X₁+X₂ ≤ 0 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁ for location l4

Problem after Preprocessing

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

Found invariant X₂ ≤ 999 ∧ X₂ ≤ 1000+X₁ ∧ X₁+X₂ ≤ 998 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁ for location l2

Found invariant X₁ ≤ 999 ∧ 0 ≤ 1+X₁ for location l1

Found invariant 1+X₂ ≤ 0 ∧ X₂ ≤ X₁ ∧ 2+X₁+X₂ ≤ 0 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁ for location l4

Time-Bound by TWN-Loops:

TWN-Loops: t₁₅ 2002 {O(1)}

TWN-Loops:

entry: t₁₄: l0(X₁, X₂) → l1(999, X₂)
results in twn-loop: twn:Inv: [X₁ ≤ 999 ∧ 0 ≤ 1+X₁] , (X₁,X₂) -> (X₁-1,X₂) :|: 0 ≤ X₁
order: [X₁]
closed-form:
X₁: X₁ + [[n != 0]] * -1 * n^1

Termination: true
Formula:

1 < 0
∨ 0 < X₁ ∧ 1 ≤ 0 ∧ 0 ≤ 1
∨ 1 ≤ 0 ∧ 0 ≤ 1 ∧ 0 ≤ X₁ ∧ X₁ ≤ 0

Stabilization-Threshold for: 0 ≤ X₁
alphas_abs: X₁
M: 0
N: 1
Bound: 2⋅X₁+2 {O(n)}

relevant size-bounds w.r.t. t₁₄:
X₁: 999 {O(1)}
Runtime-bound of t₁₄: 1 {O(1)}
Results in: 2002 {O(1)}

2002 {O(1)}

Found invariant X₂ ≤ 999 ∧ X₂ ≤ 1000+X₁ ∧ X₁+X₂ ≤ 998 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁ for location l2

Found invariant X₁ ≤ 999 ∧ 0 ≤ 1+X₁ for location l1

Found invariant 1+X₂ ≤ 0 ∧ X₂ ≤ X₁ ∧ 2+X₁+X₂ ≤ 0 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁ for location l4

Time-Bound by TWN-Loops:

TWN-Loops: t₁₇ 2002 {O(1)}

TWN-Loops:

entry: t₁₆: l1(X₁, X₂) → l2(X₁, 999) :|: X₁+1 ≤ 0 ∧ X₁ ≤ 999 ∧ 0 ≤ 1+X₁
results in twn-loop: twn:Inv: [X₂ ≤ 999 ∧ X₂ ≤ 1000+X₁ ∧ X₁+X₂ ≤ 998 ∧ 0 ≤ 1+X₂ ∧ 0 ≤ 2+X₁+X₂ ∧ X₁ ≤ X₂ ∧ 1+X₁ ≤ 0 ∧ 0 ≤ 1+X₁] , (X₁,X₂) -> (X₁,X₂-1) :|: 0 ≤ X₂
order: [X₁; X₂]
closed-form:
X₁: X₁
X₂: X₂ + [[n != 0]] * -1 * n^1

Termination: true
Formula:

1 < 0
∨ 0 < X₂ ∧ 1 ≤ 0 ∧ 0 ≤ 1
∨ 1 ≤ 0 ∧ 0 ≤ 1 ∧ 0 ≤ X₂ ∧ X₂ ≤ 0

Stabilization-Threshold for: 0 ≤ X₂
alphas_abs: X₂
M: 0
N: 1
Bound: 2⋅X₂+2 {O(n)}

relevant size-bounds w.r.t. t₁₆:
X₂: 999 {O(1)}
Runtime-bound of t₁₆: 1 {O(1)}
Results in: 2002 {O(1)}

2002 {O(1)}

All Bounds

Timebounds

Overall timebound:4007 {O(1)}
t₁₄: 1 {O(1)}
t₁₅: 2002 {O(1)}
t₁₆: 1 {O(1)}
t₁₇: 2002 {O(1)}
t₁₈: 1 {O(1)}

Costbounds

Overall costbound: 4007 {O(1)}
t₁₄: 1 {O(1)}
t₁₅: 2002 {O(1)}
t₁₆: 1 {O(1)}
t₁₇: 2002 {O(1)}
t₁₈: 1 {O(1)}

Sizebounds

t₁₄, X₁: 999 {O(1)}
t₁₄, X₂: X₂ {O(n)}
t₁₅, X₁: 998 {O(1)}
t₁₅, X₂: X₂ {O(n)}
t₁₆, X₁: 1 {O(1)}
t₁₆, X₂: 999 {O(1)}
t₁₇, X₁: 1 {O(1)}
t₁₇, X₂: 998 {O(1)}
t₁₈, X₁: 1 {O(1)}
t₁₈, X₂: 1 {O(1)}