Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
54df6737
Commit
54df6737
authored
Jun 30, 2014
by
yoogx
Browse files
* Minor reformatting for GNAT GPL 2014 & GCC 4.9.x
parent
78b6cd55
Changes
442
Expand all
Hide whitespace changes
Inline
Side-by-side
projects/Makefile.am
View file @
54df6737
...
...
@@ -2,25 +2,16 @@ include $(top_srcdir)/Makefile.common
# The order of the project files is important for saving compile time
BUILD_PROJECTS
=
\
ocarina-core.gpr
\
ocarina-frontends.gpr
\
ocarina-backends.gpr
\
ocarina-config.gpr
\
ocarina-transfo.gpr
\
BUILD_PROJECTS
=
ocarina-core.gpr ocarina-frontends.gpr
\
ocarina-backends.gpr ocarina-config.gpr ocarina-transfo.gpr
\
ocarina-main.gpr
# All project files have to be packaged with "make dist"
EXTRA_DIST
=
\
$(srcdir)
/ocarina.gpr.in
\
$(srcdir)
/ocarina-frontends.gpr
\
$(srcdir)
/ocarina-backends.gpr
\
$(srcdir)
/ocarina-core.gpr
\
$(srcdir)
/ocarina-main.gpr
\
$(srcdir)
/ocarina-transfo.gpr
\
$(srcdir)
/ocarina-config.gpr
\
$(srcdir)
/restrictions.adc
EXTRA_DIST
=
$(srcdir)
/ocarina.gpr.in
$(srcdir)
/ocarina-frontends.gpr
\
$(srcdir)
/ocarina-backends.gpr
$(srcdir)
/ocarina-core.gpr
\
$(srcdir)
/ocarina-main.gpr
$(srcdir)
/ocarina-transfo.gpr
\
$(srcdir)
/ocarina-config.gpr
$(srcdir)
/restrictions.adc
BUILD_STAMPS
=
$
(
BUILD_PROJECTS:.gpr
=
.gpr-build
)
...
...
@@ -30,20 +21,19 @@ CLEAN_STAMPS = $(CLEAN_PROJECTS:.gpr=.gpr-clean)
# Object directories (*.o, *.ali)
OBJECT_DIRS
=
$(top_builddir)
/src/core/objects
\
$(top_builddir)
/src/frontends/objects
\
$(top_builddir)
/src/backends/objects
\
$(top_builddir)
/src/transfo/objects
\
OBJECT_DIRS
=
$(top_builddir)
/src/core/objects
\
$(top_builddir)
/src/frontends/objects
\
$(top_builddir)
/src/backends/objects
\
$(top_builddir)
/src/transfo/objects
\
$(top_builddir)
/src/main/objects
# Library directories (*.ali, *.a)
LIB_DIRS
=
$(top_builddir)
/src/core/libs
\
$(top_builddir)
/src/frontends/libs
\
$(top_builddir)
/src/backends/libs
\
$(top_builddir)
/src/transfo/libs
\
$(top_builddir)
/src/config/libs
\
$(top_builddir)
/src/main/libs
LIB_DIRS
=
$(top_builddir)
/src/core/libs
\
$(top_builddir)
/src/frontends/libs
\
$(top_builddir)
/src/backends/libs
\
$(top_builddir)
/src/transfo/libs
\
$(top_builddir)
/src/config/libs
$(top_builddir)
/src/main/libs
# All directories used for the build process. If the configure is
# performed from a directory different from the top source directory,
...
...
@@ -60,17 +50,16 @@ BUILD_DIRS_STAMPS = $(BUILD_DIRS:=-stamp)
# Pseudo-IDL files that are used to generate the tree manipulators.
TREE_PIDL_SPECS
=
\
src/core/tree/ocarina-me_aadl-aadl_tree-nodes.idl
\
src/core/tree/ocarina-me_aadl-aadl_instances-nodes.idl
\
src/core/tree/ocarina-me_aadl_ba-ba_tree-nodes.idl
\
src/core/tree/ocarina-me_real-real_tree-nodes.idl
\
src/backends/ocarina-backends-ada_tree-nodes.idl
\
src/backends/ocarina-backends-c_tree-nodes.idl
\
src/backends/ocarina-backends-asn1_tree-nodes.idl
\
src/backends/ocarina-backends-xml_tree-nodes.idl
\
src/backends/ocarina-backends-pn-nodes.idl
\
src/backends/ocarina-backends-mast_tree-nodes.idl
\
TREE_PIDL_SPECS
=
src/core/tree/ocarina-me_aadl-aadl_tree-nodes.idl
\
src/core/tree/ocarina-me_aadl-aadl_instances-nodes.idl
\
src/core/tree/ocarina-me_aadl_ba-ba_tree-nodes.idl
\
src/core/tree/ocarina-me_real-real_tree-nodes.idl
\
src/backends/ocarina-backends-ada_tree-nodes.idl
\
src/backends/ocarina-backends-c_tree-nodes.idl
\
src/backends/ocarina-backends-asn1_tree-nodes.idl
\
src/backends/ocarina-backends-xml_tree-nodes.idl
\
src/backends/ocarina-backends-pn-nodes.idl
\
src/backends/ocarina-backends-mast_tree-nodes.idl
\
src/backends/ocarina-backends-rtsj_tree-nodes.idl
TREE_ADA_SPECS
=
${
addprefix
$(top_builddir)
/,
$(TREE_PIDL_SPECS:.idl=.ads)
}
...
...
src/backends/ocarina-backends-aadl_xml-main.adb
View file @
54df6737
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2011-201
2
ESA & ISAE. --
-- Copyright (C) 2011-201
4
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with
Namet
;
use
Namet
;
with
Namet
;
use
Namet
;
with
Ocarina
.
Instances
.
Queries
;
use
Ocarina
.
Instances
.
Queries
;
with
Ocarina
.
AADL_Values
;
...
...
@@ -52,7 +52,7 @@ package body Ocarina.Backends.AADL_XML.Main is
use
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
use
Ocarina
.
Backends
.
AADL_XML
.
Mapping
;
package
ATN
renames
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
package
ATN
renames
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
XTN
renames
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
use
type
ATN
.
Node_Kind
;
...
...
@@ -67,8 +67,8 @@ package body Ocarina.Backends.AADL_XML.Main is
-------------------
function
Map_Component
(
E
:
Node_Id
)
return
Node_Id
is
Category_Name_String
:
constant
array
(
Component_Category
'
Range
)
of
Name_Id
:=
Category_Name_String
:
constant
array
(
Component_Category
'
Range
)
of
Name_Id
:=
(
CC_Abstract
=>
Get_String_Name
(
"abstract"
),
CC_Bus
=>
Get_String_Name
(
"bus"
),
CC_Data
=>
Get_String_Name
(
"data"
),
...
...
@@ -85,8 +85,8 @@ package body Ocarina.Backends.AADL_XML.Main is
CC_Virtual_Bus
=>
Get_String_Name
(
"virtual bus"
),
CC_Virtual_Processor
=>
Get_String_Name
(
"virtual processor"
));
N
:
Node_Id
;
Classifier_Node
:
Node_Id
;
N
:
Node_Id
;
Classifier_Node
:
Node_Id
;
begin
N
:=
Make_XML_Node
(
"component"
);
...
...
@@ -113,8 +113,7 @@ 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
(
Display_Name
(
Identifier
(
E
)))),
XTN
.
Items
(
N
));
end
if
;
...
...
@@ -122,8 +121,7 @@ package body Ocarina.Backends.AADL_XML.Main is
Classifier_Node
:=
Make_XML_Node
(
"classifier"
);
Append_Node_To_List
(
Make_Defining_Identifier
(
Display_Name
(
Identifier
(
E
))),
(
Make_Defining_Identifier
(
Display_Name
(
Identifier
(
E
))),
XTN
.
Subitems
(
Classifier_Node
));
Append_Node_To_List
(
Classifier_Node
,
XTN
.
Subitems
(
N
));
...
...
@@ -148,9 +146,9 @@ package body Ocarina.Backends.AADL_XML.Main is
end
if
;
end
Visit_Subcomponents_Of
;
Root_System_Node
:
Node_Id
:=
No_Node
;
AADL_XML_Node
:
Node_Id
:=
No_Node
;
Current_XML_Node
:
Node_Id
:=
No_Node
;
Root_System_Node
:
Node_Id
:=
No_Node
;
AADL_XML_Node
:
Node_Id
:=
No_Node
;
Current_XML_Node
:
Node_Id
:=
No_Node
;
-----------
-- Visit --
...
...
@@ -176,20 +174,19 @@ package body Ocarina.Backends.AADL_XML.Main is
---------------------
procedure
Visit_Component
(
E
:
Node_Id
)
is
Category
:
constant
Component_Category
:=
Get_Category_Of_Component
(
E
);
N
:
Node_Id
;
Old_XML_Node
:
Node_Id
;
Subcomponents_Node
:
Node_Id
;
Features_Node
:
Node_Id
;
Properties_Node
:
Node_Id
;
Feature_Node
:
Node_Id
;
F
:
Node_Id
;
P
:
Node_Id
;
U
:
Node_Id
;
Property_Node
:
Node_Id
;
Components_Node
:
Node_Id
;
Category
:
constant
Component_Category
:=
Get_Category_Of_Component
(
E
);
N
:
Node_Id
;
Old_XML_Node
:
Node_Id
;
Subcomponents_Node
:
Node_Id
;
Features_Node
:
Node_Id
;
Properties_Node
:
Node_Id
;
Feature_Node
:
Node_Id
;
F
:
Node_Id
;
P
:
Node_Id
;
U
:
Node_Id
;
Property_Node
:
Node_Id
;
Components_Node
:
Node_Id
;
Property_Value_Node
:
Node_Id
;
AADL_Property_Value
:
Node_Id
;
...
...
@@ -212,10 +209,12 @@ package body Ocarina.Backends.AADL_XML.Main is
XTN
.
Items
(
AADL_XML_Node
));
Append_Node_To_List
(
AADL_XML_Node
,
XTN
.
Subitems
(
XTN
.
Root_Node
(
XTN
.
XML_File
(
U
))));
(
AADL_XML_Node
,
XTN
.
Subitems
(
XTN
.
Root_Node
(
XTN
.
XML_File
(
U
))));
Components_Node
:=
Make_XML_Node
(
"components"
);
Append_Node_To_List
(
Components_Node
,
XTN
.
Subitems
(
AADL_XML_Node
));
(
Components_Node
,
XTN
.
Subitems
(
AADL_XML_Node
));
end
if
;
Current_XML_Node
:=
Components_Node
;
end
if
;
...
...
@@ -240,8 +239,7 @@ 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
(
F
)))),
Make_Defining_Identifier
(
Display_Name
(
Identifier
(
F
)))),
XTN
.
Items
(
Feature_Node
));
-- Direction: in/out/inout
...
...
@@ -270,7 +268,8 @@ package body Ocarina.Backends.AADL_XML.Main is
XTN
.
Items
(
Direction_Node
));
Append_Node_To_List
(
Direction_Node
,
XTN
.
Subitems
(
Feature_Node
));
(
Direction_Node
,
XTN
.
Subitems
(
Feature_Node
));
end
;
-- Type: event/data/event data
...
...
@@ -300,8 +299,7 @@ package body Ocarina.Backends.AADL_XML.Main is
Make_Defining_Identifier
(
Type_Kind
)),
XTN
.
Items
(
Type_Node
));
Append_Node_To_List
(
Type_Node
,
XTN
.
Subitems
(
Feature_Node
));
Append_Node_To_List
(
Type_Node
,
XTN
.
Subitems
(
Feature_Node
));
end
;
-- Classifier
...
...
@@ -315,7 +313,8 @@ package body Ocarina.Backends.AADL_XML.Main is
(
Display_Name
(
Identifier
(
Corresponding_Instance
(
F
)))),
XTN
.
Subitems
(
Classifier_Node
));
Append_Node_To_List
(
Classifier_Node
,
XTN
.
Subitems
(
Feature_Node
));
(
Classifier_Node
,
XTN
.
Subitems
(
Feature_Node
));
end
;
Append_Node_To_List
(
Feature_Node
,
XTN
.
Subitems
(
Features_Node
));
...
...
@@ -328,7 +327,7 @@ package body Ocarina.Backends.AADL_XML.Main is
Subcomponents_Node
:=
Make_XML_Node
(
"subcomponents"
);
Append_Node_To_List
(
Subcomponents_Node
,
XTN
.
Subitems
(
N
));
Old_XML_Node
:=
Current_XML_Node
;
Old_XML_Node
:=
Current_XML_Node
;
Current_XML_Node
:=
Subcomponents_Node
;
Visit_Subcomponents_Of
(
E
);
Current_XML_Node
:=
Old_XML_Node
;
...
...
@@ -350,19 +349,19 @@ package body Ocarina.Backends.AADL_XML.Main is
Append_Node_To_List
(
Make_Assignement
(
Make_Defining_Identifier
(
Get_String_Name
(
"name"
)),
Make_Defining_Identifier
(
Display_Name
(
Identifier
(
F
)))),
Make_Defining_Identifier
(
Display_Name
(
Identifier
(
F
)))),
XTN
.
Items
(
Property_Node
));
Property_Value_Node
:=
Make_XML_Node
(
"property_value"
);
Append_Node_To_List
(
Property_Value_Node
,
XTN
.
Subitems
(
Property_Node
));
(
Property_Value_Node
,
XTN
.
Subitems
(
Property_Node
));
AADL_Property_Value
:=
Get_Value_Of_Property_Association
(
E
,
Name
(
Identifier
(
F
)));
AADL_Property_Value
:=
Get_Value_Of_Property_Association
(
E
,
Name
(
Identifier
(
F
)));
if
Present
(
AADL_Property_Value
)
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_S
IGNED
_AADLN
UMBER
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_S
igned
_AADLN
umber
and
then
Present
(
ATN
.
Unit_Identifier
(
AADL_Property_Value
))
then
-- This property value denotes a property with a unit
...
...
@@ -373,7 +372,8 @@ package body Ocarina.Backends.AADL_XML.Main is
begin
Unit_Node
:=
Make_XML_Node
(
"unit"
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
Append_Node_To_List
(
Make_Assignement
...
...
@@ -391,13 +391,12 @@ package body Ocarina.Backends.AADL_XML.Main is
(
Make_Defining_Identifier
(
Get_String_Name
(
"unit"
)),
Make_Defining_Identifier
(
ATN
.
Display_Name
(
ATN
.
Unit_Identifier
(
AADL_Property_Value
)))),
(
ATN
.
Unit_Identifier
(
AADL_Property_Value
)))),
XTN
.
Items
(
Unit_Node
));
end
;
elsif
Present
(
AADL_Property_Value
)
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_S
IGNED
_AADLN
UMBER
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_S
igned
_AADLN
umber
and
then
(
not
Present
(
ATN
.
Unit_Identifier
(
AADL_Property_Value
)))
then
...
...
@@ -408,7 +407,8 @@ package body Ocarina.Backends.AADL_XML.Main is
begin
Unit_Node
:=
Make_XML_Node
(
"value"
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
Append_Node_To_List
(
Make_Assignement
...
...
@@ -423,7 +423,7 @@ package body Ocarina.Backends.AADL_XML.Main is
end
;
elsif
Present
(
AADL_Property_Value
)
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_L
ITERAL
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_L
iteral
then
-- This property value denotes a literal
...
...
@@ -432,7 +432,8 @@ package body Ocarina.Backends.AADL_XML.Main is
begin
Unit_Node
:=
Make_XML_Node
(
"value"
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
Append_Node_To_List
(
Make_Assignement
...
...
@@ -446,7 +447,7 @@ package body Ocarina.Backends.AADL_XML.Main is
end
;
elsif
Present
(
AADL_Property_Value
)
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_R
EFERENCE_TERM
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_R
eference_Term
then
-- This property value denotes a reference term
...
...
@@ -455,7 +456,8 @@ package body Ocarina.Backends.AADL_XML.Main is
begin
Unit_Node
:=
Make_XML_Node
(
"reference"
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
Append_Node_To_List
(
Make_Assignement
...
...
@@ -470,7 +472,7 @@ package body Ocarina.Backends.AADL_XML.Main is
end
;
elsif
Present
(
AADL_Property_Value
)
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_E
NUMERATION_TERM
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_E
numeration_Term
then
-- This property value denotes an enumeration term
...
...
@@ -479,19 +481,20 @@ package body Ocarina.Backends.AADL_XML.Main is
begin
Unit_Node
:=
Make_XML_Node
(
"value"
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
Append_Node_To_List
(
Make_Assignement
(
Make_Defining_Identifier
(
Get_String_Name
(
"value"
)),
Make_Defining_Identifier
(
ATN
.
Display_Name
(
ATN
.
Identifier
(
AADL_Property_Value
)))),
(
ATN
.
Display_Name
(
ATN
.
Identifier
(
AADL_Property_Value
)))),
XTN
.
Items
(
Unit_Node
));
end
;
elsif
Present
(
AADL_Property_Value
)
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_N
UMBER_RANGE_TERM
and
then
ATN
.
Kind
(
AADL_Property_Value
)
=
ATN
.
K_N
umber_Range_Term
then
-- This property value denotes a number range term
...
...
@@ -500,7 +503,8 @@ package body Ocarina.Backends.AADL_XML.Main is
begin
Unit_Node
:=
Make_XML_Node
(
"range"
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
Append_Node_To_List
(
Make_Assignement
...
...
@@ -528,9 +532,9 @@ package body Ocarina.Backends.AADL_XML.Main is
(
AADL_Property_Value
))))))),
XTN
.
Items
(
Unit_Node
));
if
Present
(
ATN
.
Unit_Identifier
(
ATN
.
Lower_Bound
(
AADL_Property_Value
)))
if
Present
(
ATN
.
Unit_Identifier
(
ATN
.
Lower_Bound
(
AADL_Property_Value
)))
then
Append_Node_To_List
(
Make_Assignement
...
...
@@ -538,8 +542,7 @@ package body Ocarina.Backends.AADL_XML.Main is
Make_Defining_Identifier
(
ATN
.
Display_Name
(
ATN
.
Unit_Identifier
(
ATN
.
Lower_Bound
(
AADL_Property_Value
))))),
(
ATN
.
Lower_Bound
(
AADL_Property_Value
))))),
XTN
.
Items
(
Unit_Node
));
end
if
;
end
;
...
...
@@ -550,15 +553,17 @@ package body Ocarina.Backends.AADL_XML.Main is
declare
Unit_Node
:
Node_Id
;
begin
Unit_Node
:=
Make_XML_Node
(
ATN
.
Kind
(
AADL_Property_Value
)'
Img
);
Unit_Node
:=
Make_XML_Node
(
ATN
.
Kind
(
AADL_Property_Value
)'
Img
);
Append_Node_To_List
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
(
Unit_Node
,
XTN
.
Subitems
(
Property_Value_Node
));
end
;
end
if
;
Append_Node_To_List
(
Property_Node
,
XTN
.
Subitems
(
Properties_Node
));
(
Property_Node
,
XTN
.
Subitems
(
Properties_Node
));
F
:=
Next_Node
(
F
);
end
loop
;
end
if
;
...
...
src/backends/ocarina-backends-aadl_xml-mapping.adb
View file @
54df6737
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2011-201
2
ESA & ISAE. --
-- Copyright (C) 2011-201
4
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -58,9 +58,10 @@ package body Ocarina.Backends.AADL_XML.Mapping is
function
Map_HI_Node
(
E
:
Node_Id
)
return
Node_Id
is
N
:
constant
Node_Id
:=
New_Node
(
XTN
.
K_HI_Node
);
begin
pragma
Assert
(
AINU
.
Is_Process
(
E
)
or
else
AINU
.
Is_System
(
E
)
or
else
AINU
.
Is_Processor
(
E
));
pragma
Assert
(
AINU
.
Is_Process
(
E
)
or
else
AINU
.
Is_System
(
E
)
or
else
AINU
.
Is_Processor
(
E
));
if
AINU
.
Is_System
(
E
)
then
Set_Str_To_Name_Buffer
(
"general"
);
...
...
@@ -85,16 +86,16 @@ package body Ocarina.Backends.AADL_XML.Mapping is
-- Map_HI_Unit --
-----------------
function
Map_HI_Unit
(
E
:
Node_Id
)
return
Node_Id
is
U
:
Node_Id
;
N
:
Node_Id
;
P
:
Node_Id
;
Root
:
Node_Id
;
function
Map_HI_Unit
(
E
:
Node_Id
)
return
Node_Id
is
U
:
Node_Id
;
N
:
Node_Id
;
P
:
Node_Id
;
Root
:
Node_Id
;
begin
pragma
Assert
(
AINU
.
Is_System
(
E
)
or
else
AINU
.
Is_Process
(
E
)
or
else
AINU
.
Is_Processor
(
E
));
pragma
Assert
(
AINU
.
Is_System
(
E
)
or
else
AINU
.
Is_Process
(
E
)
or
else
AINU
.
Is_Processor
(
E
));
U
:=
New_Node
(
XTN
.
K_HI_Unit
,
Identifier
(
E
));
...
...
@@ -105,8 +106,7 @@ package body Ocarina.Backends.AADL_XML.Mapping is
else
Get_Name_String
(
To_XML_Name
(
Display_Name
(
Identifier
(
Parent_Subcomponent
(
E
)))));
(
To_XML_Name
(
Display_Name
(
Identifier
(
Parent_Subcomponent
(
E
)))));
end
if
;
Add_Str_To_Name_Buffer
(
"_aadl_xml"
);
...
...
src/backends/ocarina-backends-ada_tree-debug.adb
View file @
54df6737
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -31,10 +31,10 @@
-- --
------------------------------------------------------------------------------
with
Charset
;
use
Charset
;
with
Locations
;
use
Locations
;
with
Namet
;
use
Namet
;
with
Utils
;
use
Utils
;
with
Charset
;
use
Charset
;
with
Locations
;
use
Locations
;
with
Namet
;
use
Namet
;
with
Utils
;
use
Utils
;
with
Ocarina
.
Backends
.
Ada_Values
;
use
Ocarina
.
Backends
.
Ada_Values
;
with
Ocarina
.
Backends
.
Ada_Tree
.
Nutils
;
...
...
@@ -175,25 +175,21 @@ package body Ocarina.Backends.Ada_Tree.Debug is
is
C
:
Node_Id
;
begin
if
A
=
"Next_Node"
or
else
A
=
"Package_Declaration"
then
if
A
=
"Next_Node"
or
else
A
=
"Package_Declaration"
then
return
;
end
if
;
N_Indents
:=
N_Indents
+
1
;
W_Indents
;
Write_Str
(
A
);
Write_Str
(
A
);
Write_Char
(
' '
);
Write_Str
(
K
);
Write_Str
(
K
);
Write_Char
(
' '
);
C
:=
Node_Id
(
N
);
if
K
=
"Name_Id"
then
Write_Line
(
Quoted
(
V
));
elsif
K
=
"Node_Id"
and
then
Present
(
C
)
then
elsif
K
=
"Node_Id"
and
then
Present
(
C
)
then
case
Kind
(
C
)
is
when
K_Boolean
..
K_String
=>
Write_Line
(
'('
&
Image
(
Kind
(
Node_Id
(
N
)))
&
')'
);
...
...
@@ -228,9 +224,9 @@ package body Ocarina.Backends.Ada_Tree.Debug is
procedure
W_Node_Header
(
N
:
Node_Id
)
is
begin
W_Indents
;
Write_Int
(
Int
(
N
));
Write_Int
(
Int
(
N
));
Write_Char
(
' '
);
Write_Str
(
Image
(
Kind
(
N
)));
Write_Str
(
Image
(
Kind
(
N
)));
Write_Char
(
' '
);
Write_Line
(
Image
(
Loc
(
N
)));
end
W_Node_Header
;
...
...
src/backends/ocarina-backends-ada_tree-debug.ads
View file @
54df6737
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -39,16 +39,16 @@ package Ocarina.Backends.Ada_Tree.Debug is
N_Indents
:
Natural
:=
0
;
procedure
W_Eol
(
N
:
Natural
:=
1
)
renames
Output
.
Write_Eol
;
procedure
W_Int
(
N
:
Int
)
renames
Output
.
Write_Int
;
procedure
W_Line
(
N
:
String
)
renames
Output
.
Write_Line
;
procedure
W_Str
(
N
:
String
)
renames
Output
.
Write_Str
;
procedure
W_Eol
(
N
:
Natural
:=
1
)
renames
Output
.
Write_Eol
;
procedure
W_Int
(
N
:
Int
)
renames
Output
.
Write_Int
;
procedure
W_Line
(
N
:
String
)
renames
Output
.
Write_Line
;
procedure
W_Str
(
N
:
String
)
renames
Output
.
Write_Str
;
procedure
W_Indents
;
procedure
W_Boolean
(
N
:
Boolean
);
procedure
W_Byte
(
N
:
Byte
);
procedure
W_List_Id
(
L
:
List_Id
);
procedure
W_Node_Id
(
N
:
Node_Id
);
procedure
W_Boolean
(
N
:
Boolean
);
procedure
W_Byte
(
N
:
Byte
);
procedure
W_List_Id
(
L
:
List_Id
);
procedure
W_Node_Id
(
N
:
Node_Id
);
procedure
W_Node_Header
(
N
:
Node_Id
);
procedure
W_Node_Attribute
...
...
src/backends/ocarina-backends-ada_tree-generator-spark.adb
View file @
54df6737
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
2
ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -31,8 +31,8 @@
--