Closed nvcyc closed 3 years ago
I have a need to implement 2. and planned to do so this month.
For 1., can you elaborate? You mean you want to generate the property type definition as well?
Support for flows is something I never test, since I barely need them.
It is for property value assignment that's already included the current XML by aadl_xml
. The issue is that the current aadl_xml
places a property inside a <property>
element with its value in a child element <property_value><value>
without specifying its data type.
This can cause confusion when, for example, distinguishing between an integer-typed property value and a string-typed property value. In this example, both will have XML elements presented as:
<property name="Name_of_Some_Property">
<property_value>
<value value="10"/>
</property_value>
</property>
in which one can not tell if the value "10"
is an integer or a string.
A better way to represent the value might be:
<property name="Name_of_Some_Integer_Property">
<property_value>
<value type="IntegerLiteral" value="10"/>
</property_value>
</property>
<property name="Name_of_Some_String_Property">
<property_value>
<value type="StringLiteral" value="10"/>
</property_value>
</property>
<property name="Name_of_Some_List_Integer_Property">
<property_value>
<value type="ListValue">
<value type="IntegerLiteral" value="1"/>
<value type="IntegerLiteral" value="2"/>
</value>
</property_value>
</property>
It's good to hear that you have a plan for adding connections in aadl_xml
this month.
I'm looking forward to this new feature!
I agree that this is less appealing compared to the above two. We can come back for this later when the above two additions are resolved.
For 1., see resources/runtime/aadl_xml, there is the XML Schema we should follow. Adding type as you propose is not a big deal. Note that I am not sure the current backend properly addresses lists or records. This was a proof of concept, no more
Thanks for pointing to the XML schema that I missed.
By looking at the aadl_xml
code, it indeed does not handle lists and records.
Adding support for lists and then expanding to consider various property types seem to be a good starting port for 1.
I'm writing to give you an update for this issue:
I will send them as two separate pull requests, one after another is merged as the later commits will depend on the former PL, so that it's easier for you to review the changes and we can have deeper discussion in the PL if necessary.
I will create the first PL once the current PL #292 in the queue is resolved.
Regarding connections in the XML, you have source (and destination) elements defined in XSD as follows:
Can you elaborate a bit about what you expect to see in the component
and feature
attributes?
I expect that there should be an attribute (possibly named port_connection_reference
that may correspond to your component
here) that shows a port's identifier like port_1
or with its subcomponent's identifier if needed, such as sub_com_1.port_1
.
Sorry for the delay in answering this initial point. I am formalizing AADL in a separate project and got distracted on similar issues.
As you have seen in AADL, connection are of the form feature
or component.feature
The idea was to capture this in two separate fields to avoid additional processing
but since I am not doing anything of this XML file, feel free to propose whatever approach that would ease further processing
Thanks for your explanation. The PL #294 was implemented based on what you suggested.
I think #294 closes this issue; can you please confirm? thanks for the patches!
Thanks! This issue should be considered being resolved with the merged patches.
Just realized that the connection type (e.g., bus access, port connection) is missing from the connection elements in XML.
While checking the connection instances, it doesn't seem like the connection type information is properly stored in Associated_Type
in a connection instance object:
Is it expected? If not and we are to make Associated_Type
usable, what was the initial thought about Associated_Type
here?
Should we make Associated_Type
store Ocarina.ME_AADL.Connection_Type
?
I am not sure Associated_Type has the semantics you expect. And since this code is 12 years old, it is likely to be a left-over of some design
We have an accessor that provides this mechanism, see
This function fetches the information in the declarative model though.
OCARINA VERSION:
DESCRIPTION:
The
aadl_xml
backend enables Ocarina to export an instantiated AADL model in XML format which is useful for external tools to consume for their needs. However, the output XML does not include everything in the model instance and hence reduces the usability of the backend. The issue was occasionally raised in the past (e.g., #156) but has not been addressed in the upstream. I believe expanding the existingaadl_xml
backend can benefit those who want to use Ocarina as a compiler together with their own custom programs/tools. For this reason, I'd like to know if there exists any plan for enhancing theaadl_xml
backend to include more details from the instantiated model.SAMPLE FIX/WORKAROUND:
To facilitate the discussion and development for enhancing the usability of the
aadl_xml
backend, I'd like to start with proposing to include the following elements in the XML:Typed property values Currently property values are presented without noting their types in XML. A correct representation of the property value types is vital to analyzing/using the model.
Connections Including connections completes the architectural description of the model instance and hence can greatly increase the usability of the output XML.
Flows Including flow information allows external tools to conduct further analysis outside of Ocarina.
Before delving into the design of the XML elements and the
aadl_xml
code, it will be good to get some feedback from you and see if there is any requirement and expectation for theaadl_xml
backend.