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.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
Part 3: Safety and liveness
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
LINEAR TEMPORAL LOGIC Fall 2013 Dr. Eric Rozier.
Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.
CS6133 Software Specification and Verification
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
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.
 Dr. Vered Gafni 1 LTL Decidability Enables consistency check, but also base for verification.
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
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.
Witness and Counterexample Li Tan Oct. 15, 2002.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
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.
Automata and Formal Lanugages Büchi Automata and Model Checking Ralf Möller based on slides by Chang-Beom Choi Provable Software Lab, KAIST.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
1 Translating from LTL to automata. 2 Why translating? Want to write the specification in some logic. Want to check that an automaton (or a Kripke structure)
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.
Basics of automata theory
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.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
CS6133 Software Specification and Verification
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
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.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
Bounded Model Checking A. Biere, A. Cimatti, E. Clarke, Y. Zhu, Symbolic Model Checking without BDDs, TACAS’99 Presented by Daniel Choi Provable Software.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
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.
SS 2017 Software Verification Timed Automata
Modal, Dynamic and Temporal Logics
Formal Methods in software development
CIS 842: Specification and Verification of Reactive Systems
SS 2017 Software Verification LTL monitoring
Semantically Equivalent Formulas
Software Verification 2 Automated Verification
CSEP590 – Model Checking and Automated Verification
Formal Methods in software development
Formal Methods in software development
Software Verification 2 Automated Verification
Formal Methods in software development
Formal Methods in software development
Computer Security: Art and Science, 2nd Edition
Finite-Trace Linear Temporal Logic: Coinductive Completeness
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
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
Program correctness Branching-time temporal logics
Model Checking Graph Grammars
Presentation transcript:

Formal Methods in software development a.a.2018/2019 Prof. Anna Labella 5/16/2019

Temporal logic Let us want to express the following properties x ((file(x) requested(x)) y (y≥a  print(x,y)) y (y≥a  works(x)) The constant a as well as the variable y, of type “time” If a file is requested to be printed, eventually it will be printed After an amount a of time, x will begin to work 5/16/2019

Temporal logic One could use typed variables and first order logic making a distinction between temporal and dominion references Or one can use modal operators x ((file(x) requested(x))  F print(x)) G works(x)) F means eventually G means always 5/16/2019

Some hypotheses on temporal structure Discrete/ Continuous Linear / Branching 5/16/2019

LTL: syntax Warning: Operators not connectives They bind more tightly than connectives 5/16/2019

Exercises 5/16/2019

LTL: syntax It would be possible to introduce a proof theory for LTL, but we are not interested in it because we are going to to use LTL in Model Checking. [see Ben Ari] 5/16/2019

Semantics: transition systems Abstract models: states and transitions LTS: Automata without terminal states (Kripke structures) A set S of states with a relation ®  S  S s.t. for every s there is s’, (s,s’)  ® with a labeling function L: S ® finite sets of coherent literals 5/16/2019

LTL: semantics We are dealing with paths intended as an infinite series of states States or paths? States are starting points of paths suffixes of paths are still paths 5/16/2019

LTL: semantics (satisfaction) 5/16/2019

LTL: satisfiability

Semantics: examples  |=  O-----O-----O-----O-----O , ’  … , ’  … 5/16/2019

Semantics of G and F Semantics of G:  |= G p Semantics of F:  |= F p O-----O-----O-----O-----O---- p p p p p Semantics of F:  |= F p O-----O-----O-----O-----O---- p 5/16/2019

Semantics of X and U Semantics of X: 1 |= X p 1 2 |= p Semantics of U:  |= p U q j|= p i |= q  5/16/2019

Semantics: more examples a modal formula can be true or false in a path e.g. in this trace: O-----O-----O-----O-----O------….. pq p¬q p¬q pq pq … p ∨ ¬q true: is true in the first state of the trace X¬q true, because q is false in the second state XXq false, because q is false in the third state Gp true, because p is true in all states Gq false, because q is not true in all states (it is true only in some states) 5/16/2019

Semantics: more examples in the same trace: O-----O-----O-----O-----O------….. pq p¬q p¬q pq pq … GFq true: for all states of the sequence, there is some future point where q is true pU¬q true: p is true until ¬q becomes true; (in the first state p is true, then ¬q becomes true) qUXXq true: in the first state q is true, in the second state XXq is true (because q is true two states later) G(pUXXq) not straightforward to check: all states have to be checked for qUXXq in turn, check XXq in all states 5/16/2019

Exercises 5/16/2019

LTL: equivalences

LTL: definability F  ≅ T U  “eventually” G  ≅  W  “always” U ≅ (W)  (F) “until” W ≅ (U)  (G) “until possibly” 5/16/2019

LTL “next” operator 5/16/2019

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

LTL: reductions (transitivity on paths) G   GG while GG   G is always valid 5/16/2019

LTL An internal induction rule w.r.t. time   X G(  X ) (  G ) 5/16/2019

Exercises 5/16/2019