Preprocessing
Found invariant 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₁) -{0}> t₁:g(X₀,X₁) :|:
g₂:g(X₀,X₁) -{0}> [1/4]:t₃:h(X₀-1,1+X₁) :+: [3/4]:t₄:h(X₀-1,X₁) :|: 1 ≤ X₀
g₅:h(X₀,X₁) → t₆:h(X₀,X₁-1) :|: 1 ≤ X₁ ∧ 0 ≤ X₀
g₇:h(X₀,X₁) -{2}> t₈:g(X₀,X₁) :|: X₁ ≤ 0 ∧ 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]
MPRF for transition t₃: g(X₀,X₁) -{0}> h(X₀-1,1+X₁) :|: 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
MPRF:
• g: [X₀]
• h: [X₀]
MPRF for transition t₄: g(X₀,X₁) -{0}> h(X₀-1,X₁) :|: 1 ≤ X₀ of depth 1:
new bound:
X₀ {O(n)}
MPRF:
• g: [X₀]
• h: [X₀]
MPRF for transition t₆: h(X₀,X₁) → h(X₀,X₁-1) :|: 0 ≤ X₀ ∧ 1 ≤ X₁ of depth 1:
new bound:
X₀+X₁ {O(n)}
MPRF:
• g: [X₀+X₁]
• h: [X₀+X₁]
MPRF for transition t₈: h(X₀,X₁) -{2}> g(X₀,X₁) :|: 0 ≤ X₀ ∧ X₁ ≤ 0 of depth 1:
new bound:
X₀ {O(n)}
MPRF:
• g: [X₀]
• h: [1+X₀]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:4⋅X₀+X₁+1 {O(n)}
g₀: 1 {O(1)}
g₂: 2⋅X₀ {O(n)}
g₅: X₀+X₁ {O(n)}
g₇: X₀ {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₂,h), X₀: 2⋅X₀ {O(n)}
(g₂,h), X₁: 2⋅X₀+2⋅X₁ {O(n)}
(g₅,h), X₀: X₀ {O(n)}
(g₅,h), X₁: X₀+X₁ {O(n)}
(g₇,g), X₀: X₀ {O(n)}
(g₇,g), X₁: X₀+X₁ {O(n)}
Run probabilistic analysis on SCC: [g; h]
Results of Probabilistic Analysis
All Bounds
Timebounds
Overall timebound:4⋅X₀+X₁+1 {O(n)}
g₀: 1 {O(1)}
g₂: 2⋅X₀ {O(n)}
g₅: X₀+X₁ {O(n)}
g₇: X₀ {O(n)}
Costbounds
Overall costbound: 3⋅X₀+X₁ {O(n)}
g₀: 0 {O(1)}
g₂: 0 {O(1)}
g₅: X₀+X₁ {O(n)}
g₇: 2⋅X₀ {O(n)}
Sizebounds
(g₀,g), X₀: X₀ {O(n)}
(g₀,g), X₁: X₁ {O(n)}
(g₂,h), X₀: X₀ {O(n)}
(g₂,h), X₁: 2⋅X₀+2⋅X₁ {O(n)}
(g₅,h), X₀: X₀ {O(n)}
(g₅,h), X₁: X₀+X₁ {O(n)}
(g₇,g), X₀: X₀ {O(n)}
(g₇,g), X₁: X₀+X₁ {O(n)}