Initial Problem

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

Preprocessing

Found invariant 1+X₁ ≤ X₂ for location l5

Found invariant 1+X₁ ≤ X₂ for location l4

Found invariant X₂ ≤ X₁ for location l3

Problem after Preprocessing

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

Analysing control-flow refined program

Cut unsatisfiable transition t₁₃₉: n_l1___3→l4

Cut unsatisfiable transition t₁₄₀: n_l1___5→l4

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

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

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

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

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

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

Found invariant X₂ ≤ 0 ∧ 0 ≤ X₂ for location l1

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

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

Found invariant X₂ ≤ 0 ∧ X₂ ≤ X₁ ∧ 0 ≤ X₂ ∧ 0 ≤ X₁+X₂ ∧ 0 ≤ X₁ for location n_l3___7

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

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

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

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

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

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

Found invariant X₂ ≤ 0 ∧ 0 ≤ X₂ for location l1

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

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

Found invariant X₂ ≤ 0 ∧ X₂ ≤ X₁ ∧ 0 ≤ X₂ ∧ 0 ≤ X₁+X₂ ∧ 0 ≤ X₁ for location n_l3___7

Time-Bound by TWN-Loops:

TWN-Loops: t₁₂₃ 2⋅X₀+2⋅X₁+8 {O(n)}

TWN-Loops:

entry: t₁₃₁: n_l3___7(X₀, X₁, X₂) → n_l1___5(X₀, X₁, X₂-1) :|: 0 ≤ X₁ ∧ X₂ ≤ 0 ∧ 0 ≤ X₂ ∧ X₂ ≤ X₁ ∧ X₀ < X₂ ∧ X₂ ≤ 0 ∧ X₂ ≤ X₁ ∧ 0 ≤ X₂ ∧ 0 ≤ X₁+X₂ ∧ 0 ≤ X₁
results in twn-loop: twn:Inv: [1+X₂ ≤ 0 ∧ 1+X₂ ≤ X₁ ∧ 2+X₀+X₂ ≤ 0 ∧ X₀ ≤ X₂ ∧ 0 ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ 0 ∧ 1+X₂ ≤ 0 ∧ 1+X₂ ≤ X₁ ∧ 2+X₀+X₂ ≤ 0 ∧ X₀ ≤ X₂ ∧ 0 ≤ X₁ ∧ 1+X₀ ≤ X₁ ∧ 1+X₀ ≤ 0] , (X₀,X₁,X₂) -> (X₀,X₁,X₂-1) :|: X₂ ≤ X₁ ∧ X₂ ≤ X₁ ∧ X₂ ≤ X₁ ∧ X₂ ≤ X₁ ∧ X₂ ≤ X₁ ∧ X₀ < X₂
order: [X₀; X₁; X₂]
closed-form:
X₀: X₀
X₁: X₁
X₂: X₂ + [[n != 0]] * -1 * n^1

Termination: true
Formula:

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

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

relevant size-bounds w.r.t. t₁₃₁:
X₀: X₀ {O(n)}
X₁: X₁ {O(n)}
X₂: 1 {O(1)}
Runtime-bound of t₁₃₁: 1 {O(1)}
Results in: 2⋅X₀+2⋅X₁+8 {O(n)}

2⋅X₀+2⋅X₁+8 {O(n)}

Time-Bound by TWN-Loops:

TWN-Loops: t₁₂₆ 2⋅X₀+2⋅X₁+8 {O(n)}

relevant size-bounds w.r.t. t₁₃₁:
X₀: X₀ {O(n)}
X₁: X₁ {O(n)}
X₂: 1 {O(1)}
Runtime-bound of t₁₃₁: 1 {O(1)}
Results in: 2⋅X₀+2⋅X₁+8 {O(n)}

2⋅X₀+2⋅X₁+8 {O(n)}

CFR did not improve the program. Rolling back

All Bounds

Timebounds

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

Costbounds

Overall costbound: inf {Infinity}
t₀: 1 {O(1)}
t₂: inf {Infinity}
t₃: 1 {O(1)}
t₁: 1 {O(1)}
t₄: inf {Infinity}
t₅: inf {Infinity}
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₁: 2⋅X₁ {O(n)}
t₁, X₀: X₀ {O(n)}
t₁, X₁: 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)}
t₆, X₁: 2⋅X₁ {O(n)}