Commit 412d9e7e authored by yoogx's avatar yoogx

* Correct resolution of properties applied to connections

        For issue #39
parent 216677ad
...@@ -1113,7 +1113,8 @@ package body Ocarina.Analyzer.AADL.Finder is ...@@ -1113,7 +1113,8 @@ package body Ocarina.Analyzer.AADL.Finder is
is is
pragma Assert pragma Assert
(Kind (Component) = K_Component_Implementation (Kind (Component) = K_Component_Implementation
or else Kind (Component) = K_Component_Type); or else Kind (Component) = K_Component_Type
or else Kind (Component) = K_Port_Spec);
pragma Assert (Kind (Identifier) = K_Identifier); pragma Assert (Kind (Identifier) = K_Identifier);
begin begin
return Find_Subclause_Declaration_Classifier return Find_Subclause_Declaration_Classifier
...@@ -1148,6 +1149,7 @@ package body Ocarina.Analyzer.AADL.Finder is ...@@ -1148,6 +1149,7 @@ package body Ocarina.Analyzer.AADL.Finder is
(Kind (Component) = K_Component_Implementation (Kind (Component) = K_Component_Implementation
or else Kind (Component) = K_Component_Type or else Kind (Component) = K_Component_Type
or else Kind (Component) = K_Feature_Group_Type or else Kind (Component) = K_Feature_Group_Type
or else Kind (Component) = K_Port_spec
or else Kind (Component) = K_Subcomponent_Access); or else Kind (Component) = K_Subcomponent_Access);
pragma Assert (Kind (Declaration_Identifier) = K_Identifier); pragma Assert (Kind (Declaration_Identifier) = K_Identifier);
pragma Assert (Subclause_Kinds'Length > 0); pragma Assert (Subclause_Kinds'Length > 0);
......
...@@ -1952,6 +1952,10 @@ package body Ocarina.Analyzer.AADL.Links is ...@@ -1952,6 +1952,10 @@ package body Ocarina.Analyzer.AADL.Links is
when K_Component_Type | K_Component_Implementation => when K_Component_Type | K_Component_Implementation =>
Corresponding_Container := Pointed_Node; Corresponding_Container := Pointed_Node;
when K_Connection =>
Corresponding_Container :=
Container_Component (Pointed_Node);
when others => when others =>
-- These entities cannot have 'applies to' -- These entities cannot have 'applies to'
-- clause in their property associations. -- clause in their property associations.
......
...@@ -1021,6 +1021,9 @@ package body Ocarina.Analyzer.AADL.Queries is ...@@ -1021,6 +1021,9 @@ package body Ocarina.Analyzer.AADL.Queries is
or else or else
Named_Element'Val (Category (List_Node)) = Named_Element'Val (Category (List_Node)) =
PO_Port_Connections PO_Port_Connections
or else
Named_Element'Val (Category (List_Node)) =
PO_Port_Connection
or else or else
Named_Element'Val (Category (List_Node)) = Named_Element'Val (Category (List_Node)) =
PO_Connection PO_Connection
......
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