Initial Problem

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

Preprocessing

Eliminate variables [X₀; X₃] that do not contribute to the problem

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

Problem after Preprocessing

Start: l0
Program_Vars: X₀, X₁
Temp_Vars:
Locations: l0, l1, l2
Transitions:
t₈: l0(X₀, X₁) → l1(X₀, X₁)
t₉: l1(X₀, X₁) → l2(X₀, 0) :|: 1 ≤ X₀
t₁₀: l2(X₀, X₁) → l1(X₀-1, X₁) :|: X₀ ≤ X₁ ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁
t₁₁: l2(X₀, X₁) → l2(X₀, 1+X₁) :|: 1+X₁ ≤ X₀ ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁

MPRF for transition t₉: l1(X₀, X₁) → l2(X₀, 0) :|: 1 ≤ X₀ of depth 1:

new bound:

X₀ {O(n)}

MPRF:

• l1: [X₀]
• l2: [X₀-1]

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

new bound:

X₀+1 {O(n)}

MPRF:

• l1: [1+X₀]
• l2: [1+X₀]

TWN: t₁₁: l2→l2

cycle: [t₁₁: l2→l2]
original loop: (1+X₁ ≤ X₀ ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁,(X₀,X₁) -> (X₀,1+X₁))
transformed loop: (1+X₁ ≤ X₀ ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁,(X₀,X₁) -> (X₀,1+X₁))
loop: (1+X₁ ≤ X₀ ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁,(X₀,X₁) -> (X₀,1+X₁))
order: [X₁; X₀]
closed-form:
X₁: X₁ + [[n != 0]]⋅n^1
X₀: X₀

Termination: true
Formula:

0 ≤ 1 ∧ X₀ ≤ 1+X₁ ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 1+X₁ ≤ X₀ ∧ X₁ ≤ X₀ ∧ X₀ ≤ X₁ ∧ 0 ≤ X₁
∨ 0 ≤ 1 ∧ X₀ ≤ 1+X₁ ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁
∨ 0 ≤ 1 ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 1+X₁ ≤ X₀ ∧ 2+X₁ ≤ X₀ ∧ 0 ≤ X₁
∨ 0 ≤ 1 ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁
∨ 0 ≤ 1 ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 2+X₁ ≤ X₀ ∧ X₁ ≤ X₀ ∧ X₀ ≤ X₁ ∧ 0 ≤ X₁
∨ 0 ≤ 1 ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 2+X₁ ≤ X₀ ∧ 0 ≤ X₁
∨ 0 ≤ 1 ∧ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ X₁ ≤ X₀ ∧ X₀ ≤ X₁ ∧ 0 ≤ X₁
∨ 1 ≤ 0 ∧ 1 ≤ X₀ ∧ 1 ≤ X₀+X₁ ∧ 0 ≤ X₁

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

TWN - Lifting for [11: l2->l2] of 4⋅X₀+4⋅X₁+8 {O(n)}

relevant size-bounds w.r.t. t₉: l1→l2:
X₀: X₀ {O(n)}
X₁: 0 {O(1)}
Runtime-bound of t₉: X₀ {O(n)}
Results in: 4⋅X₀⋅X₀+8⋅X₀ {O(n^2)}

Cut unsatisfiable transition [t₁₀: l2→l1; t₂₃: l2→l1]

Found invariant X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 1 ≤ X₀ for location l2_v1

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

All Bounds

Timebounds

Overall timebound:4⋅X₀⋅X₀+10⋅X₀+2 {O(n^2)}
t₈: 1 {O(1)}
t₉: X₀ {O(n)}
t₁₀: X₀+1 {O(n)}
t₁₁: 4⋅X₀⋅X₀+8⋅X₀ {O(n^2)}

Costbounds

Overall costbound: 4⋅X₀⋅X₀+10⋅X₀+2 {O(n^2)}
t₈: 1 {O(1)}
t₉: X₀ {O(n)}
t₁₀: X₀+1 {O(n)}
t₁₁: 4⋅X₀⋅X₀+8⋅X₀ {O(n^2)}

Sizebounds

t₈, X₀: 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₁: 4⋅X₀⋅X₀+8⋅X₀ {O(n^2)}
t₁₁, X₀: X₀ {O(n)}
t₁₁, X₁: 4⋅X₀⋅X₀+8⋅X₀ {O(n^2)}