---------------------------------------------- ---------------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- OCARINA.GENERATORS.PO_HI_ADA.MAPPING -- -- -- -- S p e c -- -- -- -- Copyright (C) 2006-2007, GET-Telecom Paris. -- -- -- -- Ocarina is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 2, or (at your option) any -- -- later version. Ocarina is distributed in the hope that it will be -- -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -- -- Public License for more details. You should have received a copy of the -- -- GNU General Public License distributed with Ocarina; see file COPYING. -- -- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth -- -- Floor, Boston, MA 02111-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- Ocarina is maintained by the Ocarina team -- -- (ocarina-users@listes.enst.fr) -- -- -- ------------------------------------------------------------------------------ -- This package contains routines to map entities from the AADL tree -- into entities of the PolyORB-HI Ada tree. with Ocarina.Generators.Properties; use Ocarina.Generators.Properties; package Ocarina.Generators.PO_HI_Ada.Mapping is function Map_Distributed_Application (E : Node_Id) return Node_Id; -- Create a PolyORB-HI Ada distributed application node mapped -- from the AADL architecture instance node E. function Map_HI_Node (E : Node_Id) return Node_Id; -- Create a PolyORB-HI Ada node of a distributed application function Map_HI_Unit (E : Node_Id) return Node_Id; -- Create the node that contain all the Ada units generated for a -- particular node of the distributed application. function Map_Ada_Time (T : Time_Type) return Node_Id; -- Create the call from the corresponding Ada real time routines -- to create an Ada time span that corresponds to the given time -- T. If an error occurs (for example if the given time is too -- small to be generated by Ada or the used unit is too fine -- grained (picoseconds), return No_Node. function Map_Ada_Priority (P : Unsigned_Long_Long) return Node_Id; -- Maps the given AADL priority into an Ada priority function Map_Marshallers_Name (E : Node_Id) return Name_Id; -- Maps a name for the marshallers package instantiation generated -- for node E. function Map_Task_Job_Identifier (E : Node_Id) return Node_Id; -- Map an identifier for the parameterless subprogram that -- executes the job of thread instance E. function Map_Task_Identifier (E : Node_Id) return Node_Id; -- Map an identifier for the Ada package instance that contains -- the task mapped from the thread instance E. function Map_Port_Enumeration_Name (E : Node_Id) return Name_Id; -- Map a name for the port enumeration type specific to one thread -- or subprogram function Map_Port_Interface_Name (E : Node_Id) return Name_Id; -- Map a name for the record type corresponding to a thread or -- subprogram's interface. function Map_Port_Status_Name (E : Node_Id) return Name_Id; -- Map a name for the Status type corresponding to the subprogram -- E. function Map_Port_Enumeration (E : Node_Id) return Node_Id; -- Creates an enumeration type declaration that gathers all the -- ports of the given thread or subprogram E. function Map_Port_Interface (E : Node_Id) return Node_Id; -- Creates a discriminated record type declaration that -- represents the thread or subprogram interface. function Map_Port_Status (E : Node_Id; Full_Declaration : Boolean) return Node_Id; -- Creates the type declaration that gathers the state of the out -- ports of a subprogram. If 'Full_Declaration' is False, cretes a -- provate type declaration, otherwise, creates the full type -- declaration. function Map_Node_Name_Identifier (E : Node_Id) return Node_Id; -- Map an identifier for the string variable that constains the -- node name. function Map_Integer_Array_Name (E : Node_Id) return Name_Id; function Map_Address_Array_Name (E : Node_Id) return Name_Id; function Map_FIFO_Sizes_Name (E : Node_Id) return Name_Id; function Map_Offsets_Name (E : Node_Id) return Name_Id; function Map_Total_Size_Name (E : Node_Id) return Name_Id; function Map_Destination_Name (E : Node_Id) return Name_Id; function Map_N_Destination_Name (E : Node_Id) return Name_Id; function Map_Interrogators_Name (E : Node_Id) return Name_Id; function Map_Deliver_Name (E : Node_Id) return Name_Id; -- Internal routine names used to instanciate the thread interface -- generic. function Map_Modes_Enumeration_Name (E : Node_Id) return Name_Id; function Map_Current_Mode_Name (E : Node_Id) return Name_Id; -- Routines for the generation of thread operational modes related -- entities. function Need_Delivery (E : Node_Id) return Boolean; -- Return True if the node E needs a message delivery -- subprogram. If the process has at least IN ports or if one of -- its threads has at least one IN port, we generate a delivery -- subprogram. This subprogram is called by the transport layer to -- deliver messages to the correspoding destination. -- Tree binding operations procedure Bind_AADL_To_Marshallers (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Activity (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Deliver (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Types (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Subprograms (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Deployment (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Naming (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Main (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Job (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Enumerator (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Marshall (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Unmarshall (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Port_Interface (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Port_Enumeration (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Type_Definition (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Default_Value (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Feature_Subprogram (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Subprogram (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Object (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Put_Value (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Get_Value (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Get_Count (G : Node_Id; A : Node_Id); procedure Bind_AADL_To_Next_Value (G : Node_Id; A : Node_Id); end Ocarina.Generators.PO_HI_Ada.Mapping;