Automata-based programming (Shalyto's approach)

Automata-Based Programming is a programming technology [1] . Its defining characteristic is the use of finite state machines to describe program behavior. The transition graphs of a state machines are used in all stages of software development (specification, implementation, debugging and documentation). Automata-Based Programming technology was introduced by Anatoly Shalyto in 1991 [2] . Switch-technology [3] was developed to support automata-based programming. Automata-Based Programming is considered to be rather general purpose program development methodology than just another one finite state machine implementation.

Automata-Based Programming

The main idea of suggested approach is to construct computer programs the same way the automation of technological processes (and other kinds of processes too) is done.

For all that on the basis of data domain analysis the sources of input events, the control system (the system of interacting finite state machines) and the control objects implementing output actions are singled out. These control objects can also form yet another type of input actions that are transmitted through a feedback from control objects back to the finite state machines.

Main Features

In recent years great attention has been paid to the development of the technology of programming for embedded systems and real-time systems. These systems have special requirements for the quality of software. One of the best known approaches for this field of tasks is synchronous programming [4, 5] .

Simultaneously with the advance of synchronous programming in Europe, an approach to software development for crucial systems called "automata-based programming" or "state-based programming" [3] was being created in Russia.

The term event is being used more and more widely in programming; recently it has become one of the most commonly-used terms in software development. As opposed to it, the offered approach is based on the term state (State-Driven Architecture). After introduction of the term "input action", which could denote an input variable or an event, the term "automaton without outputs" might be brought in. After adding the term "output action", the term “automaton” might be used. It is the finite deterministic automaton.

That is why, the sort of programming, which is based on this term, was called “automata-based programming”. So the process of software creation could be named “automata software design” [6] .

The feature of this approach is that automata used for development are defined with the help of transition graphs. In order to distinguish the nodes of these graphs the term "state coding" has been introduced. With "multivalued state coding" a single variable can be used to distinguish states of automaton, the number of states is equal to the number of values this variable can take on. This allowed introducing of the term "program observability" (that is, the value of the state variable can be checked).

Using the concept of “state” in contrast to the concepts of “events” and “variables”, allows one to understand and to specify the task and its parts (subtasks) more clearly.

It is necessary to note that using automata-based programming implies debugging by drawing up the protocols (logging) in terms of automata.

For this approach there is a formal and isomorphic method of transforming from the transition graph to the software source code. So when using high-level programming languages, the simplest way is to use a construct which is similar to the "switch" construct of the C programming language. That is why the first implementation of automata-based programming was called “Switch-Technology”. Additional information about automata-based programming can be found in the “Switch-technology” article.

Nowadays automata-based programming has been developed in several ways, for different types of task to be solved and for various type of computing devices.

Russian registration certificate was issued for the "Automata-based programming core" and for the "Automata-based programming plug-in for Eclipse IDE".

Logical Control

In 1996 Russian Foundation for Basic Research [http://www.rfbr.ru/eng/default.asp?section_id=0] in the context of publishing project #96-01-14066 had supported publishing of a book [3] , in which the offered technology was described in application to the logical control systems.

In such systems there are no events, but input and output actions are binary variables and operating system is working in the scanning mode. Systems of this class are usually to be implemented on programmable logic controllers, which have relatively small amount of memory and programming is to be performed using specialized languages (for example, the language of ladder schemes or functional blocks). Methods of formal source code generation for such languages were developed for the cases in which the specification of the project being developed is represented by a system of transition graphs of interacting automata [3] .

State-Based Programming

Henceforth automata approach was spread to the event-based (reactive) systems [7] . In such systems all of the limitations mentioned above are taken away. It is obvious from the name of these systems that events are used among the input actions. Output actions could be represented by arbitrary functions. Any real-time operating system could be used as an environment.

The automata implementation of event-based systems was made with the help of the procedural approach to software development [8, 9] , hence the name “state-based programming”.

When using this method, output actions are assigned to the arcs, loops or nodes of the transition graphs (in general case mixed Moore-Mealy automata are to be used [3] ). This allows representing in a compact form the sequences of actions, which are the reactions to the corresponding input actions.

One of the features of such approach to programming for the reactive systems is that the centralization of program logic is achieved by liquidation of logic in the event handlers and forming of system of interacting automata, which are called from these handlers [10] . Automata in such system can interact by nesting, by ability to call each other and with the help of state numbers interchange.

Another important feature of this approach is that automata in it are used thrice: for specification, for implementation (they remain in the source code) and for drawing up the protocol, which is performed, as said above, in terms of automata. The latter allows to verify the propriety of automata system functioning. Logging is performed automatically on the base of created program; it can be used for debugging of programs with complicated behavior.

Also this approach allows effective documenting of the decisions made during design process, especially those related to formalization of program behavior [11] .

All this allowed to start the Foundation for open project documentation [12] , in the context of which many projects on perfecting of automata-based programming [13] are being developed.

State-Based Object-Oriented Programming

The composite approach, based on both object-oriented and automata-based programming paradigms [14, 15] , may be rather useful for solving tasks from a very large spectrum. This approach was called “state-based object-oriented programming”.

The main feature of this approach is that, like in Turing machines, controlling (automata) states are explicitly singled out. The number of these states is noticeably fewer than amount of all other objects' states (for example, run-time states).

The term “states space” was introduced in programming. This term means the set of object's controlling states. So this approach provides more understandable behavior in comparison with the case when such space is not singled out explicitly.

The minimal set of documents, which visually and clearly describe structural (static) and behavioral (dynamic) sides of a software project, is described [16] .

From the experience of adaptation of suggested approach [17] one can conclude that application of automata makes programs' behavior clearer as using objects makes programs' structure clearer. Existence of high quality project documentation makes further program refactoring (changing of its structure while retaining its functionality) much easier [18] .

Computational algorithms

Automata approach can be used for computational algorithms implementation. It was shown [19] that arbitrary iterative algorithm can be implemented with the help of construction, that is equivalent to the loop operator do … while, inside which there is singleswitch operator that implements automaton.

Automata-based approach is very effective for implementation of some algorithms of discrete mathematics, for example, tree parsing algorithm [20] .

A new state-based approach to creation of algorithms' visualizers was offered. Such visualization software is widely used in the Computer Technologies department of Saint Petersburg State University of Information Technologies, Mechanics and Optics for students teaching in programming and discrete mathematics [21, 22] . This approach allows representing of visualizer's logic as a system of interacting finite state machines. This system consists of pairs of automata; each of this pairs contains “forward” and “backward” automata, which provides step-by-step forwards and backwards execution of algorithms respectively.

Instrumentation

Various software tools are developed to support automata programming. One of these tools is "UniMod" [23-25] . This tool is based on the following concepts: UML, Switch-technology, Eclipse IDE, Java programming language, open source code (http://unimod.sourceforge.net/). All this enables one to talk about the "UniMod" as of the implementation of executable UML [26] .

Some examples of usage of UniMod tool are shown in [27] .

External links

[1] Nepeyvoda N.N. Styles and methods of programming. M.: Internet-university of information technologies. 2005. http://is.ifmo.ru/foundation/moving (rus)

[2] Shalyto A.A. Programmatic implementation of control automata //Marine industry, "Automation and remote control" series. 1991, issue 13, pp. 41, 42. http://is.ifmo.ru/works/switch_prr/ (rus)

[3] Shalyto A.A. Switch-technology. Algorithmization and programming of logic control problems. SPb.: Nauka. 1998. http://is.ifmo.ru/books/switch/1 (rus)

[4] Benveniste A. et al. The Synchronous Languages 12 Years Later. Proceedings of the IEEE, vol. 91, no. 1, January 2003. pp. 64–83. http://www-verimag.imag.fr/~caspi/PAPIERS/iee03.pdf (engl)

[5] Shopyrin D.G., Shalyto A.A. Synchronous programming // Information and control systems. 2004. #3. pp.35-42. http://is.ifmo.ru/works/sync_prog/ (rus)

[6] Shalyto A.A. Software Automation Design: Algorithmization and Programming of Problems of Logical Control //Journal of Computer and Systems Sciences International. 2000. Vol.39. №6, p.899-916. (engl) http://is.ifmo.ru/works/app-aplu/1/ (rus)

[7] Harel D. Statecharts: A Visual Formalism for Complex Systems //Science of Computer Programming. 1987. vol.8, pp. 231–274. http://www.tik.ee.ethz.ch/tik/education/lectures/hswcd/papers/Statecharts.pdf (engl)

[8] Shalyto A.A. Logic Control and "Reactive" Systems: Algorithmization and Programming //Automation and Remote Control. 2001. Vol.62. №1, p.1-29. (engl) http://is.ifmo.ru/works/arew/1/ (rus)

[9] Shalyto A.A., Tukkel N.I. SWITCH-Technology: An Automated Approach to Developing Software for Reactive Systems //Programming and Computer Software. 2001. 27(5). (engl) http://is.ifmo.ru/works/switch/1/ (rus)

[10] Tukkel N.I., Shalyto A.A. State-based programming // PC World. 2001. #8, pp.116-121; #9, pp.132-138. http://is.ifmo.ru/works/mirk/ (rus)

[11] Tukkel N.I., Shalyto A.A. Diesel-generator control system (fragment). State-based programming. Project documentation. 2002. http://is.ifmo.ru/projects/dg/ (rus)

[12] Shalyto A.A. A new initiative in programming. Foundation for open project documentation // PC Week/RE. 2003. #40, pp.38,39,42. http://is.ifmo.ru/works/open_doc/ (rus)

[13] Automata programming homepage. http://is.ifmo.ru (rus), http://is.ifmo.ru/english/ (engl)

[14] Shalyto A.A., Naumov L.A. Methods of object-oriented implementation of reactive agents on base of finite state machines // Artificial Intelligence. 2004. #4. pp. 756–762. http://is.ifmo.ru/works/_aut_oop.pdf (rus)

[15] Shalyto A.A., Naumov L.A., Korneev G.A. Methods of Object-Oriented Reactive AgentsImplementation on the Basis of Finite Automata /2005 International Conference on “Integration of Knowledge Intensive Multiagent Systems. KIMAS ’05: Modeling, Exploration, and Engineering”. USA, MA: IEEE, 2005, pp. 460–465. http://is.ifmo.ru/articles_en/_kimas05-1.pdf (engl)

[16] Tukkel N.I., Shalyto A.A. Automata and tanks // BYTE/Russia. 2003. #2. pp.69–73. http://is.ifmo.ru/works/tanks_new/ (rus)

[17] Tukkel N.I., Shalyto A.A. Tank control system for the "Robocode" game. Version 1. State-based object-oriented programming. 2001. http://is.ifmo.ru/projects/tanks/ (rus)

[18] Kuznetsuv D.V., Shalyto A.A. Tank control system for the "Robocode" game. Version 2. State-based object-oriented programming. 2003. http://is.ifmo.ru/projects/robocode2/ (rus)

[19] Tukkel N.I., Shalyto A.A. Shalyto A.A., Tukkel;nbsp; N.I. Translating Iterative Algorithms into Automation Ones //Programming and Computer Software. 2002. 28(5). http://is.ifmo.ru/works/iter/ (rus)

[20] Korneev G.A., Shamgunov N.N., Shalyto A.A. Automata-based tree traversing // Computer instruments in education. 2004. #3, pp.32–37. http://is.ifmo.ru/works/traverse/ (rus)

[21] Kazakov M.A., Shalyto A.A. Automata-based approach to implementation of animation in algorithms' visualizers //Computer instruments in education. 2005. #3, pp.52–76. http://is.ifmo.ru/works/heapsort/ (rus)

[22] Korneev G.A., Shalyto A.A. Constructing of visualizers of algorithms of discrete mathematics //Science and technical review of SPbSU ITMO. Issue 23. High technologies in optical and information systems. SPb.: SPbSU ITMO. 2005, pp.118–129. http://is.ifmo.ru/works/_a_visualizerExample.pdf (rus)

[23] Gurov V.S., Mazine M.A., Narvsky A.S., Shalyto A.A. UML. Switch-technology. Eclipse. // Information and control systems. 2004. #6, pp. 12–17. http://is.ifmo.ru/works/uml-switch-eclipse/ (rus)

[24] Gurov V.S., Mazin M.A. , Narvsky A.S., Shalyto A.A. UniMod: Method and Tool for Development of Reactive Object-Oriented Programs with Explicit States Emphasis /Proceedings of St. Petersburg IEEE Chapters. Year 2005. International Conference “110 Anniversary of Radio Invention”. SPb ETU "LETI". 2005. V. 2, pp. 106–110. http://is.ifmo.ru/articles_en/_unimod.pdf (engl)

[25] UniMod. http://unimod.sourceforge.net/intro.html (engl)

[26] Executable UML. http://en.wikipedia.org/wiki/Executable_UML (engl)

[27] Examples of using of UniMod tool. http://is.ifmo.ru/unimod-projects/ (rus) http://is.ifmo.ru/unimod-projects-en/ (engl)

ee also

* Communicating sequential processes
* Executable UML


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Anatoly Shalyto — Infobox Scientist name = Anatoly Shalyto image width = 200px caption = birth date = Birth date and age|1948|5|28|mf=y birth place = Leningrad, USSR death date = death place = residence = flag|USSR, flag|Russia citizenship = nationality =… …   Wikipedia

  • ДРАКОН — Эта статья предлагается к удалению. Пояснение причин и соответствующее обсуждение вы можете найти на странице Википедия:К удалению/28 сентября 2012. Пока процесс обсуждения не завершён, статью мож …   Википедия

  • Автоматное программирование — Автоматное программирование  это парадигма программирования, при использовании которой программа или её фрагмент осмысливается как модель какого либо формального автомата. В зависимости от конкретной задачи в автоматном программировании… …   Википедия

  • Switch-technology — is a technology for automata based programming support. It was proposed by Anatoly Shalyto in 1991. It involves software specification, design, implementation, debugging, documentation and maintenance. The term “automata based programming” is… …   Wikipedia


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.