CSEP590 – Model Checking and Automated Verification

Slides:



Advertisements
Similar presentations
Model Checking Lecture 3. Specification Automata Syntax, given a set A of atomic observations: Sfinite set of states S 0 Sset of initial states S S transition.
Advertisements

Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
Modeling issues Book: chapters 4.12, 5.4, 8.4, 10.1.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Partial Order Reduction: Main Idea
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
CS6133 Software Specification and Verification
UPPAAL Introduction Chien-Liang Chen.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar D D.
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
Discrete Abstractions of Hybrid Systems Rajeev Alur, Thomas A. Henzinger, Gerardo Lafferriere and George J. Pappas.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Temporal Logic and Model Checking. Reactive Systems We often classify systems into two types: Transformational: functions from inputs available at the.
Witness and Counterexample Li Tan Oct. 15, 2002.
Review of the automata-theoretic approach to model-checking.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
Witness and Counterexample Li Tan Oct. 15, 2002.
Abstract Verification is traditionally done by determining the truth of a temporal formula (the specification) with respect to a timed transition system.
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.
1 Carnegie Mellon UniversitySPINFlavio Lerda Bug Catching SPIN An explicit state model checker.
15-820A 1 LTL to Büchi Automata Flavio Lerda A 2 LTL to Büchi Automata LTL Formulas Subset of CTL* –Distinct from CTL AFG p  LTL  f  CTL. f.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Model Checking Lecture 3 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
Verification & Validation By: Amir Masoud Gharehbaghi
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
1 Temporal logic. 2 Prop. logic: model and reason about static situations. Example: Are there truth values that can be assigned to x,y simultaneously.
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
Model Checking Lecture 1: Specification Tom Henzinger.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Model Checking Lecture 2 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
15-820A 1 LTL Model Checking A Flavio Lerda.
Probabilistic Timed Automata
SS 2017 Software Verification Timed Automata
CSEP590 – Model Checking and Automated Verification
CIS 842: Specification and Verification of Reactive Systems
Timed Automata II CS 5270 Lecture Lecture5.
Semantically Equivalent Formulas
Modeling Arithmetic, Computation, and Languages
Instructor: Rajeev Alur
Timed Automata Formal Systems Pallab Dasgupta Professor,
CSCI1600: Embedded and Real Time Software
Alternating tree Automata and Parity games
ITEC452 Distributed Computing Lecture 5 Program Correctness
Formal Methods in software development
CSCI1600: Embedded and Real Time Software
Introduction to verification
Formal Methods in software development
Formal Methods in software development
Program correctness Branching-time temporal logics
Model Checking CS 680 Formal Methods Jeremy Johnson.
Program correctness Model-checking CTL
Instructor: Aaron Roth
Model Checking Graph Grammars
Course: CS60030 FORMAL SYSTEMS
Presentation transcript:

CSEP590 – Model Checking and Automated Verification Lecture outline for July 23, 2003

Today, we will talk about a few “loose ends” from previous lectures, as well as model checking for timed, reactive systems. First, we deal with Fairness in model checking M,s0 |=  may fail due to unrealistic behavior Example: 2 processes with critical sections. Process1 may stay indefinitely in critical section, preventing Process2 from every entering its critical section. Fairness constraints: state that a given formula is true infinitely often on every computation path Such paths are fair computation paths How accomplish? When evaluating truth of CTL formula, A and E connectives only range over fair paths Defn: Let C = {f1,f2,…fn} be a set of n fairness constraints. A computation path s0  s1  is fair with respect to C if for each i there are infinitely many j s.t. sj |= fi, that is, each fi is true infinitely often along the path

We’ll let AC and EC denote the operations A and E restricted to fair paths Recall: EU, EG, and EX form an adequate set for CTL Therefore, ECU, ECG, and ECX form an adequate set for fair CTL Indeed, ECU and ECX can be represented in terms of ECG, thus we only need an algorithm for checking ECG: Restrict graph to states satisfying  In this graph, want to know from which states there is a fair computation path Find the maximal SCCs (Strongly Connected Components) of restricted graph Remove a SCC is for some fi, it doesn’t contain a state satisfying fi. Result SCCs are “fair SCCs” Any state of restricted graph that can reach a fair SCC has a fair path from it Use search to find such states

The complexity of this algorithm is O(n*f*(V+E)) => still linear! Extensions and Alternatives to CTL Linear Time Logic (LTL) Close to CTL, but formulas have meanings on individual computation paths => no quantifiers A and E Is LTL less expressive than CTL? More expressive? LTL syntax for a formula   := p | (! ) | ( and ) | ( U ) | (G) | (F) | (X) Formula is evaluated on a path or a set of paths Set of paths satisfy formula if every path in the set does Consider path  = s1s2… where i represents the suffix starting at si Defn: give a model M for CTL, define when a path  satisfies an LTL formula via |= relation:

1)  |= T 2)  |= p iff p is in L(s1) 3)  |= ! iff  !|=  4)  |= 1 and 2 iff  |= 1 and  |= 2 5)  |= X iff 2 |=  6)  |= G iff for all i at least 1, i |=  7)  |= F iff for some i at least 1, i |=  8)  |= 1U2 iff for some i at least 1 s.t. i |= 2 and for all j = 1…i-1 we have j |= 1 LTL formula is satisfied in a state s of the model if the formula is satisfied on every path starting at s LTL has the usual G and F equivalences, as well as distribution over AND and OR There is also 1 very important equivalence we will see, which is relied upon to show that EG, EU, EX form an adequate set

CTL* - allows nested modalities and boolean connectives before applying path quantifiers E and A. We’ll see some examples of this in class Syntax of CTL* Divides formulas into 2 classes State formulas: evaluated in states:  := p | T | !  | ( and ) | A[] | E[] Path formulas: evaluated along paths:  :=  | !  | ( and ) | (U ) | G  | F  | X  This is a mutually recursive definition LTL us a subset of CTL*. Why? CTL is subset of CTL*. Why? We’ll see in class examples of formulas that define the differences between these 3 logics

Timed Automata Model reactive systems where there are notions of “real-time” Ex: “trigger the alarm upon detection of a problem” vs. “trigger the alarm in less than 5 seconds after detecting the problem” How doe we model such systems? How do we verify them? We’ve seen one way: basic synchronization based on a global clock Very inadequate though Timed Automata – model quantitative info on passage of time 2 elements: Finite automata Clocks (associated with transitions) Take on non-negative real values All clocks start out null in the initial state

A configuration of the system is (q,v) where q is the current control state and v is a valuation of the automaton’s clocks Configurations change in 1 of 2 ways A delay d in time elapses, in which case all clocks are updated by d ( (q,v)  (q, v+d) ) Discrete transition – an action transition (as with normal automata, a control state change). Some clocks may be reset to 0 on such transitions We’ll see an example in class Networks of Timed Automata Composite model composed of many timed automata synchronized. All clocks across all components are updated on delays Similar to what we saw with modeling systems via automata Example in class: the classical railway example There are 3 common extensions to this model of timed automata

Invariants: guarantee that a certain transition eventually occurs by placing invariants on clocks in a state If no transition is taken, invariants expire and system reaches deadlock Urgency: transition that can’t tolerate time delay Hybrid Linear Systems – provide access to dynamic variables Variables that evolve continuously (such as via a differential equation). Altitude, time, speed, temperature…. Very tricky to model and model check (HyTECH system can do it on occasion) Timed Temporal Logic (TCTL) Used to state properties about timed automata Extension of CTL Extends U,F,… operators with info on the flow time

Ex: pU<2q means that p is true until q, where q is true in less than 2 time units from the current time TCTL syntax: 1, 2 := p | ! 1 | (1 and 2) | (1  2) | (1 or 2) | EF(~k) 1 | EG(~k)  | E[1U(~k) 2] | AF(~k) 1 | AG(~k) 1 | A[1U(~k) 2] Where ~ is any comparison (<, >, =, …) We’ll see some examples of formulas in class Note: X operator doesn’t exist because clocks have real values, so there is no notion of “next configuration” So how do we performed Timed Model Checking? Problem: infinite number of configurations because clocks take on real values => infinitely many valuations How fix? Define a notion of “closeness” between configurations

Given clock constraints appearing in transitions and largest constraint used in these constraints, equivalence (~) on clock valuations is defined with the following property: for any timed automaton using these constraints, 2 configurations (q,v) and (q,v’) with v ~ v’ satisfy the same TCTL formulas This defines a set of equivalence classes (or regions). There is a finite number of regions! Given a configuration (q,v), we consider instead the region [v] for v. This defines a global automaton, or a region graph that represents abstractly the system. We model check on that instead Configurations are grouped into a region depending on their clock valuations One problem: exponential in number of clocks

Timed Automata are relatively new, but some progress is still being made We’ll see a full example of a region graph in class Time permitting, we will discuss some more about SMV (via a full example) to prepare you for PS4