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 inclined 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 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 here, 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 Pragmadev Studio tool, possibly in combination with TASTE. It is a complete, large scale tool that comes with commercial support. A free version of the tool exists for evaluation, check it out!
- 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 and parallel 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 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
The following features from the SDL language are not supported, mostly because they are incompatible with embedded systems or because they are rarely used. Please contact us for more details:
- the SAVE symbol
- Enabling conditions
- States inside procedures
- Some loop syntax / textual algorithms (see SDL extensions)
- Macros
- SDL data types (use ASN.1 instead) - including operators (use procedures)
- Signallists
- `Alternative` symbol
- Full CIF support
There are almost no extensions to the SDL language:
- The syntax of the `FOR` loops differs from the one of the standard
for iterator in sequence_of_variable | RANGE([start], stop, [step]): list of SDL statements endfor
NOTE: The semantics is the same as the range operator in Python: the last value is excluded from the iteration, meaning that range (4) will yield 4 elements (0, 1, 2, 3) and range (1, 3) will yield 2 elements (1, 2).
- A directive allows to specify the path/name of the ASN.1 file:
USE Datamodel COMMENT 'path/to/file.asn'; -- In a text box
- Some math operators are natively supported: abs, ceil, cos, floor, round, sin, sqrt, trunc
- The num(enumerated) operator gives the numerical value of an enumerated
- use Present(variable of CHOICE type) to know which item is chosen
- As in ObjectGeode you can use the built-in procedures "write" and "writeln" to display text
- String concatenation is done using ASN.1 value notation : string1_in_ASN.1 // string2_in_ASN.1
TASK result := {1,2,3} // {4,5,6};
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 most other programming languages.
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 } var5 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:
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]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]The tool catches the following error:
[ERROR] Decision "present(var4)": Missing branches for answer(s) "b"The tool catches the following errors:
[ERROR] Decision "var5": duplicate answers "world", "hello" [ERROR] Decision "var5": Missing branches for answer(s) "howareyou"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]
Check the GitHub page for installation instruction on your own machine.
You can also use the Windows version here: OpenGEODE and ASN.1 Compiler
The ASN.1 compiler must be in your system path.
Important: OpenGEODE is already installed in the TASTE Virtual Machine, and fully integrated with the toolset, however, the current TASTE VM is a bit old - it is based on Debian 9 which does not have important dependencies to support the latest version of OpenGEODE. It is missing Python 3.7+ and PySide6. An upgrade is in the works, but it's not ready yet. If you are familiar enough with Linux, you can manually upgrade.
To upgrade, enter the shell in the TASTE VM and:
# Switch to root sudo su
# Make sure VM image is up to date apt-get update apt-get upgrade apt-get dist-upgrade
# Point APT to Buster to prepare for upgrade sed -i 's/stretch/buster/g' /etc/apt/sources.list
# Upgrade packages to Buster; when prompted allow services to be restarted automatically apt-get upgrade
# Upgrade distribution to Buster apt-get dist-upgrade
# Remove packages no longer needed apt-get autoremove
# Return to taste user; exit root exit
# Navigate to TASTE source; upgrade cd ~/tool-src git pull git checkout feature_buster ./Update-TASTE.sh
After this upgrade, you can work with the latest version of the tools, in particular the new Kazoo build system and Opengeode 3.xx (which you can update at any time). The Quick Reference Card has not been updated to reflect this yet.
The main differences to create/edit a project is that you must just run taste
(and not taste-create-project/taste-edit-project
anymore). To build, run make
.
You can check an example of a system using Opengeode if you go in ~/tool-src/kazoo/tests/Demo_ABB_Opengeode
and run make
to build it. Then taste
to edit.
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.
- Overview of the editor
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
- Simulation using the TASTE tools
Designed and implemented by Maxime Perrotin (European Space Agency)
Additional contributions from:
* Diego Barberá (LLVM backend) * Laurent Meyer (basic parsing of standard SDL types) * Thanassis Tsiodras (Python API for ASN.1) * Angel Esquinas (MSC Streaming scene) * George Mamais (ASN.1 Compiler)
The ASN.1 Compiler was developed for ESA by Neuropublic using F# and ANTLR
The OpenGEODE logo was designed by Maxime Perrotin
The background pattern was downloaded from www.subtlepatterns.com
The tool is developed mainly using Python3, PySide6 (Qt bindings for Python), and ANTLR3 (parser)
Some documentation gives step-by-step instructions on how to extend the tool.
Licence for OpenGEODE is LGPL