Initial Problem
Start: l0
Program_Vars: X₀, X₁
Temp_Vars: C
Locations: l0, l1, l2, l3, l4, l5, l6, l7, l8
Transitions:
t₀: l0(X₀, X₁) → l7(X₀, X₁)
t₈: l1(X₀, X₁) → l2(X₀, X₁) :|: X₀ ≤ X₁
t₇: l1(X₀, X₁) → l5(X₀, X₁) :|: X₁+1 ≤ X₀
t₁₀: l2(X₀, X₁) → l3(X₀-1, X₁)
t₃: l3(X₀, X₁) → l4(X₀, X₁) :|: 0 ≤ X₀
t₄: l3(X₀, X₁) → l6(X₀, X₁) :|: X₀+1 ≤ 0
t₅: l4(X₀, X₁) → l1(X₀, 1) :|: 2 ≤ X₀
t₆: l4(X₀, X₁) → l2(X₀, C) :|: X₀ ≤ 1
t₉: l5(X₀, X₁) → l1(X₀, 2⋅X₁)
t₁₁: l6(X₀, X₁) → l8(X₀, X₁)
t₁: l7(X₀, X₁) → l3(X₀, X₁) :|: 0 ≤ X₀
t₂: l7(X₀, X₁) → l6(X₀, X₁) :|: X₀+1 ≤ 0
Preprocessing
Found invariant 0 ≤ X₀ for location l2
Found invariant 1+X₀ ≤ 0 for location l6
Found invariant 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ for location l5
Found invariant 1+X₀ ≤ 0 for location l8
Found invariant 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ for location l1
Found invariant 0 ≤ X₀ for location l4
Found invariant 0 ≤ 1+X₀ for location l3
Problem after Preprocessing
Start: l0
Program_Vars: X₀, X₁
Temp_Vars: C
Locations: l0, l1, l2, l3, l4, l5, l6, l7, l8
Transitions:
t₀: l0(X₀, X₁) → l7(X₀, X₁)
t₈: l1(X₀, X₁) → l2(X₀, X₁) :|: X₀ ≤ X₁ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀
t₇: l1(X₀, X₁) → l5(X₀, X₁) :|: X₁+1 ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀
t₁₀: l2(X₀, X₁) → l3(X₀-1, X₁) :|: 0 ≤ X₀
t₃: l3(X₀, X₁) → l4(X₀, X₁) :|: 0 ≤ X₀ ∧ 0 ≤ 1+X₀
t₄: l3(X₀, X₁) → l6(X₀, X₁) :|: X₀+1 ≤ 0 ∧ 0 ≤ 1+X₀
t₅: l4(X₀, X₁) → l1(X₀, 1) :|: 2 ≤ X₀ ∧ 0 ≤ X₀
t₆: l4(X₀, X₁) → l2(X₀, C) :|: X₀ ≤ 1 ∧ 0 ≤ X₀
t₉: l5(X₀, X₁) → l1(X₀, 2⋅X₁) :|: 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀
t₁₁: l6(X₀, X₁) → l8(X₀, X₁) :|: 1+X₀ ≤ 0
t₁: l7(X₀, X₁) → l3(X₀, X₁) :|: 0 ≤ X₀
t₂: l7(X₀, X₁) → l6(X₀, X₁) :|: X₀+1 ≤ 0
MPRF for transition t₈: l1(X₀, X₁) → l2(X₀, X₁) :|: X₀ ≤ X₁ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
X₀+1 {O(n)}
MPRF:
l3 [X₀-1 ]
l4 [X₀-1 ]
l2 [X₀-2 ]
l5 [X₀-1 ]
l1 [X₀-1 ]
MPRF for transition t₁₀: l2(X₀, X₁) → l3(X₀-1, X₁) :|: 0 ≤ X₀ of depth 1:
new bound:
X₀+1 {O(n)}
MPRF:
l3 [X₀+1 ]
l4 [X₀+1 ]
l2 [X₀+1 ]
l5 [X₀+1 ]
l1 [X₀+1 ]
MPRF for transition t₃: l3(X₀, X₁) → l4(X₀, X₁) :|: 0 ≤ X₀ ∧ 0 ≤ 1+X₀ of depth 1:
new bound:
3⋅X₀+3 {O(n)}
MPRF:
l3 [3⋅X₀+3 ]
l4 [3⋅X₀+2 ]
l2 [3⋅X₀ ]
l5 [3⋅X₀ ]
l1 [3⋅X₀ ]
MPRF for transition t₅: l4(X₀, X₁) → l1(X₀, 1) :|: 2 ≤ X₀ ∧ 0 ≤ X₀ of depth 1:
new bound:
X₀+1 {O(n)}
MPRF:
l3 [X₀+1 ]
l4 [X₀+1 ]
l2 [X₀ ]
l5 [X₀ ]
l1 [X₀ ]
MPRF for transition t₆: l4(X₀, X₁) → l2(X₀, C) :|: X₀ ≤ 1 ∧ 0 ≤ X₀ of depth 1:
new bound:
X₀+1 {O(n)}
MPRF:
l3 [X₀+1 ]
l4 [X₀+1 ]
l2 [X₀ ]
l5 [X₀ ]
l1 [X₀ ]
MPRF for transition t₇: l1(X₀, X₁) → l5(X₀, X₁) :|: X₁+1 ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
X₀⋅X₀+4⋅X₀+2 {O(n^2)}
MPRF:
l2 [X₀-X₁ ]
l3 [X₀ ]
l4 [X₀ ]
l5 [X₀-2⋅X₁ ]
l1 [X₀-X₁ ]
MPRF for transition t₉: l5(X₀, X₁) → l1(X₀, 2⋅X₁) :|: 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
X₀⋅X₀+4⋅X₀+2 {O(n^2)}
MPRF:
l2 [X₀-X₁ ]
l3 [X₀ ]
l4 [X₀ ]
l5 [X₀-X₁ ]
l1 [X₀-X₁ ]
Analysing control-flow refined program
Cut unsatisfiable transition t₈: l1→l2
Found invariant 0 ≤ X₀ for location l2
Found invariant 1+X₁ ≤ X₀ ∧ 2 ≤ X₁ ∧ 5 ≤ X₀+X₁ ∧ 3 ≤ X₀ for location n_l5___1
Found invariant 1+X₀ ≤ 0 for location l6
Found invariant 2 ≤ X₁ ∧ 4 ≤ X₀+X₁ ∧ 2 ≤ X₀ for location n_l1___2
Found invariant 1+X₀ ≤ 0 for location l8
Found invariant X₁ ≤ 1 ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ for location l1
Found invariant 0 ≤ X₀ for location l4
Found invariant 0 ≤ 1+X₀ for location l3
Found invariant X₁ ≤ 1 ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ for location n_l5___3
knowledge_propagation leads to new time bound X₀+1 {O(n)} for transition t₈₂: l1(X₀, X₁) → n_l5___3(X₀, X₁) :|: 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ X₁ ≤ 1 ∧ 1 ≤ X₁ ∧ 2 ≤ X₀ ∧ 1 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ X₁ ≤ 1 ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀
knowledge_propagation leads to new time bound X₀+1 {O(n)} for transition t₈₄: n_l5___3(X₀, X₁) → n_l1___2(X₀, 2⋅X₁) :|: 2 ≤ X₀ ∧ X₁ ≤ 1 ∧ 1 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ X₁ ≤ 1 ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀
MPRF for transition t₈₁: n_l1___2(X₀, X₁) → n_l5___1(X₀, X₁) :|: 1 ≤ X₁ ∧ 2 ≤ X₁ ∧ 2+X₁ ≤ 2⋅X₀ ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₁ ∧ 4 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
X₀⋅X₀+4⋅X₀+2 {O(n^2)}
MPRF:
l3 [X₀ ]
l1 [X₀ ]
l4 [X₀ ]
l2 [X₀ ]
n_l5___1 [X₀-X₁-2 ]
n_l5___3 [X₀-2⋅X₁ ]
n_l1___2 [X₀-X₁ ]
MPRF for transition t₈₈: n_l1___2(X₀, X₁) → l2(X₀, X₁) :|: X₀ ≤ X₁ ∧ 1 ≤ X₁ ∧ 3 ≤ X₀+X₁ ∧ 2 ≤ X₀ ∧ 2 ≤ X₁ ∧ 4 ≤ X₀+X₁ ∧ 2 ≤ X₀ of depth 1:
new bound:
X₀+1 {O(n)}
MPRF:
l3 [X₀-1 ]
l1 [X₀-1 ]
l4 [X₀-1 ]
l2 [X₀-2 ]
n_l5___1 [X₀-1 ]
n_l5___3 [X₀-X₁ ]
n_l1___2 [X₀-1 ]
MPRF for transition t₈₃: n_l5___1(X₀, X₁) → n_l1___2(X₀, 2⋅X₁) :|: 1+X₁ ≤ X₀ ∧ 2 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 2 ≤ X₁ ∧ 5 ≤ X₀+X₁ ∧ 3 ≤ X₀ of depth 1:
new bound:
X₀⋅X₀+4⋅X₀+2 {O(n^2)}
MPRF:
l3 [X₀ ]
l1 [X₀ ]
l4 [X₀ ]
l2 [0 ]
n_l5___1 [X₀-X₁ ]
n_l5___3 [X₀-2⋅X₁ ]
n_l1___2 [X₀-X₁ ]
CFR did not improve the program. Rolling back
All Bounds
Timebounds
Overall timebound:2⋅X₀⋅X₀+15⋅X₀+16 {O(n^2)}
t₀: 1 {O(1)}
t₇: X₀⋅X₀+4⋅X₀+2 {O(n^2)}
t₈: X₀+1 {O(n)}
t₁₀: X₀+1 {O(n)}
t₃: 3⋅X₀+3 {O(n)}
t₄: 1 {O(1)}
t₅: X₀+1 {O(n)}
t₆: X₀+1 {O(n)}
t₉: X₀⋅X₀+4⋅X₀+2 {O(n^2)}
t₁₁: 1 {O(1)}
t₁: 1 {O(1)}
t₂: 1 {O(1)}
Costbounds
Overall costbound: 2⋅X₀⋅X₀+15⋅X₀+16 {O(n^2)}
t₀: 1 {O(1)}
t₇: X₀⋅X₀+4⋅X₀+2 {O(n^2)}
t₈: X₀+1 {O(n)}
t₁₀: X₀+1 {O(n)}
t₃: 3⋅X₀+3 {O(n)}
t₄: 1 {O(1)}
t₅: X₀+1 {O(n)}
t₆: X₀+1 {O(n)}
t₉: X₀⋅X₀+4⋅X₀+2 {O(n^2)}
t₁₁: 1 {O(1)}
t₁: 1 {O(1)}
t₂: 1 {O(1)}
Sizebounds
t₀, X₀: X₀ {O(n)}
t₀, X₁: X₁ {O(n)}
t₇, X₀: X₀+2 {O(n)}
t₇, X₁: 2^(X₀⋅X₀+4⋅X₀+2) {O(EXP)}
t₈, X₀: X₀+2 {O(n)}
t₈, X₁: 2^(X₀⋅X₀+4⋅X₀+2) {O(EXP)}
t₁₀, X₀: X₀+2 {O(n)}
t₃, X₀: X₀+2 {O(n)}
t₄, X₀: 1 {O(1)}
t₅, X₀: X₀+2 {O(n)}
t₅, X₁: 1 {O(1)}
t₆, X₀: 1 {O(1)}
t₉, X₀: X₀+2 {O(n)}
t₉, X₁: 2^(X₀⋅X₀+4⋅X₀+2) {O(EXP)}
t₁₁, X₀: X₀+1 {O(n)}
t₁, X₀: X₀ {O(n)}
t₁, X₁: X₁ {O(n)}
t₂, X₀: X₀ {O(n)}
t₂, X₁: X₁ {O(n)}