Initial Problem

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

Preprocessing

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

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

Problem after Preprocessing

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

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

Analysing control-flow refined program

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

CFR did not improve the program. Rolling back

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

Time-Bound by TWN-Loops:

TWN-Loops: t₁₇ 2⋅X₁+4 {O(n)}

TWN-Loops:

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

Termination: true
Formula:

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

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

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

2⋅X₁+4 {O(n)}

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

Analysing control-flow refined program

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

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

Found invariant X₂ ≤ 0 for location l2

Found invariant 1 ≤ X₂ for location l1

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

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

CFR did not improve the program. Rolling back

All Bounds

Timebounds

Overall timebound:inf {Infinity}
t₁₄: 1 {O(1)}
t₁₅: 1 {O(1)}
t₁₆: inf {Infinity}
t₁₇: 2⋅X₁+4 {O(n)}
t₁₈: 1 {O(1)}
t₁₉: inf {Infinity}

Costbounds

Overall costbound: inf {Infinity}
t₁₄: 1 {O(1)}
t₁₅: 1 {O(1)}
t₁₆: inf {Infinity}
t₁₇: 2⋅X₁+4 {O(n)}
t₁₈: 1 {O(1)}
t₁₉: inf {Infinity}

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₂: 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₁: 2⋅X₁ {O(n)}
t₁₉, X₂: 1 {O(1)}