OpenAADL / AADLib

Library of AADL models
42 stars 17 forks source link

Problem generating code and configuration files for the adiru example #17

Closed AlexB737 closed 4 years ago

AlexB737 commented 6 years ago

Hello Jérôme,

I am using the last stable version of OSATE (2.3.3) to try to replicate the example showed at http://aadl.info/aadl/demo-arinc653/. To install and build OCARINA, I just copy-pasted the commands from the Docker file you prepared for Debian in a fresh Debian 9 installation.

Once in OSATE I am not able to generate configuration files nor code, I am receiving the following exception (also tried in OSATE 2.3.4):

An internal error occurred during: "Running Ocarina". Unable to get IResource for Resource: org.osate.xtext.aadl2.resource.NoCacheDerivedStateAwareResource@6748c4fd uri='platform:/plugin/org.osate.contribution.sei/resources/properties/Data_Model.aadl'

Additionally, I've found exceptions in the _adirumemory.aadl file in the following line: ARINC653::Memory_Type => (Code_Memory);

Multiple markers at this line

  • Couldn't resolve reference to property definition 'ARINC653::Memory_Type'.
  • Couldn't resolve reference to Property Constant, Property Definition, Enumeration or Unit literal 'Code_Memory'. For classifier references use classifier( ).

To solve it, I have replace it by: ARINC653::Memory_Kind => (Memory_Code); And then, when trying to generate code the exception is the following one:

An internal error occurred during: "Running Ocarina". Unable to get IResource for Resource: org.osate.xtext.aadl2.resource.NoCacheDerivedStateAwareResource@bb7dc32 uri='platform:/plugin/org.osate.contribution.sei/resources/properties/ARINC653.aadl'

Could you give some ideas on what I'm doing wrong? I'll be happy to provide with additional info of my setup/particular problem if needed.

Thanks,

A

yoogx commented 6 years ago

HI,

Can you confirm which source code you used ? The website you pointed to is referring to OSATE examples, not AADLib.

AADLib has a version of ADIRU in examples/adiru that is parsed fine with OSATE 2.3.2. I confirm the error in AADLib, due to an older version of the property set being used. It is interesting that this error is not reported, it seems hidden by the 'with ARINC653' not used.

About the other bugs, it looks related to openaadl/osate2-ocarina#14

I'll investigate both

AlexB737 commented 6 years ago

Hello Jérôme,

Thank you for such a fast response. I followed the procedure described there, but the example is coming from this repo (I just cloned AADLib and opened OSATE to check whether my ocarina-osate setup was working or not).

I will give it a try with OSATE 2.3.2 to see if that fixes the problem and let you know.

Do you think this problem is specific of this example? I'll be happy to try with a similar example to check if the problems persist.

Thanks,

A.

yoogx commented 6 years ago

I think you'll have a cascade of bugs from OSATE If your interest is in running the demo (note that I do not have the OS used, it was a demo done by Julien Delange when he was with SEI), then I suggest you go to the command line, from there

go in AADLib directory, and type ./support/reconfig ./configure

it will generate all makefiles,

go in ADIRU example, and run make check

AlexB737 commented 6 years ago

Hello,

Thank you for the help! It worked just fine.

It is noteworthy I had to replace again the line ARINC653::Memory_Kind => (Memory_Code); by its previous value ARINC653::Memory_Type => (Code_Memory);.

Nonetheless I would like to find a way of doing it benefiting from the simplicity OSATE's GUI and ocarina bridge bring to the user. Any recommendation on what's the best way to start generating code with ocarina (OSATE vs Makefiles)?

Thanks,

A.

yoogx commented 6 years ago

Updating the property is expected, I need to update the property sets in Ocarina to reflect the new property sets, and adjust the code generator to reflect this. I'll try to schedule this in my personal workplan.

I'm curious to know if the produce binaries work as expected. If you can contribute a README to complete the path from code generation to binary execution on a target, that would be greaT.

AlexB737 commented 6 years ago

Hi,

I am not really familiar with how the binaries are generated nor the make process. By binaries you mean the configure ones generated after running the lines ./support/reconfig ./configure?

yoogx commented 6 years ago

You generated code from AADL models, you wrote it succeeded. I was curious to know if you could compile the generated code with some ARINC653 RTOS

AlexB737 commented 6 years ago

Thank you, I get you now. No, so far I didn't try compiling it with any RTOS, I will let you know if I am successful there if I try.

phamhoanganhbk commented 5 years ago

Hi AlexB737 and Yoogx, Could you please explain in more detail how to fix this error? An internal error occurred during: "Running Ocarina". Unable to get IResource for Resource: org.osate.xtext.aadl2.resource.NoCacheDerivedStateAwareResource@11836806 uri='platform:/plugin/org.osate.contribution.sei/resources/properties/ARINC653.aadl' Thanks,

yoogx commented 4 years ago

This was a bug in OSATE plugin that has been solved. Closing this ticket