Preprocessing
Found invariant 0 ≤ X₀ for location l1
Probabilistic Analysis
Probabilistic Program after Preprocessing
Start: l0
Program_Vars: X₀
Temp_Vars: T
Locations: l0, l1
Transitions:
g₀:l0(X₀) → t₁:l1(T) :|: 1 ≤ T
g₂:l1(X₀) → [1/2]:t₃:l1(0) :+: [1/2]:t₄:l1(X₀) :|: 1 ≤ X₀ ∧ 0 ≤ X₀
Run classical analysis on SCC: [l0]
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
Run probabilistic analysis on SCC: [l0]
Run classical analysis on SCC: [l1]
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
Run probabilistic analysis on SCC: [l1]
Analysing control-flow refined program
Run classical analysis on SCC: [l1_v2]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:inf {Infinity}
g₀: 1 {O(1)}
g₇: 2 {O(1)}
g₁₀: inf {Infinity}
Costbounds
Overall costbound: inf {Infinity}
g₀: inf {Infinity}
g₇: inf {Infinity}
g₁₀: inf {Infinity}
Sizebounds
Run probabilistic analysis on SCC: [l1_v2]
Plrf for transition g₁₀:l1_v2(X₀) → [1/2]:t₈:l1_v1(0) :+: [1/2]:t₉:l1_v2(X₀) :|: 1 ≤ X₀ ∧ 0 ≤ X₀:
new bound:
2 {O(1)}
PLRF:
• l1_v1: 0
• l1_v2: 2
Use classical time bound for entry point (g₇:l1→[t₅:1/2:l1_v1; t₆:1/2:l1_v2],l1_v2)
Run classical analysis on SCC: [l1_v1]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:5 {O(1)}
g₀: 1 {O(1)}
g₇: 2 {O(1)}
g₁₀: 2 {O(1)}
Costbounds
Overall costbound: inf {Infinity}
g₀: inf {Infinity}
g₇: inf {Infinity}
g₁₀: inf {Infinity}
Sizebounds
(g₇,l1_v1), X₀: 0 {O(1)}
(g₁₀,l1_v1), X₀: 0 {O(1)}
Run probabilistic analysis on SCC: [l1_v1]
CFR: Improvement to new bound with the following program:
method: PartialEvaluationProbabilistic new bound:
O(1)
cfr-program:
Start: l0
Program_Vars: X₀
Temp_Vars: T
Locations: l0, l1, l1_v1, l1_v2
Transitions:
g₀:l0(X₀) → t₁:l1(T) :|: 1 ≤ T
g₇:l1(X₀) → [1/2]:t₅:l1_v1(0) :+: [1/2]:t₆:l1_v2(X₀) :|: 1 ≤ X₀ ∧ 0 ≤ X₀
g₁₀:l1_v2(X₀) → [1/2]:t₈:l1_v1(0) :+: [1/2]:t₉:l1_v2(X₀) :|: 1 ≤ X₀ ∧ 0 ≤ X₀
Results of Probabilistic Analysis
All Bounds
Timebounds
Overall timebound:5 {O(1)}
g₀: 1 {O(1)}
g₇: 2 {O(1)}
g₁₀: 2 {O(1)}
Costbounds
Overall costbound: 9 {O(1)}
g₀: 1 {O(1)}
g₇: 4 {O(1)}
g₁₀: 4 {O(1)}
Sizebounds
(g₇,l1_v1), X₀: 0 {O(1)}
(g₁₀,l1_v1), X₀: 0 {O(1)}