1
------------------------------------------------------------------------------
2
--                                                                          --
3
--                           OCARINA COMPONENTS                             --
4
--                                                                          --
5
--      O C A R I N A . A N A L Y Z E R . A A D L _ E M A . L I N K S       --
6
--                                                                          --
7
--                                 B o d y                                  --
8
--                                                                          --
9
--         Copyright (C) 2016-2019 ESA & ISAE, 2019-2020 OpenAADL           --
10
--                                                                          --
11
-- Ocarina  is free software; you can redistribute it and/or modify under   --
12
-- terms of the  GNU General Public License as published  by the Free Soft- --
13
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14
-- sion. Ocarina is distributed in the hope that it will be useful, but     --
15
-- WITHOUT ANY WARRANTY; without even the implied warranty of               --
16
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     --
17
--                                                                          --
18
-- As a special exception under Section 7 of GPL version 3, you are granted --
19
-- additional permissions described in the GCC Runtime Library Exception,   --
20
-- version 3.1, as published by the Free Software Foundation.               --
21
--                                                                          --
22
-- You should have received a copy of the GNU General Public License and    --
23
-- a copy of the GCC Runtime Library Exception along with this program;     --
24
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
25
-- <http://www.gnu.org/licenses/>.                                          --
26
--                                                                          --
27
--                    Ocarina is maintained by OpenAADL team                --
28
--                              (info@openaadl.org)                         --
29
--                                                                          --
30
------------------------------------------------------------------------------
31

32
with Ocarina.ME_AADL.AADL_Tree.Nodes;
33
with Ocarina.ME_AADL_EMA.EMA_Tree.Nodes;
34

35
package body Ocarina.Analyzer.AADL_EMA.Links is
36

37
   package ATN renames Ocarina.ME_AADL.AADL_Tree.Nodes;
38
   package EMATN renames Ocarina.ME_AADL_EMA.EMA_Tree.Nodes;
39

40
   ----------------------------------
41
   -- Link_Properties_Of_Component --
42
   ----------------------------------
43

44 0
   function Link_Properties_Of_Component
45
   (Root : Node_Id; Node : Node_Id) return Boolean
46
   is
47
   begin
48 0
      return Root = Node;
49
   end Link_Properties_Of_Component;
50

51
   ----------------------------------
52
   -- Link_Error_Type_Library_List --
53
   ----------------------------------
54

55 0
   procedure Link_Error_Type_Library_List
56
     (Root    : Node_Id;
57
      Node    : Node_Id)
58
   is
59
      use ATN;
60
      use EMATN;
61

62 0
      pragma Assert (ATN.Kind (Root)   = ATN.K_PACKAGE_SPECIFICATION);
63 0
      pragma Assert (EMATN.Kind (Node) =
64
                     EMATN.K_Error_Model_Library_Reference);
65
   begin
66 0
      Set_AADL_Package_Reference (Node, Root);
67 0
   end Link_Error_Type_Library_List;
68

69
   ----------------------------------
70
   -- Link_Error_Type_Library_List --
71
   ----------------------------------
72

73 0
   procedure Link_Error_Type_Reference
74
     (Error_Model_Library_Ref : Node_Id;
75
      Node_Referenced         : Node_Id)
76
   is
77
      use EMATN;
78

79 0
      pragma Assert (EMATN.Kind (Error_Model_Library_Ref)
80 0
                     = K_Error_Model_Library_Reference);
81 0
      pragma Assert (EMATN.Kind (Node_Referenced)
82 0
                     = K_Error_Model_Library_Reference);
83

84 0
      AADL_Package_Ref : Node_Id;
85
   begin
86 0
      AADL_Package_Ref := AADL_Package_Reference (Node_Referenced);
87 0
      Set_AADL_Package_Reference (Error_Model_Library_Ref, AADL_Package_Ref);
88 0
   end Link_Error_Type_Reference;
89

90
end Ocarina.Analyzer.AADL_EMA.Links;

Read our documentation on viewing source code .

Loading