Initial Problem
Start: l0
Program_Vars: X₀, X₁
Temp_Vars:
Locations: l0, l1
Transitions:
t₀: l0(X₀, X₁) → l1(X₀, X₀) :|: 1 ≤ X₀
t₁: l1(X₀, X₁) → l1(X₀, X₁-1) :|: 1 ≤ X₁
t₂: l1(X₀, X₁) → l1(X₀-1, X₀-1) :|: X₁ ≤ 0 ∧ 2 ≤ X₀
Preprocessing
Found invariant X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ for location l1
Problem after Preprocessing
Start: l0
Program_Vars: X₀, X₁
Temp_Vars:
Locations: l0, l1
Transitions:
t₀: l0(X₀, X₁) → l1(X₀, X₀) :|: 1 ≤ X₀
t₁: l1(X₀, X₁) → l1(X₀, X₁-1) :|: 1 ≤ X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀
t₂: l1(X₀, X₁) → l1(X₀-1, X₀-1) :|: X₁ ≤ 0 ∧ 2 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀
MPRF for transition t₂: l1(X₀, X₁) → l1(X₀-1, X₀-1) :|: X₁ ≤ 0 ∧ 2 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
MPRF:
l1 [X₀ ]
MPRF for transition t₁: l1(X₀, X₁) → l1(X₀, X₁-1) :|: 1 ≤ X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀⋅X₀+2⋅X₀+1 {O(n^2)}
MPRF:
l1 [X₁+1 ]
Analysing control-flow refined program
Cut unsatisfiable transition t₃₈: n_l1___2→l1
Found invariant 1+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ X₀ ≤ 1+X₁ ∧ 1 ≤ X₀ for location n_l1___2
Found invariant X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ X₀ ≤ X₁ ∧ 1 ≤ X₀ for location l1
Found invariant 2+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 2 ≤ X₀ for location n_l1___1
MPRF for transition t₃₉: l1(X₀, X₁) → n_l1___2(X₀, X₁-1) :|: X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ X₀ ≤ X₁ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₀ ∧ 1 ≤ X₁ ∧ X₁ ≤ X₀ ∧ X₀ ≤ X₁ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ X₀ ≤ X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
MPRF:
l1 [X₀ ]
n_l1___2 [X₀-1 ]
n_l1___1 [X₀-1 ]
MPRF for transition t₃₆: n_l1___1(X₀, X₁) → l1(X₀-1, X₀-1) :|: X₁ ≤ X₀ ∧ 2 ≤ X₀ ∧ 0 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 2 ≤ X₀ ∧ X₁ ≤ 0 ∧ 0 ≤ X₁ ∧ 2+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
X₀+1 {O(n)}
MPRF:
l1 [X₁+1 ]
n_l1___2 [2⋅X₀-X₁ ]
n_l1___1 [X₀+1 ]
MPRF for transition t₃₇: n_l1___2(X₀, X₁) → n_l1___1(X₀, X₁-1) :|: X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ X₀ ≤ 1+X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
MPRF:
l1 [X₀ ]
n_l1___2 [X₀ ]
n_l1___1 [X₀-1 ]
MPRF for transition t₃₅: n_l1___1(X₀, X₁) → n_l1___1(X₀, X₁-1) :|: X₁ ≤ X₀ ∧ 2 ≤ X₀ ∧ 0 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
4⋅X₀⋅X₀+2⋅X₀ {O(n^2)}
MPRF:
n_l1___2 [X₀ ]
n_l1___1 [X₀+X₁+1 ]
l1 [X₁ ]
CFR did not improve the program. Rolling back
All Bounds
Timebounds
Overall timebound:X₀⋅X₀+3⋅X₀+2 {O(n^2)}
t₀: 1 {O(1)}
t₁: X₀⋅X₀+2⋅X₀+1 {O(n^2)}
t₂: X₀ {O(n)}
Costbounds
Overall costbound: X₀⋅X₀+3⋅X₀+2 {O(n^2)}
t₀: 1 {O(1)}
t₁: X₀⋅X₀+2⋅X₀+1 {O(n^2)}
t₂: X₀ {O(n)}
Sizebounds
t₀, X₀: X₀ {O(n)}
t₀, X₁: X₀ {O(n)}
t₁, X₀: X₀ {O(n)}
t₁, X₁: 2⋅X₀ {O(n)}
t₂, X₀: X₀ {O(n)}
t₂, X₁: X₀ {O(n)}