Formal Methods in software development

Slides:



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

1 First order theories (Chapter 1, Sections 1.4 – 1.5)
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
The Logic of Quantified Statements
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Chair of Software Engineering Software Verification Stephan van Staden Lecture 10: Model Checking.
9/28/98 Prof. Richard Fikes First-Order Logic Knowledge Interchange Format (KIF) Computer Science Department Stanford University CS222 Fall 1998.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Temporal Logic of Actions (TLA) Leslie Lamport
Review: forward E { P } { P && E } TF { P && ! E } { P 1 } { P 2 } { P 1 || P 2 } x = E { P } { \exists … }
ESE601: Hybrid Systems Introduction to verification Spring 2006.
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Introduction to Software Testing Chapter 9.4 Model-Based Grammars Paul Ammann & Jeff Offutt
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
CS6133 Software Specification and Verification
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
CS6133 Software Specification and Verification
4.1 Proofs and Counterexamples. Even Odd Numbers Find a property that describes each of the following sets E={…, -4, -2, 0, 2, 4, 6, …} O={…, -3, -1,
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.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
lamsweerde Chap.4: Formal Requirements Specification © 2009 John Wiley and Sons Fundamentals of RE Chapter 4 Requirements.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Logic Programming. Formal Logics- Recap Formulas – w/out quantifiers Free Variables Bound Variables Assignments and satisfaction Validity and satisfiability.
This Week Lecture on relational semantics Exercises on logic and relations Labs on using Isabelle to do proofs.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Π-AAL: An Architecture Analysis Language for Formally Specifying and Verifying Structural and Behavioral Properties of Software Architectures Presented.
IS 2620: Developing Secure Systems Formal Verification/Methods Lecture 9 March 15, 2012.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Counterexample-Guided Abstraction Refinement By Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith Presented by Yunho Kim Provable Software.
Describing Syntax and Semantics
Formal methods: Lecture
Propositional Calculus: Boolean Functions and Expressions
Knowledge Representation and Reasoning
ARTIFICIAL INTELLIGENCE
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
EPISTEMIC LOGIC.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
IS 2935: Developing Secure Systems
Logics for Data and Knowledge Representation
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
MA/CSSE 474 More Math Review Theory of Computation
Computer Security: Art and Science, 2nd Edition
Formal Methods in software development
Logics for Data and Knowledge Representation
Formal Methods in software development
Search techniques.
Formal Methods in software development
Formal Methods in software development
Translating Linear Temporal Logic into Büchi Automata
Logics for Data and Knowledge Representation
Introduction to verification
Formal Methods in software development
Formal Methods in software development
Representations & Reasoning Systems (RRS) (2.2)
CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre
Logics for Data and Knowledge Representation
Presentation transcript:

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

The predicate calculus [H-R ch.2] The need for a richer language Terms and formulas quantifiers 1/14/2019

Syntax Inductive term definition BNF t::= x | c | f(t1,t2,…,tn) 1/14/2019

Syntax Inductive definition of wff BNF ::= p(t1,t2,…,tn) | t1=t2 | () | () | () | () | x | x 1/14/2019

Semantics syntactical data F functional symbols- constants P predicate symbols An interpretation M a non empty set (domain) A F  a set of functions fM on A (An) P  a set of relations PM on A (An) 1/14/2019

Semantics A subset is the interpretation of a 1-ary predicate A n-ary relation is the interpretation of a n-ary predicate 1/14/2019

An example: arithmetics syntactical data F: f1(-,-), f2(-,-), f0(-), c P: - = -, P1(-,-) An interpretation M Natural numbers (domain) Functions : - + -, - . -, s(-), 0 Predicates: - = -, - ≤ - 1/14/2019

Semantics environments Assigning values l: var  elements of A 1/14/2019

Semantics Summing up, we are given with 1/14/2019

An example: arithmetics 2 f1(c,x)=x always true in the interpretation f2(c,x)=x sometimes true sometimes false in the interpretation depending on the assignment x(f1(c,x)=x) true in the interpretation x(f2(c,x)=x) true in the interpretation x(f2(c,x)=x) false in the interpretation x(f1(c,x)=f1(c,x)) valid 1/14/2019

Semantics An interpretation M is a model of  M |=l  : 1/14/2019

Semantics: satisfiability 1/14/2019

Exercises 1/14/2019

Semantics: validity is valid if for every intepretation and for every environment M |=  1/14/2019

Properties Soundness  |-   M |=  Completeness M |=    |-  Indecidability Compactness Expressivity 1/14/2019

Second order logic Existential second order logic Universal second order logic Peano’s arithmetics 1/14/2019

Specification, verification and logics [H-R ch.3] Logic provides: A framework for modelling systems A specification language for describing properties to be verified A verification method to ascertain whether the description of the system satisfies the properties 1/14/2019

Possibilities of approaching model verification Proof-based Γ |-- φ Γ is the description while φ is the property to be satisfied Degree of automation: Fully automatic Full behaviour Sequential Reactive …. A priori Model based M |= φ M is a finite model (only one) Manual One property Concurrent Terminating ….. A posteriori 1/14/2019

We are possibly dealing with Γ |-- φ proof theory Γ |= φ semantic entailment M |= φ satifiability 1/14/2019

We are possibly dealing with Γ |-- φ Γ |= φ M |= φ 1/14/2019

We are possibly dealing with Γ |-- φ Γ |= φ M |= φ 1/14/2019

Model Checking Concurrent systems Reactive systems Temporal aspects Automatic Based on a builded model Verifying satisfiability of properties A posteriori Provides a counterexample Concurrent systems Reactive systems Temporal aspects 1/14/2019

A formula can change its truth value We build a model M We model our system using the description language of the model checker We code the property to be verified in the same language and the model checker should say whether M |= φ or not Time could change the truth value of a formula M,s |= φ or not for a given state s In this last case it is often possible using the model checker to have a counterexample 1/14/2019

Models and states A model M is an abstraction: it can describe very different things and omits lot of particulars A model M is a transition system We have states and and transitions between them. An assignment statement can make the model move from one state to another one We can think of a transition system as a set S of states together with a binary relation    S ✕ S and a labeling function L: S  P(atoms) 1/14/2019

A transition system 1 1/14/2019

A transition system 2 unwinding 1/14/2019

Linear and branching time 1/14/2019

Exercises 1/14/2019