Initial Problem

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

Preprocessing

Found invariant X₁ ≤ 0 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₁) → l1(2⋅X₀, X₁-1) :|: 0 < X₁
t₂: l1(X₀, X₁) → l2(X₀, X₁) :|: X₁ ≤ 0
t₃: l2(X₀, X₁) → l2(X₀-1, X₁) :|: 0 < X₀ ∧ X₁ ≤ 0

MPRF for transition t₁: l1(X₀, X₁) → l1(2⋅X₀, X₁-1) :|: 0 < X₁ of depth 1:

new bound:

X₁ {O(n)}

MPRF:

l1 [X₁ ]

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

new bound:

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

MPRF:

l2 [X₀ ]

Analysing control-flow refined program

Found invariant X₁ ≤ 0 for location l2

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

new bound:

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

MPRF:

l2 [X₀ ]

CFR did not improve the program. Rolling back

All Bounds

Timebounds

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

Costbounds

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

Sizebounds

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