7/7/20161 Formal Methods in software development a.a.2015/2016 Prof.Anna Labella.

Slides:



Advertisements
Similar presentations
Language and Automata Theory
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.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
CS21 Decidability and Tractability
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
Introduction to Computability Theory
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Finite State Machines Data Structures and Algorithms for Information Processing 1.
CS 3240: Languages and Computation Pushdown Automata & CF Grammars NOTE: THESE ARE ONLY PARTIAL SLIDES RELATED TO WEEKS 9 AND 10. PLEASE REFER TO THE TEXTBOOK.
Finite-State Machines with No Output
CSCI 2670 Introduction to Theory of Computing September 21, 2005.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Pushdown Automata (PDAs)
Grammars CPSC 5135.
CHAPTER 1 Regular Languages
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
Language Recognition MSU CSE 260.
Pushdown Automata.
SS 2017 Software Verification Automated Verification
Methods of Proof.
Formal Methods in software development
CIS Automata and Formal Languages – Pei Wang
Non Deterministic Automata
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
Regular Expressions.
Linear Bounded Automata LBAs
CS314 – Section 5 Recitation 3
Language and Automata Theory
Language Recognition (12.4)
REGULAR LANGUAGES AND REGULAR GRAMMARS
Hierarchy of languages
Summary.
CSE322 The Chomsky Hierarchy
Some slides by Elsa L Gunter, NJIT, and by Costas Busch
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
Non-Deterministic Finite Automata
Formal Methods in software development
Intro to Data Structures
Non Deterministic Automata
CSE322 Minimization of finite Automaton & REGULAR LANGUAGES
Pushdown automata a_introduction.htm.
Finite-State Methods in Natural-Language Processing: Basic Mathematics
Formal Methods in software development
CS21 Decidability and Tractability
CSE 105 theory of computation
Formal Methods in software development
Language Recognition (12.4)
Formal Methods in software development
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,
Formal Methods in software development
The Chomsky Hierarchy Costas Busch - LSU.
Presentation transcript:

7/7/20161 Formal Methods in software development a.a.2015/2016 Prof.Anna Labella

7/7/ The metaphore of abstract machine An automaton is given by a (finite) set of states S; an initial state s 0 and (one or more) terminal one Transitions labeled via a finite alphabet  A transition law  : S x   S

7/7/ The metaphore of abstract machine Automata are characterized through the “accepted” language i.e. through the possible sequences of elements from the alphabet going from the initial state to the terminal state

7/7/ Finite State Automata

7/7/ Finite State Automata Coffee machine A 1 : Coffee machine A 2 : Are the two machines ”the same”? 1€ tea coffee 1€ tea coffee 1€

7/7/ The metaphore of abstract machine In the previous slide the two structures are equivalent automata because the language accepted by the first one can be proved equal to the language accepted by the second one

7/7/ The algebra of languages  * is the free monoid generated by the alphabet P(  *) is a boolean algebra, but also a domain It is a monoid w.r.t. concatenation  (Frobenius product)

7/7/ The free monoid generated by A

7/7/ Boolean algebra

7/7/ Frobenius product  Frobenius product distributes over sum (union)

7/7/ The algebra of languages We are able to define iteration on P(  *)

7/7/ The algebra of languages We are able to define iteration on P(A*)

7/7/ Theorems Languages accepted by finite states automata correspond to regular expressions Regular expressions are generated by right linear grammars, which are continuous operators on P(  *) The language associated with a right linear grammar is the minimal solution of a recursive equations system We can extend the result to context free grammars (push down automata)

7/7/ Examples Let us take the automaton a It accepts the language a* defined by the grammar X = a X |  or via the recursive equation x = ax+1 as its minimal solution (Tarski’s theorem)

7/7/ More generally The recursive equation x = ax+b defines a continuous function P(  *)  P(  *) and has a*b as its minimal solution (Tarski’s theorem)

7/7/ grammar equations system Minimal solution X ∞ = a*ba* Y ∞ = 0

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

7/7/ Their features Synchronous vs asynchronous Communication Observability Non determinism vs determinism

7/7/ Transition systems TS=( ,S, , S 0 ), where –  a non empty finite alphabet –S a non empty finite set of states –  S    S is a transition relation, –S 0  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

7/7/ A transition system generates (finite or infinite) words w 0 w 1 w 2... iff there are states s 0 s 1 s 2 s 3... s.t. s 0  S 0 and (s i,w i,s i+1 )   A state is identified through the possibilities it offers to go on termination and deadlock

7/7/ Example: a recorder 1.  ={up, dn} 2. S={off, tape, memory, play} 3.  ={(off,dn,tape), (tape,up,off), (tape,dn,memory), (memory,up,off), (memory,dn,play), (play,dn,tape), (play,up,off)} 4. S 0 ={off} off memorytapeplay dn up

7/7/ Parallel transition systems Parallel transition system T=(T 1,…,T n ) –each T i is a transition system –S i  S j =  interleaving semantics –on its private alphabet, each T i can make an independent move –synchronization is via common events example: power switch and camcorder mode

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

7/7/ The global transition system T associated with a parallel transition system (T 1,…,T n ) is defined as T=( , S, , S 0 ), where –  =   i –S= S 1  …  S n –S 0 = S 1,0  …  S n,0, and –((s 1,…,s n ),a,(s 1 ‘,…,s n ‘))  iff for all T i if a  i, then ((s i ),a,(s i ‘))  i, and if a  i, then s i =s i ‘. ((s 1,…,s n ),a,(s 1 ‘,…,s n ‘))  iff for all T i –If a is the result of a synchronisation of ((s i ),a i,(s i ‘))  i and ((s ji ),a j,(s j ‘))  j, then then s k =s k ‘ for all k≠i,j