|
|
|
[[File:Og-rocket.png|center|Opengeode]]
|
|
|
|
[[File:Og-overview.png|700 px|right|Opengeode overview]]
|
|
|
|
|
|
|
|
= Introduction =
|
|
|
|
|
|
|
|
SDL (Specification and Description Language) is a powerful modelling language for visually yet '''formally describing state machines'''. As any programming language, SDL comes with a textual syntax, but in addition has an intuitive graphical notation that can be used to build models using interactive editors. The well-defined semantics of SDL makes it a good candidate for describing the behaviour of embedded, real-time systems.
|
|
|
|
|
|
|
|
|
|
|
|
The standard has been established by ITU-T under reference Z100. Among others, it is widely used in the telecommunication industry. See [http://www.sdl-forum.org] for more information.
|
|
|
|
|
|
|
|
|
|
|
|
Thanks to its formalism, its well-defined concepts and ease of use, the SDL language is sized for the production of safe, robust software.
|
|
|
|
|
|
|
|
TASTE now includes an open-source SDL graphical editor that generates Ada code. It is free software, implemented in Python with the Qt graphical framework. The name "OpenGEODE" was chosen as a tribute to the former ObjectGEODE tool, which has unfortunately been discontinued several years ago. OpenGEODE is freely inspired from the ergonomy of its ancestor, and is trying to show how modern languages and tools can help providing a great user experience to programmers, even those who are not enclined to use a visual approach for development.
|
|
|
|
|
|
|
|
|
|
|
|
''Important notice:''
|
|
|
|
|
|
|
|
We are developing OpenGEODE as a ''technology demonstrator''. Please consider it as such, and use it for your lab experiments, discovery of SDL, and for enriching your understanding of embedded, communicating systems. SDL and [http://ttsiodras.github.io/asn1.html ASN.1] are powerful languages. They are also excellent languages that can be studied to concretely understand what state machines and data types are about.
|
|
|
|
|
|
|
|
Feel free to browse the source code, that was also meant to show how Python and Qt allow, with little effort, to create amazing applications.
|
|
|
|
|
|
|
|
'''For professional applications, we recommend the use of the [http://www.pragmadev.com Pragmadev RTDS tool]''' in combination with TASTE. It is a complete, large scale tool that comes with commercial support. Among other features, RTDS has a formal verifier module based on the IF technology from ''Verimag'', that checks behavioural properties using an ''exhaustive simulation'' technique.
|
|
|
|
|
|
|
|
|
|
|
|
== OpenGEODE Features ==
|
|
|
|
|
|
|
|
* Graphical editor of SDL '''processes''' and '''procedures'''. The communication diagram is captured with the TASTE interface view editor.
|
|
|
|
|
|
|
|
* SDL2010 features: FOR loops in task symbols, '''hierarchical states'''
|
|
|
|
|
|
|
|
* Reads and save .pr files (textual SDL notation), with CIF support for the graphical information
|
|
|
|
|
|
|
|
* Supports ASN.1 data types, including the Value notation - check [http://ttsiodras.github.io/asn1.html this page] to know more about our ASN.1 compiler and tools
|
|
|
|
|
|
|
|
* Supports a subset of symbols that are sufficient to develop real-time applications (excluding the ''SAVE'' symbol)
|
|
|
|
|
|
|
|
* Generates Ada code with ASN.1 types using TASTE ASN.1 "space-certified" (SPARK) compiler
|
|
|
|
|
|
|
|
* Generates optimized LLVM code for speed and performance on targets without Ada runtime
|
|
|
|
|
|
|
|
* Complete syntax and semantic checks
|
|
|
|
|
|
|
|
* Automatic conversion to Statechart diagrams
|
|
|
|
|
|
|
|
* Save the complete or parts of the model to PNG/SVG/PDF files
|
|
|
|
|
|
|
|
* Hyperlinks (link a symbol content to any external document or web page)
|
|
|
|
|
|
|
|
* Zoom in, zoom-out
|
|
|
|
|
|
|
|
* Context-dependent text auto-completion
|
|
|
|
|
|
|
|
* Syntax highlighting
|
|
|
|
|
|
|
|
* Undo/Redo, Copy-Paste
|
|
|
|
|
|
|
|
* (Limited) VIM mode - You can use :wq or :%s,search,replace,g, and /search pattern
|
|
|
|
|
|
|
|
|
|
|
|
=== Why SDL and OpenGEODE ? ===
|
|
|
|
|
|
|
|
SDL has formal semantics and syntax. It has yet a simple textual syntax and advanced checking capabilities. Because SDL uses ASN.1 data types, many checks are possible with SDL that do not exist with other programming languages, even Ada or advanced functional languages such as OCaml/F#.
|
|
|
|
|
|
|
|
Non-determinism is detected by the tool as error.
|
|
|
|
|
|
|
|
Here are examples of errors caught by the tool. If you declare these variables:
|
|
|
|
|
|
|
|
'''DCL''' var1 t_int32, -- with T-Int32 ::= '''INTEGER''' (-2147483648 .. 2147483647)
|
|
|
|
var2 t_uint8, -- with T-UInt8 ::= '''INTEGER''' (0..255)
|
|
|
|
var4 MyChoice, -- with MyChoice ::= '''CHOICE''' { a '''BOOLEAN''', b Whatever }
|
|
|
|
var4 MyEnum; -- with MyEnum ::= '''ENUMERATED''' { hello, world, howareyou }
|
|
|
|
|
|
|
|
You can test the value of these variable in a DECISION symbol - think of a switch-case in C:
|
|
|
|
|
|
|
|
[[File:Range_check_1.png|300 px|thumb|left|Check1]]
|
|
|
|
The tool catches the following errors:
|
|
|
|
|
|
|
|
[ERROR] Decision "var1": answers =0 and /=1 are overlapping in range [0 .. 0]
|
|
|
|
[ERROR] Decision "var1": answers =0 and -500:500 are overlapping in range [0 .. 0]
|
|
|
|
[ERROR] Decision "var1": answers /=1 and >0 are overlapping in range [2 .. 2147483647]
|
|
|
|
[ERROR] Decision "var1": answers /=1 and -500:500 are overlapping in range [-500 .. 0]
|
|
|
|
[ERROR] Decision "var1": answers /=1 and -500:500 are overlapping in range [2 .. 500]
|
|
|
|
[ERROR] Decision "var1": answers >0 and -500:500 are overlapping in range [1 .. 500]
|
|
|
|
|
|
|
|
|
|
|
|
[[File:Range_check_2.png|300 px|thumb|left|Check2]]
|
|
|
|
The tool catches the following issues:
|
|
|
|
[WARNING] Decision "var2": Unreachable branch "<0"
|
|
|
|
[WARNING] Decision "var2": Unreachable branch ">300"
|
|
|
|
[WARNING] Decision "var2": Unreachable branch -10:-5
|
|
|
|
[WARNING] Decision "var2": Unreachable branch 256:300
|
|
|
|
[WARNING] Decision "var2": Range [-10 .. -1] is unreachable
|
|
|
|
[WARNING] Decision "var2": Range [256 .. 300] is unreachable
|
|
|
|
[ERROR] Decision "var2": No answer to cover range [0 .. 255]
|
|
|
|
|
|
|
|
|
|
|
|
[[File:Range_check_3.png|300 px|thumb|left|Check3]]
|
|
|
|
The tool catches the following error:
|
|
|
|
[ERROR] Decision "present(var4)": Missing branches for answer(s) "b"
|
|
|
|
|
|
|
|
|
|
|
|
[[File:Range_check_4.png|300 px|thumb|left|Check4]]
|
|
|
|
The tool catches the following errors:
|
|
|
|
[ERROR] Decision "var5": duplicate answers "world", "hello"
|
|
|
|
[ERROR] Decision "var5": Missing branches for answer(s) "howareyou"
|
|
|
|
|
|
|
|
|
|
|
|
[[File:Range_check_5.png|300 px|thumb|left|Check5]]
|
|
|
|
The tool detects the risk of overflow in the first TASK box and raises an error:
|
|
|
|
[ERROR] Types are incompatible in assignment: left (var2, type= T-UInt8), right (var2 + 1, type= IntegerType) Expression evaluation in range [1.0..256.0], outside expected range [0..255]
|
|
|
|
|
|
|
|
=== Standalone installation ===
|
|
|
|
|
|
|
|
Check the [https://github.com/maxime-esa/opengeode GitHub] page for installation instruction on your own machine.
|
|
|
|
|
|
|
|
You can also use the Windows version here: [http://download.tuxfamily.org/taste/opengeode_windows.zip OpenGEODE] and [http://download.tuxfamily.org/taste/asn1scc.zip ASN.1 Compiler]
|
|
|
|
|
|
|
|
The ASN.1 compiler must be in your system path.
|
|
|
|
|
|
|
|
=== How to use it in TASTE ===
|
|
|
|
|
|
|
|
OpenGEODE is already installed in the TASTE Virtual Machine, and fully integrated with the toolset.
|
|
|
|
|
|
|
|
In the interface view, select the SDL language for the implementation of the blocks you want to model using OpenGEODE.
|
|
|
|
|
|
|
|
Then when you right-click on the SDL block you can select the option "Open SDL Editor".
|
|
|
|
|
|
|
|
The code is automatically generated when you exit the tool.
|
|
|
|
|
|
|
|
=== Example and screenshots ===
|
|
|
|
|
|
|
|
In the source directory of OpenGEODE you can find a number of examples that show most features of the tool:
|
|
|
|
|
|
|
|
go to : ~/tool-src/misc/opengeode/tests/regression/
|
|
|
|
and browse through the subdirectories
|
|
|
|
|
|
|
|
A complete TASTE system including an OpenGEODE subsystem is provided in the following directory of the TASTE VM:
|
|
|
|
|
|
|
|
$ cd ~/tool-src/testSuites/Regression_AADLv2/Demo_TrafficLight_OG_NestedStates
|
|
|
|
$ taste-edit-interface-view
|
|
|
|
|
|
|
|
* Overview of the editor
|
|
|
|
|
|
|
|
[[File:Opengeode.png|600px|border|center|thumb|Opengeode]]
|
|
|
|
|
|
|
|
The editor is meant to be simple and straightforward to use.
|
|
|
|
|
|
|
|
Based on the example you can find in the VM here are the main capabilities of the tool:
|
|
|
|
|
|
|
|
* Support of composite states and FOR loops
|
|
|
|
|
|
|
|
[[File:Nested-state.png|800px|border|center|thumb|Nested states]]
|
|
|
|
|
|
|
|
* Adavanced support for ASN.1 constructs to work with data
|
|
|
|
|
|
|
|
[[File:opengeode-asn1.png|400px|border|center|thumb|Support for ASN.1 constructs]]
|
|
|
|
|
|
|
|
* State with various constructs, loops, printf, hyperlinks
|
|
|
|
|
|
|
|
[[File:opengeode-state.png|400px|border|center|thumb|A State definition]]
|
|
|
|
|
|
|
|
=== Credits ===
|
|
|
|
|
|
|
|
Designed and implemented by Maxime Perrotin (European Space Agency)
|
|
|
|
|
|
|
|
Additional contributions from Diego Barberá (LLVM backend) and Laurent Meyer
|
|
|
|
|
|
|
|
The ASN.1 Compiler was developed by George Mamais (Neuropublic) with F# and ANTLR
|
|
|
|
|
|
|
|
The background pattern was downloaded from www.subtlepatterns.com
|
|
|
|
|
|
|
|
The tool is developed mainly using Python, PySide (Qt bindings for Python), and ANTLR (parser)
|
|
|
|
|
|
|
|
Special thanks and greetings to Thanassis Tsiodras
|
|
|
|
|
|
|
|
=== Licence ===
|
|
|
|
|
|
|
|
Licence for OpenGEODE is LGPL
|
|
|
|
![opengeode-complete-2](https://gitrepos.estec.esa.int/uploads/taste/opengeode/48bd78923c/opengeode-complete-2.png) |