Commit 88fec13b authored by hugues.jerome's avatar hugues.jerome
Browse files

* Add new keyword: "Root_System_Set", returns the root system

	 of the AADL instance



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2335 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 8978677f
...@@ -76,6 +76,8 @@ package body Ocarina.Backends.REAL is ...@@ -76,6 +76,8 @@ package body Ocarina.Backends.REAL is
Current_Range_Variable : Node_Id; Current_Range_Variable : Node_Id;
Root_System : Node_Id;
-- Buffer for runtime instance -- Buffer for runtime instance
type Runtime_Instance is record type Runtime_Instance is record
...@@ -2931,6 +2933,15 @@ package body Ocarina.Backends.REAL is ...@@ -2931,6 +2933,15 @@ package body Ocarina.Backends.REAL is
when SV_End_To_End_Flows_Set => when SV_End_To_End_Flows_Set =>
return Get_Instances_Of_End_To_End_Flows; return Get_Instances_Of_End_To_End_Flows;
when SV_Root_System_Set =>
declare
Result : Result_Set;
begin
Result := Empty_Set;
Add (Result, AIN.Root_System (Root_System), Distinct => False);
return Result;
end;
when SV_Local_Set => when SV_Local_Set =>
-- Local set is either the AADL component where the theorem -- Local set is either the AADL component where the theorem
-- has been declared or the parameter-passed domain -- has been declared or the parameter-passed domain
...@@ -2979,13 +2990,13 @@ package body Ocarina.Backends.REAL is ...@@ -2979,13 +2990,13 @@ package body Ocarina.Backends.REAL is
-------------- --------------
procedure Generate (AADL_Root : Node_Id) is procedure Generate (AADL_Root : Node_Id) is
pragma Unreferenced (AADL_Root);
use RNU.Node_List; use RNU.Node_List;
It : Natural := First; It : Natural := First;
Node : Node_Id; Node : Node_Id;
begin begin
Root_System := AADL_Root;
-- Runtime -- Runtime
while It <= Last (To_Run_Theorem_List) loop while It <= Last (To_Run_Theorem_List) loop
......
...@@ -214,7 +214,6 @@ package body Ocarina.Instances.Finder is ...@@ -214,7 +214,6 @@ package body Ocarina.Instances.Finder is
N : Node_Id; N : Node_Id;
begin begin
case AIN.Kind (Instance_Root) is case AIN.Kind (Instance_Root) is
when AIN.K_Architecture_Instance => when AIN.K_Architecture_Instance =>
R := AIN.Root_System (Instance_Root); R := AIN.Root_System (Instance_Root);
Select_Single_Node Select_Single_Node
......
...@@ -45,12 +45,14 @@ with Namet; use Namet; ...@@ -45,12 +45,14 @@ with Namet; use Namet;
with Output; use Output; with Output; use Output;
package body Ocarina.Instances.REAL_Checker.Queries is package body Ocarina.Instances.REAL_Checker.Queries is
use Ocarina.ME_AADL.AADL_Instances.Debug;
use Ocarina.ME_AADL.AADL_Instances.Nutils;
use Ocarina.ME_AADL.AADL_Instances.Entities; use Ocarina.ME_AADL.AADL_Instances.Entities;
use Ocarina.ME_AADL.AADL_Instances.Entities.Properties; use Ocarina.ME_AADL.AADL_Instances.Entities.Properties;
use Ocarina.Instances.Queries; use Ocarina.Instances.Queries;
use Ocarina.Instances.Finder; use Ocarina.Instances.Finder;
use Ocarina.ME_AADL.AADL_Instances.Nutils;
use Ocarina.ME_AADL.AADL_Instances.Debug;
use Set; use Set;
package ATN renames Ocarina.ME_AADL.AADL_Tree.Nodes; package ATN renames Ocarina.ME_AADL.AADL_Tree.Nodes;
...@@ -203,10 +205,12 @@ package body Ocarina.Instances.REAL_Checker.Queries is ...@@ -203,10 +205,12 @@ package body Ocarina.Instances.REAL_Checker.Queries is
end case; end case;
while Present (EL.First) loop while Present (EL.First) loop
if Is_Component (EL.First, Component_T) and then if Is_Component (EL.First, Component_T)
(Component_T /= C_Subprogram or else and then (Component_T /= C_Subprogram
or else
not Find_Subprogram_Declaration not Find_Subprogram_Declaration
(Corresponding_Declaration (EL.First), Results)) then (Corresponding_Declaration (EL.First), Results))
then
Add (Results, EL.First, Distinct => True); Add (Results, EL.First, Distinct => True);
end if; end if;
EL.First := AIN.Next_Entity (EL.First); EL.First := AIN.Next_Entity (EL.First);
......
...@@ -180,6 +180,8 @@ package body Ocarina.ME_REAL.REAL_Tree.Utils is ...@@ -180,6 +180,8 @@ package body Ocarina.ME_REAL.REAL_Tree.Utils is
return SV_System_Set; return SV_System_Set;
when T_Abstract_Set => when T_Abstract_Set =>
return SV_Abstract_Set; return SV_Abstract_Set;
when T_Root_System_Set =>
return SV_Root_System_Set;
when T_End_To_End_Flows_Set => when T_End_To_End_Flows_Set =>
return SV_End_To_End_Flows_Set; return SV_End_To_End_Flows_Set;
when T_Local_Set => when T_Local_Set =>
...@@ -232,6 +234,8 @@ package body Ocarina.ME_REAL.REAL_Tree.Utils is ...@@ -232,6 +234,8 @@ package body Ocarina.ME_REAL.REAL_Tree.Utils is
return T_System_Set; return T_System_Set;
when SV_Abstract_Set => when SV_Abstract_Set =>
return T_Abstract_Set; return T_Abstract_Set;
when SV_Root_System_Set =>
return T_Root_System_Set;
when SV_End_To_End_Flows_Set => when SV_End_To_End_Flows_Set =>
return T_End_To_End_Flows_Set; return T_End_To_End_Flows_Set;
when SV_Local_Set => when SV_Local_Set =>
......
...@@ -85,6 +85,7 @@ package Ocarina.ME_REAL.REAL_Tree.Utils is ...@@ -85,6 +85,7 @@ package Ocarina.ME_REAL.REAL_Tree.Utils is
SV_End_To_End_Flows_Set : constant := 33; SV_End_To_End_Flows_Set : constant := 33;
SV_Local_Set : constant := 34; SV_Local_Set : constant := 34;
SV_Abstract_Set : constant := 35; SV_Abstract_Set : constant := 35;
SV_Root_System_Set : constant := 36;
-- Selection functions codes -- Selection functions codes
......
...@@ -131,6 +131,7 @@ package body Ocarina.ME_REAL.Tokens is ...@@ -131,6 +131,7 @@ package body Ocarina.ME_REAL.Tokens is
New_Token (T_Device_Set, "Device_Set"); New_Token (T_Device_Set, "Device_Set");
New_Token (T_System_Set, "System_Set"); New_Token (T_System_Set, "System_Set");
New_Token (T_Abstract_Set, "Abstract_Set"); New_Token (T_Abstract_Set, "Abstract_Set");
New_Token (T_Root_System_Set, "Root_System_Set");
New_Token (T_Unknown_Set, "Unknown_Set"); New_Token (T_Unknown_Set, "Unknown_Set");
New_Token (T_Local_Set, "Local"); New_Token (T_Local_Set, "Local");
......
...@@ -103,6 +103,7 @@ package Ocarina.ME_REAL.Tokens is ...@@ -103,6 +103,7 @@ package Ocarina.ME_REAL.Tokens is
T_End_To_End_Flows_Set, T_End_To_End_Flows_Set,
T_System_Set, T_System_Set,
T_Abstract_Set, T_Abstract_Set,
T_Root_System_Set,
T_Unknown_Set, T_Unknown_Set,
T_Local_Set, T_Local_Set,
......
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