Commit bfb195fd authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Generate Makefile to build the properties

parent 9e477bef
all: install
@pip install --user --upgrade .
@pip install --user --upgrade .
@rm -rf build dist *.egg-info properties/*.pyc
make -C test -f clean || :
rm -f test/
rm -f properties/*.pyc
properties/ -s ../test/properties test/*.pr
cd test && asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal && gnatmake -gnat2012 -c orchestrator_stop_conditions.adb
cd test && gnatbind -n -Lliborechestrator_stop_conditions orchestrator_stop_conditions
cd test && gnatmake -c -gnat2012 b~orchestrator_stop_conditions.adb
cd test && gcc -shared -fPIC -o b~orchestrator_stop_conditions.o orchestrator_stop_conditions.o taste_basictypes.o adaasn1rtl.o -lgnat
make -C test -f build
.PHONY: all install clean test
This directory contains the code for the TASTE Property Parser and code generator
Install by typing, as root:
Install by typing:
$ make install
This command will call: python install --record
You can install in a virtualenv instead
You must first install opengeode, which is a required dependency
(c) European Space Agency, 2015
Test your setup with:
$ make test
(c) European Space Agency, 2016
Author: Maxime Perrotin
......@@ -7,14 +7,16 @@ Parse expressions such as:
and generate code to verify the property
This shall be used in combination with the OpenGEODE simulator
(c) European Space Agency, 2015-2016
__author__ = "Maxime Perrotin"
__license__ = "ESA Community (compatible with LGPLv3)"
__version__ = "1.0.1"
__license__ = "LGPL v3"
__version__ = "1.0.2"
__url__ = ""
import os
......@@ -35,6 +37,21 @@ console = logging.StreamHandler(sys.__stdout__)
MAKEFILE_TEMPLATE = '''all: build
@rm -rf *.o *.ad? *.ali bin examiner *.idx * *_interface.aadl *.wrn *.gpr gnat.cfg lib{name}.so
asn1.exe -Ada {asn1} -typePrefix asn1Scc -equal
gnatmake -gnat2012 -c {name}.adb
gnatbind -n -Llib{name} {name}
gnatmake -c -gnat2012 b~{name}.adb
gcc -shared -fPIC -o lib{name}.so b~{name}.o {name}.o {modules} adaasn1rtl.o -lgnat
.PHONY: all clean build
def parse_input_files(pr_files, ppty_file):
''' Invoke opengeode to parse the SDL models and use the expression
......@@ -105,6 +122,15 @@ def parse_input_files(pr_files, ppty_file):
idx += 1
opengeode.AdaGenerator.generate(process, simu=True)
# gather asn.1 files and modules
asn1_files = ' '.join(ast[0].asn1_filenames) #'dataview-uniq.asn'
asn1_modules = ' '.join(name.lower().replace('-', '_') + '.o'
for name in ast[0].asn1Modules)
with open('', 'w') as Makefile:
def cli():
''' Application entry point, when used from the command line '''
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment