This article may be expanded with text translated from the corresponding article in Russian. (February 2015) Click [show] for important translation instructions.
|
A major contributor to this article appears to have a close connection with its subject.(March 2015) |
Paradigm | Visual |
---|---|
First appeared | 1996 |
Website | drakon-editor |
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] |
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 name DRAKON is the 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 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 easily understand the contributions of others and provide commentary if needed.
The development of DRAKON started in 1986 to address the longstanding risk of misunderstandings in large projects developed by the Soviet space program, especially if multiple programming languages are used. Its development was directed by Vladimir Parondzhanov with later 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».[2][3]
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),[4] DIPOL (ДИПОЛЬ), used for developing software for the ground maintenance computer systems)[4] 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.[5]
This CASE is used since 1996 in many major space programs: an international project Sea Launch, Russian orbit insertion upper stage Fregat (Russian: Фрегат, frigate),[6] 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 (Russian: ДРАКОН; 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 not a single language, but as a family of hybrid languages, such as DRAKON-C, DRAKON-ASM, DRAKON-Java, etc. All languages of the DRAKON-family have 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 (graphical letters) of the DRAKON alphabet are called icons (not symbols). There are 27 icons in the DRAKON graphical alphabet.
DRAKON also has macroicons. Macroicons are the graphical words of the DRAKON language. Macroiсons (graphical words) consist of icons (graphical letters). There are 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 to the right, they are depicted as little black circles). Into these points, icons or microicons can be successively entered and arranged by drakon-editor into vertical rows.
DRAKON was created as a visual language to aid in the understanding of computer programs written in different programming languages for quickly understanding the flow and purpose of a program.
DRAKON uses drakon-chart, which is a flowchart used to depict the overall structure of the program. Code snippets of a programming language are added to the charts.
DRAKON rules for creating diagrams are cognitively optimized for easy comprehension, making it a tool for intelligence augmentation.[2][7][8][9]
Drakon-charts of large multi-purpose programs can be hard to follow or understand. A set of smaller programs, that together serve the same purpose, are often easier to understand.
The full-text article containing description of the visual syntax of the DRAKON language in English, 12 pages, free to download, pdf.[10]
This section needs expansion. You can help by adding to it. (November 2017) |
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.
The advanceStep function implements the core logic of the game. advanceStep is a state machine represented as a decision tree.[11] 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.
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
}
}
}
|
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()
}
}
}
|
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
}
}
}
|
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.
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.
The algorithm of going out of one's apartment:
|
The workout algorithm:
|
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.[12]
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. Example of medical program for reducing body fat (not translated).
A full description of the DRAKON language is provided in a Russian book. The book is 520 pages long and free to download.[9]
Russian DRAKON website Russian DRAKON webforum
By: Wikipedia.org
Edited: 2021-06-18 17:51:02
Source: Wikipedia.org