Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AADL models are not syntaxically correct, please fix them ! #4

Open
AtirChaudary opened this issue Jul 13, 2017 · 19 comments
Open

AADL models are not syntaxically correct, please fix them ! #4

AtirChaudary opened this issue Jul 13, 2017 · 19 comments

Comments

@AtirChaudary
Copy link

AtirChaudary commented Jul 13, 2017

this happens when I run Makefile
there is a syntax error in your code can you help me on this ?
this happens for arnic653-events and arnic653-queueing and i am running others also so maybe its in them also

@juli1
Copy link
Contributor

juli1 commented Jul 13, 2017

Having a trace/comment might help :)

@AtirChaudary
Copy link
Author

AtirChaudary commented Jul 13, 2017

atir@ubuntu:/Desktop/pok/examples/arinc653-events$ ls
Makefile model.aadl model.aadl
receive.c
atir@ubuntu:/Desktop/pok/examples/arinc653-events$ make
/home/atir/Desktop/POK/pok-master/misc/pok-toolchain.pl --arinc653 --models=model.aadl --no-run
AADL models are not syntaxically correct, please fix them !
make: *** [build] Error 1
atir@ubuntu:
/Desktop/pok/examples/arinc653-events$

@juli1
Copy link
Contributor

juli1 commented Jul 13, 2017

looks like a problem with @yoogx and ocarina!

@AtirChaudary
Copy link
Author

how can buffer and blackboard can run then ?

they both are running but events queueing are not :(
i have reinstalled the ocarina but still this issue is there

@AtirChaudary
Copy link
Author

there is not much help on the internet.You are the last person who can solve this :)

@juli1
Copy link
Contributor

juli1 commented Jul 13, 2017

I appreciate the compliment. Please note that POK and Ocarina are open source and contributions are more than appreciated.

@AtirChaudary
Copy link
Author

AtirChaudary commented Jul 25, 2017 via email

@yoogx
Copy link

yoogx commented Aug 8, 2017

@AtirChaudary, can you please send us a patch with your corrections ? These would also help us providing an updated version of the tool. Thanks

@khchenTW
Copy link

@AtirChaudary @yoogx, is this issue solved to the end? I also have the same error. It would be nice if there is a patch.

@yoogx
Copy link

yoogx commented Jan 31, 2018

No, I did not hear back from @AtirChaudary since last August. And I lack resources to update these models.

@AtirChaudary
Copy link
Author

AtirChaudary commented Feb 6, 2018

see the .aadl file and see which functions you are using in your model.There are some mistakes like where we define language if = C but it should be (C) because thats how functions are accepting it. so i use it for my own and modified it but i am not working on this anymore so i dont have access to those files now.I moved to other project
hope this helps @yoogx @kuanhsunchen

@gchamp20
Copy link

gchamp20 commented Jan 11, 2019

Hi,

It seems most of the errors were introduced around the time this commit was merged into ocarina. Mainly, it seems Module_Major_Frame, Partition_Slots, Slots_Allocation from ARINC653:: has to be replaced by POK::Major_Frame, POK::Slots, POK::Slots_Allocation. Plus what @AtirChaudary said about source_language => (C).

However, after correcting the model i'm getting the error from the script:

ARINC653 deployment file is NOT conform to XSD schema

These are the format errors:

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'System_HM_Table': Missing child element(s). Expected is ( System_State_Entry ).

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'Module_HM_Table': Missing child element(s). Expected is ( System_State_Entry ).

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'Memory_Requirements': The attribute 'Type' is required but missing.

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'Memory_Requirements': The attribute 'Access' is required but missing.

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'Partition_HM_Table': The attribute 'PartitionIdentifier' is required but missing.

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'Partition_HM_Table': Missing child element(s). Expected is ( System_State_Entry ).

cpu_arinc653-conf.xml:0: Schemas validity error : Element 'ARINC_653_Module': Missing child element(s). Expected is one of ( Partition_HM_Table, Connection_Table ).

The code still compiles even if the xml is not valid. I'm willing to correct the models, but I'm wondering is using ocarina the common workflow for using POK? Because commits are getting merged, but none of the examples using ocarina are buildable out of the box for me.

If I want to fix the models, what is the best way to go about it? Is there any example of currently valid ARINC653 model working for ocarina? I tried ocarina/examples/real/safety/model.aadl, but those don't seem to be valid either.

@juli1
Copy link
Contributor

juli1 commented Jan 12, 2019

Can you please send:

  1. The version of ocarina you are using
  2. The version of pok you are using
  3. The commands you are using

Having a way to reproduce the bug will definitively help us to fix it :-)

@gchamp20
Copy link

Sorry for the late reply.

1 - Ocarina 2017.1 (Working Copy from rfb77e27) --> Github binaries
2 - Latest pok master (commit ddca1c4)
3 - make in examples/arinc653-events or any other arinc653-* test.

The build scripts hide the error output from the subcommand, so I've executed
ocarina -k no-assert -k arinc653 -aadlv2 -f -g pok_c model.aadl $POK_PATH/misc/aadl-library.aadl to debug the AADL model and ../../../misc/check-arinc653-conffile.pl cpu_arinc653-conf.xml to validate the XML configuration files after I got the model compiling.

@juli1
Copy link
Contributor

juli1 commented Jan 17, 2019

I will look into this over the week end.

@juli1
Copy link
Contributor

juli1 commented Jan 18, 2019

follow-up on this.

The reason is because the property set changed. Obviously, the ocarina compiler would need some love to be fixed and generate the HM policy based on the new property set. It will have to read the literals from the new property set and so on.

I managed to generate arinc653-blackboard but the generated code needs to be manually modified to compile (adding POK_NEEDS_THREADS and POK_NEEDS_FUNCTION_TIME_GET in the deployment.h file).

This is a long change that requires some time, please submit a patch to fix the issue and/or try to get commercial support if this is something you really need.

@gchamp20
Copy link

Thank you for the answer.

If I understand correctly the ocarina compiler is not correctly using its property set defined in ocarina/resources/AADLv2/arinc653.aadl, so the backend for POK defined in ocarina/src/backends/arinc653/ requires some modification? On top of that, the models used by the arinc653-* tests in the pok repository would need to be updated to use the same property set?

I am not using POK for anything commercial, so don't worry! :-)

@juli1
Copy link
Contributor

juli1 commented Jan 18, 2019

You are totally correct:

  • The models need to be updated to use the new property set
  • The compiler needs to be updated to generate the HM policy based on the new properties.

@wenting83
Copy link

  • based on the new properties.

Yes, exactly. Any update? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants