Initial Problem
Start: l0
Program_Vars: X₀, X₁, X₂, X₃
Temp_Vars:
Locations: l0, l1, l2
Transitions:
t₀: l0(X₀, X₁, X₂, X₃) → l1(0, X₁, X₂, X₃)
t₁: l1(X₀, X₁, X₂, X₃) → l2(X₀, X₁, 0, 0) :|: 1 ≤ X₁
t₃: l2(X₀, X₁, X₂, X₃) → l1(X₀+X₃, X₁-1, X₂, X₃) :|: X₁ ≤ X₂
t₂: l2(X₀, X₁, X₂, X₃) → l2(X₀, X₁, X₂+1, X₃+X₂) :|: X₂+1 ≤ X₁
Preprocessing
Eliminate variables {X₀,X₃} that do not contribute to the problem
Found invariant X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ 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₁) → l2(X₀, 0) :|: 1 ≤ X₀
t₁₀: l2(X₀, X₁) → l1(X₀-1, X₁) :|: X₀ ≤ X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀
t₁₁: l2(X₀, X₁) → l2(X₀, X₁+1) :|: X₁+1 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀
MPRF for transition t₉: l1(X₀, X₁) → l2(X₀, 0) :|: 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
MPRF for transition t₁₀: l2(X₀, X₁) → l1(X₀-1, X₁) :|: X₀ ≤ X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
TWN: t₁₁: l2→l2
cycle: [t₁₁: l2→l2]
loop: (X₁+1 ≤ X₀,(X₀,X₁) -> (X₀,X₁+1)
order: [X₀; X₁]
closed-form:
X₀: X₀
X₁: X₁ + [[n != 0]] * n^1
Termination: true
Formula:
1 < 0
∨ X₁+1 < X₀ ∧ 1 ≤ 0 ∧ 0 ≤ 1
∨ 1 ≤ 0 ∧ 0 ≤ 1 ∧ X₁+1 ≤ X₀ ∧ X₀ ≤ X₁+1
Stabilization-Threshold for: X₁+1 ≤ X₀
alphas_abs: X₁+1+X₀
M: 0
N: 1
Bound: 2⋅X₀+2⋅X₁+4 {O(n)}
TWN - Lifting for t₁₁: l2→l2 of 2⋅X₀+2⋅X₁+6 {O(n)}
relevant size-bounds w.r.t. t₉:
X₀: X₀ {O(n)}
X₁: 0 {O(1)}
Runtime-bound of t₉: X₀ {O(n)}
Results in: 2⋅X₀⋅X₀+6⋅X₀ {O(n^2)}
Chain transitions t₁₀: l2→l1 and t₉: l1→l2 to t₂₇: l2→l2
Chain transitions t₈: l0→l1 and t₉: l1→l2 to t₂₈: l0→l2
Analysing control-flow refined program
Found invariant X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ for location l2
knowledge_propagation leads to new time bound 2⋅X₀⋅X₀+6⋅X₀ {O(n^2)} for transition t₂₇: l2(X₀, X₁) -{2}> l2(X₀-1, 0) :|: X₀ ≤ X₁ ∧ 2 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀
CFR did not improve the program. Rolling back
CFR did not improve the program. Rolling back
Analysing control-flow refined program
Cut unsatisfiable transition t₁₀: l2→l1
Found invariant X₁ ≤ 0 ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ for location l2
Found invariant X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 1 ≤ X₀ for location n_l2___1
knowledge_propagation leads to new time bound X₀ {O(n)} for transition t₅₃: l2(X₀, X₁) → n_l2___1(X₀, X₁+1) :|: 1+X₁ ≤ X₀ ∧ X₁ ≤ 0 ∧ 1+X₁ ≤ X₀ ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀ ∧ 0 ≤ X₁ ∧ 0 ≤ X₁ ∧ X₁ ≤ 0 ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀
MPRF for transition t₅₂: n_l2___1(X₀, X₁) → n_l2___1(X₀, X₁+1) :|: 1 ≤ X₁ ∧ 1+X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀⋅X₀+2⋅X₀ {O(n^2)}
MPRF for transition t₅₆: n_l2___1(X₀, X₁) → l1(X₀-1, X₁) :|: X₀ ≤ X₁ ∧ X₁ ≤ X₀ ∧ 0 ≤ X₁ ∧ 1 ≤ X₀+X₁ ∧ 1 ≤ X₀ ∧ X₁ ≤ X₀ ∧ 1 ≤ X₁ ∧ 2 ≤ X₀+X₁ ∧ 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
CFR did not improve the program. Rolling back
CFR did not improve the program. Rolling back
All Bounds
Timebounds
Overall timebound:2⋅X₀⋅X₀+8⋅X₀+1 {O(n^2)}
t₈: 1 {O(1)}
t₉: X₀ {O(n)}
t₁₀: X₀ {O(n)}
t₁₁: 2⋅X₀⋅X₀+6⋅X₀ {O(n^2)}
Costbounds
Overall costbound: 2⋅X₀⋅X₀+8⋅X₀+1 {O(n^2)}
t₈: 1 {O(1)}
t₉: X₀ {O(n)}
t₁₀: X₀ {O(n)}
t₁₁: 2⋅X₀⋅X₀+6⋅X₀ {O(n^2)}
Sizebounds
t₈, X₀: X₀ {O(n)}
t₈, X₁: X₁ {O(n)}
t₉, X₀: X₀ {O(n)}
t₉, X₁: 0 {O(1)}
t₁₀, X₀: X₀ {O(n)}
t₁₀, X₁: 2⋅X₀⋅X₀+6⋅X₀ {O(n^2)}
t₁₁, X₀: X₀ {O(n)}
t₁₁, X₁: 2⋅X₀⋅X₀+6⋅X₀ {O(n^2)}