100 likes | 238 Vues
This crash course provides an overview of the fundamentals of automata and string recognition, essential for comprehending how Linear Temporal Logic (LTL) formulae are satisfied. You will learn about finite state automata (FSA), including transition diagrams, acceptance conditions, and the distinction between deterministic and nondeterministic FSAs. Key theorems regarding regular languages, grammars, and expressions are discussed. Additionally, the course covers Buchi automata, which recognize infinite strings, bridging the concepts to real-world applications such as Promela programs.
E N D
Automata and String Recognition In order to understand how LTL formulae are satisfied, you need to understand the basics of automata and string recognition. This is a short refresher/crash course. A transition diagram/fsa: • a finite set of (labelled) states S • a finite set of (labelled) edges between the states, i.e. a function Label x S -> S • a start (initial) state • a set of accept states Recognition: A string s is recognised by a trans. diagram/fsa iff the symbols in s correspond to a sequence of edge labels, i.e. a path, from the start state to an accept state.
Examples M1 M1 accepts, or recognises the strings {xy,xz}. L(M) = {xy,xz}. x y z
Examples M2 M2 accepts the strings {ac,abac,ababac, …} L(M2) = a(ba)*c M3 a M3 accepts the strings{ac,abac,ababac, …}. L(M3) = L(M2). (M3 is fully defined.) a c b a c b b,c a,b,c
Nondeterministic FSA • NFSA • allow non-determinism • transition function is a relation • A string is accepted by a NFSA if it is possible to find a corresponding path which ends in an accept state. • In practice, this means backtracking, or parallel computation. • digit • S0 digit S1 • digit digit • digit S2 S3 S4 • Are NFSA more powerful than DFSA?Do they recognise more languages? . digit
Nondeterministic FSA Theorem For every NFSA there is a DFSA accepting the same language. Example digit S0 digit S12 . S3 S4 digit
Deterministic FSA Theorem If G is a regular grammar then there exists a DFSA M st. L(M)=L(G). Theorem For every regular language there is a corresponding regular expression. Conclusion: regular expression == regular grammar == FSA If M is a DFSA, then L(M) is a regular language.
Beyond FSA {xnyn|n e N} is not a regular language. Why? Because the automata cannot “remember” n. Not a solution. G is N ::= xNy | xy (a context-free grammar) To recognise a language like this you need an automata plus a stack onto which you can pop and push symbols. If you make the stack two-ended, i.e. a tape, the you have a Turing machine! x y x y
Buchi Automata FSA accept infinitely many finite strings. Each string is finite. We are ultimately interested in reasoning about Promela programs: they range over finite states, but a particular execution sequence might actually be infinite. loop: x=x+1; goto loop We need automata that can recognise infinite strings. Such an automata is called a Buchi, or w-automata. (They also accept finite strings, in the usual way, as appropriate.) Buchi automata are just the “logical” extensions of finite state automata.
Buchi Automata An Example: Strings accepted by this automata are: {a, aba, …} u {abababab….} the usual + the infinite string finite strings a b