Download Program De Oprire Automata A Calculatorului Software
.Automata-based programming is a in which the program or part of it is thought of as a model of a (FSM) or any other (often more complicated) formal automaton (see ). Sometimes a potentially infinite set of possible states is introduced, and such a set can have a complicated structure, not just an enumeration.FSM-based programming is generally the same, but, formally speaking, doesn't cover all possible variants, as FSM stands for, and automata-based programming doesn't necessarily employ FSMs in the strict sense.The following properties are key indicators for automata-based programming:. The time period of the program's execution is clearly separated down to the steps of the automaton. Each of the steps is effectively an execution of a code section (same for all the steps), which has a single entry point.
Such a section can be a function or other routine, or just a cycle body. The step section might be divided down to subsections to be executed depending on different states, although this is not necessary. Any communication between the steps is only possible via the explicitly noted set of variables named the state. Between any two steps, the program (or its part created using the automata-based technique) can not have implicit components of its state, such as local (stack) variables' values, return addresses, the current instruction pointer, etc. That is, the state of the whole program, taken at any two moments of entering the step of the automaton, can only differ in the values of the variables being considered as the state of the automaton.The whole execution of the automata-based code is a (possibly explicit) cycle of the automaton's steps.Another reason for using the notion of automata-based programming is that the programmer's style of thinking about the program in this technique is very similar to the style of thinking used to solve mathematical tasks using, etc.
Contents.Example Consider a program in that reads a text from standard input stream, line by line, and prints the first word of each line. It is clear we need first to read and skip the leading spaces, if any, then read characters of the first word and print them until the word ends, and then read and skip all the remaining characters until the end-of-line character is encountered. Upon reaching the end of line character (regardless of the stage), we restart the algorithm from the beginning, and upon encountering the end of file condition (regardless of the stage), we terminate the program.Traditional (imperative) program in C The program which solves the example task in traditional style can look something like this.
The program implements (models) the work of a finite state machine shown on the picture. The N denotes the end of line character, the S denotes spaces, and the A stands for all the other characters. The automaton follows exactly one arrow on each step depending on the current state and the encountered character. Some state switches are accompanied with printing the character; such arrows are marked with asterisks.It is not absolutely necessary to divide the code down to separate handlers for each unique state. Furthermore, in some cases the very notion of the state can be composed of several variables' values, so that it could be impossible to handle each possible state explicitly. In the discussed program it is possible to reduce the code length by noticing that the actions taken in response to the end of line character are the same for all the possible states. The following program is equal to the previous one but is a bit shorter.
^ Aho, Alfred V.; Ullman, Jeffrey D. The theory of parsing, translation and compiling. Englewood Cliffs, N. J.: Prentice-Hall. Ollongren, Alexander (1974). Definition of programming languages by interpreting automata. London: Academic Press.
![Download Program De Oprire Automata A Calculatorului Software Download Program De Oprire Automata A Calculatorului Software](https://ebd-cdn.serverhost.ro/media/prezentari/cep2011/slide-1.jpg)
Download Program De Oprire Automata A Calculatorului Software 2
Johnson, W. L.; Porter, J. H.; Ackley, S. 'Automatic generation of efficient lexical processors using finite state techniques'. 11 (12): 805–813.
Naur, Peter (September 1963). BIT Numerical Mathematics. 3 (3): 145–166.
(PDF). Scientific and Technical Journal of Information Technologies, Mechanics and Optics (53).
2008.External links. — automata-based programming in.
Harel, David (1987). 8 (8): 231–274. Harel, David; Drusinsky, D. 'Using Statecharts for Hardware Description and Synthesis'.
IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems (8): 798–807. Polikarpova N. I., Shalyto A.