Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
57a1772b
Commit
57a1772b
authored
Apr 16, 2021
by
Maxime Perrotin
Browse files
Merge
https://github.com/esa/opengeode
into feature_buster
parents
f3121499
5ccda33c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
57a1772b
...
...
@@ -124,6 +124,10 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
**3.5.2 (04/2021)**
-
Model checking observers: run only one transition per call
-
Support field names called "state"
**3.5.1 (04/2021)**
-
Support aliases:
dcl var type renames foo.bar.baz;
...
...
opengeode/AdaGenerator.py
View file @
57a1772b
...
...
@@ -1101,7 +1101,7 @@ package body {process_name}_RI is''']
has_cs
=
any
(
process
.
cs_mapping
.
values
())
if
simu
and
has_cs
:
if
simu
and
has_cs
and
not
MONITORS
:
# Callback registration for Check_Queue
taste_template
.
append
(
'procedure Register_Check_Queue '
'(Callback : Check_Queue_T) is'
)
...
...
@@ -1163,7 +1163,10 @@ package body {process_name}_RI is''']
taste_template
.
append
(
'when CS_Only =>'
)
taste_template
.
append
(
'trId := -1;'
)
taste_template
.
append
(
'goto Next_Transition;'
)
if
not
MONITORS
:
taste_template
.
append
(
'goto Next_Transition;'
)
else
:
taste_template
.
append
(
'goto Observer_Transition;'
)
taste_template
.
append
(
'when others =>'
)
taste_template
.
append
(
'null;'
)
...
...
@@ -1177,21 +1180,33 @@ package body {process_name}_RI is''']
# Add the code for the floating labels
taste_template
.
extend
(
code_labels
)
taste_template
.
append
(
'<<Next_Transition>>'
)
if
MONITORS
:
# If monitors are defined, it means this SDL process is in fact
# a model checking observer. In that case, the Next_Transition
# section shall not contain the code of the continuous signals,
# because only one transition is executed at each activation of
# the observer
taste_template
.
append
(
'<<Observer_Transition>>'
)
else
:
taste_template
.
append
(
'<<Next_Transition>>'
)
# After completing active transition(s), check continuous signals:
# - Check current state(s)
# - For each continuous signal generate code (test+transition)
# XXX add to C backend
if
has_cs
and
not
simu
:
taste_template
.
append
(
'-- Process continuous signals'
)
taste_template
.
append
(
'if {}.Init_Done then'
.
format
(
LPREFIX
))
taste_template
.
append
(
"Check_Queue (msgPending);"
)
taste_template
.
append
(
'end if;'
)
ads_template
.
append
(
'procedure Check_Queue (Res : out Asn1Boolean);'
)
if
not
generic
:
ads_template
.
append
(
f
'pragma Import(C, Check_Queue, "
{
process_name
.
lower
()
}
_check_queue");'
)
elif
has_cs
and
simu
:
if
not
MONITORS
:
taste_template
.
append
(
'-- Process continuous signals'
)
taste_template
.
append
(
f
'if
{
LPREFIX
}
.Init_Done then'
)
taste_template
.
append
(
"Check_Queue (msgPending);"
)
taste_template
.
append
(
'end if;'
)
ads_template
.
append
(
'procedure Check_Queue (Res : out Asn1Boolean);'
)
if
not
generic
:
ads_template
.
append
(
f
'pragma Import(C, Check_Queue, "
{
process_name
.
lower
()
}
_check_queue");'
)
else
:
taste_template
.
append
(
'-- Process observer transitions'
)
taste_template
.
append
(
"msgPending := False;"
)
elif
has_cs
and
simu
and
not
MONITORS
:
taste_template
.
append
(
'if {}.Init_Done then'
.
format
(
LPREFIX
))
taste_template
.
append
(
"Check_Queue (msgPending);"
)
taste_template
.
append
(
'end if;'
)
...
...
@@ -1243,8 +1258,7 @@ package body {process_name}_RI is''']
each
.
priority
=
lowest_priority
+
1
for
provided_clause
in
sorted
(
cs_item
,
key
=
lambda
itm
:
itm
.
priority
):
taste_template
.
append
(
u
'-- CS Priority {}'
.
format
(
provided_clause
.
priority
))
taste_template
.
append
(
f
'-- Priority
{
provided_clause
.
priority
}
'
)
trId
=
process
.
transitions
.
index
\
(
provided_clause
.
transition
)
code
,
loc
=
generate
(
provided_clause
.
trigger
,
...
...
@@ -1274,7 +1288,7 @@ package body {process_name}_RI is''']
each
.
priority
=
lowest_priority
+
1
for
provided_clause
in
sorted
(
cs_item
,
key
=
lambda
itm
:
itm
.
priority
):
taste_template
.
append
(
'-- Priority {provided_clause.priority}'
)
taste_template
.
append
(
f
'-- Priority
{
provided_clause
.
priority
}
'
)
trId
=
process
.
transitions
.
index
(
provided_clause
.
transition
)
# check if we are leaving a nested state with a CS
...
...
@@ -1310,15 +1324,15 @@ package body {process_name}_RI is''']
if
need_final_endif
:
taste_template
.
append
(
'end if;'
)
if
MONITORS
:
taste_template
.
append
(
'<<Next_Transition>>'
)
taste_template
.
append
(
'end loop;'
)
taste_template
.
append
(
'end Execute_Transition;'
)
taste_template
.
append
(
'
\n
'
)
elif
not
instance
:
# No transitions defined, but keep the interface for CS_Only calls
taste_template
.
append
(
'procedure Execute_Transition (Id : Integer) is'
)
taste_template
.
append
(
'begin'
)
taste_template
.
append
(
'null;'
)
taste_template
.
append
(
'end Execute_Transition;'
)
taste_template
.
append
(
'procedure Execute_Transition (Id : Integer) is null;'
)
taste_template
.
append
(
'
\n
'
)
# Add code of the package elaboration
...
...
opengeode/icons.py
View file @
57a1772b
This diff is collapsed.
Click to expand it.
opengeode/opengeode.py
View file @
57a1772b
...
...
@@ -3,11 +3,11 @@
# pylint: disable=C0302
"""
OpenGEODE -
A tiny, free SDL Editor for TASTE
OpenGEODE -
TASTE SDL and Observers Editor
SDL is the Specification and Description Language (Z100 standard from ITU)
Copyright (c) 2012-202
0
European Space Agency
Copyright (c) 2012-202
1 Maxime Perrotin &
European Space Agency
Designed and implemented by Maxime Perrotin
...
...
@@ -141,7 +141,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'3.5.
1
'
__version__
=
'3.5.
2
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
opengeode/sdl92Lexer.py
View file @
57a1772b
# $ANTLR 3.5.2 sdl92.g 2021-04-1
4
1
3:02:03
# $ANTLR 3.5.2 sdl92.g 2021-04-1
6
1
1:43:10
import
sys
from
antlr3
import
*
...
...
opengeode/sdl92Parser.py
View file @
57a1772b
This diff is collapsed.
Click to expand it.
sdl92.g
View file @
57a1772b
...
...
@@ -1481,7 +1481,7 @@ priority_signal_id
: ID;
signal_list_id : ID;
timer_id : ID;
field_name : ID;
field_name : ID
| STATE
;
signal_route_id : ID;
channel_id : ID;
route_id : ID;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment