Preprocessing
Found invariant 0 ≤ 7+X₁ ∧ 0 ≤ 7+X₀+X₁ ∧ 0 ≤ X₀ for location h
Probabilistic Analysis
Probabilistic Program after Preprocessing
Start: f
Program_Vars: X₀, X₁
Temp_Vars:
Locations: f, g, h
Transitions:
g₁:f(X₀,X₁) → t₂:g(X₀,X₁) :|:
g₃:g(X₀,X₁) → [1/4]:t₄:h(1+X₀,X₀) :+: [3/4]:t₅:h(X₀-1,X₀-2) :|: 1 ≤ X₀
g₆:h(X₀,X₁) → t₇:h(X₀,X₁+UNIFORM(-4, 0)) :|: 1 ≤ X₁ ∧ 0 ≤ 7+X₀+X₁ ∧ 0 ≤ 7+X₁ ∧ 0 ≤ 1 ∧ 0 ≤ X₀
g₈:h(X₀,X₁) → t₉:g(X₀,X₁) :|: X₁ ≤ 0 ∧ 0 ≤ 7+X₀+X₁ ∧ 0 ≤ 7+X₁ ∧ 0 ≤ X₀
Run classical analysis on SCC: [f]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:inf {Infinity}
g₁: 1 {O(1)}
g₃: inf {Infinity}
g₆: inf {Infinity}
g₈: inf {Infinity}
Costbounds
Overall costbound: inf {Infinity}
g₁: inf {Infinity}
g₃: inf {Infinity}
g₆: inf {Infinity}
g₈: inf {Infinity}
Sizebounds
(g₁,g), X₀: X₀ {O(n)}
(g₁,g), X₁: X₁ {O(n)}
Run probabilistic analysis on SCC: [f]
Run classical analysis on SCC: [g; h]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:inf {Infinity}
g₁: 1 {O(1)}
g₃: inf {Infinity}
g₆: inf {Infinity}
g₈: inf {Infinity}
Costbounds
Overall costbound: inf {Infinity}
g₁: inf {Infinity}
g₃: inf {Infinity}
g₆: inf {Infinity}
g₈: inf {Infinity}
Sizebounds
(g₁,g), X₀: X₀ {O(n)}
(g₁,g), X₁: X₁ {O(n)}
(g₈,g), X₁: 7 {O(1)}
Run probabilistic analysis on SCC: [g; h]
Plrf for transition g₃:g(X₀,X₁) → [1/4]:t₄:h(1+X₀,X₀) :+: [3/4]:t₅:h(X₀-1,X₀-2) :|: 1 ≤ X₀:
new bound:
2⋅X₀ {O(n)}
PLRF:
• g: 2⋅X₀
• h: 2⋅X₀
Use expected size bounds for entry point (g₁:f→[t₂:1:g],g)
Use classical time bound for entry point (g₁:f→[t₂:1:g],g)
Plrf for transition g₈:h(X₀,X₁) → t₉:g(X₀,X₁) :|: X₁ ≤ 0 ∧ 0 ≤ 7+X₀+X₁ ∧ 0 ≤ 7+X₁ ∧ 0 ≤ X₀:
new bound:
2⋅X₀ {O(n)}
PLRF:
• g: 2⋅X₀
• h: 1+2⋅X₀
Use expected size bounds for entry point (g₁:f→[t₂:1:g],g)
Use classical time bound for entry point (g₁:f→[t₂:1:g],g)
Results of Probabilistic Analysis
All Bounds
Timebounds
Overall timebound:inf {Infinity}
g₁: 1 {O(1)}
g₃: 2⋅X₀ {O(n)}
g₆: inf {Infinity}
g₈: 2⋅X₀ {O(n)}
Costbounds
Overall costbound: inf {Infinity}
g₁: 1 {O(1)}
g₃: 4⋅X₀ {O(n)}
g₆: inf {Infinity}
g₈: 2⋅X₀ {O(n)}
Sizebounds
(g₁,g), X₀: X₀ {O(n)}
(g₁,g), X₁: X₁ {O(n)}
(g₃,h), X₀: 3/2⋅X₀ {O(n)}
(g₃,h), X₁: 5⋅X₀+2 {O(n)}
(g₆,h), X₀: 3/2⋅X₀ {O(n)}
(g₈,g), X₀: 3/2⋅X₀ {O(n)}
(g₈,g), X₁: 7 {O(1)}