Title: Probabilistic Verification of Discrete Event Systems
1Probabilistic Verification of Discrete Event
Systems
2Introduction
- Verify properties of discrete event systems
- Probabilistic and real-time properties
- Properties expressed using CSL
- Acceptance sampling
- Guaranteed error bounds
3The Hungry Stork
4The Hungry Stork
System
The probability is at least 0.7 that the stork
satisfies its hunger within 180 seconds
5Systems
- A stork hunting for frogs
- The CMU post office
- The Swedish telephone system
- The solar system
6Discrete Event Systems
- Discrete state changes at the occurrence of
events - A stork hunting for frogs
- The CMU post office
- The Swedish telephone system
- The solar system
7The Hungry Stork as aDiscrete Event System
hungry
8The Hungry Stork as aDiscrete Event System
stork sees frog
hungry,hunting
hungry
40 sec
9The Hungry Stork as aDiscrete Event System
stork sees frog
frog sees stork
hungry,hunting,seen
hungry,hunting
hungry
40 sec
19 sec
10The Hungry Stork as aDiscrete Event System
stork sees frog
frog sees stork
stork eats frog
hungry,hunting,seen
not hungry
hungry,hunting
hungry
40 sec
19 sec
1 sec
11Sample Execution Paths
stork sees frog
frog sees stork
stork eats frog
hungry,hunting,seen
not hungry
hungry,hunting
hungry
40 sec
19 sec
1 sec
12Properties of Interest
- Probabilistic real-time properties
- The probability is at least 0.7 that the stork
satisfies its hunger within 180 seconds
13Properties of Interest
- Probabilistic real-time properties
- The probability is at least 0.7 that the stork
satisfies its hunger within 180 seconds
14Verifying Real-time Properties
- The stork satisfies its hunger within 180
seconds
stork sees frog
frog sees stork
stork eats frog
hungry,hunting,seen
not hungry
hungry,hunting
hungry
40 sec
19 sec
1 sec
True!
15Verifying Real-time Properties
- The stork satisfies its hunger within 180
seconds
stork sees frog
Stork eats frog
not hungry
hungry,hunting
hungry
165 sec
30 sec
False!
16Verifying Probabilistic Properties
- The probability is at least 0.7 that X
- Symbolic Methods
- Pro Exact solution
- Con Works for a restricted class of systems
- Sampling
- Pro Works for all systems that can be simulated
- Con Uncertainty in correctness of solution
17Our Approach
- Use simulation to generate sample execution paths
- Use sequential acceptance sampling to verify
probabilistic properties
18Error Bounds
- Probability of false negative ?
- We say that P is false when it is true
- Probability of false positive ?
- We say that P is true when it is false
19Acceptance Sampling
- Hypothesis The probability is at least ? that X
20Acceptance Sampling
21SequentialAcceptance Sampling
22Performance of Test
23Ideal Performance
24Actual Performance
25Graphical Representation of Sequential Test
26Graphical Representation of Sequential Test
- We can find an acceptance line and a rejection
line given ?, ?, ?, and ?
27Graphical Representation of Sequential Test
28Graphical Representation of Sequential Test
29Continuous Stochastic Logic (CSL)
- State formulas
- Truth value is determined in a single state
- Path formulas
- Truth value is determined over an execution path
30State Formulas
- Standard logic operators ?, ?1 ? ?2
- Probabilistic operator Pr?(?)
- True iff probability is at least ? that ? holds
- Pr0.7(The stork satisfies its hunger within 180
seconds)
31Path Formulas
- Until ?1 Ut ?2
- Holds iff ?2 becomes true in some state along the
execution path before time t, and ?1 is true in
all prior states - The stork satisfies its hunger within 180
seconds true U180 hungry
32Expressing Properties in CSL
- The probability is at least 0.7 that the stork
satisfies its hunger within 180 seconds - Pr0.7(true U180 hungry)
- The probability is at least 0.9 that the
customer is served within 60 seconds and remains
happy while waiting - Pr0.9(happy U60 served)
33Semantics of Until
hungry,hunting,seen
hungry
hungry,hunting
hungry
40 sec
19 sec
1 sec
True!
34Semantics of Until
hungry
hungry,hunting
hungry
165 sec
30 sec
False!
35Semantics of Until
happy,served
served
happy,served
happy,served
17 sec
13 sec
5 sec
False!
36Verifying Probabilistic Statements
- Verify Pr?(?) with error bounds ? and ?
- Generate sample execution paths using simulation
- Verify ? over each sample execution path
- If ? is true, then we have a positive sample
- If ? is false, then we have a negative sample
- Use sequential acceptance sampling to test the
hypothesis Pr?(?)
37Verification of Nested Probabilistic Statements
- Suppose ?, in Pr?(?), contains probabilistic
statements - Pr0.8(true U60 Pr0.9(true U30 hungry))
- Error bounds ? and ? when verifying ?
38Verification of Nested Probabilistic Statements
- Suppose ?, in Pr?(?), contains probabilistic
statements
39Modified Test
- Find an acceptance line and a rejection line
given ?, ?, ?, ?, ?, and ?
40Modified Test
- Find an acceptance line and a rejection line
given ?, ?, ?, ?, ?, and ?
Accept
Continue sampling
Reject
41Verification of Negation
- To verify ? with error bounds ? and ?
- Verify ? with error bounds ? and ?
42Verification of Conjunction
- Verify ?1 ? ?2 ? ? ?n with error bounds ? and ?
- Accept if all conjuncts are true
- Reject if some conjunct is false
43Acceptance of Conjunction
- Accept if all conjuncts are true
- Accept all ?i with bounds ?i and ?i
- Probability at most ?i that ?i is false
- Therefore Probability at most ?1 ?n that
conjunction is false - For example, choose ?i ?/n
- Note ?i unconstrained
44Rejection of Conjunction
- Reject if some conjunct is false
- Reject some ?i with bounds ?i and ?i
- Probability at most ?i that ?i is true
- Therefore Probability at most ?i that
conjunction is true - Choose ?i ?
- Note ?i unconstrained
45Putting it Together
- To verify ?1 ? ?2 ? ? ?n with error bounds ?
and ? - Verify each ?i with error bounds ? and ?
- Return false as soon as any ?i is verified to be
false - If all ?i are verified to be true, verify each ?i
again with error bounds ? and ?/n - Return true iff all ?i are verified to be true
Fast reject
46Putting it Together
- To verify ?1 ? ?2 ? ? ?n with error bounds ?
and ? - Verify each ?i with error bounds ? and ?
- Return false as soon as any ?i is verified to be
false - If all ?i are verified to be true, verify each ?i
again with error bounds ? and ?/n - Return true iff all ?i are verified to be true
Rigorous accept
47Verification of Path Formulas
- To verify ?1 Ut ?2 with error bounds ? and ?
- Convert to disjunction
- ?1 Ut ?2 holds if ?2 holds in the first state,
or if ?2 holds in the second state and ?1 holds
in all prior states, or
48More on Verifying Until
- Given ?1 Ut ?2, let n be the index of the first
state more than t time units away from the
current state - Disjunction of n conjunctions c1 through cn, each
of size i - Simplifies if ?1 or ?2, or both, do not contain
any probabilistic statements
49Example
hungry
- Verify Pr0.7(true U180 hungry) inwith ? ?
0.1 and ? 0.1
Simulator
50Example
hungry
- Verify Pr0.7(true U180 hungry) inwith ? ?
0.1 and ? 0.1
hungry
40
hungry, hunting
19
hungry, hunting, seen
1
hungry
Total time 0 sec
Total time 40 sec
Total time 59 sec
Total time 60 sec
51Example
hungry
- Verify Pr0.7(true U180 hungry) inwith ? ?
0.1 and ? 0.1
hungry
63
hungry, hunting
25
hungry, hunting, seen
2
hungry,tired
93
hungry
Total time 88 sec
Total time 90 sec
Total time 183 sec
Total time 0 sec
Total time 63 sec
52Example
hungry
- Verify Pr0.7(true U180 hungry) inwith ? ?
0.1 and ? 0.1
Property holds!
53Summary
- Algorithm for probabilistic verification of
discrete event systems - Sample execution paths generated using simulation
- Probabilistic properties verified using
sequential acceptance sampling
54Future Work
- Apply to hybrid dynamic systems
- Develop heuristics for formula ordering and
parameter selection - Use verification to aid policy generation for
real-time stochastic domains