Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
finite automata project

finite automata project

Ratings: (0)|Views: 59 |Likes:
Published by Zarnigar Altaf
modeling of reactive system with finite automata
modeling of reactive system with finite automata

More info:

Published by: Zarnigar Altaf on Oct 10, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

04/22/2012

pdf

text

original

 
MODELING OF REACTIVE SYSTEMS WITH FINITE AUTOMATA 1
MODELING OF REACTIVE SYSTEMS WITHFINITE AUTOMATA
Asma Hameed Zarnigar Altaf Syeda Phool Zehraasma.89leo@yahoo.com zaris_22@yahoo.com zehras_1@yahoo.com 
Department of Computer Science, Fatima Jinnah Women University,The Mall, Rawalpindi, Pakistan.
Abstract
:
 Finite automata are computing devicesthat accept/recognize regular languagesand are used to model operations of manysystems we find in practice.
 
Finite-statemachines can solve a large number of  problems, among which are electronicdesign automation, communication protocol design, parsing and other engineering application. In biology and artificial intelligence research, statemachine or hierarchies of state machinesare some time used to describeneurological systemsand inlinguistics
 — 
to describe the grammars of naturallanguages.In this project we aredescribing modeling of reactive systemswith Finite automata.
Keywords:
Finite automata application ,modelingreactive system.
1.
 
Introduction:
eactive system that computes byreacting to stimuli from itsenvironment along its Overallcomputation. We have seen an example of use of finite automata in describing theoperation of a simplified version of vending machine. Many other systemsoperating in practice can also be modeledby finite automata such as control circuitsof computers, computer network communication protocols, and lexicalanalyzers for compilers etc. Many of thosesystems fall into the class of systems calledreactive system. A reactive system is asystem that changes its actions, outputsand conditions/status in response to stimulifrom within or outside it. It is an eventdriven or control driven systemcontinuously having to react to externaland/or internal stimuli. The inputs for areactive system are never ready unlike forexample when two numbers are addedtogether by an adder (Here we areconsidering an adder at a higher level of 
R
 
MODELING OF REACTIVE SYSTEMS WITH FINITE AUTOMATA 2
abstraction than physical devices levelignoring for example the transient states of the electronic circuit that realizes anadder). An adder does not respond unlessthe input i.e. two numbers to be added areready. A system such as an adder is calleda transformational system. In the case of vending machine or communicationprotocol, on the other hand, a system mustrespond to each stimulus, even to afragment of input such as each coin tossedin for a can of soda or every messagereceived.
2. Background
 
Modeling is a visual process used forconstructing and documenting the designand structure of an application. It is a goodidea to make at least some outline of anapplication, showing interdependenciesand relationships between the componentsand subsystems, during development. Herewe are using finite automata for modelingof reactive system. Finite automata is usedin software for verifying all kinds of systems with a finite number of states,such as communication protocols. Alsoused in software for scanning text, to findcertain patterns.
Used in “Lexicalanalyzers” of compilers (to
turn program
text into “tokens”, e.g.
 
identifierz,
keywords, brackets, punctuation).Part of Turing machines and abacus machines
 
3. Overview
The term Finite automata' describes a classof models of computation that arecharacterized by having a finite number of states. The use of the word `automata'harks back to the early days of the subjectin the 1950's when they were viewed asabstract models of real circuits Finite
automata (also called finite state machines,
emerged during the 1
940’s and 1950’s):
useful e.g. text search, protocol
verification, compilers, descriptions of 
certain formal grammars (N. Chomsky,
1950’s).
Since then finite automata is beingused in different machines.
4. Application Of Finite Automata
Finite automata and various extensions of them, such as transducers, are used in areasas diverse as compilers, spelling checking,natural language grammar checking,communication protocol design, digitalcircuit simulation, digital flight control,speech recognition and synthesis, geneticsequencing, and Java program verification.Unfortunately, as the number of applications has grown, so has the varietyof implementations and implementationtechniques.
5. Advantages of FSM
The advantages of finite automata is thattheir simplicity make it easy forinexperienced developers to implement withlittle to no extra knowledge (low entrylevel).Predictability (in deterministic FSM),given a set of inputs and a known currentstate, the state transition can be predicted,allowing for easy testing. Due to theirsimplicity, FSMs are quick to design, quick to implement and quick in execution.FSM isan old knowledge representation and systemmodeling technique, and its been around fora long time, as such it is well proven even asan artificial intelligence technique, with lots
 
MODELING OF REACTIVE SYSTEMS WITH FINITE AUTOMATA 3
of examples to learn from. FSMs arerelatively flexible. There are a number of ways to implement a FSM based system interms of topology, and it is easy toincorporate many other techniques .Easy totransfer from a meaningful abstractrepresentation to a coded implementation.Easy determination of reach ability of astate, when represented in an abstract form,it is immediately obvious whether a state isachievable from another state, and what isrequired to achieve the state
5. Modeling Reactive SystemsWith Finite Automata
It is generally agreed that finite automataare a natural medium to describe dynamicbehaviors of reactive systems. Finiteautomata are formal and rigorous andcomputer programs can be easily written tosimulate their behaviors.To model a reactive system with finiteautomaton, first the states the system goesin or the modes of its operation areidentified. These become the states of thefinite automaton that models it. Then thetransitions between the states triggered byevents and conditions, external or internalto the system, are identified and theybecome arcs in the transition diagram of the finite automaton. In addition actionsthat may take place in those states can alsobe added to the model.
5.1 Finite Automata Of LoginProcess
For example consider the following verysimplified version of login process to acomputer from the computer point of view.Let us assume for simplicity that thiscomputer accepts a single user at a time.Initially the computer waits for a username to be typed in. This is one state of the system. When a name is typed in, itchecks whether or not the name is valid. If it is valid, then it asks for and then waitsfor the password, which is another state. If the user name typed in is not valid, it goesback to the initial state. We could make itgo to a different state and count thenumber of login attempts for securitypurpose. But let us make it simple. When apassword is typed in and it is correct, thenit accepts the user and starts a session. Thatis another state though it could further bebroken down into a number of more states.When the session terminates, it gets asignal, goes back to the initial state andwaits for another login. If the passwordtyped in is incorrect, then it informs theuser of that and waits for the next try. Thatis a fourth state. If the second passwordfails, it goes to the initial state and starts allover again. Again what we have seen is amodel for one level of abstraction.Depending on how much detail we areinterested in, different states would beidentified and transitions would have to beselected accordingly.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->