Preprocessing

Found invariant X₀ ≤ 150+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₁) -{0}> t₁:g(X₀,X₁) :|:
g₂:g(X₀,X₁) → [1/2]:t₃:g(X₀-1,X₁) :+: [1/2]:t₄:g(X₀,X₁) :|: 101 ≤ X₀
g₅:g(X₀,X₁) -{0}> t₆:h(50+X₀+X₁,X₁) :|: X₀ ≤ 100
g₇:h(X₀,X₁) → t₈:h(X₀-1,X₁) :|: 0 ≤ X₀ ∧ X₀ ≤ 150+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₅: 1 {O(1)}
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]

MPRF for transition t₃: g(X₀,X₁) → g(X₀-1,X₁) :|: 101 ≤ X₀ of depth 1:

new bound:

X₀ {O(n)}

MPRF:

• g: [X₀]

Classical Approximation after Lifting Classical Results

All Bounds
Timebounds

Overall timebound:inf {Infinity}
g₀: 1 {O(1)}
g₂: inf {Infinity}
g₅: 1 {O(1)}
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₀: 2⋅X₀ {O(n)}
(g₂,g), X₁: 2⋅X₁ {O(n)}
(g₅,h), X₀: 2⋅X₀+2⋅X₁+100 {O(n)}
(g₅,h), X₁: 2⋅X₁ {O(n)}

Run probabilistic analysis on SCC: [g]

Plrf for transition g₂:g(X₀,X₁) → [1/2]:t₃:g(X₀-1,X₁) :+: [1/2]:t₄:g(X₀,X₁) :|: 101 ≤ X₀:

new bound:

2⋅X₀ {O(n)}

PLRF:

• g: 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)

Run classical analysis on SCC: [h]

MPRF for transition t₈: h(X₀,X₁) → h(X₀-1,X₁) :|: X₀ ≤ 150+X₁ ∧ 0 ≤ X₀ of depth 1:

new bound:

2⋅X₀+2⋅X₁+101 {O(n)}

MPRF:

• h: [1+X₀]

Classical Approximation after Lifting Classical Results

All Bounds
Timebounds

Overall timebound:2⋅X₁+4⋅X₀+103 {O(n)}
g₀: 1 {O(1)}
g₂: 2⋅X₀ {O(n)}
g₅: 1 {O(1)}
g₇: 2⋅X₀+2⋅X₁+101 {O(n)}

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₀: X₀ {O(n)}
(g₂,g), X₁: X₁ {O(n)}
(g₅,h), X₀: 3⋅X₀+3⋅X₁+50 {O(n)}
(g₅,h), X₁: 2⋅X₁ {O(n)}
(g₇,h), X₀: 2⋅X₀+2⋅X₁+101 {O(n)}
(g₇,h), X₁: 2⋅X₁ {O(n)}

Run probabilistic analysis on SCC: [h]

Results of Probabilistic Analysis

All Bounds

Timebounds

Overall timebound:2⋅X₁+4⋅X₀+103 {O(n)}
g₀: 1 {O(1)}
g₂: 2⋅X₀ {O(n)}
g₅: 1 {O(1)}
g₇: 2⋅X₀+2⋅X₁+101 {O(n)}

Costbounds

Overall costbound: 2⋅X₁+6⋅X₀+101 {O(n)}
g₀: 0 {O(1)}
g₂: 4⋅X₀ {O(n)}
g₅: 0 {O(1)}
g₇: 2⋅X₀+2⋅X₁+101 {O(n)}

Sizebounds

(g₀,g), X₀: X₀ {O(n)}
(g₀,g), X₁: X₁ {O(n)}
(g₂,g), X₀: X₀ {O(n)}
(g₂,g), X₁: X₁ {O(n)}
(g₅,h), X₀: 3⋅X₀+3⋅X₁+50 {O(n)}
(g₅,h), X₁: 2⋅X₁ {O(n)}
(g₇,h), X₀: 2⋅X₀+2⋅X₁+101 {O(n)}
(g₇,h), X₁: 2⋅X₁ {O(n)}