Initial Problem
Start: l0
Program_Vars: X₀, X₁, X₂, X₃
Temp_Vars:
Locations: l0, l1, l2
Transitions:
t₀: l0(X₀, X₁, X₂, X₃) → l1(X₀, X₁, X₂, X₃)
t₁: l1(X₀, X₁, X₂, X₃) → l1(X₀-1, 3⋅X₁+2⋅X₂, -5⋅X₁-3⋅X₂, (X₀)²+X₃) :|: 0 < X₀
t₂: l1(X₀, X₁, X₂, X₃) → l2(X₀, X₁, X₂, X₃)
t₃: l2(X₀, X₁, X₂, X₃) → l2(X₀, X₁, X₂, X₃-1) :|: 0 < X₃
Preprocessing
Eliminate variables {X₁,X₂} that do not contribute to the problem
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(X₀-1, (X₀)²+X₁) :|: 0 < X₀
t₁₁: l1(X₀, X₁) → l2(X₀, X₁)
t₁₂: l2(X₀, X₁) → l2(X₀, X₁-1) :|: 0 < X₁
TWN. Size Bound: t₁₀: l1→l1 for X₁
cycle: [t₁₀: l1→l1]
loop: (0 < X₀,(X₀,X₁) -> (X₀-1,(X₀)²+X₁)
closed-form: X₁ + [[n != 0]] * (X₀)² * n^1 + [[n != 0, n != 1]] * 1/3 * n^3 + [[n != 0, n != 1]] * -1/2-X₀ * n^2 + [[n != 0, n != 1]] * 1/6+X₀ * n^1
runtime bound: X₀+1 {O(n)}
TWN Size Bound - Lifting for t₁₀: l1→l1 and X₁: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+8⋅X₀+X₁+3 {O(n^3)}
MPRF for transition t₁₀: l1(X₀, X₁) → l1(X₀-1, Temp_Int₅₉+X₁) :|: 0 < X₀ ∧ 0 < Temp_Int₅₉ ∧ X₀ ≤ Temp_Int₅₉ of depth 1:
new bound:
X₀ {O(n)}
MPRF for transition t₁₂: l2(X₀, X₁) → l2(X₀, X₁-1) :|: 0 < X₁ of depth 1:
new bound:
3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+8⋅X₀+3 {O(n^3)}
Analysing control-flow refined program
MPRF for transition t₃₇: l2(X₀, X₁) → l2(X₀, X₁-1) :|: 0 < X₁ of depth 1:
new bound:
3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+8⋅X₀+3 {O(n^3)}
CFR did not improve the program. Rolling back
CFR did not improve the program. Rolling back
All Bounds
Timebounds
Overall timebound:3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+9⋅X₀+5 {O(n^3)}
t₉: 1 {O(1)}
t₁₀: X₀ {O(n)}
t₁₁: 1 {O(1)}
t₁₂: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+8⋅X₀+3 {O(n^3)}
Costbounds
Overall costbound: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+9⋅X₀+5 {O(n^3)}
t₉: 1 {O(1)}
t₁₀: X₀ {O(n)}
t₁₁: 1 {O(1)}
t₁₂: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+8⋅X₀+3 {O(n^3)}
Sizebounds
t₉, X₀: X₀ {O(n)}
t₉, X₁: X₁ {O(n)}
t₁₀, X₀: X₀ {O(n)}
t₁₀, X₁: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+8⋅X₀+X₁+3 {O(n^3)}
t₁₁, X₀: 2⋅X₀ {O(n)}
t₁₁, X₁: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+8⋅X₀+3 {O(n^3)}
t₁₂, X₀: 2⋅X₀ {O(n)}
t₁₂, X₁: 3⋅X₀⋅X₀⋅X₀+8⋅X₀⋅X₀+2⋅X₁+8⋅X₀+3 {O(n^3)}