Initial Problem

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

Preprocessing

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

Found invariant 1 ≤ X₁ for location l1

Problem after Preprocessing

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

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

Found invariant 1 ≤ X₁ for location l1

Time-Bound by TWN-Loops:

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

TWN-Loops:

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

Termination: true
Formula:

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

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₀: X₀ {O(n)}
Runtime-bound of t₀: 1 {O(1)}
Results in: 2⋅X₀+4 {O(n)}

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

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

Found invariant 1 ≤ X₁ for location l1

Time-Bound by TWN-Loops:

TWN-Loops: t₃ 2⋅2^(2⋅X₀+4)+6 {O(EXP)}

TWN-Loops:

entry: t₂: l1(X₀, X₁) → l2(X₀, X₁) :|: X₀ ≤ 0 ∧ 1 ≤ X₁
results in twn-loop: twn:Inv: [0 ≤ X₁ ∧ X₀ ≤ X₁ ∧ X₀ ≤ 0] , (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

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₁: 2^(2⋅X₀+4)+1 {O(EXP)}
Runtime-bound of t₂: 1 {O(1)}
Results in: 2⋅2^(2⋅X₀+4)+6 {O(EXP)}

2⋅2^(2⋅X₀+4)+6 {O(EXP)}

Analysing control-flow refined program

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

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

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

Found invariant 1 ≤ X₁ for location l1

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

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

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

Found invariant 1 ≤ X₁ for location l1

Time-Bound by TWN-Loops:

TWN-Loops: t₄₁ 2⋅2^(2⋅X₀+4)+7 {O(EXP)}

TWN-Loops:

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

Termination: true
Formula:

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

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₁: 2^(2⋅X₀+4)+1 {O(EXP)}
Runtime-bound of t₄₂: 1 {O(1)}
Results in: 2⋅2^(2⋅X₀+4)+7 {O(EXP)}

2⋅2^(2⋅X₀+4)+7 {O(EXP)}

CFR did not improve the program. Rolling back

All Bounds

Timebounds

Overall timebound:2⋅2^(2⋅X₀+4)+2⋅X₀+12 {O(EXP)}
t₀: 1 {O(1)}
t₁: 2⋅X₀+4 {O(n)}
t₂: 1 {O(1)}
t₃: 2⋅2^(2⋅X₀+4)+6 {O(EXP)}

Costbounds

Overall costbound: 2⋅2^(2⋅X₀+4)+2⋅X₀+12 {O(EXP)}
t₀: 1 {O(1)}
t₁: 2⋅X₀+4 {O(n)}
t₂: 1 {O(1)}
t₃: 2⋅2^(2⋅X₀+4)+6 {O(EXP)}

Sizebounds

t₀, X₀: X₀ {O(n)}
t₀, X₁: 1 {O(1)}
t₁, X₀: X₀ {O(n)}
t₁, X₁: 2^(2⋅X₀+4) {O(EXP)}
t₂, X₀: 2⋅X₀ {O(n)}
t₂, X₁: 2^(2⋅X₀+4)+1 {O(EXP)}
t₃, X₀: 2⋅X₀ {O(n)}
t₃, X₁: 2^(2⋅X₀+4)+1 {O(EXP)}