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

Backends: fatal error : This OUT port is not connected to any destination? #304

Closed Liufengyuann closed 2 years ago

Liufengyuann commented 2 years ago

Hello, when I run the ping example from polyorb_hi_c ,but i get the fatal error like this :

image

but the out port of thread P will be a subcomponent of process A, and thread Q will be a subcomponent of process B. image

process A will connected to process B ,so the OUT PORT of Thread P will connected to Thread Q, but this error occurred.

So how can I solve this error? Hope I can get your help, thanks!

yoogx commented 2 years ago

I would need more details on the version of Ocarina you are using; and which ping example you are using. All examples are tested nightly and are known to work properly

Liufengyuann commented 2 years ago

Ocarina version Im using:

image

and the example path is ocarina/ocarina-build/ocarina_install/examples/ocarina/polyorb-hi-c/aadlv2/ping

Can you make some suggestions to solve the problem? thank you so much!

yoogx commented 2 years ago

AFAICT it works.

Go in ocarina/ocarina-build/ocarina_install/examples/ocarina/polyorb-hi-c/aadlv2/pingand type make build-all. This is the test I run during regression tests. It compiles this example in various configurations. I do not test through OSATE.

In this example, the two processes are connected. But you changed it as the line numbers do not match. Also, the code does not match. I do not use "conn" as a name for the connections in this file. OSATE may have reported an error here, I have to port this example to OSATE, Ocarina is a bit lax here.

So first test the original example from the command line

Liufengyuann commented 2 years ago

Thanks! But I also have some problems..

But the dir does not have a makefile, so maybe i can not run make build-all

image

And when i type ocarina -p ping.aadl to parse the ping.aadl ,I got these errors

image

Maybe the instruction i used is not correct ?

Whats more , if i do not revise the example, use the original file from example, I will get error like this

image

image image

This example does not seem to meet the AADL specification ..?

yoogx commented 2 years ago

You may want to read the doc first, ocarina -p parses one file, but you need extra parameters to indicate which version of AADL you want to use, etc.

PolyORB-HI/C examples must be ported to OSATE, a few elements are missing like names for connections. OSATE is stricter than it used to be on this. Only the examples from AADLib have been ported to OSATE

You are right there is no makefile, it seems you used build_ocarina.sh to compil, and I missed that you were referencing the install directory and not the build one. If so go, in the source directory; (path from my install, you may adapt this) ocarina-build/ocarina/resources/runtime/polyorb-hi-c/examples/aadlv2/ping and run make build-all

alternatively; from the command line: ocarina -bx scenario.aadl will generate code and compile it. It does not depend on any makefile and should work in your install directory

Liufengyuann commented 2 years ago

Thank you!!! I have successfully run it!! Thank you so much~ My research topic is the conversion of aadl to C language. I would like to know in which part of your code the aadl parsing process is implemented? Thank you so much for your help!

jjhugues commented 2 years ago

Glad it worked. Ocarina is a compiler, so review the code: frontends has the parsing, backends the code generation part for the multiple targets we support. Code generation simply instantiate the PolyORB-HI/C middleware