Commit 36913d2e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Minor refactoring

parent cea7d069
...@@ -247,9 +247,7 @@ procedure BuildSupport is ...@@ -247,9 +247,7 @@ procedure BuildSupport is
"Error: Missing value for context parameter " & "Error: Missing value for context parameter " &
Get_Name_String Get_Name_String
(Name (Identifier (FV_Subco))) & (Name (Identifier (FV_Subco))) &
" in function " & " in function " & AIN_Case (Current_Function));
Get_Name_String
(Name (Identifier (Current_Function))));
declare declare
-- Name of the variable -- Name of the variable
FS_name : constant String := FS_name : constant String :=
...@@ -1478,6 +1476,8 @@ procedure BuildSupport is ...@@ -1478,6 +1476,8 @@ procedure BuildSupport is
end Initialize; end Initialize;
IV_Root : Node_Id;
begin begin
Banner; Banner;
...@@ -1492,10 +1492,16 @@ begin ...@@ -1492,10 +1492,16 @@ begin
Ocarina.Options.Root_System_Name := Ocarina.Options.Root_System_Name :=
Get_String_Name ("interfaceview.others"); Get_String_Name ("interfaceview.others");
-- Process_DataView (Dataview_root); IV_Root := Root_System (Instantiate_Model (Root => Interface_Root));
declare
AST : Complete_Interface_View := AADL_to_Ada_IV (IV_Root);
pragma Unreferenced (AST);
begin
null;
end;
Process_Interface_View Process_Interface_View (IV_Root);
(Root_System (Instantiate_Model (Root => Interface_Root))); -- (Root_System (Instantiate_Model (Root => Interface_Root)));
-- Now, we are done with the interface view. We now analyze the -- Now, we are done with the interface view. We now analyze the
-- deployment view. -- deployment view.
......
...@@ -383,10 +383,21 @@ package body Buildsupport_Utils is ...@@ -383,10 +383,21 @@ package body Buildsupport_Utils is
end Get_ASN1_Basic_Type; end Get_ASN1_Basic_Type;
function AADL_to_Ada_IV (System : Node_Id) return Complete_Interface_View is function AADL_to_Ada_IV (System : Node_Id) return Complete_Interface_View is
pragma Unreferenced (System); Funcs : Functions.Vector;
Funcs : Functions.Vector; Routes : Channels.Vector;
Routes : Channels.Vector; Current_Function : Node_Id;
CI : Node_Id;
pragma Unreferenced (CI);
begin begin
Exit_On_Error (No (System), "Missing or erroneous interface view");
Current_Function := AIN.First_Node (AIN.Subcomponents (System));
while Present (Current_Function) loop
CI := Corresponding_Instance (Current_Function);
Put_Line ("Function " & AIN_Case (Current_Function));
Current_Function := AIN.Next_Node (Current_Function);
end loop;
return IV_AST : constant Complete_Interface_View := return IV_AST : constant Complete_Interface_View :=
(Flat_Functions => Funcs, (Flat_Functions => Funcs,
Connections => Routes); Connections => Routes);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment