Commit 579cc85b authored by hugues.jerome's avatar hugues.jerome
Browse files

* Extend the instanciation mechanism for data component types:

	reuse an existing instance of a	     data component type only for
        access components, this allow to have subcomponent-specific
        properties to be correctly attached to the corresponing
	instance of subcomponents



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1486 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent f43d6356
...@@ -156,34 +156,34 @@ CM(11:declaration,1,3,1,19:Msg_Types is [msg];) ...@@ -156,34 +156,34 @@ CM(11:declaration,1,3,1,19:Msg_Types is [msg];)
CM(11:declaration,1,4,1,6:Domain) CM(11:declaration,1,4,1,6:Domain)
CM(11:declaration,1,5,1,32:mess is <Threads_Ids,Msg_Types>;) CM(11:declaration,1,5,1,32:mess is <Threads_Ids,Msg_Types>;)
CM(11:declaration,1,6,1,3:Var) CM(11:declaration,1,6,1,3:Var)
CM(11:declaration,1,7,1,57: x, y, x575, x636, x709, x768, x879, x941 in Threads_Ids;) CM(11:declaration,1,7,1,57: x, y, x580, x641, x714, x773, x884, x946 in Threads_Ids;)
CM(11:declaration,1,8,1,16: m in Msg_Types;) CM(11:declaration,1,8,1,16: m in Msg_Types;)
CN(10:transition,1123) CN(10:transition,1123)
CT(4:name,1123,37:proc_capteur_droit_th_c_Init_Dispatch) CT(4:name,1123,37:proc_capteur_droit_th_c_Init_Dispatch)
CA(3:arc,1128,1115,1123) CA(3:arc,1128,1115,1123)
CT(9:valuation,1128,6:<x575>) CT(9:valuation,1128,6:<x580>)
CA(3:arc,2597,1294,1123) CA(3:arc,2597,1294,1123)
CT(9:valuation,2597,6:<x636>) CT(9:valuation,2597,6:<x641>)
CA(3:arc,2607,1473,1123) CA(3:arc,2607,1473,1123)
CT(9:valuation,2607,6:<x709>) CT(9:valuation,2607,6:<x714>)
CA(3:arc,2637,1751,1123) CA(3:arc,2637,1751,1123)
CT(9:valuation,2637,6:<x768>) CT(9:valuation,2637,6:<x773>)
CA(3:arc,2667,2029,1123) CA(3:arc,2667,2029,1123)
CT(9:valuation,2667,6:<x879>) CT(9:valuation,2667,6:<x884>)
CA(3:arc,2697,2259,1123) CA(3:arc,2697,2259,1123)
CT(9:valuation,2697,6:<x941>) CT(9:valuation,2697,6:<x946>)
CA(3:arc,1133,1123,1119) CA(3:arc,1133,1123,1119)
CT(9:valuation,1133,6:<x575>) CT(9:valuation,1133,6:<x580>)
CA(3:arc,2602,1123,1298) CA(3:arc,2602,1123,1298)
CT(9:valuation,2602,6:<x636>) CT(9:valuation,2602,6:<x641>)
CA(3:arc,2612,1123,1477) CA(3:arc,2612,1123,1477)
CT(9:valuation,2612,6:<x709>) CT(9:valuation,2612,6:<x714>)
CA(3:arc,2642,1123,1755) CA(3:arc,2642,1123,1755)
CT(9:valuation,2642,6:<x768>) CT(9:valuation,2642,6:<x773>)
CA(3:arc,2672,1123,2033) CA(3:arc,2672,1123,2033)
CT(9:valuation,2672,6:<x879>) CT(9:valuation,2672,6:<x884>)
CA(3:arc,2702,1123,2263) CA(3:arc,2702,1123,2263)
CT(9:valuation,2702,6:<x941>) CT(9:valuation,2702,6:<x946>)
CN(5:place,1115) CN(5:place,1115)
CT(4:name,1115,30:proc_capteur_droit_th_c_Halted) CT(4:name,1115,30:proc_capteur_droit_th_c_Halted)
CT(6:domain,1115,11:Threads_Ids) CT(6:domain,1115,11:Threads_Ids)
......
all.aadl:66:03: warning: Field references a component type all.aadl:66:03: warning: Field references a component type
all.aadl:66:03: warning: Field references a component type
all.aadl:124:03: warning: proc_1 references a component type all.aadl:124:03: warning: proc_1 references a component type
all.aadl:125:03: warning: proc_2 references a component type all.aadl:125:03: warning: proc_2 references a component type
all.aadl:126:03: warning: ram references a component type all.aadl:126:03: warning: ram references a component type
all.aadl:127:03: warning: ram_2 references a component type all.aadl:127:03: warning: ram_2 references a component type
ocarina: Total: 0 error and 5 warnings ocarina: Total: 0 error and 6 warnings
resources execution resources execution
requirement : connections requirement : connections
theorem connections is: TRUE theorem connections is: TRUE
...@@ -14,6 +15,6 @@ theorem mutexes is: TRUE ...@@ -14,6 +15,6 @@ theorem mutexes is: TRUE
requirement : latency requirement : latency
requirement : buses_rate requirement : buses_rate
lib.real:12:33 Backends: warning : property "assert_properties::access_bandwidth" is not defined on element Bus_Set lib.real:12:33 Backends: warning : property "assert_properties::access_bandwidth" is not defined on element Bus_Set
lib.real:12:72 Backends: error : Property is false for instance 582 (shared.impl_a_bus) lib.real:12:72 Backends: error : Property is false for instance 607 (shared.impl_a_bus)
theorem buses_rate is: FALSE theorem buses_rate is: FALSE
lib.real:85:01 Backends: fatal error : requirements are not fulfilled lib.real:85:01 Backends: fatal error : requirements are not fulfilled
...@@ -781,6 +781,8 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -781,6 +781,8 @@ package body Ocarina.Backends.C_Common.Mapping is
---------------------------------- ----------------------------------
procedure Bind_AADL_To_Type_Definition (G : Node_Id; A : Node_Id) is procedure Bind_AADL_To_Type_Definition (G : Node_Id; A : Node_Id) is
pragma Assert (Present (A));
N : Node_Id; N : Node_Id;
begin begin
N := AIN.Backend_Node (G); N := AIN.Backend_Node (G);
...@@ -1204,6 +1206,7 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -1204,6 +1206,7 @@ package body Ocarina.Backends.C_Common.Mapping is
begin begin
if Get_Current_Backend_Kind = PolyORB_Kernel_C then if Get_Current_Backend_Kind = PolyORB_Kernel_C then
Add_Include (PKR.RH (RH_Gtypes)); Add_Include (PKR.RH (RH_Gtypes));
elsif Get_Current_Backend_Kind = PolyORB_HI_C then elsif Get_Current_Backend_Kind = PolyORB_HI_C then
Add_Include (PHR.RH (RH_Types)); Add_Include (PHR.RH (RH_Types));
end if; end if;
...@@ -1217,13 +1220,16 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -1217,13 +1220,16 @@ package body Ocarina.Backends.C_Common.Mapping is
if Kind (N) = K_Defining_Identifier then if Kind (N) = K_Defining_Identifier then
return N; return N;
elsif Kind (N) = K_Array_Declaration then elsif Kind (N) = K_Array_Declaration then
return Defining_Identifier (N); return Defining_Identifier (N);
end if; end if;
return No_Node;
else else
return No_Node; -- XXX why do we need this hack?
return Map_C_Defining_Identifier (E);
end if; end if;
return No_Node;
end Map_C_Data_Type_Designator; end Map_C_Data_Type_Designator;
--------------------------------- ---------------------------------
......
...@@ -1220,10 +1220,10 @@ package body Ocarina.Backends.Properties is ...@@ -1220,10 +1220,10 @@ package body Ocarina.Backends.Properties is
(D : Node_Id) (D : Node_Id)
return Supported_Data_Access return Supported_Data_Access
is is
T_Name : Name_Id;
begin
pragma Assert (AINU.Is_Data (D)); pragma Assert (AINU.Is_Data (D));
T_Name : Name_Id;
begin
if Is_Defined_Enumeration_Property (D, Data_Required_Access) then if Is_Defined_Enumeration_Property (D, Data_Required_Access) then
T_Name := Get_Enumeration_Property (D, Data_Required_Access); T_Name := Get_Enumeration_Property (D, Data_Required_Access);
...@@ -1993,26 +1993,28 @@ package body Ocarina.Backends.Properties is ...@@ -1993,26 +1993,28 @@ package body Ocarina.Backends.Properties is
Property_Type_Range := Type_Range (Property_Type); Property_Type_Range := Type_Range (Property_Type);
when AADL_V2 => when AADL_V2 =>
if Present (Parent_Subcomponent (E)) then
Process_Inst := Parent_Subcomponent Process_Inst := Parent_Subcomponent
(Parent_Component (Parent_Subcomponent (E))); (Parent_Component (Parent_Subcomponent (E)));
if Present (Process_Inst) then if Present (Process_Inst) then
if Get_Category_Of_Component (Process_Inst) = CC_Thread then if Get_Category_Of_Component (Process_Inst)
= CC_Thread
then
Process_Inst := Parent_Subcomponent Process_Inst := Parent_Subcomponent
(Parent_Component (Process_Inst)); (Parent_Component (Process_Inst));
end if; end if;
Processor_Inst := Get_Bound_Processor Processor_Inst := Get_Bound_Processor
(Corresponding_Instance (Process_Inst)); (Corresponding_Instance (Process_Inst));
if Is_Defined_Range_Property (Processor_Inst, if Is_Defined_Range_Property
Get_String_Name (Processor_Inst, Get_String_Name ("priority_range"))
("priority_range"))
then then
Property_Type := Property_Type :=
(AIN.Property_Association_Value (AIN.Property_Association_Value
(AIEP.Find_Property_Association_From_Name (AIEP.Find_Property_Association_From_Name
(Property_List => AIN.Properties (Processor_Inst), (Property_List =>
AIN.Properties (Processor_Inst),
Property_Name => Get_String_Name Property_Name => Get_String_Name
("priority_range")))); ("priority_range"))));
...@@ -2025,6 +2027,7 @@ package body Ocarina.Backends.Properties is ...@@ -2025,6 +2027,7 @@ package body Ocarina.Backends.Properties is
Warning => True); Warning => True);
end if; end if;
end if; end if;
end if;
end case; end case;
if No (Property_Type_Range) then if No (Property_Type_Range) then
...@@ -2252,8 +2255,10 @@ package body Ocarina.Backends.Properties is ...@@ -2252,8 +2255,10 @@ package body Ocarina.Backends.Properties is
begin begin
if Is_Defined_String_Property (T, Initialize_Entrypoint) then if Is_Defined_String_Property (T, Initialize_Entrypoint) then
return Get_String_Property (T, Initialize_Entrypoint); return Get_String_Property (T, Initialize_Entrypoint);
elsif Is_Defined_String_Property elsif Is_Defined_String_Property
(T, Initialize_Entrypoint_Source_Text) then (T, Initialize_Entrypoint_Source_Text)
then
return Get_String_Property return Get_String_Property
(T, Initialize_Entrypoint_Source_Text); (T, Initialize_Entrypoint_Source_Text);
else else
......
...@@ -967,12 +967,15 @@ package body Ocarina.Backends.Utils is ...@@ -967,12 +967,15 @@ package body Ocarina.Backends.Utils is
begin begin
case Comparison is case Comparison is
when By_Name => when By_Name =>
Get_Name_String (Compute_Full_Name_Of_Instance (E)); Get_Name_String (Map_Ada_Defining_Identifier (E));
-- Get_Name_String (Compute_Full_Name_Of_Instance (E));
when By_Node => when By_Node =>
Set_Nat_To_Name_Buffer (Nat (E)); Set_Nat_To_Name_Buffer (Nat (E));
end case; end case;
Add_Str_To_Name_Buffer ("%Handling%" & Handling'Img); Add_Str_To_Name_Buffer ("%Handling%" & Handling'Img);
return Name_Find; return Name_Find;
end Get_Handling_Internal_Name; end Get_Handling_Internal_Name;
...@@ -988,6 +991,7 @@ package body Ocarina.Backends.Utils is ...@@ -988,6 +991,7 @@ package body Ocarina.Backends.Utils is
is is
Internal_Name : constant Name_Id := Get_Handling_Internal_Name Internal_Name : constant Name_Id := Get_Handling_Internal_Name
(E, Comparison, Handling); (E, Comparison, Handling);
begin begin
Set_Name_Table_Info (Internal_Name, Nat (A)); Set_Name_Table_Info (Internal_Name, Nat (A));
May_Be_Append_Handling_Entry (E, Comparison, Handling, A); May_Be_Append_Handling_Entry (E, Comparison, Handling, A);
...@@ -1122,14 +1126,12 @@ package body Ocarina.Backends.Utils is ...@@ -1122,14 +1126,12 @@ package body Ocarina.Backends.Utils is
---------------------------------- ----------------------------------
function Map_Ada_Data_Type_Designator (E : Node_Id) return Node_Id is function Map_Ada_Data_Type_Designator (E : Node_Id) return Node_Id is
begin
pragma Assert (AAU.Is_Data (E)); pragma Assert (AAU.Is_Data (E));
begin
return ADU.Extract_Designator return ADU.Extract_Designator
(ADN.Type_Definition_Node (ADN.Type_Definition_Node
(Backend_Node (Backend_Node (Identifier (E))));
(Identifier
(E))));
end Map_Ada_Data_Type_Designator; end Map_Ada_Data_Type_Designator;
--------------------------------- ---------------------------------
...@@ -1255,6 +1257,7 @@ package body Ocarina.Backends.Utils is ...@@ -1255,6 +1257,7 @@ package body Ocarina.Backends.Utils is
if Kind (A) = K_Component_Instance then if Kind (A) = K_Component_Instance then
N := Namespace (A); N := Namespace (A);
elsif Kind (A) = K_Subcomponent_Instance then elsif Kind (A) = K_Subcomponent_Instance then
if Present (Parent_Component (A)) then if Present (Parent_Component (A)) then
N := Namespace (Parent_Component (A)); N := Namespace (Parent_Component (A));
...@@ -2182,7 +2185,8 @@ package body Ocarina.Backends.Utils is ...@@ -2182,7 +2185,8 @@ package body Ocarina.Backends.Utils is
Display_Located_Error Display_Located_Error
(Loc (F), (Loc (F),
"This IN parameter is not connected to" "This IN parameter is not connected to"
& " any source", & " any source"
& Image (Loc (Caller)),
Fatal => True); Fatal => True);
elsif AAU.Length (Sources (F)) > 1 then elsif AAU.Length (Sources (F)) > 1 then
Display_Located_Error Display_Located_Error
......
...@@ -170,9 +170,7 @@ package body Ocarina.Instances.Components.Features is ...@@ -170,9 +170,7 @@ package body Ocarina.Instances.Components.Features is
New_List (K_List_Id, No_Location)); New_List (K_List_Id, No_Location));
New_Subinstance := Instantiate_Corresponding_Entity New_Subinstance := Instantiate_Corresponding_Entity
(Instance_Root, (Instance_Root, Feature, Container);
Feature,
Container);
if Present (New_Subinstance) then if Present (New_Subinstance) then
Set_Corresponding_Instance (New_Instance, New_Subinstance); Set_Corresponding_Instance (New_Instance, New_Subinstance);
...@@ -192,9 +190,7 @@ package body Ocarina.Instances.Components.Features is ...@@ -192,9 +190,7 @@ package body Ocarina.Instances.Components.Features is
-- Instantiate the corresponding subprogram component -- Instantiate the corresponding subprogram component
New_Subinstance := Instantiate_Corresponding_Entity New_Subinstance := Instantiate_Corresponding_Entity
(Instance_Root, (Instance_Root, Feature, Container);
Feature,
Container);
if Present (New_Subinstance) then if Present (New_Subinstance) then
Set_Corresponding_Instance (New_Instance, New_Subinstance); Set_Corresponding_Instance (New_Instance, New_Subinstance);
...@@ -209,7 +205,9 @@ package body Ocarina.Instances.Components.Features is ...@@ -209,7 +205,9 @@ package body Ocarina.Instances.Components.Features is
AIN.Set_Is_Data (New_Instance, AIN.Set_Is_Data (New_Instance,
Component_Category'Val Component_Category'Val
(Subcomponent_Category (Feature)) = CC_Data); (Subcomponent_Category (Feature)) = CC_Data);
AIN.Set_Identifier (New_Instance,
AIN.Set_Identifier
(New_Instance,
Duplicate_Identifier (ATN.Identifier (Feature))); Duplicate_Identifier (ATN.Identifier (Feature)));
Set_Sources (New_Instance, New_List (K_List_Id, No_Location)); Set_Sources (New_Instance, New_List (K_List_Id, No_Location));
Set_Destinations (New_Instance, New_List (K_List_Id, No_Location)); Set_Destinations (New_Instance, New_List (K_List_Id, No_Location));
...@@ -224,16 +222,33 @@ package body Ocarina.Instances.Components.Features is ...@@ -224,16 +222,33 @@ package body Ocarina.Instances.Components.Features is
-- 2 - POSTPONE the resolution of this at the connection -- 2 - POSTPONE the resolution of this at the connection
-- instantiation. -- instantiation.
if Component_Category'Val
(Subcomponent_Category (Feature)) = CC_Data
and then Present (Get_Instance (ATE.Get_Referenced_Entity
(Entity_Ref (Feature))))
then
-- XXX If the component type denotes a data type, we
-- recycle an existing instance. this is done to avoid
-- infinite recursion, may lead to incorrect
-- properties being set. We should definitely
-- implement the recommandation above. Yet, this
-- removes a dirtier hack in Instantiate_Component
Set_Corresponding_Instance
(New_Instance,
Get_Instance (ATE.Get_Referenced_Entity
(Entity_Ref (Feature))));
else
New_Subinstance := Instantiate_Corresponding_Entity New_Subinstance := Instantiate_Corresponding_Entity
(Instance_Root, (Instance_Root, Feature, Container);
Feature,
Container);
if Present (New_Subinstance) then if Present (New_Subinstance) then
Set_Corresponding_Instance (New_Instance, New_Subinstance); Set_Corresponding_Instance (New_Instance, New_Subinstance);
else else
Success := False; Success := False;
end if; end if;
end if;
when others => when others =>
raise Program_Error with "Unknown feature kind " raise Program_Error with "Unknown feature kind "
...@@ -300,12 +315,12 @@ package body Ocarina.Instances.Components.Features is ...@@ -300,12 +315,12 @@ package body Ocarina.Instances.Components.Features is
return New_Subinstance; return New_Subinstance;
end if; end if;
-- If the component isn't instantiateed yet, instantiate it... -- If the component isn't instantiated yet, instantiate it...
New_Subinstance := Instantiate_Component (Instance_Root, C); New_Subinstance := Instantiate_Component (Instance_Root, C);
if Present (New_Subinstance) then if Present (New_Subinstance) then
-- Instantiation is successful, append the compoent to the -- Instantiation is successful, append the component to the
-- declarations of its namespace. If the component has -- declarations of its namespace. If the component has
-- subcomponents, they will be added recursivly. -- subcomponents, they will be added recursivly.
...@@ -313,8 +328,8 @@ package body Ocarina.Instances.Components.Features is ...@@ -313,8 +328,8 @@ package body Ocarina.Instances.Components.Features is
-- list because we cannot append the same node in two -- list because we cannot append the same node in two
-- different lists. -- different lists.
Append_To_Namespace_Instance Append_To_Namespace_Instance (Instance_Root, New_Subinstance);
(Instance_Root, New_Subinstance);
else else
-- Something went wrong, propagate the information by -- Something went wrong, propagate the information by
-- returning No_Node. -- returning No_Node.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2005-2009, GET-Telecom Paris. -- -- Copyright (C) 2005-2010, GET-Telecom Paris. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify -- -- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the -- -- it under terms of the GNU General Public License as published by the --
...@@ -122,25 +122,8 @@ package body Ocarina.Instances.Components is ...@@ -122,25 +122,8 @@ package body Ocarina.Instances.Components is
Instance_Node : Node_Id; Instance_Node : Node_Id;
Success : Boolean := True; Success : Boolean := True;
Namespace_Instance : Node_Id; Namespace_Instance : Node_Id;
begin
-- Data components have to be instantiated only once. Other
-- components may be instantiated more than once. This avoids
-- infinite recursion in the case subprograms are features of
-- data and require/provide access to the same data. However,
-- if different data components inherit from the same parent
-- data component, the later has to be instantiated for each
-- child. This case is known if the Existing_Instance parameter
-- is not null. If different data component are implementations
-- of the same component type, the later has to be instantiated
-- for each implementation.
if No (Existing_Instance)
and then Component_Category'Val (Category (Component)) = CC_Data
and then Present (Get_Instance (Component))
then
return Get_Instance (Component);
end if;
begin
-- Getting the component namespace -- Getting the component namespace
Namespace_Instance := Instantiate_Namespace Namespace_Instance := Instantiate_Namespace
...@@ -177,7 +160,7 @@ package body Ocarina.Instances.Components is ...@@ -177,7 +160,7 @@ package body Ocarina.Instances.Components is
-- 1 - For component types: -- 1 - For component types:
-- (a) we instantite the features of the component -- (a) we instantiate the features of the component
-- (b) we instantiate recursively the parents of the component -- (b) we instantiate recursively the parents of the component
...@@ -218,8 +201,8 @@ package body Ocarina.Instances.Components is ...@@ -218,8 +201,8 @@ package body Ocarina.Instances.Components is
declare declare
Component_Type : constant Node_Id := ATN.Corresponding_Entity Component_Type : constant Node_Id := ATN.Corresponding_Entity
(Component_Type_Identifier (Component_Type_Identifier (Component));
(Component));
begin begin
-- Annotate the component type node with the -- Annotate the component type node with the
-- component implementation node. -- component implementation node.
...@@ -250,7 +233,6 @@ package body Ocarina.Instances.Components is ...@@ -250,7 +233,6 @@ package body Ocarina.Instances.Components is
List_Node := ATN.First_Node (ATN.Subcomponents (Component)); List_Node := ATN.First_Node (ATN.Subcomponents (Component));
while Present (List_Node) loop while Present (List_Node) loop
-- XXX Changed call Get_First_Homonym by this
if No (Get_First_Homonym_Instance if No (Get_First_Homonym_Instance
(AIN.Subcomponents (New_Instance), (AIN.Subcomponents (New_Instance),
List_Node)) List_Node))
...@@ -258,8 +240,7 @@ package body Ocarina.Instances.Components is ...@@ -258,8 +240,7 @@ package body Ocarina.Instances.Components is
-- We do not re-instantiate subcomponent refinements -- We do not re-instantiate subcomponent refinements
Instance_Node := Instantiate_Subcomponent Instance_Node := Instantiate_Subcomponent
(Instance_Root, (Instance_Root, List_Node);
List_Node);
if Present (Instance_Node) then if Present (Instance_Node) then
-- Annotate the corresponding component of the -- Annotate the corresponding component of the
...@@ -277,8 +258,7 @@ package body Ocarina.Instances.Components is ...@@ -277,8 +258,7 @@ package body Ocarina.Instances.Components is
Append_Node_To_List Append_Node_To_List
(Instance_Node, (Instance_Node,
AIN.Subcomponents AIN.Subcomponents (New_Instance));
(New_Instance));
-- We apply the properties to the component -- We apply the properties to the component
-- corresponding to the subcomponent. -- corresponding to the subcomponent.
...@@ -289,6 +269,7 @@ package body Ocarina.Instances.Components is ...@@ -289,6 +269,7 @@ package body Ocarina.Instances.Components is
ATN.Properties (List_Node), ATN.Properties (List_Node),
Override_Mode => True) Override_Mode => True)
and then Success; and then Success;
else else
Display_Instantiation_Error (List_Node); Display_Instantiation_Error (List_Node);
Success := False; Success := False;
...@@ -394,9 +375,11 @@ package body Ocarina.Instances.Components is ...@@ -394,9 +375,11 @@ package body Ocarina.Instances.Components is
ATN.Properties (List_Node), ATN.Properties (List_Node),
Override_Mode => True) Override_Mode => True)
and then Success; and then Success;
Append_Node_To_List Append_Node_To_List
(Instance_Node, (Instance_Node,
AIN.Features (New_Instance)); AIN.Features (New_Instance));