Preprocessing

Found invariant 0 ≤ X₀ for location l1

Found invariant 0 ≤ X₀ for location l2

Probabilistic Analysis

Probabilistic Program after Preprocessing

Start: l0
Program_Vars: X₀, X₁
Temp_Vars: T
Locations: l0, l1, l2
Transitions:
g₀:l0(X₀,X₁) → t₁:l1(T,X₁) :|: 1 ≤ T
g₂:l1(X₀,X₁) → [1/2]:t₃:l1(0,X₁) :+: [1/2]:t₄:l1(X₀,X₁) :|: 1 ≤ X₀ ∧ 0 ≤ X₀
g₅:l1(X₀,X₁) → t₆:l2(X₀,X₁-1) :|: 0 ≤ X₀
g₇:l2(X₀,X₁) → t₈:l1(X₀,X₁) :|: 1 ≤ X₁ ∧ 0 ≤ X₀ ∧ X₀ ≤ 0

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}
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₀,l1), X₁: X₁ {O(n)}

Run probabilistic analysis on SCC: [l0]

Run classical analysis on SCC: [l1; l2]

MPRF for transition t₈: l2(X₀,X₁) → l1(X₀,X₁) :|: X₀ ≤ 0 ∧ 0 ≤ X₀ ∧ 1 ≤ X₁ of depth 1:

new bound:

X₁+1 {O(n)}

MPRF:

• l1: [X₁-1]
• l2: [X₁]

MPRF for transition t₆: l1(X₀,X₁) → l2(X₀,X₁-1) :|: 0 ≤ X₀ of depth 1:

new bound:

X₁+2 {O(n)}

MPRF:

• l1: [1]
• l2: [0]

Classical Approximation after Lifting Classical Results

All Bounds
Timebounds

Overall timebound:inf {Infinity}
g₀: 1 {O(1)}
g₂: inf {Infinity}
g₅: X₁+2 {O(n)}
g₇: X₁+1 {O(n)}

Costbounds

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

Sizebounds

(g₀,l1), X₁: X₁ {O(n)}
(g₂,l1), X₁: 3⋅X₁ {O(n)}
(g₅,l2), X₁: 5⋅X₁+2 {O(n)}
(g₇,l1), X₀: 0 {O(1)}
(g₇,l1), X₁: 5⋅X₁+2 {O(n)}

Run probabilistic analysis on SCC: [l1; l2]

Results of Probabilistic Analysis

All Bounds

Timebounds

Overall timebound:inf {Infinity}
g₀: 1 {O(1)}
g₂: inf {Infinity}
g₅: X₁+2 {O(n)}
g₇: X₁+1 {O(n)}

Costbounds

Overall costbound: inf {Infinity}
g₀: 1 {O(1)}
g₂: inf {Infinity}
g₅: X₁+2 {O(n)}
g₇: X₁+1 {O(n)}

Sizebounds

(g₀,l1), X₁: X₁ {O(n)}
(g₂,l1), X₁: 3⋅X₁ {O(n)}
(g₅,l2), X₁: 5⋅X₁+2 {O(n)}
(g₇,l1), X₀: 0 {O(1)}
(g₇,l1), X₁: 5⋅X₁+2 {O(n)}