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