Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.

Slides:



Advertisements
Similar presentations
Chapter 7 Hypothesis Testing
Advertisements

Introduction to Hypothesis Testing
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Friday, April 17, PTR: A Probabilistic Transaction Logic Julian Fogel A logic for reasoning about action under uncertainty. A mathematically sound.
Probabilistic Verification of Discrete Event Systems using Acceptance Sampling Håkan L. S. YounesReid G. Simmons Carnegie Mellon University.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
Statistical Probabilistic Model Checking Håkan L. S. Younes Carnegie Mellon University.
CS 355 – Programming Languages
Ymer: A Statistical Model Checker Håkan L. S. Younes Carnegie Mellon University.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes Reid G. Simmons (initial work performed at HTC, Summer 2001)
A Hybridized Planner for Stochastic Domains Mausam and Daniel S. Weld University of Washington, Seattle Piergiorgio Bertoli ITC-IRST, Trento.
Planning under Uncertainty
Complexity 26-1 Complexity Andrei Bulatov Interactive Proofs.
Precise Inter-procedural Analysis Sumit Gulwani George C. Necula using Random Interpretation presented by Kian Win Ong UC Berkeley.
Introduction to Hypothesis Testing
1 Discrete Structures CS 280 Example application of probability: MAX 3-SAT.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
8-2 Basics of Hypothesis Testing
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
Flavio Lerda 1 LTL Model Checking Flavio Lerda. 2 LTL Model Checking LTL –Subset of CTL* of the form: A f where f is a path formula LTL model checking.
Antoine Girard VAL-AMS Project Meeting April 2007 Behavioral Metrics for Simulation-based Circuit Validation.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
A Framework for Planning in Continuous-time Stochastic Domains Håkan L. S. Younes Carnegie Mellon University David J. MuslinerReid G. Simmons Honeywell.
Policy Generation for Continuous-time Stochastic Domains with Concurrency Håkan L. S. YounesReid G. Simmons Carnegie Mellon University.
Predicates and Quantifiers
Hypothesis Tests In statistics a hypothesis is a statement that something is true. Selecting the population parameter being tested (mean, proportion, variance,
Planning with Concurrency in Continuous-time Stochastic Domains (thesis proposal) Håkan L. S. Younes Thesis Committee: Reid G. Simmons (chair) Geoffrey.
Planning and Verification for Stochastic Processes with Asynchronous Events Håkan L. S. Younes Carnegie Mellon University.
Slide Slide 1 Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing 8-3 Testing a Claim about a Proportion 8-4 Testing a Claim About.
Maximum Likelihood Estimator of Proportion Let {s 1,s 2,…,s n } be a set of independent outcomes from a Bernoulli experiment with unknown probability.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.7 Switching Circuits.
Hypothesis Tests In statistics a hypothesis is a statement that something is true. Selecting the population parameter being tested (mean, proportion, variance,
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Logic Disjunction A disjunction is a compound statement formed by combining two simple sentences using the word “OR”. A disjunction is true when at.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
CS 363 Comparative Programming Languages Semantics.
1 Building The Ultimate Consistent Reader. 2 Introduction We’ve already built a consistent reader (cube-Vs.-point)... Except it had variables ranging.
Selecting Input Probability Distribution. Simulation Machine Simulation can be considered as an Engine with input and output as follows: Simulation Engine.
Extending PDDL to Model Stochastic Decision Processes Håkan L. S. Younes Carnegie Mellon University.
Thinking Mathematically
Probabilistic Verification of Discrete Event Systems using Acceptance Sampling Håkan L. S. Younes Carnegie Mellon University.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
1 Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
1 Section 8.2 Basics of Hypothesis Testing Objective For a population parameter (p, µ, σ) we wish to test whether a predicted value is close to the actual.
C HAPTER 3 Describing Syntax and Semantics. D YNAMIC S EMANTICS Describing syntax is relatively simple There is no single widely acceptable notation or.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Machine Learning Lecture 1: Intro + Decision Trees Moshe Koppel Slides adapted from Tom Mitchell and from Dan Roth.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Håkan L. S. YounesDavid J. Musliner Carnegie Mellon UniversityHoneywell Laboratories Probabilistic Plan Verification through Acceptance Sampling.
CHAPTER SIX T HE P ROBABILISTIC M ETHOD M1 Zhang Cong 2011/Nov/28.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
Chapter 7. Propositional and Predicate Logic
Statistical probabilistic model checking
AND.
Knowledge Representation and Reasoning
When we free ourselves of desire,
Chapter 9: Hypothesis Testing
Statistical Model-Checking of “Black-Box” Probabilistic Systems VESTA
On Statistical Model Checking of Stochastic Systems
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Lecture 2: Propositional Logic
Chapter 7. Propositional and Predicate Logic
Section 3.7 Switching Circuits
Statistical Probabilistic Model Checking
Introduction to verification
Program correctness Linear Time Temporal Logic
Presentation transcript:

Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes

Introduction Verify properties of discrete event systems Probabilistic and real-time properties Properties expressed using CSL Acceptance sampling Guaranteed error bounds

“The Hungry Stork”

System “The probability is at least 0.7 that the stork satisfies its hunger within 180 seconds”

Systems A stork hunting for frogs The CMU post office The Swedish telephone system The solar system

Discrete 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

“The Hungry Stork” as a Discrete Event System hungry

“The Hungry Stork” as a Discrete Event System hungry, hunting hungry 40 sec stork sees frog

“The Hungry Stork” as a Discrete Event System hungry, hunting, seen hungry, hunting hungry 40 sec19 sec stork sees frogfrog sees stork

“The Hungry Stork” as a Discrete Event System hungry, hunting, seen not hungry hungry, hunting hungry 40 sec19 sec1 sec stork sees frogfrog sees storkstork eats frog

Sample Execution Paths hungry, hunting, seen not hungry hungry, hunting hungry 40 sec19 sec1 sec stork sees frogfrog sees storkstork eats frog

Properties of Interest Probabilistic real-time properties “The probability is at least 0.7 that the stork satisfies its hunger within 180 seconds”

Properties of Interest Probabilistic real-time properties “The probability is at least 0.7 that the stork satisfies its hunger within 180 seconds”

Verifying Real-time Properties “The stork satisfies its hunger within 180 seconds” True! hungry, hunting, seen not hungry hungry, hunting hungry 40 sec19 sec1 sec stork sees frogfrog sees storkstork eats frog ++≤ 180 sec

Verifying Real-time Properties “The stork satisfies its hunger within 180 seconds” False! not hungry hungry, hunting hungry 165 sec30 sec stork sees frogStork eats frog +> 180 sec

Verifying 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

Our Approach Use simulation to generate sample execution paths Use sequential acceptance sampling to verify probabilistic properties

Error 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

Acceptance Sampling Hypothesis: “The probability is at least  that X”

Acceptance Sampling Hypothesis: Pr ≥  (X)

Sequential Acceptance Sampling True, false, or another sample? Hypothesis: Pr ≥  (X)

Performance of Test Actual probability of X holding Probability of accepting Pr ≥  (X) as true  1 –  

Ideal Performance Actual probability of X holding Probability of accepting Pr ≥  (X) as true  1 –   False negatives False positives

Actual Performance  –  +  Indifference region Actual probability of X holding Probability of accepting Pr ≥  (X) as true  1 –   False negatives False positives

Graphical Representation of Sequential Test Number of samples Number of positive samples

Graphical Representation of Sequential Test We can find an acceptance line and a rejection line given , , , and  Reject Accept Continue sampling Number of samples Number of positive samples

Graphical Representation of Sequential Test Reject hypothesis Reject Accept Continue sampling Number of samples Number of positive samples

Graphical Representation of Sequential Test Accept hypothesis Reject Accept Continue sampling Number of samples Number of positive samples

Continuous Stochastic Logic (CSL) State formulas Truth value is determined in a single state Path formulas Truth value is determined over an execution path

State Formulas Standard logic operators: ¬ ,  1   2 … Probabilistic operator: Pr ≥  (  ) True iff probability is at least  that  holds Pr ≥0.7 (“The stork satisfies its hunger within 180 seconds”)

Path Formulas Until:  1 U ≤t  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 U ≤180 ¬hungry

Expressing Properties in CSL “The probability is at least 0.7 that the stork satisfies its hunger within 180 seconds” Pr ≥0.7 (true U ≤180 ¬hungry) “The probability is at least 0.9 that the customer is served within 60 seconds and remains happy while waiting” Pr ≥0.9 (happy U ≤60 served)

Semantics of Until true U ≤180 ¬hungry True! hungry, hunting, seen ¬hungry hungry, hunting hungry 40 sec19 sec1 sec++≤ 180 sec

Semantics of Until true U ≤180 ¬hungry False! ¬hungry hungry, hunting hungry 165 sec30 sec+> 180 sec

Semantics of Until happy U ≤60 served False! happy, ¬served served ¬happy, ¬served happy, ¬served 17 sec13 sec5 sec++≤ 60 sec

Verifying 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 ≥  (  )

Verification of Nested Probabilistic Statements Suppose , in Pr ≥  (  ), contains probabilistic statements Pr ≥0.8 (true U ≤60 Pr ≥0.9 (true U ≤30 ¬hungry)) Error bounds  ’ and  ’ when verifying 

Verification of Nested Probabilistic Statements Suppose , in Pr ≥  (  ), contains probabilistic statements True, false, or another sample?

Modified Test Find an acceptance line and a rejection line given , , , ,  ’, and  ’: Reject Accept Continue sampling With  ’ and  ’ = 0 Number of samples Number of positive samples

Modified Test Find an acceptance line and a rejection line given , , , ,  ’, and  ’: With  ’ and  ’ > 0 Reject Accept Continue sampling Number of samples Number of positive samples

Verification of Negation To verify ¬  with error bounds  and  Verify  with error bounds  and 

Verification of Conjunction Verify  1   2  …   n with error bounds  and  Accept if all conjuncts are true Reject if some conjunct is false

Acceptance 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

Rejection 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

Putting it Together To verify  1   2  …   n with error bounds  and  1. Verify each  i with error bounds  and  ’ 2. Return false as soon as any  i is verified to be false 3. If all  i are verified to be true, verify each  i again with error bounds  and  /n 4. Return true iff all  i are verified to be true “Fast reject”

Putting it Together To verify  1   2  …   n with error bounds  and  1. Verify each  i with error bounds  and  ’ 2. Return false as soon as any  i is verified to be false 3. If all  i are verified to be true, verify each  i again with error bounds  and  /n 4. Return true iff all  i are verified to be true “Rigorous accept”

Verification of Path Formulas To verify  1 U ≤t  2 with error bounds  and  Convert to disjunction  1 U ≤t  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 …

More on Verifying Until Given  1 U ≤t  2, let n be the index of the first state more than t time units away from the current state Disjunction of n conjunctions c 1 through c n, each of size i Simplifies if  1 or  2, or both, do not contain any probabilistic statements

Example Verify Pr ≥0.7 (true U ≤180 ¬hungry) in with  =  = 0.1 and  = 0.1 hungry Simulator Number of samples Positive samples

Example Verify Pr ≥0.7 (true U ≤180 ¬hungry) in with  =  = 0.1 and  = 0.1 hungry hungry, hunting, seen hungry, hunting hungry ¬hungry Total time: 0 secTotal time: 40 sec 1 stork sees frog frog sees stork stork eats frog Total time: 59 secTotal time: 60 sec Number of samples Positive samples

Example Verify Pr ≥0.7 (true U ≤180 ¬hungry) in with  =  = 0.1 and  = 0.1 hungry, hunting, seen hungry, hunting hungry hungry, tired hungry stork sees frog frog sees stork frog jumps hungry stork rested Number of samples Positive samples Total time: 0 secTotal time: 63 sec Total time: 88 secTotal time: 90 secTotal time: 183 sec

Example Verify Pr ≥0.7 (true U ≤180 ¬hungry) in with  =  = 0.1 and  = 0.1 hungry Number of samples Positive samples Property holds!

Summary Algorithm for probabilistic verification of discrete event systems Sample execution paths generated using simulation Probabilistic properties verified using sequential acceptance sampling

Future 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