User:Watercleave/sandbox







DRAKON is an algorithmic visual programming and modeling language developed within the Buran space project following ergonomic design principles. The language provides a uniform way to represent flowcharts of any complexity that are easy to read and understand.

The DRAKON Editor, which was released in September 2011, is an implementation of the language available in the public domain. It can be used for creating documentation, or for creating visual programs that can be converted to source code in other languages.

Unlike other flowchart creation tools, such as UML, DRAKON is designed to be augmented by the inclusion of written code in other programming languages within flowchart elements. This allows DRAKON to be used as a hybrid programming language, combining visual and conventional programming to simplify code creation, provide structure to the programming process, or making code easier to understand and read view.

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

The DRAKON language can be used both as a modeling or "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 understand and work with each other's contributions to the overall project and even provide commentary if needed.

History
The development of DRAKON started in 1986 and 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» and for the development of real time programs.

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

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.

This CASE is used since 1996 in many major space programs: an international project Sea Launch, Russian orbit insertion upper stage Fregat (Russian: Фрегат, frigate), upgraded heavy launch vehicle (carrier rocket) Proton-M, etc. The exact role DRAKON played in these projects however can not be determined. The actual real-world experience of building systems with DRAKON remains extremely scarce as only a few very short snippets of code are publicly available.

DRAKON rules for creating diagrams are cognitively optimized for easy comprehension, making it a tool for intelligence augmentation.

Family of DRAKON-languages (hybrid languages)
DRAKON was designed with human-focused ergonomics in mind, as the use of three different languages for the Buran project was a source of human error due to mutual misunderstandings of different ares of code.

DRAKON is used not as a single stand-alone language but as a family of hybrid languages, such as DRAKON-C, DRAKON-ASM, DRAKON-Java, etc. All hybrid languages of the DRAKON-family have the uniform graphical syntax, based on flowcharts. The standard graphical syntax provides similar structure to programs written in all the various languages. The conventional (text) language uses its own syntax.

Strict distinction of the graphical and textual syntax along with rich graphics improves flexibility and variety of expressive means of the language. The unification of the rules of the graphical syntax in the hybrid languages secures their conceptual unity.

DRAKON flowcharts are created from a graphical "alphabet" of 27 icons (graphical elements) and structured with 21 macroicons (structured combinations of icons). Programs are constructed incrementally by inserting new elements into the valence points or open "spaces" in existing macroicons (represented in the diagram by black dots).

Design
DRAKON was created as a language with a set of rules that would allow to depict algorithms in fields, not necessarily related to computing, being easy to learn.
 * The main reason to the development of the language was emerging risk of misunderstanding, and following errors upon interaction between users of different programming languages in same project (namely, DIPOL, LAX and PROL2, used in the 1980s in Russian space program development).

DRAKON initially uses drakon-chart, which is initially based on a formalization of a traditional flowchart yet with additional functionality for handling code in text language. This technique allows to produce and keep readable flowchart at hand simultaneously with process of making the program in question.
 * It is to note a large multi-purpose program with too large drakon-chart may be harder to be comprehended that a set of small programs that serve same purposes separately; similar problem of maintaining code of a single large program is occasionally referred to as "rule of 30 [lines of code]" among programmers.

Purposes
While DRAKON is designed to be a tool that allows to comprehend purposes of programs in different programming languages, for illustrative, planning and strategy purposes (mirrored to Perl programming language's primary function). Drakoncharts can also be made in spoken language with same tools. Example of medical program on reducing body fat (not translated).

"DRAKON editor" is popular in Russia for being used as a tool for making 'charts without programming language syntax in the medicine field in Russia as a markup language for algorithms of performing actions in certain cases and scenarios. DRAKON allows both create a map-like guide for patients and form instructions for medical personnel.

DRAKON editor takes infographics and flowchart together in a some way: for some purposes DRAKON icons can be augmented a photo inside an icon (which will be placed under icon's text).

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

Manual
The DRAKON language full description is represented in Russian book, 520 pages, free to download.

DRAKON algorithm execution animation
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: The main path of each tree is shown by highlighting thick vertical line which is called a skewer. Note that each path from the "Fishing" Headline icon (start point) to the End icon (stop point) goes smoothly and continuously without any breaks or interruptions. This animation shows that any human can slide his finger along any route from the Headline icon to the End one without lifting his finger (or pencil) from the paper or screen.
 * Preparing for fishing.
 * Waiting for a bite.
 * Fishing work.
 * Way back.

It means that silhouette control 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 Editor
DRAKON Editor is software for making DRAKON flowcharts. It is used for two purposes: documenting algorithms and programming. DRAKON Editor is written in Tcl/Tk and runs on Windows, OS X and Linux. As a documentation tool, DRAKON Editor helps create diagrams that capture algorithmic knowledge. Such knowledge covers both behaviour of computer systems and procedures not directly related to computers, for example medical algorithms and business processes. DRAKON Editor can generate source code from diagrams. This way, DRAKON Editor can be used as an IDE.

Features
The process of editing in DRAKON Editor is based on free drawing. The user inserts and manipulates primitive shapes such as rectangles, vertical and horizontal lines. The user experience is similar to that of business drawing tools. DRAKON Editor does not prevent the user from violating the rules of DRAKON language. It is possible, however, to perform an automated check of the visual syntax at any time.

DRAKON Editor has an alternative editing algorithm, called "smart mode". When in the smart mode, the user can change the visual appearance of the diagram without breaking its topology. In other words, the smart mode allows to fine-tune the layout of the diagram while keeping the underlying algorithm intact.

DRAKON Editor supports the following programming languages:
 * AutoHotKey
 * C
 * C++
 * C#
 * D
 * Erlang
 * Go
 * Java
 * JavaScript
 * Lua
 * Processing
 * Python
 * Tcl
 * Verilog

For some programming languages, DRAKON Editor generates source code for ERIL data modeling language.

DRAKON Editor can also generate source code for finite state machines represented with the silhouette construct of DRAKON language.

For Erlang, DRAKON Editor generates boilerplate code from a visual representation of a supervision tree.

Thanks to the nature of the free drawing principle, DRAKON Editor can produce other types of diagrams including class diagrams and sequence diagrams.

In the German Aerospace Center
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 using 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.