Formal Methods in software development

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
Tutorial I – An Introduction to Model Checking Peng WU INRIA Futurs LIX, École Polytechnique.
Metodi formali dello sviluppo software a.a.2013/2014 Prof.Anna Labella.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
1 Computation Tree Logic (CTL). 2 CTL Syntax P - a set of atomic propositions, every p  P is a CTL formula. f, g, CTL formulae, then so are  f, f 
François Fages MPRI Bio-info 2007 Formal Biology of the Cell Modeling, Computing and Reasoning with Constraints François Fages, Constraint Programming.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
François Fages MPRI Bio-info 2006 Formal Biology of the Cell Modeling, Computing and Reasoning with Constraints François Fages, Constraints Group, INRIA.
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.
Model Checking Inputs: A design (in some HDL) and a property (in some temporal logic) Outputs: Decision about whether or not the property always holds.
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.
卜磊 Transition System. Part I: Introduction  Chapter 0: Preliminaries  Chapter 1: Language and Computation Part II: Models  Chapter.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar D D.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
© Katz, 2007CS Formal SpecificationsLecture - Temporal logic 1 Temporal Logic Formal Specifications CS Shmuel Katz The Technion.
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.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
Witness and Counterexample Li Tan Oct. 15, 2002.
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 Temporal Logic-Overview FM Temporal Logic u Classical logic: Good for describing static conditions u Temporal logic: Adds temporal operators Describe.
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.
1 Introduction to SMV and Model Checking Mostly by: Ken McMillan Cadence Berkeley Labs Small parts by: Brandon Eames ISIS/Vanderbilt.
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.
10/19/2015COSC , Lecture 171 Real-Time Systems, COSC , Lecture 17 Stefan Andrei.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
卜磊 Transition System. Definitions and notations Reactive System The intuition is that a transition system consists of a set of possible.
Introduction to Model Checking
1 Networks of TA; Specification Logic; Case Studies CS5270, P.S. Thiagarajan.
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.
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.
Model Checking Lecture 2 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
15-820A 1 LTL Model Checking A Flavio Lerda.
Basic concepts of Model Checking
CIS 842: Specification and Verification of Reactive Systems
SS 2017 Software Verification LTL monitoring
Semantically Equivalent Formulas
Software Verification 2 Automated Verification
CSCI1600: Embedded and Real Time Software
CSEP590 – Model Checking and Automated Verification
Formal Methods in software development
Formal Methods in software development
Computer Security: Art and Science, 2nd Edition
CSCI1600: Embedded and Real Time Software
Formal Methods in software development
Translating Linear Temporal Logic into Büchi Automata
Introduction to verification
Formal Methods in software development
Program correctness Linear Time Temporal Logic
Formal Methods in software development
Program correctness Branching-time temporal logics
Model Checking CS 680 Formal Methods Jeremy Johnson.
Model Checking Graph Grammars
Presentation transcript:

Formal Methods in software development a.y.2017/2018 Prof. Anna Labella 1/17/2019

LTL: what is expressible Safety properties G ¬  Liveness properties GF or G(F) 1/17/2019

LTS: Automata without terminal states Semantics: transition systems Abstract models: states and transitions LTS: Automata without terminal states Kripke structures ®  S  S 1/17/2019

LTL Characterising linear time G ((G )  (G))  (GG) ,   --------  -------- Lefthand holds, righthand does not 1/17/2019

LTL: what is expressible 1/17/2019

LTL: what is not expressible 1/17/2019

Infinite computation tree for initial state s1 Computation Trees: labelled TS a b ac s1 s3 s1 s2 a b ac State transition structure (Kripke Model) Infinite computation tree for initial state s1 1/17/2019

Linear time and Branching time Linear: only one possible future in a moment Look at individual computations Branching: may split to different courses depending on possible futures Look at the tree of computations s0 s2 s3 s1 s0 s1 s3 s2 ... s0 s2 s3 s1 ... 1/17/2019

Operators and Quantifiers State operators G f : f holds globally F f : f holds eventually X f : f holds at the next state f U y : f holds until y holds f W y : f holds until y possibly holds Path quantifiers E: along at least one path (there exists …) A: along all paths (for all …) 1/17/2019

CTL characterisation Temporal operators must be immediately preceded by a path quantifier 1/17/2019

Typical CTL Formulas E F ( start  ¬ ready ) A G ( req  A F ack ) eventually a state is reached where start holds and ready does not hold A G ( req  A F ack ) any time request occurs, it will be eventually acknowledged A G ( E F restart ) from any state it is possible to get to the restart state 1/17/2019

CTL semantics E X (f) A X (f) E G (f) A G (f) true in state s if f is true in some successor of s (there exists a next state of s for which f holds) A X (f) true in state s if f is true for all successors of s (for all next states of s f is true) E G (f) true in s if f holds in every state along some path emanating from s (there exists a path ….) A G (f) true in s if f holds in every state along all paths emanating from s (for all paths ….globally ) 1/17/2019

E F, A F are special cases of E [f Uy], A [f Uy] E F (y) there exists a path which eventually contains a state in which y is true A F (y) for all paths, eventually there is state in which y holds E F (f U y) there exists a path where (f U y) is true A F (f U y) for all paths (f U y) is true E F, A F are special cases of E [f Uy], A [f Uy] E F (y) = E [ true U y ], A F (y) = A [ true U y ] 1/17/2019

CTL Operators - examples so |= E F y y so so y so |= A F y y so |= E G y y so so |= A G y so y y 1/17/2019

Minimal set of CTL Formulas Full set of operators Boolean: ¬, , , ,  temporal: E, A, X, F, G, U, W Minimal set sufficient to express any CTL formula Boolean: ¬,  temporal: E, X, U Examples: f  y = ¬(¬f  ¬y), F f = true U f , A (f ) = ¬E(¬f ) 1/17/2019

CTL* – Computation Tree Logic Path quantifiers - describe branching structure of the tree A (for all computation paths) E (for some computation path = there exists a path) Temporal operators - describe properties of a path through the tree X (next time, next state) F (eventually, finally) G (always, globally) U (until) W (weak until) 1/17/2019

CTL* Formulas Temporal logic formulas are evaluated w.r.to a state in the model State formulas apply to a specific state Path formulas apply to all states along a specific path 1/17/2019

CTL* Syntax An atomic proposition p is a state formula A state formula is also a path formula If f, y are state formulae, so are ¬f, fy, fy, If a is a path formula, E a is a state formula If a, b are path formulae, so are ¬a, ab , ab If a, b are path formulae, so are X a, aUb 1/17/2019

Summing up (CTL*) 1/17/2019

CTL* Semantics If formula f holds at state s (path ), we write: s |= f ( |= a) s |= p, p is an atomic formula, iff p  L(s) [label of s] s |= ¬ f, iff s |≠ f s |= f y, iff s |= f and s |= y s |= E f, iff   from state s, s.t.  |= f  |= ¬ a, iff  |≠ a  |= a b, iff  |= a and  |= b  |= X a, iff 1 |= a (a reachable in next state)  |= a U b, iff  |= a until  |= b 1/17/2019

CTL – Computational Tree Logic CTL* - a powerful branching-time temporal logic CTL – a branching-time fragment of CTL* In CTL every temporal operator (G,F,X,U,W) must be immediately preceded by a path quantifier (A,E) We need both state formulae and path formulae to recursively define the logic 1/17/2019

More expressivity in CTL than in LTL? Quantifying on paths In LTL formulas are always quantified through A 1/17/2019

LTL: blocks of operators must be thought as preceded by A always Linear time operators. The following are a complete set ¬f , fy , Xf, f U y Others can be derived f  y  ¬(¬f  ¬y) f y  ¬f y F f  (true U f) G f (f U false) 1/17/2019

CTL: what is expressible? 1 1/17/2019

CTL: what is expressible? 2 1/17/2019

Expressivity of LTL and CTL Safety G ( c1 c2) Liveness G (ti Fci) Safety AG ( c1 c2) Liveness AG (ti AFci) 1/17/2019

LTL and CTL LTL (Linear Temporal Logic) - Reasoning about infinite sequence of states π: s0, s1, s2, … CTL (Computation Tree Logic) – Reasoning on a computation tree. Temporal operators are immediately preceded by a path quantifier (e.g. A F p ) CTL vs. LTL – different expressive power EFp is not expressible in LTL FGp is not expressible in CTL 1/17/2019

Comparing logics 1/17/2019

Comparing logics 1/17/2019

Exercises 1/17/2019

Exercises 1/17/2019

LTL: what does hold (exercises) G ()  (G  G ) G   F  G  X X  F G  F X() ≅ X X 1/17/2019