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.
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.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
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)
Model Checking LTL over (discrete time) Controllable Linear System is Decidable P. Tabuada and G. J. Pappas Michael, Roozbeh Ph.D. Course November 2005.
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.
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.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
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.
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
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.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
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.
15-820A 1 LTL Model Checking A Flavio Lerda.
SS 2017 Software Verification Timed Automata
Modal, Dynamic and Temporal Logics
CIS 842: Specification and Verification of Reactive Systems
Semantically Equivalent Formulas
Propositional Logic: exercises
Software Verification 2 Automated Verification
CSEP590 – Model Checking and Automated Verification
Generating Optimal Linear Temporal Logic Monitors by Coinduction
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
Computer Security: Art and Science, 2nd Edition
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
Formal Methods in software development
Program correctness Branching-time temporal logics
Model Checking CS 680 Formal Methods Jeremy Johnson.
COMP60621 Designing for Parallelism
Model Checking Graph Grammars
Formal Methods in software development
CSE 503 – Software Engineering
Presentation transcript:

Formal Methods in software development a.a.2017/2018 Prof. Anna Labella 12/2/2018

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 12/2/2018

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 12/2/2018

Some hypotheses on temporal structure Discrete/ Continuous Linear / Branching 12/2/2018

Linear time temporal logic: LTL (syntax) ::=T | | p | () | () | () | () | (X) | (F) | (G) | (X) | ( U ) | ( W ) F “eventually” G “always” X “next step” U “until” W “until possibly” 12/2/2018

LTL: syntax Warning: Operators not connectives They bind more tightly than connectives 12/2/2018

Exercises 12/2/2018

LTL: satisfiability

LTL: semantics M, s |=  if the path starting from s satisfys  We are dealing with a path intended as an infinite series of states M, s |=  if the path starting from s satisfys  States or paths? States are starting points of paths suffixes of paths are still paths 12/2/2018

LTL: semantics (satisfaction) 12/2/2018

Semantics  |=  O-----O-----O-----O-----O , ’  … 12/2/2018

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 12/2/2018

Semantics of X and U Semantics of X: 1 |= X p 1 2 |= p Semantics of U:  |= p U q j|= p i |= q  12/2/2018

Semantics 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) 12/2/2018

Semantics 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 12/2/2018

Exercises 12/2/2018

LTL: equivalences

LTL: what does hold (exercises) G ()  (G  G ) G   F  G  X X  F G  F X() ≅ X X 12/2/2018

LTL: reductions (transitivity on paths) G   GG while GG   G is always valid 12/2/2018

LTL An internal induction rule w.r.t. time   X G(  X ) (  G ) 12/2/2018

LTL: definability F  ≅ T U  “eventually” G  ≅  W  “always” U ≅ (W)  (F) “until” W ≅ (U)  (G) “until possibly” 12/2/2018

LTL “next” operator 12/2/2018

Exercises 12/2/2018