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
B
buildsupport
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
buildsupport
Commits
0dd820b1
Commit
0dd820b1
authored
Apr 07, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Groupe routes in a map
parent
6f17e64b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
ada/buildsupport_utils.adb
ada/buildsupport_utils.adb
+20
-9
ada/buildsupport_utils.ads
ada/buildsupport_utils.ads
+6
-2
No files found.
ada/buildsupport_utils.adb
View file @
0dd820b1
...
...
@@ -247,7 +247,7 @@ package body Buildsupport_Utils is
--------------------------------------------
function
Get_Properties_Map
(
D
:
Node_Id
)
return
Property_Maps
.
Map
is
properties
:
constant
List_Id
:=
AIN
.
Properties
(
D
);
result
:
Property_Maps
.
Map
:=
Empty_Map
;
result
:
Property_Maps
.
Map
:=
Property_Maps
.
Empty_Map
;
property
:
Node_Id
:=
AIN
.
First_Node
(
properties
);
prop_value
:
Node_Id
;
single_val
:
Node_Id
;
...
...
@@ -405,8 +405,10 @@ package body Buildsupport_Utils is
use
type
Ctxt_Params
.
Vector
;
use
type
Interfaces
.
Vector
;
use
type
Parameters
.
Vector
;
use
type
Connection_Maps
.
Map
;
Funcs
:
Functions
.
Vector
:=
Functions
.
Empty_Vector
;
Routes
:
Channels
.
Vector
;
-- := Channels.Empty_Vector;
Routes_Map
:
Connection_Maps
.
Map
;
Current_Function
:
Node_Id
;
-- Parse a connection
...
...
@@ -616,7 +618,9 @@ package body Buildsupport_Utils is
end
loop
;
end
if
;
Routes
:=
Routes
&
Parse_System_Connections
(
CI
);
-- Routes := Routes & Parse_System_Connections (CI);
Routes_Map
.
Insert
(
Key
=>
Name
,
New_Item
=>
Parse_System_Connections
(
CI
));
if
No
(
AIN
.
Subcomponents
(
CI
))
or
Res
=
Functions
.
Empty_Vector
then
...
...
@@ -640,16 +644,23 @@ package body Buildsupport_Utils is
Current_Function
:=
AIN
.
Next_Node
(
Current_Function
);
end
loop
;
Routes
:=
Routes
&
Parse_System_Connections
(
System
);
for
Each
of
Routes
loop
Put_Line
(
To_String
(
Each
.
Caller
)
&
"."
&
To_String
(
Each
.
RI_Name
)
&
" -> "
&
To_String
(
Each
.
Callee
)
&
"."
&
To_String
(
Each
.
PI_Name
));
-- Routes := Routes & Parse_System_Connections (System);
Routes_Map
.
Insert
(
Key
=>
"_Root"
,
New_Item
=>
Parse_System_Connections
(
System
));
for
C
in
Routes_Map
.
Iterate
loop
Put_Line
(
"Routes of Function "
&
Connection_Maps
.
Key
(
C
));
for
Each
of
Connection_Maps
.
Element
(
C
)
loop
Put_Line
(
" "
&
To_String
(
Each
.
Caller
)
&
"."
&
To_String
(
Each
.
RI_Name
)
&
" -> "
&
To_String
(
Each
.
Callee
)
&
"."
&
To_String
(
Each
.
PI_Name
));
end
loop
;
end
loop
;
return
IV_AST
:
constant
Complete_Interface_View
:=
(
Flat_Functions
=>
Funcs
,
Connections
=>
Routes
);
(
Flat_Functions
=>
Funcs
,
End_To_End_Conn
=>
Routes
,
Nested_Conn
=>
Routes_Map
);
end
AADL_to_Ada_IV
;
end
Buildsupport_Utils
;
ada/buildsupport_utils.ads
View file @
0dd820b1
...
...
@@ -175,11 +175,15 @@ package Buildsupport_Utils is
end
record
;
package
Channels
is
new
Indefinite_Vectors
(
Natural
,
Connection
);
package
Connection_Maps
is
new
Indefinite_Ordered_Maps
(
String
,
Channels
.
Vector
,
"="
=>
Channels
.
"="
);
type
Complete_Interface_View
is
record
Flat_Functions
:
Functions
.
Vector
;
Connections
:
Channels
.
Vector
;
Flat_Functions
:
Functions
.
Vector
;
End_To_End_Conn
:
Channels
.
Vector
;
Nested_Conn
:
Connection_Maps
.
Map
;
end
record
;
-- Function to build up the Ada AST by transforming the one from Ocarina
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment