Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formal Methods in software development

Similar presentations


Presentation on theme: "Formal Methods in software development"— Presentation transcript:

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

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

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

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

5 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

6 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

7 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

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

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

10 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

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

12 Semantics: satisfiability
1/14/2019

13 Exercises 1/14/2019

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

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

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

17 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

18 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

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

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

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

22 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

23 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

24 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

25 A transition system 1 1/14/2019

26 A transition system 2 unwinding 1/14/2019

27 Linear and branching time
1/14/2019

28 Exercises 1/14/2019


Download ppt "Formal Methods in software development"

Similar presentations


Ads by Google