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
6f17e64b
Commit
6f17e64b
authored
Apr 07, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse Connections (incomplete), separate prefix
parent
28fb01a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
13 deletions
+28
-13
ada/buildsupport.adb
ada/buildsupport.adb
+2
-1
ada/buildsupport_utils.adb
ada/buildsupport_utils.adb
+25
-12
ada/buildsupport_utils.ads
ada/buildsupport_utils.ads
+1
-0
No files found.
ada/buildsupport.adb
View file @
6f17e64b
...
...
@@ -1484,7 +1484,8 @@ begin
IV_Root
:=
Root_System
(
Instantiate_Model
(
Root
=>
Interface_Root
));
AST
:=
AADL_to_Ada_IV
(
IV_Root
);
for
each
of
AST
.
Flat_Functions
loop
Put_Line
(
"From New AST: "
&
To_String
(
Each
.
Name
));
Put_Line
(
"AST: "
&
To_String
(
Each
.
Prefix
.
Value_Or
(
US
(
""
)))
&
" "
&
To_String
(
Each
.
Name
));
end
loop
;
Process_Interface_View
(
IV_Root
);
...
...
ada/buildsupport_utils.adb
View file @
6f17e64b
...
...
@@ -420,12 +420,13 @@ package body Buildsupport_Utils is
RI_Name
:
constant
Name_Id
:=
Get_Interface_Name
(
Get_Referenced_Entity
(
AIN
.
Destination
(
Conn
)));
begin
Put_Line
(
"Caller function (has RI) : "
&
AIN_Case
(
Caller
));
Put_Line
(
"Callee (has PI) : "
&
AIN_Case
(
Callee
));
Put_Line
(
"PI Name: "
&
Get_Name_String
(
PI_Name
));
Put_Line
(
"RI Name: "
&
Get_Name_String
(
RI_Name
));
return
Connection
'(
Caller
=>
US
(
AIN_Case
(
Caller
)),
Callee
=>
US
(
AIN_Case
(
Callee
)),
-- Put_Line (AIN.Node_Kind'Image (Kind (Caller)));
return
Connection
'(
Caller
=>
(
if
Kind
(
Caller
)
=
K_Subcomponent_Access_Instance
then
US
(
"_env"
)
else
US
(
AIN_Case
(
Caller
))),
Callee
=>
(
if
Kind
(
Callee
)
=
K_Subcomponent_Access_Instance
then
US
(
"_env"
)
else
US
(
AIN_Case
(
Callee
))),
PI_Name
=>
US
(
Get_Name_String
(
PI_Name
)),
RI_Name
=>
US
(
Get_Name_String
(
RI_Name
)));
end
Parse_Connection
;
...
...
@@ -540,8 +541,9 @@ package body Buildsupport_Utils is
-- * User Properties (from TASTE_IV_Properties.aadl)
-- * Timers
-- * Provided and Required Interfaces
function
Parse_Function
(
Name
:
String
;
Inst
:
Node_Id
)
return
Taste_Terminal_Function
function
Parse_Function
(
Prefix
:
String
;
Name
:
String
;
Inst
:
Node_Id
)
return
Taste_Terminal_Function
is
Result
:
Taste_Terminal_Function
;
-- To get the optional zip filename where user code is stored:
...
...
@@ -553,6 +555,8 @@ package body Buildsupport_Utils is
PI_Or_RI
:
Node_Id
;
begin
Result
.
Name
:=
US
(
Name
);
Result
.
Prefix
:=
(
if
Prefix
'
Length
>
0
then
Just
(
US
(
Prefix
))
else
Nothing
);
Result
.
Language
:=
Get_Source_Language
(
Inst
);
if
Source_Text
'
Length
/=
0
then
Zip_Id
:=
Source_Text
(
1
);
...
...
@@ -596,8 +600,9 @@ package body Buildsupport_Utils is
Inner
:
Node_Id
;
Res
:
Functions
.
Vector
:=
Functions
.
Empty_Vector
;
CI
:
constant
Node_Id
:=
Corresponding_Instance
(
Func
);
Name
:
constant
String
:=
Prefix
&
(
if
Prefix
'
Length
>
0
then
"_"
else
""
)
&
AIN_Case
(
Func
);
Name
:
constant
String
:=
AIN_Case
(
Func
);
Next_Prefix
:
constant
String
:=
Prefix
&
(
if
Prefix
'
Length
>
0
then
"_"
else
""
)
&
Name
;
begin
case
Get_Category_Of_Component
(
CI
)
is
...
...
@@ -605,7 +610,8 @@ package body Buildsupport_Utils is
if
Present
(
AIN
.
Subcomponents
(
CI
))
then
Inner
:=
AIN
.
First_Node
(
AIN
.
Subcomponents
(
CI
));
while
Present
(
Inner
)
loop
Res
:=
Res
&
Rec_Function
(
Prefix
=>
Name
,
Func
=>
Inner
);
Res
:=
Res
&
Rec_Function
(
Prefix
=>
Next_Prefix
,
Func
=>
Inner
);
Inner
:=
AIN
.
Next_Node
(
Inner
);
end
loop
;
end
if
;
...
...
@@ -614,7 +620,9 @@ package body Buildsupport_Utils is
if
No
(
AIN
.
Subcomponents
(
CI
))
or
Res
=
Functions
.
Empty_Vector
then
Res
:=
Res
&
Parse_Function
(
Name
=>
Name
,
Inst
=>
CI
);
Res
:=
Res
&
Parse_Function
(
Prefix
=>
Prefix
,
Name
=>
Name
,
Inst
=>
CI
);
end
if
;
when
others
=>
null
;
...
...
@@ -633,6 +641,11 @@ package body Buildsupport_Utils is
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
));
end
loop
;
return
IV_AST
:
constant
Complete_Interface_View
:=
(
Flat_Functions
=>
Funcs
,
...
...
ada/buildsupport_utils.ads
View file @
6f17e64b
...
...
@@ -153,6 +153,7 @@ package Buildsupport_Utils is
type
Taste_Terminal_Function
is
record
Name
:
Unbounded_String
;
Prefix
:
Optional_Unbounded_String
:=
Nothing
;
Language
:
Supported_Source_Language
;
Zip_File
:
Optional_Unbounded_String
:=
Nothing
;
Context_Params
:
Ctxt_Params
.
Vector
;
...
...
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