Jump to content

DRAKON

From Wikipedia, the free encyclopedia
DRAKON
ParadigmVisual
DeveloperAcademician Pilyugin Center, Ministry of General Machine Building
First appeared1996
ScopeComputer-aided software engineering
Websitedrakon.su/start
Major implementations
GRAFIT-FLOKS (1996), IS Drakon (2008), DRAKON Editor (2011), DrakonHub (2018), Drakon.Tech (2019)
Influenced by
PROL2, DIPOL, LAKS
Influenced
QReal DSM platform[1]
Dijkstra search algorithm in DRAKON
Outer part of quicksort algorithm in DRAKON-C
A DRAKON diagram describing a transportation of a cryonics patient

DRAKON (Russian: Дружелюбный Русский Алгоритмический язык, Который Обеспечивает Наглядность, lit.'Friendly Russian Algorithmic language Which Provides Clarity') is a free and open source algorithmic visual programming and modeling language developed as part of the defunct Soviet Union Buran space program[2] in 1986 following the need in increase of software development productivity. The visual language provides a uniform way to represent processes in flowcharts.

There are various implementation of the language specification that may be used to draw and export actual flowcharts. Notable examples include free and open source DRAKON Editor (September 2011).

History

[edit]

The development of DRAKON started in 1986 to address the emerging risk of misunderstandings - and subsequent errors - between users of different programming languages in the Russian space program. Its development was directed by Vladimir Parondzhanov with the participation of the Russian Federal Space Agency (Academician Pilyugin Center, Moscow) and Russian Academy of Sciences (Keldysh Institute of Applied Mathematics).

The language was constructed by formalization, ergonomization and nonclassical structurization of flowcharts described in the ISO 5807-85 standard and Russian standard «Гост 19.701-90».[3][4]

The goal was to replace specialized languages used in the Buran project with one universal programming language. Namely PROL2 (ПРОЛ2), used for developing inflight systems software for the computer system Biser-4 (Бисер-4),[5] DIPOL (ДИПОЛЬ), used for developing software for the ground maintenance computer systems)[5] and LAKS (ЛАКС), used for modelling.

The work was finished in 1996 (3 years after the Buran project was officially closed), when an automated CASE programming system called "Grafit-Floks" was developed.[6]

This CASE is used since 1996 in: an international project Sea Launch,[citation needed] Russian orbit insertion upper stage Fregat (Russian: Фрегат, frigate) for onboard control systems and tests,[7] upgraded heavy launch vehicle (carrier rocket) Proton-M.[citation needed]

Overview

[edit]

The name DRAKON is the Russian acronym for "Дружелюбный Русский Алгоритмический [язык], Который Обеспечивает Наглядность", which translates to "Friendly Russian Algorithmic [language] that illustrates (or provides clarity)". The word "наглядность" (pronounced approximately as "na-GLYA-dnost") refers to a concept or idea being easy to imagine and understand, and may be translated as "clarity".

Unlike UML's philosophy, DRAKON's language philosophy is based on being augmented if needed, by using a hybrid language, which can be illustrated as "incrustating code snippets from text language used into shape DRAKON requires". This way, DRAKON always remains a simple visual language that can be used as an augmentation for a programmer who is interested in making their own project code easier to support or other long-term needs for example improving the ergonomics of the coding process or to making code easier to review and understand.

The DRAKON language can be used both as a modelling/"markup" language (which is considered a standalone "pure DRAKON" program) and as a programming language (as part of a hybrid language).

Integration of a stricter, "academic", variant of a markup language into programming, such as provided by DRAKON, adds syntactic sugar allowing users of different programming languages to comprehend each other's contributions to the overall project and even provide commentary if needed.

Family of DRAKON languages

[edit]
Icons of DRAKON language
Macroicons of DRAKON language.

DRAKON (Russian: ДРАКОН; meaning "dragon" in English) is designed with the intent of allowing for easy understanding and legibility, as usage of multiple languages in a single project can lead to confusion.

DRAKON is a family of hybrid languages, such as DRAKON-C, DRAKON-ASM, DRAKON-Java, etc. All languages of the DRAKON-family share a uniform, graphical syntax based on flowcharts. The standard graphical syntax provides similarity of drakon-charts for different hybrid languages. The text language uses its own syntax.

The basis of the graphical syntax is a graphical alphabet. Graphical elements ("letters") of the DRAKON alphabet are called icons (not symbols). DRAKON also has macroicons. Macroicons are the graphical words of the DRAKON language; they consist of icons. There are 27 icons and 21 macroicons in the DRAKON language.

Drakon-charts are constructed out of icons and macroicons.

The important parts of maсroiсons are valence points (in the illustration depicted as black circles). Into these points, icons or microicons can be successively entered and arranged by the drakon-editor into columns.

Design

[edit]

DRAKON was created as an easy to learn visual language to aid the comprehension of computer programs written in different programming languages for illustrative, planning and strategy purposes.

DRAKON uses drakon-chart, which is a formalization of traditional flowcharts to depict the overall structure of the program. Code snippets of a programming language are added to the DRAKON icons. The combination of visual elements with code helps with the creation and maintenance of readable flowcharts alongside the development of the program in question.

DRAKON rules for creating diagrams are cognitively optimized for easy comprehension, making it a tool for intelligence augmentation.[3][8][9][10]

Drakon-charts of big multi-purpose programs can be complex and hard to comprehend. A set of smaller programs, that together serve the same purpose, are often easier to understand when depicted as drakon-charts. A similar problem exists in maintaining code of large programs. This problem is occasionally referred to as "rule of 30 [lines of code]" among programmers.

Visual syntax

[edit]

The full-text article containing description of the visual syntax of the DRAKON language in English, 12 pages, free to download, pdf.[11]

Examples

[edit]

Tetris example

[edit]

Simple example of a program in the DRAKON language

These examples are real code from an implementation of the Tetris game. The examples are in DRAKON-JavaScript language. The icons (visual primitives) of the DRAKON language define the overall structure of the algorithms. The code snippets inside the icons (primitives) are in JavaScript.

advanceStep

[edit]

The advanceStep function implements the core logic of the game. advanceStep is a state machine represented as a decision tree.[12] The game engine calls advanceStep periodically. This state machine has three states "playing", "dropping", and "finished". The game takes different actions depending on the current state. For example, in the "playing" state, when there is a falling projectile and the projectile can move down, it is moved down one step.

The core logic of the Tetris game in DRAKON-JavaScript language

With DRAKON, the reader of the algorithm can visually trace all possible paths in the decision tree.

JavaScript code generated from the DRAKON-chart:

function advanceStep() {
    var _sw_8;
    _sw_8 = module.state;
    if (_sw_8 === "playing") {
        if (module.projectile) {
            if (canMoveDown()) {
                moveDown()
                return getStepPeriod()
            } else {
                freezeProjectile()
                return noProjectile()
            }
        } else {
            return noProjectile()
        }
    } else {
        if (_sw_8 === "dropping") {
            if (canMoveDown()) {
                moveDown()
                return DropPeriod
            } else {
                freezeProjectile()
                module.state = "playing"
                return getStepPeriod()
            }
        } else {
            if (_sw_8 === "finished") {
            } else {
                throw new Error("Unexpected Choice value: " + _sw_8);
            }
            return undefined
        }
    }
}

noProjectile

[edit]
The noProjectile function for Tetris game in DRAKON-JavaScript language

The noProjectile function handles the specific situation when there is no falling projectile. If there is a filled row, that row is removed from the grid. Otherwise, the game tries to insert a new projectile. If there is no space for the projectile, the game is lost.

JavaScript code generated from the DRAKON-chart:

function noProjectile() {
    if (clearRow()) {
        return getStepPeriod()
    } else {
        createProjectile()
        if (isGameLost()) {
            gameOver()
            module.state = "finished"
            return undefined
        } else {
            return getStepPeriod()
        }
    }
}

clearRow

[edit]
The algorithm that removes a line from Tetris grid in DRAKON-JavaScript language

The clearRow function scans all rows bottom-up until it hits a row with no gaps. In such case the row is removed from the grid, the score is increased, and the game's tempo goes up.

JavaScript code generated from the DRAKON-chart:

function clearRow() {
    var row, rows;
    rows = module.glass.rows
    row = rows.length - 1;
    while (true) {
        if (row >= 0) {
            if (rowHasHoles(row)) {
                row--;
            } else {
                deleteRow(row)
                increaseScore()
                increaseSpeed()
                return true 
            }
        } else {
            module.addedScore = 0
            return false 
        }
    }
}

DRAKON execution animation

[edit]

The picture below illustrated the execution of the silhouette DRAKON algorithm. The algorithm execution is animated by highlighting diagram elements in the running order.

The 'Fishing' silhouette consists of four trees:

  • Preparing for fishing.
  • Waiting for a bite.
  • Fishing work.
  • Way back.

The main path of each tree is shown by highlighting thick vertical line which is called a skewer.

The flow graph always has a path from the Headline icon to each vertex (node) of the control flow graph. Consequently, a silhouette can't have unreachable code in any conditions.

DRAKON algorithm execution is animated by highlighting diagram elements in the running order.

Modern usage

[edit]

DRAKON in the German Aerospace Center

[edit]

DRAKON language is used in the German Aerospace Center for implementation of some critical functions dictated by the safety regulations of the flight tests, where automation is important because of maximum distance to the ground station and the process needs quick automatic execution.

The DRAKON Editor software was used to graphically program flowcharts which were specially checked. C-code was generated from the drakon-charts, for instance, for DRAKON representation of launch detection code.[13]

Business processes modelling

[edit]

The DRAKON language may be used as the language to model and visualize business processes. "The DRAKON language was applied as the basic language for constructing models of business processes, which makes it possible to obtain a prototype of a finite-state machine when building models of business processes. The visualization of business processes in the state space allows the decision maker to improve the efficiency of the decision-making".[14]

Uses outside of programming

[edit]

While DRAKON is primarily designed as a tool for comprehending computer programs, drakon-charts can also be used to illustrate processes in fields not related to computing.

In the DRAKON editor pictures can be added to the DRAKON icons. This ability is used in some fields to easily create "flowchart like" infographics. In Russia the DRAKON editor is known for being used in the medical field as a tool for making 'instructional' charts for patients or medical personnel.[citation needed][15]

See also

[edit]

References

[edit]
  1. ^ Terekhov, Andrey; Bryksin, Timofey; Litvinov, Yurii. How to make visual modeling more attractive to software developers / 11th LASER Summer School on Software Engineering. Leading-Edge Software Engineering. September 7-13, 2014 - Elba Island, Italy
  2. ^ "Stepan-mitkin/Drakon_editor". GitHub. 28 September 2022.
  3. ^ a b Окулова Л. П. Проектирование образовательного процесса в соответствии с требованиями педагогической эргономики // Вестник. Наука и практика. Материалы конференции «Инновации и научные исследования, а также их применение на практике \ Innowacje i badania naukowe, jak rowniez ich zastosowanie w praktyce. — 29.05.2012- 31.05.2012. Варшава \ Warszaw».
  4. ^ Parondzhanov V. D. Visual Syntax of the DRAGON Language // Programming and Computer Software, 01 / 1995; Volume 21 (Issue 3): p. 142 - 153. (Here is an incorrect translation. This should be read as "DRAKON language.")
  5. ^ a b Штурманы ракет / Под общей редакцией Е. Л. Межирицкого. — М.: БЛОК-Информ-Экспресс, 2008. — 384 с. — C. 192. — ISBN 978-5-93735-008-4
  6. ^ "Technique of development of algorithms and programms "Grafit-Floks."" (PDF). Archived from the original (PDF) on 2012-12-27. Retrieved 2012-12-27.
  7. ^ Морозов В.В., Трунов Ю.В., Комиссаров А.И., Пак Е.А., Жучков А.Г., Дишель В.Д., Залихина Е.Е., Паронджанов В.Д. Система управления межорбитального космического буксира «Фрегат» // Вестник НПО имени С.А. Лавочкина: Космонавтика и ракетостроение. — 2014, №1 (22). — С. 16–25. (In Russian) Morozov V.V., Trunov Yu.V., Komissarov A.I., Pak E.A., Zhuchkov A.G., Dishel V.D., Zalihina E.E., Parondzhanov V.D. Control System of "Fregat" Versatile Space Tug // Vestnik NPO imeni S.A. Lavochkina. Cosmonautics and Rocket Engineering — 2014, 1 (22). — P. 16–25.
  8. ^ Bezel Ja. V. Is it possible to improve the workings of the mind? A new look at the problem.— Herald of the Russian Academy of Sciences. Volume 73, Issue 4, 2003.
  9. ^ Созоров Н. Г., Трошин М. В. Дракон-редактор как основное звено в формализации целевых дидактических ресурсов для проектирования интерактивного учебного курса. Материалы региональной научно-методической конференции ИДНО Томского политехнического университета «Электронные дидактические материалы в инженерном образовании» 11-12 октября 2009 г.
  10. ^ Паронджанов В. Д. (2012). "Учебное пособие по языку ДРАКОН для вузов". Учись писать, читать и понимать алгоритмы. Алгоритмы для правильного мышления. Основы алгоритмизации. М.: ДМК Пресс. p. 520. ISBN 978-5-94074-800-7. вузов". Учись писать, читать и понимать алгоритмы. Алгоритмы для правильного мышления. Основы алгоритмизации. М.: ДМК Пресс. p. 520. ISBN 978-5-94074-800-7.
  11. ^ Parondzhanov V.D. (1995). Visual Syntax of the DRAKON Language. Vol. 21. PROGRAMMING AND COMPUTER SOFTWARE. Official English Translation of Programmirovanie. pp. 142–153.
  12. ^ Митькин С.Б. Автоматное программирование на языке ДРАКОН // Программная инженерия. Том 10, № 1, 2019 (in Russian). Mitkin Stepan B. Automata-Based Programming in DRAKON Language. Programmnaya Ingeneria, 2019, vol. 10, no. 1, pp. 3—13. DOI: 10.17587/prin.10.3-13
  13. ^ "Marc Schwarzbach, Sven Wlach, Maximilian Laiacker. Modifying a Scientific Flight Control System for Balloon Launched UAV Missions // German Aerospace Center DLR // IEEE, 2015" (PDF). drakon.su. Retrieved 2017-12-03.
  14. ^ Valeev S.S., Kondratyeva N.V. Analysis of business processes in a distributed organizational and technical system based on snapshots // Computational technologies. 2023. V. 28. № 1. P. 41-47.
  15. ^ Example of medical program for reducing body fat (in Russian)[permanent dead link]

Sources

[edit]
[edit]