Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
properties
Commits
976b5af3
Commit
976b5af3
authored
Mar 17, 2015
by
Maxime Perrotin
Browse files
Generate first layout of Ada code
parent
03b9b1c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
properties/properties.py
View file @
976b5af3
...
...
@@ -72,7 +72,35 @@ def parse_input_files(pr_files, ppty_file):
for
each
in
stop_conditions
:
stmts
,
string
,
local_decl
=
opengeode
.
AdaGenerator
.
expression
(
each
)
log
.
info
(
string
)
# For each stop condition create a new Procedure with a boolean return type
process
.
content
.
inner_procedures
=
[]
process
.
procedures
=
[]
process
.
transitions
=
[]
process
.
composite_states
=
[]
process
.
mapping
=
{}
idx
=
0
for
each
in
stop_conditions
:
proc
=
opengeode
.
ogAST
.
Procedure
()
proc
.
return_type
=
opengeode
.
ogParser
.
BOOLEAN
proc
.
inputString
=
'property_{}'
.
format
(
idx
)
proc
.
global_variables
=
process
.
variables
proc
.
global_timers
=
process
.
timers
proc
.
input_signals
=
process
.
input_signals
proc
.
output_signals
=
process
.
output_signals
proc
.
procedures
=
process
.
procedures
proc
.
operators
=
process
.
operators
proc
.
content
.
parent
=
process
start
=
opengeode
.
ogAST
.
Start
()
start
.
transition
=
opengeode
.
ogAST
.
Transition
()
proc
.
content
.
start
=
start
decision
=
opengeode
.
ogAST
.
Terminator
()
decision
.
kind
=
'return'
decision
.
return_expr
=
each
proc
.
content
.
start
.
terminators
=
[
decision
]
proc
.
content
.
start
.
transition
.
terminators
=
[
decision
]
process
.
content
.
inner_procedures
.
append
(
proc
)
idx
+=
1
opengeode
.
AdaGenerator
.
generate
(
process
)
def
cli
():
''' Application entry point, when used from the command line '''
...
...
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