Download presentation
Presentation is loading. Please wait.
Published byOpal Gardner Modified over 8 years ago
1
7/7/20161 Formal Methods in software development a.a.2015/2016 Prof.Anna Labella
2
7/7/2016 2 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
3
7/7/2016 3 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
4
7/7/2016 4 Finite State Automata
5
7/7/2016 5 Finite State Automata Coffee machine A 1 : Coffee machine A 2 : Are the two machines ”the same”? 1€ tea coffee 1€ tea coffee 1€
6
7/7/2016 6 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/7/2016 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)
8
7/7/2016 8 The free monoid generated by A
9
7/7/2016 9 Boolean algebra
10
7/7/2016 10 Frobenius product Frobenius product distributes over sum (union)
11
7/7/2016 11 The algebra of languages We are able to define iteration on P( *)
12
7/7/2016 12 The algebra of languages We are able to define iteration on P(A*)
13
7/7/2016 13 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)
14
7/7/2016 14 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)
15
7/7/2016 15 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)
16
7/7/2016 16 grammar equations system Minimal solution X ∞ = a*ba* Y ∞ = 0
17
7/7/2016 17 From automata to reactive systems They are supposed to go on forever as Communication protocols Operative systems Command and control devices
18
7/7/2016 18 Their features Synchronous vs asynchronous Communication Observability Non determinism vs determinism
19
7/7/2016 19 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
20
7/7/2016 20 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
21
7/7/2016 21 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
22
7/7/2016 22 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
23
7/7/2016 23 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
24
7/7/2016 24 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.