Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
d2d9d246
Commit
d2d9d246
authored
Oct 23, 2015
by
Maxime Perrotin
Browse files
Merge pull request #34 from maxime-esa/state_aggregation
State aggregation
parents
b056d66d
bfafe5d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
d2d9d246
...
...
@@ -468,18 +468,19 @@ package {process_name} is'''.format(process_name=process_name,
# - add a swich case on the corresponding substate
taste_template
.
append
(
u
'-- this is a state aggregation'
)
for
sub
in
aggregates
[
state
]:
for
par
in
sub
.
mapping
.
viewkeys
():
if
par
in
mapping
[
signame
].
viewkeys
():
taste_template
.
append
(
u
'case '
u
'{ctxt}.{sub}{sep}state is'
.
format
(
ctxt
=
LPREFIX
,
sub
=
sub
.
statename
,
sep
=
UNICODE_SEP
))
if
[
a
for
a
in
sub
.
mapping
.
viewkeys
()
if
a
in
mapping
[
signame
].
viewkeys
()]:
taste_template
.
append
(
u
'case '
u
'{ctxt}.{sub}{sep}state is'
.
format
(
ctxt
=
LPREFIX
,
sub
=
sub
.
statename
,
sep
=
UNICODE_SEP
))
for
par
in
sub
.
mapping
.
viewkeys
():
case_state
(
par
)
taste_template
.
append
(
'when others =>'
)
taste_template
.
append
(
'null;'
)
taste_template
.
append
(
'end case;'
)
break
taste_template
.
append
(
'when others =>'
)
taste_template
.
append
(
'null;'
)
taste_template
.
append
(
'end case;'
)
break
else
:
# Input is not managed in the state aggregation
taste_template
.
append
(
'null;'
)
...
...
tests/regression/test-aggregation2/Makefile
View file @
d2d9d246
...
...
@@ -33,7 +33,7 @@ test-python:
$(GNATBIND)
-n
-Llibog
og
$(GNATMAKE)
-c
-fPIC
-gnat2012
b~og.adb
$(CC)
-shared
-fPIC
-o
libog.so b~og.o og.o adaasn1rtl.o taste_dataview.o
-lgnat
python
-c
"from ctypes import *; test=CDLL('./libog.so'); test.liboginit()"
python
-c
"from ctypes import *; test=CDLL('./libog.so'); test.liboginit()
; test.og_for_a(); test.og_for_b(); test.og_for_a(); test.og_for_b()
"
coverage
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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