Preprocessing

Found invariant X₀ ≤ 1 ∧ 0 ≤ X₀ for location g

Probabilistic Analysis

Probabilistic Program after Preprocessing

Start: f
Program_Vars: X₀
Temp_Vars:
Locations: f, g
Transitions:
g₀:f(X₀) -{0}> t₁:g(1) :|:
g₂:g(X₀) → [3/4]:t₃:g(0) :+: [1/12]:t₄:g(0) :+: [1/6]:t₅:g(1) :|: 1 ≤ X₀ ∧ X₀ ≤ 1 ∧ 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}

Costbounds

Overall costbound: inf {Infinity}
g₀: inf {Infinity}
g₂: inf {Infinity}

Sizebounds

(g₀,g), X₀: 1 {O(1)}

Run probabilistic analysis on SCC: [f]

Run classical analysis on SCC: [g]

MPRF for transition t₃: g(X₀) → g(Temp_Int₃₀) :|: X₀ ≤ 1 ∧ 0 ≤ X₀ ∧ X₀ ≤ 1 ∧ 1 ≤ X₀ ∧ Temp_Int₃₀ ≤ 0 ∧ 0 ≤ Temp_Int₃₀ ∧ 1 ≤ X₀ of depth 1:

new bound:

2 {O(1)}

MPRF:

• g: [1+X₀]

MPRF for transition t₄: g(X₀) → g(Temp_Int₃₁) :|: X₀ ≤ 1 ∧ 0 ≤ X₀ ∧ X₀ ≤ 1 ∧ 1 ≤ X₀ ∧ Temp_Int₃₁ ≤ 0 ∧ 0 ≤ Temp_Int₃₁ ∧ 1 ≤ X₀ of depth 1:

new bound:

2 {O(1)}

MPRF:

• g: [1+X₀]

Classical Approximation after Lifting Classical Results

All Bounds
Timebounds

Overall timebound:inf {Infinity}
g₀: 1 {O(1)}
g₂: inf {Infinity}

Costbounds

Overall costbound: inf {Infinity}
g₀: inf {Infinity}
g₂: inf {Infinity}

Sizebounds

(g₀,g), X₀: 1 {O(1)}
(g₂,g), X₀: 1 {O(1)}

Run probabilistic analysis on SCC: [g]

Plrf for transition g₂:g(X₀) → [3/4]:t₃:g(0) :+: [1/12]:t₄:g(0) :+: [1/6]:t₅:g(1) :|: 1 ≤ X₀ ∧ X₀ ≤ 1 ∧ 0 ≤ X₀:

new bound:

6/5 {O(1)}

PLRF:

• g: 6/5⋅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:11/5 {O(1)}
g₀: 1 {O(1)}
g₂: 6/5 {O(1)}

Costbounds

Overall costbound: 18/5 {O(1)}
g₀: 0 {O(1)}
g₂: 18/5 {O(1)}

Sizebounds

(g₀,g), X₀: 1 {O(1)}
(g₂,g), X₀: 1 {O(1)}