Formal Methods in software development

Slides:



Advertisements
Similar presentations
1 Reasoning with Promela Safety properties bad things do not happen can check by inspecting finite behaviours Liveness properties good things do eventually.
Advertisements

CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
Partial Order Reduction: Main Idea
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Timed Automata.
1 Partial Order Reduction. 2 Basic idea P1P1 P2P2 P3P3 a1a1 a2a2 a3a3 a1a1 a1a1 a2a2 a2a2 a2a2 a2a2 a3a3 a3a3 a3a3 a3a3 a1a1 a1a1 3 independent processes.
4/25/20151 Metodi formali nello sviluppo software a.a.2013/2014 Prof.Anna Labella.
Compatibility between shared variable valuations in timed automaton network model- checking Zhao Jianhua, Zhou Xiuyi, Li Xuandong, Zheng Guoliang Presented.
Behavioral Equivalence Hossein Hojjat Formal Lab University of Tehran.
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
A logic for true concurrency Paolo Baldan and Silvia Crafa Universita’ di Padova.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Modeling Software Systems Lecture 2 Book: Chapter 4.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Review of the automata-theoretic approach to model-checking.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
EXPRESS'011 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut Scott Smolka, SUNY at Stony Brook Peter Wegner, Brown University.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
Pushdown Automata (PDAs)
Reactive systems – general
Hybrid automata and temporal logics
1 Bisimulations as a Technique for State Space Reductions.
Lecture 81 Regional Automaton CS 5270 Lecture 8. Lecture 82 What We Need to Do Problem: –We need to analyze the timed behavior of a TTS. –The timed behavior.
卜磊 Transition System. Definitions and notations Reactive System The intuition is that a transition system consists of a set of possible.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Formal Methods for Software Engineering Part II: Modelling & Analysis of System Behaviour.
MPRI 3 Dec 2007Catuscia Palamidessi 1 Why Probability and Nondeterminism? Concurrency Theory Nondeterminism –Scheduling within parallel composition –Unknown.
Modelling Reactive Systems 4 Professor Muffy Calder Dept. of Computing Science University of Glasgow
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5.
2G1516/2G1521 Formal Methods2004 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.1, 8.2, 8.5.
Lecture Notes 
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
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.
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.
7/7/20161 Formal Methods in software development a.a.2015/2016 Prof.Anna Labella.
Formal Methods for Software Engineering
SS 2017 Software Verification Automated Verification
Formal Methods in software development
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
Pushdown Automata.
Hierarchy of languages
SS 2018 Software Verification ML, state machines
High-Level Abstraction of Concurrent Finite Automata
Internet of Things A Process Calculus Approach
Alternating tree Automata and Parity games
Non-Deterministic Finite Automata
Formal Methods in software development
Intro to Data Structures
Formal Methods in software development
Threads Chapter 4.
Formal Methods in software development
Lecture 10: Query Complexity
Formal Methods in software development
Formal Methods in software development
Non-preemptive Semantics for Data-race-free Programs
Linear Time Properties
Translating Linear Temporal Logic into Büchi Automata
Chapter 1 Regular Language
Recap lecture 37 New format for FAs, input TAPE, START, ACCEPT , REJECT, READ states Examples of New Format of FAs, PUSHDOWN STACK , PUSH and POP states,
Introduction to verification
Formal Methods in software development
Formal Methods in software development
A MODULAR LTS FOR OPEN REACTIVE SYSTEMS
Presentation transcript:

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

From automata to reactive systems They are supposed to go on forever as Communication protocols Operative systems Command and control devices 12/3/2018

Non determinism vs determinism Synchronous vs asynchronous Their features Communication Observability Non determinism vs determinism Synchronous vs asynchronous 12/3/2018

Labeled transition systems TS=(,S, , S0), where  a non empty finite alphabet S a non empty finite set of states  S    S is a transition relation, S0 S is the set of initial states Similar to a nondeterministic finite state automaton, with possibly more than one initial state, but without terminal states Similar to a labeled Kripke model as we have seen in temporal logic 12/3/2018

A state is identified through the possibilities it offers to go on A transition system generates (finite or infinite) words w0w1w2... iff there are states s0s1s2s3... s.t. s0  S0 and (si,wi,si+1)   A state is identified through the possibilities it offers to go on termination and deadlock 12/3/2018

Example: a recorder off memory tape play dn up T = <S, , , s0> without terminal states ={up, dn} S={off, tape, memory, play} ={(off,dn,tape), (tape,up,off), (tape,dn,memory), (memory,up,off), (memory,dn,play), (play,dn,tape), (play,up,off)} s0={off} 12/3/2018

Parallel transition systems Parallel transition system T=(T1,…,Tn) each Ti is a transition system SiSj= interleaving semantics on its private alphabet, each Ti can make an independent move synchronization is via common events example: power switch and camcorder mode 12/3/2018

Example T=(switch, camera) {pwr_fail, pwr_res} are private to camera but_hi but_lo dn up off on dn, pwr_res up, pwr_fail memory tape play switch camera T=(switch, camera) {pwr_fail, pwr_res} are private to camera synchronization alphabet {up,dn} how big is the state space? 12/3/2018

The global transition system T associated with a parallel transition system (T1,…,Tn) is defined as T=(, S, , S0), where = i S= S1 … Sn S0 = S1,0 … Sn,0, and ((s1,…,sn),a,(s1‘,…,sn‘)) iff - when a is an asynchronous move ai, ((s i),a,(s i‘))i, and then sk= sk‘ for all k≠i - when a is the result of a synchronisation of Ti and Tj ((s i),ai,(s i‘))i and ((sji),aj,(s j‘))j, and sk= sk‘ for all k≠i,j 12/3/2018

Process Equivalences Sameness of behaviour = equivalence of states Many process equivalences have been proposed For instance: q1 ~ q2 iff q1 and q2 have the same paths, or q1 and q2 may always refuse the same interactions, or q1 and q2 pass the same tests, or q1 and q2 satisfy the same temporal formulas, or q1 and q2 have identical branching structure CCS: Focus on bisimulation equivalence 12/3/2018

Finite State Automata Coffee machine A1: Coffee machine A2: 1€ Coffee machine A1: Coffee machine A2: Are the two machines ”the same”? 1€ tea coffee 1€ 1€ 1€ tea coffee 12/3/2018

Bisimulation Equivalence Intuition: q1 ~ q2 iff q1 and q2 have same branching structure Idea: Find relation which will relate two states with the same transition structure, and make sure the relation is preserved Example: q1 q2 a a a c b b c b c 12/3/2018

Strong Bisimulation Equivalence Given: Labelled transition system T = (Q,,R) Looking for a relation S  Q  Q on states S is a strong bisimulation relation if whenever q1 S q2 then: q1  q1’ implies q2  q2’ for some q2’ such that q1’ S q2’ q2  q2’ implies q1  q1’ for some q1’ such that q1’ S q2’ q1 and q2 are strongly bisimilar iff q1 S q2 for some strong bisimulation relation S q1  q2: q1 and q2 are strongly bisimilar 12/3/2018

Exercise Does q0 ~ p0 hold? q1 p0 a b a a q0 p1 a b b a q2 p2 a a 12/3/2018

Exercise Does q0 ~ p0 hold? q0 p0 a a a q1 q2 p1 b c b c q3 q4 p2 p3 12/3/2018

Weak Transitions What to do about internal activity? : Transition label for activity which is not externally visible q  q’ iff q = q0  q1  ...  qn = q’, n  0 q  q’ iff q  q’ q  q’ iff q  q1  q2  q’ (  ) Beware that  =  (non-standard notation) Observational equivalence, v.1.0: Bisimulation equivalence with  in place of  Let q1  q2 iff q1 ~ q2 with  in place of  12/3/2018

Observational Equivalence Let S  Q  Q. The relation S is a weak bisimulation relation if whenever q1 S q2 then: q1  q1’ implies q2  q2’ for some q2’ such that q1’ S q2’ q2  q2’ implies q1  q1’ for some q1’ such that q1’ S q2’ q1 and q2 are observationally equivalent, or weakly bisimulation equivalent, if q1 S q2 for some weak bisimulation relation S q1  q2: q1 and q2 are observationally equivalent/weakly bisimilar 12/3/2018

Exercises a  a  a  a  a  c a b a  b a  c  c 12/3/2018

Exercises b b a a  b  All three are inequivalent a  12/3/2018

Bisimulations Strong Weak Branching 12/3/2018

Bisimulations Strong If a process/state can do a move, then the other one can do the same and viceversa. a a a b b c b c b c 12/3/2018

Bisimulations weak A process can go through (non equivalent, non consecutive) states with invisible moves Trying to simulate the other one. a a a c b c b b 12/3/2018

Bisimulations branching A process can go through different (equivalent) states with invisible moves while the other does not move, but has the same possibilities. a a b b a b c b c 12/3/2018