README.md 13.1 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1 2 3 4 5 6 7 8 9 10 11 12 13
OpenGEODE
=========

OpenGEODE is a tiny open-source SDL editor that is developed for
the purpose of providing an easy to use and free state machine editor and
Ada code generator to the TASTE toolchain from the European Space Agency,
running in combination with ESA's ASN.1 "Space Certifiable" ASN.1 compiler.

SDL is the Specification and Description Language (Z100 standard from ITU-T).

This is NOT related to the graphical Simple DirectMedia Layer libraries!

Visit http://sdl-forum.org for more information about SDL.
14 15 16 17 18 19 20 21 22 23
Visit http://www.pragmadev.com to get a full-featured commercial SDL tool and support


![alt tag](icons/opengeode-screenshot.png)


Features
--------

- Graphical editor of SDL processes and procedures.
Maxime Perrotin's avatar
Maxime Perrotin committed
24 25 26
- SDL2010 features: state composition and state aggregation
- Works on pure PR+CIF files (textual SDL notation)
- Supports ASN.1 data types - using ESA Space Certified compiler (www.github.com/ttsiodras/asn1scc)
Maxime Perrotin's avatar
Maxime Perrotin committed
27
- Generates Ada code
dbarbera's avatar
dbarbera committed
28
- Automatic conversion to Statechart diagrams
29
- Save the complete or parts of the model to PNG/SVG/PDF files
dbarbera's avatar
dbarbera committed
30 31 32 33
- Hyperlinks (link a symbol content to any external document or web page)
- Context-dependent text auto-completion
- Syntax highlighting
- Undo/Redo, Copy-Paste
34
- (Limited) VIM mode - You can use :wq or :%s,search,replace,g, and /search pattern
Maxime Perrotin's avatar
Maxime Perrotin committed
35
- Python API to parse and render SDL from other Python modules
Maxime Perrotin's avatar
Maxime Perrotin committed
36 37 38 39

Installation
============

40 41 42 43 44 45
On Windows, download the binary from [here](http://download.tuxfamily.org/taste/opengeode_windows.zip)

Uzip it and run opengeode.exe. It contains everything without any other external dependencies.

Linux Pre-requisites
--------------------
Maxime Perrotin's avatar
Maxime Perrotin committed
46

Maxime Perrotin's avatar
Maxime Perrotin committed
47
To install OpenGEODE on Linux you need to install some system-level dependencies:
Maxime Perrotin's avatar
Maxime Perrotin committed
48

Maxime Perrotin's avatar
Maxime Perrotin committed
49 50 51
- Python 2.7 with pip (installed by default on nearly all Linux distributions)
- Pyside
- Graphviz
52
- [ASN1SCC](https://github.com/ttsiodras/asn1scc)
Maxime Perrotin's avatar
Maxime Perrotin committed
53 54 55
- GNAT

And optionally llvm and llvmpy
Maxime Perrotin's avatar
Maxime Perrotin committed
56

Maxime Perrotin's avatar
Maxime Perrotin committed
57
On Debian, Ubuntu, and probably other distributions:
Maxime Perrotin's avatar
Maxime Perrotin committed
58

59
```bash
Maxime Perrotin's avatar
Maxime Perrotin committed
60
$ sudo apt install pkg-config python-pyside pyside-tools graphviz python-ply \
Maxime Perrotin's avatar
Maxime Perrotin committed
61
                       graphviz-dev libgraphviz-dev  python-pip gnat \
Maxime Perrotin's avatar
Maxime Perrotin committed
62 63 64 65 66
                       libmono-system-runtime4.0-cil libmono-corlib4.0-cil \
                       libmono-system-runtime-serialization-formatters-soap4.0-cil \
                       libmono-system-web4.0-cil libmono-system-xml4.0-cil \
                       libmono-system4.0-cil mono-runtime libmono-system-numerics4.0-cil \
                       libmono-system-data-linq4.0-cil libmono-corlib2.0-cil libmono-system2.0-cil
67
```
Maxime Perrotin's avatar
Maxime Perrotin committed
68

Maxime Perrotin's avatar
Maxime Perrotin committed
69
Some of these packages may be more recent on your distribution.
Maxime Perrotin's avatar
Maxime Perrotin committed
70 71

To install the ASN.1 compiler, run (possibly as root):
Maxime Perrotin's avatar
Maxime Perrotin committed
72

73
```bash
Maxime Perrotin's avatar
Maxime Perrotin committed
74
$ cd /opt
Maxime Perrotin's avatar
Maxime Perrotin committed
75 76 77
$ wget http://download.tuxfamily.org/taste/ASN1SCC/ASN1SCC-latest.tgz
$ tar zxvf ASN1SCC-latest.tgz
$ echo 'export PATH=$PATH:/opt/asn1scc' >> ~/.bashrc
78
```
Maxime Perrotin's avatar
Maxime Perrotin committed
79

Maxime Perrotin's avatar
Maxime Perrotin committed
80
Open a new terminal and check that it works:
Maxime Perrotin's avatar
Maxime Perrotin committed
81

Maxime Perrotin's avatar
Maxime Perrotin committed
82
```bash
Maxime Perrotin's avatar
Maxime Perrotin committed
83
$ mono /opt/asn1scc/asn1.exe
Maxime Perrotin's avatar
Maxime Perrotin committed
84
```
Maxime Perrotin's avatar
Maxime Perrotin committed
85

Maxime Perrotin's avatar
Maxime Perrotin committed
86 87
OpenGEODE installation
----------------------
Maxime Perrotin's avatar
Maxime Perrotin committed
88

89 90
Make sure all dependencies are installed.

Maxime Perrotin's avatar
Maxime Perrotin committed
91
If you see a certificate error while cloning from [Gitlab](https://gitrepos.estec.esa.int/taste/opengeode), you may need to run the following commands:
92 93 94 95

```bash
$ echo -n | openssl s_client -connect gitrepos.estec.esa.int:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > gitrepos.cert
$ sudo cp gitrepos.cert /usr/local/share/ca-certificates/gitrepos.crt
Maxime Perrotin's avatar
Maxime Perrotin committed
96
$ sudo update-ca-certificates
97
```
98

Maxime Perrotin's avatar
Maxime Perrotin committed
99
There is no such issue if you use Github:
Maxime Perrotin's avatar
Maxime Perrotin committed
100

Maxime Perrotin's avatar
Maxime Perrotin committed
101

102
```bash
Maxime Perrotin's avatar
Maxime Perrotin committed
103
$ git clone --recursive https://github.com/esa/opengeode.git
dbarbera's avatar
dbarbera committed
104
```
Maxime Perrotin's avatar
Maxime Perrotin committed
105

106
And install it:
Maxime Perrotin's avatar
Maxime Perrotin committed
107

108
```bash
109
$ cd opengeode
110
$ make full-install
111
```
Maxime Perrotin's avatar
Maxime Perrotin committed
112

Maxime Perrotin's avatar
Maxime Perrotin committed
113

Maxime Perrotin's avatar
Maxime Perrotin committed
114 115 116
Information and contact
=======================

Maxime Perrotin's avatar
Maxime Perrotin committed
117
OpenGEODE is part of the [TASTE project](http://taste.tuxfamily.org)
Maxime Perrotin's avatar
Maxime Perrotin committed
118

Maxime Perrotin's avatar
Maxime Perrotin committed
119
For additional information please contact:
Maxime Perrotin's avatar
Maxime Perrotin committed
120 121
maxime (dot) perrotin (at) esa (dot) int

Maxime Perrotin's avatar
Maxime Perrotin committed
122

123
The LLVM backend was designed and implemented by Diego Barbera during the ESA
Maxime Perrotin's avatar
Maxime Perrotin committed
124
Summer of Code 2014 (It is unfortunately unmaintained now and does not support all features of the tool).
125
Some parts implemented by Laurent Meyer (native SDL type support in the parser)
Maxime Perrotin's avatar
Maxime Perrotin committed
126

Maxime Perrotin's avatar
Maxime Perrotin committed
127 128 129

The ASN.1 compiler (ASN1Scc) that OpenGEODE is based on was
developed by George Mamais and Thanassis Tsiodras for the European
130
Space Agency. Information at https://github.com/ttsiodras/asn1scc
Maxime Perrotin's avatar
Maxime Perrotin committed
131 132 133 134 135

Licence
=======

License is LGPL (see file LICENSE)
Maxime Perrotin's avatar
Maxime Perrotin committed
136 137
There is no runtime, and the generated code is not subject to any license.

Maxime Perrotin's avatar
Maxime Perrotin committed
138
The fonts are the fonts from Ubuntu, check licence in file FONT-LICENSE.TXT
Maxime Perrotin's avatar
Maxime Perrotin committed
139
The background pattern was downloaded from www.subtlepatterns.com
Maxime Perrotin's avatar
Maxime Perrotin committed
140 141 142 143

Changelog
=========

144 145 146
1.5.39 (07/2017)
    - Minor fix in testcase Makefile

Maxime Perrotin's avatar
Maxime Perrotin committed
147 148 149
1.5.38 (06/2017)
    - Fix unicode issue in Ada backend

150 151 152
1.5.37 (05/2017)
    - Fix Ada backend bug with sequence of literals in nested states

Maxime Perrotin's avatar
Maxime Perrotin committed
153 154 155
1.5.36 (05/2017)
    - Fix Unicode issues in Ada backend

Maxime Perrotin's avatar
Maxime Perrotin committed
156 157 158
1.5.35 (05/2017)
    - Fix FOR LOOPS code generation

159 160 161
1.5.34 (05/2017)
    - Fix statechart message selection box

162 163 164 165
1.5.33 (04/2017)
    - Fix unicode issue with the simulation code
    - Use -fPIC when building the simulation library

166
1.5.32 (04/2017)
Maxime Perrotin's avatar
Maxime Perrotin committed
167 168
    - Unicode bugfixes in Ada backend
    - Bugfix with SEQUENCE OF literals in Ada backend
169
    - Various bugfixes with mixed int32/64 bits
Maxime Perrotin's avatar
Maxime Perrotin committed
170

171
1.5.28 (03/2017)
Maxime Perrotin's avatar
Maxime Perrotin committed
172 173
    - Added preliminary support for PROCESS TYPE and instances

Maxime Perrotin's avatar
Maxime Perrotin committed
174 175 176
1.5.26 (02/2017)
    - Statecharts can be configured to filter out signals

177 178 179
1.5.25 (01/2017)
    - Ada backend generates aliased context (used for model checking)

180 181 182
1.5.24 (01/2017)
    - PR file use better indentation for text areas (no line return)

Maxime Perrotin's avatar
Maxime Perrotin committed
183
1.5.23 (12/2016)
184
    - In simulation mode, bugfix in the declaration of the startup function
Maxime Perrotin's avatar
Maxime Perrotin committed
185
    - Code generator prepared for model checking
186

187 188 189
1.5.22 (12/2016)
    - Simulation function save/restore context fix

Maxime Perrotin's avatar
Maxime Perrotin committed
190 191 192 193
1.5.21 (11/2016)
    - Fix regression with test-math (import of external functions)
    - Use monospace font in the HTML rendering of ASN.1 files

194 195
1.5.20 (11/2016)
    - Fix wrongly formatted error reporting in FOR loops
196 197
    - Support SDL2010 dot field separator (variable.field,
      while sdl92 only supported variable!field)
198 199
    - Sequence of literals now support field selectors
      (i.e. { variable.field } is now a valid statement)
200
    - Support inner procedure call with return statement
201

202 203 204
1.5.19 (11/2016)
    - Fix integer cast in Ada

205 206 207 208
1.5.18 (11/2016)
    - Fix parsing of ASN.1 constants that use an annonymous inner type

1.5.17 (11/2016)
Maxime Perrotin's avatar
Maxime Perrotin committed
209 210
    - Fixed issue with initialization of generated code in state aggregations

Maxime Perrotin's avatar
Maxime Perrotin committed
211 212
1.5.16 (11/2016)
    - Fix minor indentation issue when saving
Maxime Perrotin's avatar
Maxime Perrotin committed
213

214 215 216
1.5.15 (10/2016)
    - Report incomplete startup transitions as errors in nested states

Maxime Perrotin's avatar
Maxime Perrotin committed
217 218 219
1.5.14 (10/2016)
    - Support named integers (requires asn1scc 3.3.04 or more recent)

220 221 222
1.5.13 (10/2016)
    - Better support of warnings
    - Fixed detection of CHOICE assignment erros
223
    - Raise error if process miss the start transition
Maxime Perrotin's avatar
Maxime Perrotin committed
224
    - Raise error in case of SEQUENCE OF type mismatch
225

Maxime Perrotin's avatar
Maxime Perrotin committed
226 227 228
1.5.12 (09/2016)
    - Detect duplicate declaration of procedures

229 230 231
1.5.11 (09/2016)
    - Allow semicolon in the declaration of procedures after RETURNS keyword

232 233 234
1.5.10 (09/2016)
    - readonly mode with more restrictions

235 236 237
1.5.9 (09/2016)
    - Added --readonly command line to restrict process modifications

238 239 240 241
1.5.8 (09/2016)
    - Bugfix - Ada backend failed when there were continuous signals in
               nested states but none at root level (missing end if)
    - Load fix when there is no dataview
242 243
    - Additional type checks

Maxime Perrotin's avatar
Maxime Perrotin committed
244 245 246 247
1.5.7 (09/2016)
    - Bugfix - Update completion list of process symbol
    - Sort ASN.1 types in data dictionary

Maxime Perrotin's avatar
Maxime Perrotin committed
248
1.5.6 (08/2016)
Maxime Perrotin's avatar
Maxime Perrotin committed
249 250 251
    - vi interface supports history
    - vi interface for substitution can apply to the whole model (with g)
    - refactoring function via vi interface (eg. %state,fromName,toName,)
Maxime Perrotin's avatar
Maxime Perrotin committed
252
    - Fixed issue with rendering (coordinates of symbols could be wrong)
Maxime Perrotin's avatar
Maxime Perrotin committed
253
    - Introduce data dictionary
Maxime Perrotin's avatar
Maxime Perrotin committed
254

Maxime Perrotin's avatar
Maxime Perrotin committed
255 256 257
1.5.4 (08/2016)
    - Various GUI improvements

258
1.5.3 (07/2016):
Maxime Perrotin's avatar
Maxime Perrotin committed
259 260
    - Ada backend fix: Continous signals now handled in states
      where input is not consumed
261

Maxime Perrotin's avatar
Maxime Perrotin committed
262
1.5.2 (07/2016):
263
    - Asn1scc API added to interface with DMT/asn2dataModel
Maxime Perrotin's avatar
Maxime Perrotin committed
264
    - Better statechart rendering (less distance between nodes)
265

Maxime Perrotin's avatar
Maxime Perrotin committed
266
1.4.5 (07/2016):
267 268
    - Context variable was not prefixed properly
    - Callback function for timers use 64bits integer
Maxime Perrotin's avatar
Maxime Perrotin committed
269 270
    - RIs use prefix with unicode separation to avoid name clashes

271

272 273 274
1.4.4 (06/2016)
    - Minor bugfix in Ada backend to support typeless systems

275 276 277
1.4.3 (06/2016)
    - Add support for priority of continuous signals in Ada code generator

278 279 280
1.4.2 (06/2016)
    - Reload / render properly priority of continuous signals

281
1.4.1 (06/2016)
282 283
    - Continuous states can check the presence of messages in the input queue
      to respect the SDL semantics
284
    - Bugfix in Ada code generator on continuous states
285

Maxime Perrotin's avatar
Maxime Perrotin committed
286 287 288
1.3.28 (06/2016)
    - Excluded states (with *(statelist) ) were case sensitive

Maxime Perrotin's avatar
Maxime Perrotin committed
289 290 291 292
1.3.27 (05/2016)
    - Fix bug in Ada backend when using continous signals
    - Better handling of simulation script

293 294 295
1.3.26 (05/2016)
    - Fix parser issues with negative expressions

Maxime Perrotin's avatar
Maxime Perrotin committed
296
1.3.25 (05/2016)
297 298
    - Fix reporting of syntax errors in state aggregations

Maxime Perrotin's avatar
Maxime Perrotin committed
299
1.3.22 (05/2016)
300
    - Bug fix in range checks for division and subtraction
301
    - Optimise loading when there are no CIF comments
Maxime Perrotin's avatar
Maxime Perrotin committed
302

Maxime Perrotin's avatar
Maxime Perrotin committed
303 304 305 306
1.3.21 (05/2016)
    - Complete support of optional fields
      (check tests/regression/test-optionalfields)

Maxime Perrotin's avatar
Maxime Perrotin committed
307 308 309
1.3.20 (05/2016)
    - Improve simulator interface

Maxime Perrotin's avatar
Maxime Perrotin committed
310 311 312 313
1.3.19 (04/2016)
    - Various bugfixes with ternary operator
    - Added demo "test-save" showing how to emulate the behaviour of the SAVE
      symbol
Maxime Perrotin's avatar
Maxime Perrotin committed
314
    - ASN.1 types are shown with SDL-syntax (no hyphens)
Maxime Perrotin's avatar
Maxime Perrotin committed
315

316 317
1.3.18 (04/2016)
    - Add support for value notation of NULL type
318
    - Remove warning when accessing CHOICE fields
319

320 321 322
1.3.17 (04/2016)
    - Add support for value notation of empty SEQUENCEs ("{}")

Maxime Perrotin's avatar
Maxime Perrotin committed
323 324 325
1.3.16 (03/2016)
    - Bugfix in testing aggregation states in the GUI

Maxime Perrotin's avatar
Maxime Perrotin committed
326 327 328 329
1.3.15 (03/2016)
    - Bugfix in Ada backend when a state aggregation contained only empty
      states (directly returning states).

330 331 332
1.3.14
    - Minor bugfix with command line handling

333 334 335
1.3.13
    - Bugfix in rendering of Continuous signals

Maxime Perrotin's avatar
Maxime Perrotin committed
336 337 338
1.3.12
    - Render properly parameterless procedures that are declared in the .pr
      file but without a textbox
339
    - When going to parent scene, fixed rendering issue
Maxime Perrotin's avatar
Maxime Perrotin committed
340

Maxime Perrotin's avatar
Maxime Perrotin committed
341 342 343
1.3.11
    - Parser is more tolerant to incomplete systems

Maxime Perrotin's avatar
Maxime Perrotin committed
344
1.3.9/10 (01/2016)
Maxime Perrotin's avatar
Maxime Perrotin committed
345 346
    - Checker verifies that decision coverage is complete on Real and Boolean
      types
Maxime Perrotin's avatar
Maxime Perrotin committed
347
    - F3 generates Ada code
Maxime Perrotin's avatar
Maxime Perrotin committed
348

349 350 351
1.3.8 (01/2016)
    - Fix logging when LLVM is not installed

Maxime Perrotin's avatar
Maxime Perrotin committed
352 353 354
1.3.7 (12/2015)
    - Added icon to use Continuous Signals from the GUI

355 356 357 358 359
1.3.6 (11/2015)
     - Support external procedures having a return statement
       this allows to import math functions from the libmath without having
       to provide manual code. see test-math

360 361 362
1.3.5 (11/2015)
     - Better support for continous signals

Maxime Perrotin's avatar
Maxime Perrotin committed
363 364 365 366
1.3.4 (11/2015)
     - Early support for continous signals
     - Regression issue fixed (test-nocif2)

Maxime Perrotin's avatar
Maxime Perrotin committed
367
1.3.3 (11/2015)
Maxime Perrotin's avatar
Maxime Perrotin committed
368
     - Better support of platform-dependent screen resolution and dpi
Maxime Perrotin's avatar
Maxime Perrotin committed
369
     - Minor fixes in statechart scenes (no negative coordinates)
Maxime Perrotin's avatar
Maxime Perrotin committed
370

Maxime Perrotin's avatar
Maxime Perrotin committed
371
1.3.1 (11/2015)
372
     - Support for State Aggregations (parallel states)
Maxime Perrotin's avatar
Maxime Perrotin committed
373
     - Improved statechart rendering
374

375
1.2.10 (10/2015)
Maxime Perrotin's avatar
Maxime Perrotin committed
376 377 378
     - Better support of renamePolicy
     - Better handling of models without CIF coordinates
     - Minor bug fixes
379
     - Forloop syntax error handled correctly when using range
380
     - support Hex and bit string literals when working with OCTET STRING
381
     - support OUT keyword for procedure FPAR
Maxime Perrotin's avatar
Maxime Perrotin committed
382

Maxime Perrotin's avatar
Maxime Perrotin committed
383
1.2.4 (07/2015)
384 385 386 387
     - Use version 3.2.x of the ASN1SCC compiler with new -renamePolicy flag
     - Improve robustness

1.1.1 (07/2015)
Maxime Perrotin's avatar
Maxime Perrotin committed
388 389 390
     - Strongly report syntax errors with symbol location and warning if user
       tries to save a model with syntax errors

391 392 393
1.1.0 (07/2015)
     - Write/Writeln procedure support enumerated types

Maxime Perrotin's avatar
Maxime Perrotin committed
394 395 396 397
1.0.1 (06/2015)
     - Bugfix: use mono when calling asn1.exe by default (needed redhat-based
                                                          distros)

Maxime Perrotin's avatar
Maxime Perrotin committed
398 399 400 401
1.0.0 (06/2015)
     - Bugfixes and minor improvements
     - Python API / Simulator function (coupled with other TASTE components)

402
1.0RC (10/2014)
403 404 405 406 407 408
     - Release candidate Version 1
     - Allow standalone systems (made of one process)
     - Major refactoring of parser and Ada backend
     - Many bugfixes and improvements
     - First version of LLVM backend

409 410 411
0.994 (07/2014)
     - Maintenance release, minor fixes

Maxime Perrotin's avatar
Maxime Perrotin committed
412 413 414 415 416 417 418 419 420
0.993 (07/2014)
     - Parser bugfixes
     - Better support for nested states
     - Ada generator improvements
     - Support for unicode
     - Indentation of PR code
     - Copy-paste of procedures and nested states
     - Improved regression testing

421
0.99 (04/2014)
Maxime Perrotin's avatar
Maxime Perrotin committed
422
     - Refactoring of the backend engine, now using singledispatch
423
     - Support of hierachical states
Maxime Perrotin's avatar
Maxime Perrotin committed
424 425
     - Minor bugfixes

426 427

0.98
Maxime Perrotin's avatar
Maxime Perrotin committed
428 429 430 431 432
     - Added support for FOR loops
       In a task, use "for x in range([start], stop, [range]): ... endfor"
       or "for x in sequenceOfvariable: ... endfor"
     - Default symbol size is smaller
     - Various minor bugfixes
433 434 435


0.97
Maxime Perrotin's avatar
Maxime Perrotin committed
436 437 438 439
     - added support for default value when declaring a variable
       e.g. DCL myVar myType ::= { x 5, y 2 };
       default value must be a ground expression