Skip to content

Commit

Permalink
* Generate a valid identifier from AADL root ssytem component implem…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
jjhugues committed Oct 4, 2021
1 parent 8df4b2f commit d2e9f13
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
6 changes: 4 additions & 2 deletions src/backends/aadl_xml/ocarina-backends-aadl_xml-main.adb
Expand Up @@ -124,7 +124,8 @@ package body Ocarina.Backends.AADL_XML.Main is
Append_Node_To_List
(Make_Assignement
(Make_Defining_Identifier (Get_String_Name ("identifier")),
Make_Defining_Identifier (Display_Name (Identifier (E)))),
Make_Defining_Identifier
(Normalize_Name (Name (Identifier (E))))),
XTN.Items (N));
end if;

Expand Down Expand Up @@ -207,7 +208,8 @@ package body Ocarina.Backends.AADL_XML.Main is
(Make_Assignement
(Make_Defining_Identifier (Get_String_Name ("root_system")),
Make_Defining_Identifier
(Display_Name (Identifier (Root_System_Node)))),
(Normalize_Name
(Display_Name (Identifier (Root_System_Node))))),
XTN.Items (AADL_XML_Node));

Append_Node_To_List
Expand Down
6 changes: 3 additions & 3 deletions tests/github/issue_287/test_aadl_xml.aadl.out
@@ -1,11 +1,11 @@
<aadl_xml root_system="main.impl">
<aadl_xml root_system="main_impl">
<components>
<component category="system" identifier="main.impl">
<component category="system" identifier="main_impl">
<classifier namespace="Test_Aadl_Xml_Output">
main.impl </classifier>
<features/>
<subcomponents/>
<properties/>
</component>
</components>
</aadl_xml>
</aadl_xml>
4 changes: 2 additions & 2 deletions tests/github/issue_287/test_aadl_xml_connections.aadl.out
@@ -1,6 +1,6 @@
<aadl_xml root_system="main.impl">
<aadl_xml root_system="main_impl">
<components>
<component category="system" identifier="main.impl">
<component category="system" identifier="main_impl">
<classifier namespace="Test_Aadl_Xml_Connections">
main.impl </classifier>
<features/>
Expand Down
4 changes: 2 additions & 2 deletions tests/github/issue_287/test_lists.aadl.out
@@ -1,6 +1,6 @@
<aadl_xml root_system="main.impl">
<aadl_xml root_system="main_impl">
<components>
<component category="system" identifier="main.impl">
<component category="system" identifier="main_impl">
<classifier namespace="Test_List_of_List">
main.impl </classifier>
<features/>
Expand Down
4 changes: 2 additions & 2 deletions tests/github/issue_287/test_property_terms.aadl.out
@@ -1,6 +1,6 @@
<aadl_xml root_system="main.impl">
<aadl_xml root_system="main_impl">
<components>
<component category="system" identifier="main.impl">
<component category="system" identifier="main_impl">
<classifier namespace="Test">
main.impl </classifier>
<features/>
Expand Down

0 comments on commit d2e9f13

Please sign in to comment.