Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Ocarina
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
14e2d66a
Commit
14e2d66a
authored
Sep 09, 2017
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Factor out visit of subcomponents
For openaadl/ocarina#111
parent
b359958f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
250 deletions
+50
-250
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-activity.adb
...ackends/po_hi_ada/ocarina-backends-po_hi_ada-activity.adb
+11
-30
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-deployment.adb
...kends/po_hi_ada/ocarina-backends-po_hi_ada-deployment.adb
+4
-14
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-main.adb
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-main.adb
+5
-25
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-marshallers.adb
...ends/po_hi_ada/ocarina-backends-po_hi_ada-marshallers.adb
+7
-46
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-naming.adb
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-naming.adb
+3
-12
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-subprograms.adb
...ends/po_hi_ada/ocarina-backends-po_hi_ada-subprograms.adb
+7
-43
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-transport.adb
...ckends/po_hi_ada/ocarina-backends-po_hi_ada-transport.adb
+6
-35
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-types.adb
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-types.adb
+7
-45
No files found.
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-activity.adb
View file @
14e2d66a
...
@@ -389,6 +389,7 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
...
@@ -389,6 +389,7 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
procedure
Visit_Process_Instance
(
E
:
Node_Id
);
procedure
Visit_Process_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
procedure
Cyclic_Task_Instantiation_Formals
procedure
Cyclic_Task_Instantiation_Formals
(
E
:
Node_Id
;
(
E
:
Node_Id
;
...
@@ -1188,22 +1189,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
...
@@ -1188,22 +1189,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
---------------------------
---------------------------
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
-- Visit all the subcomponents of the system
-- Visit all the subcomponents of the system
if
not
AINU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
@@ -1532,6 +1523,7 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
...
@@ -1532,6 +1523,7 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
procedure
Visit_Process_Instance
(
E
:
Node_Id
);
procedure
Visit_Process_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
function
Task_Job_Body
(
E
:
Node_Id
)
return
Node_Id
;
function
Task_Job_Body
(
E
:
Node_Id
)
return
Node_Id
;
-- Creates the parameterless subprogram body that does the
-- Creates the parameterless subprogram body that does the
...
@@ -4306,16 +4298,15 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
...
@@ -4306,16 +4298,15 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
procedure
Visit_Device_Instance
(
E
:
Node_Id
)
is
procedure
Visit_Device_Instance
(
E
:
Node_Id
)
is
Implementation
:
constant
Node_Id
:=
Get_Implementation
(
E
);
Implementation
:
constant
Node_Id
:=
Get_Implementation
(
E
);
S
:
Node_Id
;
begin
begin
if
Implementation
/=
No_Node
then
if
Implementation
/=
No_Node
then
if
not
AAU
.
Is_Empty
(
AAN
.
Subcomponents
(
Implementation
))
then
S
:=
First_Node
(
Subcomponents
(
Implementation
));
-- A device may be "implemented" using an abstract
while
Present
(
S
)
loop
-- component, representing its driver. We iterate on its
Visit_Component_Instance
(
Corresponding_Instance
(
S
));
-- subcomponents to attach specific threads associated.
S
:=
Next_Node
(
S
);
end
loop
;
Visit_Subcomponents_Of
(
Implementation
);
end
if
;
end
if
;
end
if
;
end
Visit_Device_Instance
;
end
Visit_Device_Instance
;
...
@@ -4478,22 +4469,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
...
@@ -4478,22 +4469,12 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
---------------------------
---------------------------
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
-- Visit all the subcomponents of the system
-- Visit all the subcomponents of the system
if
not
AINU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
...
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-deployment.adb
View file @
14e2d66a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- --
-- --
-- B o d y --
-- B o d y --
-- --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- terms of the GNU General Public License as published by the Free Soft- --
...
@@ -68,6 +68,7 @@ package body Ocarina.Backends.PO_HI_Ada.Deployment is
...
@@ -68,6 +68,7 @@ package body Ocarina.Backends.PO_HI_Ada.Deployment is
------------------
------------------
package
body
Package_Spec
is
package
body
Package_Spec
is
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
procedure
Visit_Architecture_Instance
(
E
:
Node_Id
);
procedure
Visit_Architecture_Instance
(
E
:
Node_Id
);
procedure
Visit_Component_Instance
(
E
:
Node_Id
);
procedure
Visit_Component_Instance
(
E
:
Node_Id
);
...
@@ -1410,22 +1411,11 @@ package body Ocarina.Backends.PO_HI_Ada.Deployment is
...
@@ -1410,22 +1411,11 @@ package body Ocarina.Backends.PO_HI_Ada.Deployment is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
A
:
constant
Node_Id
:=
Map_Distributed_Application
(
E
);
A
:
constant
Node_Id
:=
Map_Distributed_Application
(
E
);
S
:
Node_Id
;
begin
begin
Push_Entity
(
A
);
Push_Entity
(
A
);
-- Visit all the subcomponents of the system
Visit_Subcomponents_Of
(
E
);
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- A
Pop_Entity
;
-- A
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
...
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-main.adb
View file @
14e2d66a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- --
-- --
-- B o d y --
-- B o d y --
-- --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- terms of the GNU General Public License as published by the Free Soft- --
...
@@ -72,6 +72,8 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
...
@@ -72,6 +72,8 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
Has_Hybrid_Threads
:
Boolean
:=
False
;
Has_Hybrid_Threads
:
Boolean
:=
False
;
-----------
-----------
...
@@ -203,7 +205,6 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
...
@@ -203,7 +205,6 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
(
ADN
.
Deployment_Node
(
Backend_Node
(
Identifier
(
E
))));
(
ADN
.
Deployment_Node
(
Backend_Node
(
Identifier
(
E
))));
P
:
constant
Node_Id
:=
ADN
.
Entity
(
U
);
P
:
constant
Node_Id
:=
ADN
.
Entity
(
U
);
N
:
Node_Id
;
N
:
Node_Id
;
S
:
Node_Id
;
Transport_API
:
constant
Supported_Transport_APIs
:=
Transport_API
:
constant
Supported_Transport_APIs
:=
Fetch_Transport_API
(
E
);
Fetch_Transport_API
(
E
);
The_System
:
constant
Node_Id
:=
The_System
:
constant
Node_Id
:=
...
@@ -232,16 +233,7 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
...
@@ -232,16 +233,7 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
-- Visit all the subcomponents of the process
-- Visit all the subcomponents of the process
if
not
AINU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
if
Has_Hybrid_Threads
then
if
Has_Hybrid_Threads
then
-- Unblock the hybrid task driver
-- Unblock the hybrid task driver
...
@@ -321,22 +313,10 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
...
@@ -321,22 +313,10 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
---------------------------
---------------------------
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
-- Visit all the subcomponents of the system
Visit_Subcomponents_Of
(
E
);
if
not
AINU
.
Is_Empty
(
Subcomponents
(
E
))
then
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
...
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-marshallers.adb
View file @
14e2d66a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- --
-- --
-- B o d y --
-- B o d y --
-- --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- terms of the GNU General Public License as published by the Free Soft- --
...
@@ -107,6 +107,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -107,6 +107,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
function
Marshall_Spec
(
E
:
Node_Id
)
return
Node_Id
;
function
Marshall_Spec
(
E
:
Node_Id
)
return
Node_Id
;
-- Creates a spec for a Marshall procedure for a data type
-- Creates a spec for a Marshall procedure for a data type
...
@@ -324,7 +325,6 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -324,7 +325,6 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
ADN
.
Distributed_Application_Unit
ADN
.
Distributed_Application_Unit
(
ADN
.
Deployment_Node
(
Backend_Node
(
Identifier
(
E
))));
(
ADN
.
Deployment_Node
(
Backend_Node
(
Identifier
(
E
))));
P
:
constant
Node_Id
:=
ADN
.
Entity
(
U
);
P
:
constant
Node_Id
:=
ADN
.
Entity
(
U
);
S
:
Node_Id
;
begin
begin
Push_Entity
(
P
);
Push_Entity
(
P
);
Push_Entity
(
U
);
Push_Entity
(
U
);
...
@@ -337,16 +337,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -337,16 +337,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
-- Visit all the subcomponents of the process
-- Visit all the subcomponents of the process
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
-- Unmark all the marked types
-- Unmark all the marked types
...
@@ -390,22 +381,12 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -390,22 +381,12 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
---------------------------
---------------------------
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
-- Visit all the subcomponents of the system
-- Visit all the subcomponents of the system
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
@@ -502,6 +483,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -502,6 +483,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Thread_Instance
(
E
:
Node_Id
);
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
function
Marshall_Implementation
(
E
:
Node_Id
)
return
Node_Id
;
function
Marshall_Implementation
(
E
:
Node_Id
)
return
Node_Id
;
-- Creates an implementation for a Marshall procedure
-- Creates an implementation for a Marshall procedure
...
@@ -1005,7 +987,6 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -1005,7 +987,6 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
ADN
.
Distributed_Application_Unit
ADN
.
Distributed_Application_Unit
(
ADN
.
Deployment_Node
(
Backend_Node
(
Identifier
(
E
))));
(
ADN
.
Deployment_Node
(
Backend_Node
(
Identifier
(
E
))));
P
:
constant
Node_Id
:=
ADN
.
Entity
(
U
);
P
:
constant
Node_Id
:=
ADN
.
Entity
(
U
);
S
:
Node_Id
;
begin
begin
Push_Entity
(
P
);
Push_Entity
(
P
);
Push_Entity
(
U
);
Push_Entity
(
U
);
...
@@ -1018,16 +999,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -1018,16 +999,7 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
-- Visit all the subcomponents of the process
-- Visit all the subcomponents of the process
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
-- Unmark all the marked types
-- Unmark all the marked types
...
@@ -1071,23 +1043,12 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
...
@@ -1071,23 +1043,12 @@ package body Ocarina.Backends.PO_HI_Ada.Marshallers is
---------------------------
---------------------------
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
-- Visit all the subcomponents of the system
-- Visit all the subcomponents of the system
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
...
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-naming.adb
View file @
14e2d66a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- --
-- --
-- B o d y --
-- B o d y --
-- --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- terms of the GNU General Public License as published by the Free Soft- --
...
@@ -77,6 +77,7 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
...
@@ -77,6 +77,7 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
procedure
Visit_Component_Instance
(
E
:
Node_Id
);
procedure
Visit_Component_Instance
(
E
:
Node_Id
);
procedure
Visit_System_Instance
(
E
:
Node_Id
);
procedure
Visit_System_Instance
(
E
:
Node_Id
);
procedure
Visit_Process_Instance
(
E
:
Node_Id
);
procedure
Visit_Process_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
function
Added_Internal_Name
function
Added_Internal_Name
(
P
:
Node_Id
;
(
P
:
Node_Id
;
...
@@ -573,7 +574,6 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
...
@@ -573,7 +574,6 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
C
:
Node_Id
;
C
:
Node_Id
;
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
...
@@ -591,16 +591,7 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
...
@@ -591,16 +591,7 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
-- Visit all the subcomponents of the system
-- Visit all the subcomponents of the system
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
...
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-subprograms.adb
View file @
14e2d66a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- --
-- --
-- B o d y --
-- B o d y --
-- --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- terms of the GNU General Public License as published by the Free Soft- --
...
@@ -72,6 +72,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
...
@@ -72,6 +72,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
function
Put_Value_Spec
(
E
:
Node_Id
)
return
Node_Id
;
function
Put_Value_Spec
(
E
:
Node_Id
)
return
Node_Id
;
function
Get_Value_Spec
(
E
:
Node_Id
)
return
Node_Id
;
function
Get_Value_Spec
(
E
:
Node_Id
)
return
Node_Id
;
...
@@ -336,16 +337,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
...
@@ -336,16 +337,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
-- Visit all the subcomponents of the process
-- Visit all the subcomponents of the process
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
-- Visit all devices attached to the parent system that
-- Visit all devices attached to the parent system that
-- share the same processor as process E.
-- share the same processor as process E.
...
@@ -517,22 +509,12 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
...
@@ -517,22 +509,12 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
---------------------------
---------------------------
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
procedure
Visit_System_Instance
(
E
:
Node_Id
)
is
S
:
Node_Id
;
begin
begin
Push_Entity
(
Ada_Root
);
Push_Entity
(
Ada_Root
);
-- Visit all the subcomponents of the system
-- Visit all the subcomponents of the system
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
Pop_Entity
;
-- Ada_Root
Pop_Entity
;
-- Ada_Root
end
Visit_System_Instance
;
end
Visit_System_Instance
;
...
@@ -585,6 +567,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
...
@@ -585,6 +567,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Subprogram_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Data_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Device_Instance
(
E
:
Node_Id
);
procedure
Visit_Subcomponents_Of
is
new
Visit_Subcomponents_Of_G
(
Visit
);
function
Put_Value_Body
(
E
:
Node_Id
)
return
Node_Id
;
function
Put_Value_Body
(
E
:
Node_Id
)
return
Node_Id
;
function
Get_Value_Body
(
E
:
Node_Id
)
return
Node_Id
;
function
Get_Value_Body
(
E
:
Node_Id
)
return
Node_Id
;
...
@@ -951,16 +934,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
...
@@ -951,16 +934,7 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
-- Visit all the subcomponents of the process
-- Visit all the subcomponents of the process
if
not
AAU
.
Is_Empty
(
Subcomponents
(
E
))
then
Visit_Subcomponents_Of
(
E
);
S
:=
First_Node
(
Subcomponents
(
E
));
while
Present
(
S
)
loop
-- Visit the component instance corresponding to the
-- subcomponent S.
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
-- Visit all devices attached to the parent system that
-- Visit all devices attached to the parent system that
-- share the same processor as process E.
-- share the same processor as process E.
...
@@ -1053,22 +1027,12 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is
...
@@ -1053,22 +1027,12 @@ package body Ocarina.Backends.PO_HI_Ada.Subprograms is