OpenAADL / ocarina

AADL model processor: mappings to code (C, Ada); Petri Nets; scheduling tools (MAST, Cheddar); WCET; REAL
http://www.openaadl.org
Other
64 stars 29 forks source link

Support for record properties #17

Open juli1 opened 9 years ago

juli1 commented 9 years ago

When trying to parse the following model https://github.com/osate/examples/blob/master/core-examples/arinc653-basic/onepart.aadl

I got an exception, see following.

/home/julien/local/bin/ocarina -aadlv2 -g polyorb_hi_c -r arincsystem.impl /home/julien/git/examples/core-examples/arinc653-basic/onepart.aadl /home/julien/wip/runtime-osate/Plugin_Resources/ARINC653.aadl onepart.aadl:89:04: warning: part1mem references a component type +========================== OCARINA BUG DETECTED =========================+ | Detected exception: STORAGE_ERROR | | Error: s-intman.adb:139 explicit raise | | Please refer to the User's Guide for more details. | +=========================================================================+

Exception name: STORAGE_ERROR Message: s-intman.adb:139 explicit raise

yoogx commented 9 years ago

[Note: The nice thing with the OSATE plug-in is that it uses the property sets of OSATE in place of the ones provided by Ocarina. To test with Ocarina without plug-in, I removed the property line 66.]

i cannot reproduce this bug, I get this

macbookair-hugues% ocarina -f -aadlv2 -g polyorb_hi_c -r arincsystem.impl onepart.aadl onepart.aadl:87:04: warning: part1mem references a component type ocarina: Total: 0 error and 1 warning onepart.aadl:97:04 Backends: fatal error : This process subcomponent is bound to a processor without execution platform specification

Which version of Ocarina did you try?

BTW, what is your objective? Ocarina is unlikely to generate code for an ARINC653 model using the PolyORB-HI/C backend, POK would make more sense (you probably know that)

juli1 commented 9 years ago

I look at the bug. It comes from the ARINC653 property set in OSATE. When not including it, it seems to be ok. Otherwise, ocarina crashes. Anyway, even if there is something wrong with the input model, we should not have such an issue.

The goal is to parse the model and ultimately generate the C code for POK. As pok was not in the generator list of the plugin, I tried with pohic. But I also fix this since, the flight from Rome to JFK give some time to work!

juli1 commented 9 years ago

To be more specific, ocarina crashes when it tries to instantiate the model. For example the following command crashes but when removing -i, it is ok. /home/julien/local/bin/ocarina -aadlv2 -i -r arincsystem.impl /home/julien/wip/runtime-osate/Plugin_Resources/ARINC653.aadl

yoogx commented 9 years ago

This patch solves (or hides) this issue. It appears one needs to revisit the way we process properties that are records. This is the major task to be done for supporting the new ARINC653 property set.

juli1 commented 9 years ago

On the other hand, this is something required to parse arinc models and update the POK models as well.

yoogx commented 9 years ago

An initial support has been implemented, I now need to implement proper entity resolution. Will be done when time permits