CombinedText
stringlengths
4
3.42M
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- A class that defines the core logic or control flow for one or more -- auxiliary classes that support it. Support classes may be defined -- explicitly using Auxiliary classes or implicitly as clients of dependency -- relationships whose supplier is a focus class. Focus classes are typically -- used together with one or more Auxiliary classes, and are particularly -- useful for specifying the core business logic or control flow of -- components during design. See also: «Auxiliary». ------------------------------------------------------------------------------ limited with AMF.UML.Classes; package AMF.Standard_Profile_L2.Focuses is pragma Preelaborate; type Standard_Profile_L2_Focus is limited interface; type Standard_Profile_L2_Focus_Access is access all Standard_Profile_L2_Focus'Class; for Standard_Profile_L2_Focus_Access'Storage_Size use 0; not overriding function Get_Base_Class (Self : not null access constant Standard_Profile_L2_Focus) return AMF.UML.Classes.UML_Class_Access is abstract; -- Getter of Focus::base_Class. -- not overriding procedure Set_Base_Class (Self : not null access Standard_Profile_L2_Focus; To : AMF.UML.Classes.UML_Class_Access) is abstract; -- Setter of Focus::base_Class. -- end AMF.Standard_Profile_L2.Focuses;
pragma License (Unrestricted); -- extended unit with Ada.Command_Line.Generic_Parsing; package Ada.Command_Line.Parsing is new Generic_Parsing ( Input_Cursor => Natural, Has_Element => Has_Element, Input_Iterator_Interfaces => Iterator_Interfaces, Input_Iterator => Concrete_Iterator'(null record), -- Iterate Argument => Argument); -- Command line parser.
-- Copyright 2005, 2007, 2008, 2009, 2010, 2011 -- Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program 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 -- along with this program. If not, see <http://www.gnu.org/licenses/>. procedure First is begin null; end First;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Formal_Procedure_Access_Types is function Create (Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Access_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Protected_Token : Program.Lexical_Elements.Lexical_Element_Access; Procedure_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access) return Formal_Procedure_Access_Type is begin return Result : Formal_Procedure_Access_Type := (Not_Token => Not_Token, Null_Token => Null_Token, Access_Token => Access_Token, Protected_Token => Protected_Token, Procedure_Token => Procedure_Token, Left_Bracket_Token => Left_Bracket_Token, Parameters => Parameters, Right_Bracket_Token => Right_Bracket_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Not_Null : Boolean := False; Has_Protected : Boolean := False) return Implicit_Formal_Procedure_Access_Type is begin return Result : Implicit_Formal_Procedure_Access_Type := (Parameters => Parameters, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Has_Not_Null => Has_Not_Null, Has_Protected => Has_Protected, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Parameters (Self : Base_Formal_Procedure_Access_Type) return Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access is begin return Self.Parameters; end Parameters; overriding function Not_Token (Self : Formal_Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Not_Token; end Not_Token; overriding function Null_Token (Self : Formal_Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Null_Token; end Null_Token; overriding function Access_Token (Self : Formal_Procedure_Access_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Access_Token; end Access_Token; overriding function Protected_Token (Self : Formal_Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Protected_Token; end Protected_Token; overriding function Procedure_Token (Self : Formal_Procedure_Access_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Procedure_Token; end Procedure_Token; overriding function Left_Bracket_Token (Self : Formal_Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Left_Bracket_Token; end Left_Bracket_Token; overriding function Right_Bracket_Token (Self : Formal_Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Right_Bracket_Token; end Right_Bracket_Token; overriding function Has_Not_Null (Self : Formal_Procedure_Access_Type) return Boolean is begin return Self.Null_Token.Assigned; end Has_Not_Null; overriding function Has_Protected (Self : Formal_Procedure_Access_Type) return Boolean is begin return Self.Protected_Token.Assigned; end Has_Protected; overriding function Is_Part_Of_Implicit (Self : Implicit_Formal_Procedure_Access_Type) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Formal_Procedure_Access_Type) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Formal_Procedure_Access_Type) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; overriding function Has_Not_Null (Self : Implicit_Formal_Procedure_Access_Type) return Boolean is begin return Self.Has_Not_Null; end Has_Not_Null; overriding function Has_Protected (Self : Implicit_Formal_Procedure_Access_Type) return Boolean is begin return Self.Has_Protected; end Has_Protected; procedure Initialize (Self : aliased in out Base_Formal_Procedure_Access_Type'Class) is begin for Item in Self.Parameters.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; null; end Initialize; overriding function Is_Formal_Procedure_Access_Type_Element (Self : Base_Formal_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Formal_Procedure_Access_Type_Element; overriding function Is_Formal_Access_Type_Element (Self : Base_Formal_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Formal_Access_Type_Element; overriding function Is_Formal_Type_Definition_Element (Self : Base_Formal_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Formal_Type_Definition_Element; overriding function Is_Definition_Element (Self : Base_Formal_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Definition_Element; overriding procedure Visit (Self : not null access Base_Formal_Procedure_Access_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Formal_Procedure_Access_Type (Self); end Visit; overriding function To_Formal_Procedure_Access_Type_Text (Self : aliased in out Formal_Procedure_Access_Type) return Program.Elements.Formal_Procedure_Access_Types .Formal_Procedure_Access_Type_Text_Access is begin return Self'Unchecked_Access; end To_Formal_Procedure_Access_Type_Text; overriding function To_Formal_Procedure_Access_Type_Text (Self : aliased in out Implicit_Formal_Procedure_Access_Type) return Program.Elements.Formal_Procedure_Access_Types .Formal_Procedure_Access_Type_Text_Access is pragma Unreferenced (Self); begin return null; end To_Formal_Procedure_Access_Type_Text; end Program.Nodes.Formal_Procedure_Access_Types;
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package body Nodes.Database is type Attribute is record Name : Unbounded_String; Type_Name : Unbounded_String; end record; type Attributes is array (Attribute_Index) of Attribute; type Node is record Name : Unbounded_String; Attrs : Attributes; Last_Attr : Attribute_Index; end record; type Nodes is array (Node_Index) of Node; All_Nodes : Nodes; Last_Node_Index : Node_Index; First_Node : Boolean := True; First_Attr : Boolean := True; -------------------- -- Attribute_Name -- -------------------- function Attribute_Name (Node : Node_Index; Attribute : Attribute_Index) return String is begin return To_String (All_Nodes (Node).Attrs (Attribute).Name); end Attribute_Name; -------------------- -- Attribute_Type -- -------------------- function Attribute_Type (Node : Node_Index; Attribute : Attribute_Index) return String is begin return To_String (All_Nodes (Node).Attrs (Attribute).Type_Name); end Attribute_Type; ---------------------- -- Create_Attribute -- ---------------------- procedure Create_Attribute (Name : String; Type_Name : String) is N : Node renames All_Nodes (Last_Node_Index); begin if First_Attr then First_Attr := False; else N.Last_Attr := N.Last_Attr + 1; end if; N.Attrs (N.Last_Attr).Name := To_Unbounded_String (Name); N.Attrs (N.Last_Attr).Type_Name := To_Unbounded_String (Type_Name); end Create_Attribute; ----------------- -- Create_Node -- ----------------- procedure Create_Node (Name : String; Parent : String) is Found : Boolean; Upper : Node_Index; begin if First_Node then Last_Node_Index := 1; First_Node := False; else Last_Node_Index := Last_Node_Index + 1; end if; All_Nodes (Last_Node_Index).Name := To_Unbounded_String (Name); All_Nodes (Last_Node_Index).Last_Attr := 1; First_Attr := True; if Parent /= "" then Find_Node (Parent, Upper, Found); for I in 1 .. Last_Attribute (Upper) loop Create_Attribute (Attribute_Name (Upper, I), Attribute_Type (Upper, I)); end loop; end if; end Create_Node; -------------------- -- Find_Attribute -- -------------------- procedure Find_Attribute (Name : in String; Node : in Node_Index; Attribute : out Attribute_Index; Found : out Boolean) is Count : constant Attribute_Index := All_Nodes (Node).Last_Attr; Attrs : Attributes renames All_Nodes (Node).Attrs; begin for I in 1 .. Count loop if Attrs (I).Name = Name then Attribute := I; Found := True; return; end if; end loop; Found := False; end Find_Attribute; ---------------------------- -- Find_Attribute_By_Type -- ---------------------------- procedure Find_Attribute_By_Type (Type_Name : in String; Node : in Node_Index; Attribute : out Attribute_Index; Found : out Boolean) is Count : constant Attribute_Index := All_Nodes (Node).Last_Attr; Attrs : Attributes renames All_Nodes (Node).Attrs; begin Found := False; for I in 1 .. Count loop if Attrs (I).Type_Name = Type_Name then Attribute := I; if Found then -- too much found Found := False; return; end if; Found := True; end if; end loop; end Find_Attribute_By_Type; --------------- -- Find_Node -- --------------- procedure Find_Node (Name : in String; Node : out Node_Index; Found : out Boolean) is begin for I in 1 .. Last_Node_Index loop if All_Nodes (I).Name = Name then Node := I; Found := True; return; end if; end loop; Found := False; end Find_Node; -------------------- -- Last_Attribute -- -------------------- function Last_Attribute (Node : Node_Index) return Attribute_Index is begin return All_Nodes (Node).Last_Attr; end Last_Attribute; --------------- -- Last_Node -- --------------- function Last_Node return Node_Index is begin return Last_Node_Index; end Last_Node; --------------- -- Node_Name -- --------------- function Node_Name (Node : Node_Index) return String is begin return To_String (All_Nodes (Node).Name); end Node_Name; end Nodes.Database; ------------------------------------------------------------------------------ -- Copyright (c) 2006, Maxim Reznik -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of the Maxim Reznik, IE nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2018-2019, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with MMA8653; package MicroBit.Accelerometer is function Data return MMA8653.All_Axes_Data; -- Return the acceleration value for each of the three axes (X, Y, Z) end MicroBit.Accelerometer;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- A duration observation is a reference to a duration during an execution. -- It points out the element(s) in the model to observe and whether the -- observations are when this model element is entered or when it is exited. ------------------------------------------------------------------------------ with AMF.Boolean_Collections; limited with AMF.UML.Named_Elements.Collections; with AMF.UML.Observations; package AMF.UML.Duration_Observations is pragma Preelaborate; type UML_Duration_Observation is limited interface and AMF.UML.Observations.UML_Observation; type UML_Duration_Observation_Access is access all UML_Duration_Observation'Class; for UML_Duration_Observation_Access'Storage_Size use 0; not overriding function Get_Event (Self : not null access constant UML_Duration_Observation) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is abstract; -- Getter of DurationObservation::event. -- -- The observation is determined by the entering or exiting of the event -- element during execution. not overriding function Get_First_Event (Self : not null access constant UML_Duration_Observation) return AMF.Boolean_Collections.Set_Of_Boolean is abstract; -- Getter of DurationObservation::firstEvent. -- -- The value of firstEvent[i] is related to event[i] (where i is 1 or 2). -- If firstEvent[i] is true, then the corresponding observation event is -- the first time instant the execution enters event[i]. If firstEvent[i] -- is false, then the corresponding observation event is the time instant -- the execution exits event[i]. Default value is true applied when -- event[i] refers an element that represents only one time instant. end AMF.UML.Duration_Observations;
with Ada.References.Strings; with System.Address_To_Constant_Access_Conversions; with System.Startup; with System.Storage_Elements; package body Ada.Bind_Time_Variables is use type System.Storage_Elements.Storage_Offset; type Length_Type is mod 2 ** Character'Size; type Length_Access is access constant Length_Type; package LA_Conv is new System.Address_To_Constant_Access_Conversions ( Length_Type, Length_Access); function Read_Length (Position : System.Address) return Length_Type with Convention => Intrinsic; pragma Inline_Always (Read_Length); function Read_Length (Position : System.Address) return Length_Type is begin return LA_Conv.To_Pointer (Position).all; end Read_Length; function First return Cursor; function Next (Position : Cursor) return Cursor; function First return Cursor is Result : constant System.Address := System.Startup.Bind_Env_Addr; begin if Read_Length (Result) = 0 then return Cursor (System.Null_Address); else return Cursor (Result); end if; end First; function Next (Position : Cursor) return Cursor is Name_Length : constant System.Storage_Elements.Storage_Offset := System.Storage_Elements.Storage_Offset ( Read_Length (System.Address (Position))); Value_Address : constant System.Address := System.Address (Position) + 1 + Name_Length; Value_Length : constant System.Storage_Elements.Storage_Offset := System.Storage_Elements.Storage_Offset (Read_Length (Value_Address)); Result : constant System.Address := Value_Address + 1 + Value_Length; begin if Read_Length (Result) = 0 then return Cursor (System.Null_Address); else return Cursor (Result); end if; end Next; function Name_Reference (Position : Cursor) return References.Strings.Slicing.Constant_Reference_Type; function Value_Reference (Position : Cursor) return References.Strings.Slicing.Constant_Reference_Type; function Name_Reference (Position : Cursor) return References.Strings.Slicing.Constant_Reference_Type is type String_Constant_Access is access constant String; Name_Length : constant Natural := Natural (Read_Length (System.Address (Position))); Name_All : aliased String (1 .. Name_Length); for Name_All'Address use System.Address (Position) + 1; begin return References.Strings.Slicing.Constant_Slice ( String_Constant_Access'(Name_All'Unrestricted_Access).all, First => 1, Last => Name_Length); end Name_Reference; function Value_Reference (Position : Cursor) return References.Strings.Slicing.Constant_Reference_Type is type String_Constant_Access is access constant String; Name_Length : constant System.Storage_Elements.Storage_Offset := System.Storage_Elements.Storage_Offset ( Read_Length (System.Address (Position))); Value_Address : constant System.Address := System.Address (Position) + 1 + Name_Length; Value_Length : constant Natural := Natural (Read_Length (Value_Address)); Value_All : aliased String (1 .. Value_Length); for Value_All'Address use Value_Address + 1; begin return References.Strings.Slicing.Constant_Slice ( String_Constant_Access'(Value_All'Unrestricted_Access).all, First => 1, Last => Value_Length); end Value_Reference; -- implementation function Value (Name : String) return String is I : Cursor := First; begin while Has_Element (I) loop if Name_Reference (I).Element.all = Name then return Value (I); end if; I := Next (I); end loop; raise Constraint_Error; end Value; function Value (Name : String; Default : String) return String is I : Cursor := First; begin while Has_Element (I) loop if Name_Reference (I).Element.all = Name then return Value (I); end if; I := Next (I); end loop; return Default; end Value; function Exists (Name : String) return Boolean is I : Cursor := First; begin while Has_Element (I) loop if Name_Reference (I).Element.all = Name then return True; end if; I := Next (I); end loop; return False; end Exists; procedure Iterate ( Process : not null access procedure (Name, Value : String)) is I : Cursor := First; begin while Has_Element (I) loop Process ( Name_Reference (I).Element.all, Value_Reference (I).Element.all); I := Next (I); end loop; end Iterate; -- implementation of iterators function Has_Element (Position : Cursor) return Boolean is begin return Position /= Cursor (System.Null_Address); end Has_Element; function Name (Position : Cursor) return String is begin return Name_Reference (Position).Element.all; end Name; function Value (Position : Cursor) return String is begin return Value_Reference (Position).Element.all; end Value; function Iterate return Iterator_Interfaces.Forward_Iterator'Class is begin return Iterator'(null record); end Iterate; overriding function First (Object : Iterator) return Cursor is pragma Unreferenced (Object); begin return First; end First; overriding function Next (Object : Iterator; Position : Cursor) return Cursor is pragma Unreferenced (Object); begin return Next (Position); end Next; end Ada.Bind_Time_Variables;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014-2019, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Strings.Unbounded; with AWS.Containers.Tables; with AWS.Cookie; with AWS.Headers; with AWS.Messages; with AWS.Response.Set; with Matreshka.RFC2616_Dates; package body Matreshka.Servlet_AWS_Responses is To_AWS_Status_Code : constant array (Servlet.HTTP_Responses.Status_Code) of AWS.Messages.Status_Code := (Servlet.HTTP_Responses.Continue => AWS.Messages.S100, Servlet.HTTP_Responses.Switching_Protocols => AWS.Messages.S101, Servlet.HTTP_Responses.OK => AWS.Messages.S200, Servlet.HTTP_Responses.Created => AWS.Messages.S201, Servlet.HTTP_Responses.Accepted => AWS.Messages.S202, Servlet.HTTP_Responses.Non_Authoritative_Information => AWS.Messages.S203, Servlet.HTTP_Responses.No_Content => AWS.Messages.S204, Servlet.HTTP_Responses.Reset_Content => AWS.Messages.S205, Servlet.HTTP_Responses.Partial_Content => AWS.Messages.S206, Servlet.HTTP_Responses.Multiple_Choices => AWS.Messages.S300, Servlet.HTTP_Responses.Moved_Permanently => AWS.Messages.S301, Servlet.HTTP_Responses.Moved_Temporarily => AWS.Messages.S302, Servlet.HTTP_Responses.Found => AWS.Messages.S302, Servlet.HTTP_Responses.See_Other => AWS.Messages.S303, Servlet.HTTP_Responses.Not_Modified => AWS.Messages.S304, Servlet.HTTP_Responses.Use_Proxy => AWS.Messages.S305, Servlet.HTTP_Responses.Temporary_Redirect => AWS.Messages.S307, Servlet.HTTP_Responses.Bad_Request => AWS.Messages.S400, Servlet.HTTP_Responses.Unauthorized => AWS.Messages.S401, Servlet.HTTP_Responses.Payment_Required => AWS.Messages.S402, Servlet.HTTP_Responses.Forbidden => AWS.Messages.S403, Servlet.HTTP_Responses.Not_Found => AWS.Messages.S404, Servlet.HTTP_Responses.Method_Not_Allowed => AWS.Messages.S405, Servlet.HTTP_Responses.Not_Acceptable => AWS.Messages.S406, Servlet.HTTP_Responses.Proxy_Authentication_Required => AWS.Messages.S407, Servlet.HTTP_Responses.Request_Timeout => AWS.Messages.S408, Servlet.HTTP_Responses.Conflict => AWS.Messages.S409, Servlet.HTTP_Responses.Gone => AWS.Messages.S410, Servlet.HTTP_Responses.Length_Required => AWS.Messages.S411, Servlet.HTTP_Responses.Precondition_Failed => AWS.Messages.S412, Servlet.HTTP_Responses.Request_Entity_Too_Large => AWS.Messages.S413, Servlet.HTTP_Responses.Request_URI_Too_Long => AWS.Messages.S414, Servlet.HTTP_Responses.Unsupported_Media_Type => AWS.Messages.S415, Servlet.HTTP_Responses.Requested_Range_Not_Satisfiable => AWS.Messages.S416, Servlet.HTTP_Responses.Expectation_Failed => AWS.Messages.S417, Servlet.HTTP_Responses.Internal_Server_Error => AWS.Messages.S500, Servlet.HTTP_Responses.Not_Implemented => AWS.Messages.S501, Servlet.HTTP_Responses.Bad_Gateway => AWS.Messages.S502, Servlet.HTTP_Responses.Service_Unavailable => AWS.Messages.S503, Servlet.HTTP_Responses.Gateway_Timeout => AWS.Messages.S504, Servlet.HTTP_Responses.HTTP_Version_Not_Supported => AWS.Messages.S505); Format : Matreshka.RFC2616_Dates.Format; ---------------- -- Add_Cookie -- ---------------- overriding procedure Add_Cookie (Self : in out AWS_Servlet_Response; Cookie : Servlet.HTTP_Cookies.Cookie) is Path : constant League.Strings.Universal_String := Cookie.Get_Path; AWS_Path : constant League.Strings.Universal_String := (if Path.Is_Empty then League.Strings.To_Universal_String ("/") else Path); -- AWS sends Path attributes always, so set its value to root. begin AWS.Cookie.Set (Content => Self.Data, Key => Cookie.Get_Name.To_UTF_8_String, Value => Cookie.Get_Value.To_UTF_8_String, Comment => Cookie.Get_Comment.To_UTF_8_String, Domain => Cookie.Get_Domain.To_UTF_8_String, -- XXX Must be encoded when containts non-ASCII characters. Max_Age => AWS.Cookie.No_Max_Age, -- XXX Not supported yet. Path => AWS_Path.To_UTF_8_String, Secure => Cookie.Get_Secure); end Add_Cookie; --------------------- -- Add_Date_Header -- --------------------- overriding procedure Add_Date_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String; Value : League.Calendars.Date_Time) is Image : constant League.Strings.Universal_String := Matreshka.RFC2616_Dates.To_String (Format, Value); begin AWS.Response.Set.Add_Header (Self.Data, Name.To_UTF_8_String, Image.To_UTF_8_String); end Add_Date_Header; ---------------- -- Add_Header -- ---------------- overriding procedure Add_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String; Value : League.Strings.Universal_String) is begin AWS.Response.Set.Add_Header (Self.Data, Name.To_UTF_8_String, Value.To_UTF_8_String); end Add_Header; ------------------------ -- Add_Integer_Header -- ------------------------ overriding procedure Add_Integer_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String; Value : League.Holders.Universal_Integer) is begin raise Program_Error; -- XXX Not implemented. end Add_Integer_Header; ----------- -- Build -- ----------- function Build (Self : in out AWS_Servlet_Response'Class) return AWS.Response.Data is begin Self.Set_Session_Cookie; return Self.Data; end Build; --------------------- -- Contains_Header -- --------------------- overriding function Contains_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String) return Boolean is List : constant AWS.Headers.List := AWS.Response.Header (Self.Data); begin return List.Exist (Name.To_UTF_8_String); end Contains_Header; ---------------------- -- Get_Header_Names -- ---------------------- overriding function Get_Header_Names (Self : in out AWS_Servlet_Response) return League.String_Vectors.Universal_String_Vector is List : constant AWS.Headers.List := AWS.Response.Header (Self.Data); Names : constant AWS.Containers.Tables.VString_Array := List.Get_Names; Result : League.String_Vectors.Universal_String_Vector; begin for J in Names'Range loop Result.Append (League.Strings.From_UTF_8_String (Ada.Strings.Unbounded.To_String (Names (J)))); end loop; return Result; end Get_Header_Names; ----------------- -- Get_Headers -- ----------------- overriding function Get_Headers (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String) return League.String_Vectors.Universal_String_Vector is List : constant AWS.Headers.List := AWS.Response.Header (Self.Data); Values : constant AWS.Containers.Tables.VString_Array := List.Get_Values (Name.To_UTF_8_String); Result : League.String_Vectors.Universal_String_Vector; begin for J in Values'Range loop Result.Append (League.Strings.From_UTF_8_String (Ada.Strings.Unbounded.To_String (Values (J)))); end loop; return Result; end Get_Headers; ----------------------- -- Get_Output_Stream -- ----------------------- overriding function Get_Output_Stream (Self : AWS_Servlet_Response) return not null access Servlet.Output_Streams.Servlet_Output_Stream'Class is begin if AWS_Servlet_Response (Self.Output.all).Codec = null and not Self.Encoding.Is_Empty then AWS_Servlet_Response (Self.Output.all).Codec := new League.Text_Codecs.Text_Codec' (League.Text_Codecs.Codec (Self.Encoding)); end if; return Self.Output; end Get_Output_Stream; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : in out AWS_Servlet_Response'Class; Request : not null Matreshka.Servlet_HTTP_Requests.HTTP_Servlet_Request_Access) is begin Matreshka.Servlet_HTTP_Responses.Initialize (Self, Request); Self.Stream := new AWS.Resources.Streams.Memory.Stream_Type; AWS.Response.Set.Stream (Self.Data, Self.Stream); -- Memory will be released by AWS. Self.Output := Self'Unchecked_Access; end Initialize; -------------- -- Is_Ready -- -------------- overriding function Is_Ready (Self : AWS_Servlet_Response) return Boolean is begin -- Asynchronous mode is not supported by AWS. return False; end Is_Ready; ---------------- -- Send_Error -- ---------------- overriding procedure Send_Error (Self : in out AWS_Servlet_Response; Code : Servlet.HTTP_Responses.Status_Code; Message : League.Strings.Universal_String) is begin AWS.Response.Set.Status_Code (Self.Data, To_AWS_Status_Code (Code)); end Send_Error; ------------------- -- Send_Redirect -- ------------------- overriding procedure Send_Redirect (Self : in out AWS_Servlet_Response; Location : League.IRIs.IRI) is begin AWS.Response.Set.Status_Code (Self.Data, AWS.Messages.S302); AWS.Response.Set.Location (Self.Data, Location.To_Universal_String.To_UTF_8_String); AWS.Response.Set.Mode (Self.Data, AWS.Response.Header); end Send_Redirect; ---------------------------- -- Set_Character_Encoding -- ---------------------------- overriding procedure Set_Character_Encoding (Self : in out AWS_Servlet_Response; Encoding : League.Strings.Universal_String) is begin Self.Encoding := Encoding; if Self.Encoding.Is_Empty then AWS.Response.Set.Content_Type (Self.Data, Self.Content_Type.To_UTF_8_String); else AWS.Response.Set.Content_Type (Self.Data, Self.Content_Type.To_UTF_8_String & ";charset=" & Self.Encoding.To_UTF_8_String); end if; end Set_Character_Encoding; ---------------------- -- Set_Content_Type -- ---------------------- overriding procedure Set_Content_Type (Self : in out AWS_Servlet_Response; To : League.Strings.Universal_String) is begin -- XXX Encoding must be extracted from passed content type and set. Self.Content_Type := To; if Self.Encoding.Is_Empty then AWS.Response.Set.Content_Type (Self.Data, Self.Content_Type.To_UTF_8_String); else AWS.Response.Set.Content_Type (Self.Data, Self.Content_Type.To_UTF_8_String & ";charset=" & Self.Encoding.To_UTF_8_String); end if; end Set_Content_Type; --------------------- -- Set_Date_Header -- --------------------- overriding procedure Set_Date_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String; Value : League.Calendars.Date_Time) is Image : constant League.Strings.Universal_String := Matreshka.RFC2616_Dates.To_String (Format, Value); begin AWS.Response.Set.Update_Header (Self.Data, Name.To_UTF_8_String, Image.To_UTF_8_String); end Set_Date_Header; ---------------- -- Set_Header -- ---------------- overriding procedure Set_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String; Value : League.Strings.Universal_String) is begin AWS.Response.Set.Update_Header (Self.Data, Name.To_UTF_8_String, Value.To_UTF_8_String); end Set_Header; ------------------------ -- Set_Integer_Header -- ------------------------ overriding procedure Set_Integer_Header (Self : in out AWS_Servlet_Response; Name : League.Strings.Universal_String; Value : League.Holders.Universal_Integer) is begin raise Program_Error; -- XXX Not implemented. end Set_Integer_Header; ---------------- -- Set_Status -- ---------------- overriding procedure Set_Status (Self : in out AWS_Servlet_Response; Status : Servlet.HTTP_Responses.Status_Code) is begin Matreshka.Servlet_HTTP_Responses.Abstract_HTTP_Servlet_Response (Self).Set_Status (Status); AWS.Response.Set.Status_Code (Self.Data, To_AWS_Status_Code (Status)); end Set_Status; ------------------------ -- Set_Write_Listener -- ------------------------ overriding procedure Set_Write_Listener (Self : in out AWS_Servlet_Response; Listener : not null access Servlet.Write_Listeners.Write_Listener'Class) is begin null; end Set_Write_Listener; ----------- -- Write -- ----------- overriding procedure Write (Self : in out AWS_Servlet_Response; Item : Ada.Streams.Stream_Element_Array) is begin Self.Stream.Append (Item); end Write; ----------- -- Write -- ----------- overriding procedure Write (Self : in out AWS_Servlet_Response; Item : League.Strings.Universal_String) is begin Self.Stream.Append (Self.Codec.Encode (Item).To_Stream_Element_Array); end Write; end Matreshka.Servlet_AWS_Responses;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2013, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with League.Characters; with League.Strings; package XML.SAX.Output_Destinations is pragma Preelaborate; type SAX_Output_Destination is limited interface; not overriding function Get_Encoding (Self : SAX_Output_Destination) return League.Strings.Universal_String is abstract; -- Returns character encoding used to convert Unicode character code point -- into the external items. This operation is used by XML writers to -- generate 'encoding' attribute for XML declaration or text declaration. not overriding procedure Put (Self : in out SAX_Output_Destination; Text : League.Strings.Universal_String) is abstract; not overriding procedure Put (Self : in out SAX_Output_Destination; Text : Wide_Wide_String) is abstract; not overriding procedure Put (Self : in out SAX_Output_Destination; Char : League.Characters.Universal_Character) is abstract; not overriding procedure Put (Self : in out SAX_Output_Destination; Char : Wide_Wide_Character) is abstract; end XML.SAX.Output_Destinations;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- A D A . N U M E R I C S . A U X -- -- -- -- S p e c -- -- (C Library Version) -- -- -- -- $Revision: 2 $ -- -- -- -- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ -- This package provides the basic computational interface for the generic -- elementary functions. The C library version interfaces with the routines -- in the C mathematical library, and is thus quite portable, although it may -- not necessarily meet the requirements for accuracy in the numerics annex. -- One advantage of using this package is that it will interface directly to -- hardware instructions, such as the those provided on the Intel 80x87. package Ada.Numerics.Aux is pragma Pure (Aux); subtype Double is Long_Float; -- implementation dependent function Sin (X : Double) return Double; pragma Import (C, Sin, "sin"); function Cos (X : Double) return Double; pragma Import (C, Cos, "cos"); function Tan (X : Double) return Double; pragma Import (C, Tan, "tan"); function Exp (X : Double) return Double; pragma Import (C, Exp, "exp"); function Sqrt (X : Double) return Double; pragma Import (C, Sqrt, "sqrt"); function Log (X : Double) return Double; pragma Import (C, Log, "log"); function Acos (X : Double) return Double; pragma Import (C, Acos, "acos"); function Asin (X : Double) return Double; pragma Import (C, Asin, "asin"); function Atan (X : Double) return Double; pragma Import (C, Atan, "atan"); function Sinh (X : Double) return Double; pragma Import (C, Sinh, "sinh"); function Cosh (X : Double) return Double; pragma Import (C, Cosh, "cosh"); function Tanh (X : Double) return Double; pragma Import (C, Tanh, "tanh"); function Pow (X, Y : Double) return Double; pragma Import (C, Pow, "pow"); end Ada.Numerics.Aux;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . E X N _ L L F -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- [Long_[Long_]]Float exponentiation (checks off) package System.Exn_LLF is pragma Pure; function Exn_Float (Left : Float; Right : Integer) return Float; function Exn_Long_Float (Left : Long_Float; Right : Integer) return Long_Float; function Exn_Long_Long_Float (Left : Long_Long_Float; Right : Integer) return Long_Long_Float; end System.Exn_LLF;
with AdaM.Factory; package body AdaM.a_Type.enumeration_literal is -- Storage Pool -- record_Version : constant := 1; pool_Size : constant := 5_000; package Pool is new AdaM.Factory.Pools (storage_Folder => ".adam-store", pool_Name => "enumeration_literals", max_Items => pool_Size, record_Version => record_Version, Item => enumeration_Literal.item, View => enumeration_Literal.view); -- Forge -- procedure define (Self : in out Item; Name : in String) is begin Self.Name_is (Name); end define; overriding procedure destruct (Self : in out Item) is begin null; end destruct; function new_Literal (Value : in String := "") return enumeration_Literal.View is new_View : constant enumeration_Literal.view := Pool.new_Item; begin define (enumeration_Literal.item (new_View.all), Value); return new_View; end new_Literal; procedure free (Self : in out enumeration_Literal.view) is begin destruct (enumeration_Literal.item (Self.all)); Pool.free (Self); end free; -- Attributes -- overriding function Id (Self : access Item) return AdaM.Id is begin return Pool.to_Id (Self); end Id; overriding function to_Source (Self : in Item) return text_Vectors.Vector is pragma Unreferenced (Self); the_Source : text_Vectors.Vector; begin raise Program_Error with "TODO"; return the_Source; end to_Source; -- Streams -- procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : in View) renames Pool.View_write; procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : out View) renames Pool.View_read; end AdaM.a_Type.enumeration_literal;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Source_Buffers; private with Ada.Containers.Hashed_Maps; package Program.Symbols.Tables is pragma Preelaborate; type Symbol_Table is tagged limited private; procedure Initialize (Self : in out Symbol_Table); -- Initialize given symbol table with predefinced symbols function Find (Self : Symbol_Table'Class; Value : Program.Text) return Symbol; -- Return symbol for given Text or No_Symbol if no such value in the table procedure Find_Or_Create (Self : in out Symbol_Table'Class; Buffer : not null Program.Source_Buffers.Source_Buffer_Access; Span : Program.Source_Buffers.Span; Result : out Symbol); function Symbol_Text (Self : Symbol_Table'Class; Symbol : Program.Symbols.Symbol) return Program.Text; -- Return text of the Symbol private type Symbol_Reference is record Buffer : not null Program.Source_Buffers.Source_Buffer_Access; Span : Program.Source_Buffers.Span; end record; function Equal (Left, Right : Symbol_Reference) return S.Boolean; function Hash (Value : Symbol_Reference) return Ada.Containers.Hash_Type; package Symbol_Maps is new Ada.Containers.Hashed_Maps (Key_Type => Symbol_Reference, Element_Type => Program.Symbols.Symbol, Hash => Hash, Equivalent_Keys => Equal, "=" => Program.Symbols."="); package Reference_Maps is new Ada.Containers.Hashed_Maps (Key_Type => Program.Symbols.Symbol, Element_Type => Symbol_Reference, Hash => Program.Symbols.Hash, Equivalent_Keys => Program.Symbols."=", "=" => Equal); function Hash (Value : Symbol) return Ada.Containers.Hash_Type is (Ada.Containers.Hash_Type'Mod (Value)); type Predefined_Source_Buffer is new Program.Source_Buffers.Source_Buffer with null record; overriding function Text (Self : Predefined_Source_Buffer; Span : Program.Source_Buffers.Span) return Program.Text; overriding procedure Read (Self : in out Predefined_Source_Buffer; Data : out Program.Source_Buffers.Character_Info_Array; Last : out Natural) is null; overriding procedure Rewind (Self : in out Predefined_Source_Buffer) is null; type Symbol_Table is tagged limited record Map : Symbol_Maps.Map; References : Reference_Maps.Map; Buffer : aliased Predefined_Source_Buffer; Last_Symbol : Program.Symbols.Symbol := Program.Symbols.X_Symbol'Last; end record; type Symbol_List is null record; type Symbol_List_Table is tagged limited null record; end Program.Symbols.Tables;
-- Generated by Snowball 2.2.0 - https://snowballstem.org/ package Stemmer.Nepali with SPARK_Mode is type Context_Type is new Stemmer.Context_Type with private; procedure Stem (Z : in out Context_Type; Result : out Boolean); private type Context_Type is new Stemmer.Context_Type with null record; end Stemmer.Nepali;
-- Copyright (c) 2021 Devin Hill -- zlib License -- see LICENSE for details. with GBA.Memory.IO_Registers; use GBA.Memory.IO_Registers; with Ada.Unchecked_Conversion; with Interfaces; use Interfaces; package body GBA.Interrupts is -- IO Register Definitions -- Enabled_Master : Boolean with Import, Volatile, Address => IME; Enabled_Flags : Interrupt_Flags with Import, Volatile, Address => IE; Acknowledge_Flags : Interrupt_Flags with Import, Volatile, Address => IRF; Acknowledge_BIOS_Flags : Interrupt_Flags with Import, Volatile, Address => 16#3007FF8#; -- ID to Flags conversions -- function As_Flags (ID : Interrupt_ID) return Interrupt_Flags with Pure_Function, Inline_Always is function Cast is new Ada.Unchecked_Conversion(Unsigned_16, Interrupt_Flags); begin return Cast( Shift_Left(1, Interrupt_ID'Enum_Rep(ID)) ); end; function "or" (I1, I2 : Interrupt_ID) return Interrupt_Flags is ( As_Flags(I1) or As_Flags(I2) ); function "or" (F : Interrupt_Flags; I : Interrupt_ID) return Interrupt_Flags is ( F or As_Flags(I) ); -- Currently Registered Handlers -- Handlers : array (Interrupt_ID) of Interrupt_Handler := (others => null) with Export, External_Name => "interrupt_handler_array"; procedure Default_Interrupt_Dispatcher is separate; Interrupt_Dispatcher : access procedure with Import, Address => 16#3007FFC#; -- Master Interrupt Enable/Disable -- procedure Enable_Receiving_Interrupts (Enabled : Boolean) is begin Enabled_Master := Enabled; end; procedure Enable_Receiving_Interrupts is begin Enabled_Master := True; end; procedure Disable_Receiving_Interrupts (Enabled : out Boolean) is begin Enabled := Enabled_Master; Enabled_Master := False; end; procedure Disable_Receiving_Interrupts is begin Enabled_Master := False; end; -- Individual Interrupt Enable/Disable -- procedure Enable_Interrupt (ID : Interrupt_ID) is begin Enabled_Flags := Enabled_Flags or ID; end; procedure Enable_Interrupt (Flags : Interrupt_Flags) is begin Enabled_Flags := Enabled_Flags or Flags; end; procedure Disable_Interrupt (ID : Interrupt_ID) is begin Enabled_Flags := Enabled_Flags and not As_Flags(ID); end; procedure Disable_Interrupt (Flags : Interrupt_Flags) is begin Enabled_Flags := Enabled_Flags and not Flags; end; procedure Disable_Interrupts_And_Save (Flags : out Interrupt_Flags) is begin Flags := Enabled_Flags; Enabled_Flags := 0; end; procedure Acknowledge_Interrupt (ID : Interrupt_ID) is Flags : Interrupt_Flags := As_Flags(ID); begin Acknowledge_Flags := Flags; Acknowledge_BIOS_Flags := Flags; end; procedure Acknowledge_Interrupt (Flags : Interrupt_Flags) is begin Acknowledge_Flags := Flags; Acknowledge_BIOS_Flags := Flags; end; -- Interrupt Handler Settings -- procedure Attach_Interrupt_Handler (ID : Interrupt_ID; Handler : not null Interrupt_Handler) is begin Handlers(ID) := Handler; end; procedure Attach_Interrupt_Handler_And_Save (ID : Interrupt_ID; Handler : not null Interrupt_Handler; Old_Handler : out Interrupt_Handler) is begin Old_Handler := Handlers(ID); Handlers(ID) := Handler; end; procedure Detach_Interrupt_Handler (ID : Interrupt_ID) is begin Handlers(ID) := null; end; procedure Detach_Interrupt_Handler_And_Save (ID : Interrupt_ID; Old_Handler : out Interrupt_Handler) is begin Old_Handler := Handlers(ID); Handlers(ID) := null; end; begin -- Register default handler. -- Ensures safety of enabling interrupts. Interrupt_Dispatcher := Default_Interrupt_Dispatcher'Access; end GBA.Interrupts;
with Ada.Text_IO; use Ada.Text_IO; procedure Main is subtype Year_T is Positive range 1_900 .. 2_099; subtype Month_T is Positive range 1 .. 12; subtype Day_T is Positive range 1 .. 31; type Date_T is record Year : Positive; Month : Positive; Day : Positive; end record; -- implement correctly as an expression function function Is_Leap_Year (Year : Positive) return Boolean is (False); -- implement correctly as an expression function -- (case expression would be helpful) function Days_In_Month (Month : Positive; Year : Positive) return Positive is (1); -- Implement correctly as an expression function function Is_Valid (Date : Date_T) return Boolean is (False); List : array (1 .. 5) of Date_T; Item : Date_T; function Number (Prompt : String) return Positive is begin Put (Prompt & "> "); return Positive'value (Get_Line); end Number; begin for I in List'range loop Item.Year := Number ("Year"); Item.Month := Number ("Month"); Item.Day := Number ("Day"); List (I) := Item; end loop; -- Print True/False if any date in the list is not valid Put_Line ("Any invalid: " & Boolean'image (False)); -- Print True/False if all dates in the list are in the same year Put_Line ("Same Year: " & Boolean'image (False)); end Main;
-- C64201C.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT INITIALIZATION OF IN PARAMETERS OF A COMPOSITE -- TYPE HAVING AT LEAST ONE COMPONENT (INCLUDING COMPONENTS -- OF COMPONENTS) OF A TASK TYPE IS PERMITTED. -- (SEE ALSO 7.4.4/T2 FOR TESTS OF LIMITED PRIVATE TYPES.) -- CVP 5/14/81 -- ABW 7/1/82 -- BHS 7/9/84 WITH REPORT; USE REPORT; PROCEDURE C64201C IS GLOBAL : INTEGER := 10; TASK TYPE T IS ENTRY E (X : IN OUT INTEGER); END; TYPE REC_T IS RECORD TT : T; BB : BOOLEAN := TRUE; END RECORD; TYPE REC_REC_T IS RECORD RR : REC_T; END RECORD; TYPE ARR_T IS ARRAY (1 .. 2) OF T; TYPE ARR_REC_T IS ARRAY (1 .. 2) OF REC_T; RT1, RT2 : REC_T; RRT1, RRT2 : REC_REC_T; AT1, AT2 : ARR_T; ART1, ART2 : ARR_REC_T; TASK BODY T IS BEGIN ACCEPT E (X : IN OUT INTEGER) DO X := X - 1; END E; ACCEPT E (X : IN OUT INTEGER) DO X := X + 1; END E; END T; PROCEDURE PROC1A (P1X : REC_T := RT1) IS BEGIN IF P1X.BB THEN -- EXPECT RT2 PASSED. FAILED( "RECORD OF TASK NOT PASSED, DEFAULT EMPLOYED" ); END IF; END PROC1A; PROCEDURE PROC1B (P1X : REC_T := RT1) IS BEGIN IF NOT P1X.BB THEN -- EXPECT DEFAULT USED. FAILED( "DEFAULT RECORD OF TASK NOT EMPLOYED" ); END IF; END PROC1B; PROCEDURE PROC2A (P2X : REC_REC_T := RRT1) IS BEGIN IF P2X.RR.BB THEN -- EXPECT RRT2 PASSED. FAILED( "RECORD OF RECORD OF TASK NOT PASSED, " & "DEFAULT EMPLOYED" ); END IF; END PROC2A; PROCEDURE PROC2B (P2X : REC_REC_T := RRT1) IS BEGIN IF NOT P2X.RR.BB THEN -- EXPECT DEFAULT USED. FAILED( "DEFAULT RECORD OF RECORD OF TASK " & "NOT EMPLOYED" ); END IF; END PROC2B; PROCEDURE PROC3 (P3X : ARR_T := AT1) IS BEGIN P3X(1).E (X => GLOBAL); -- CALL TO AT2(1).E, -- GLOBAL => GLOBAL - 1. END PROC3; PROCEDURE PROC4 (P4X : ARR_T := AT1) IS BEGIN P4X(1).E (X => GLOBAL); -- CALL TO DEFAULT AT1(1).E, -- GLOBAL => GLOBAL - 1. IF GLOBAL /= IDENT_INT(8) THEN FAILED( "ARRAY OF TASKS NOT PASSED " & "CORRECTLY IN PROC3" ); END IF; END PROC4; PROCEDURE PROC5 (P5X : ARR_REC_T := ART1) IS BEGIN P5X(1).TT.E (X => GLOBAL); -- CALL TO ART2(1).TT.E, -- GLOBAL => GLOBAL - 1. END PROC5; PROCEDURE PROC6 (P6X : ARR_REC_T := ART1) IS BEGIN P6X(1).TT.E (X => GLOBAL); -- CALL DEFAULT ART1(1).TT.E, -- GLOBAL => GLOBAL - 1. IF GLOBAL /= IDENT_INT(8) THEN FAILED( "ARRAY OF RECORDS OF TASKS NOT " & "PASSED IN PROC5" ); END IF; END PROC6; PROCEDURE TERM (TSK : T; NUM : CHARACTER) IS BEGIN IF NOT TSK'TERMINATED THEN ABORT TSK; COMMENT ("ABORTING TASK " & NUM); END IF; END TERM; BEGIN TEST( "C64201C" , "CHECK THAT INITIALIZATION OF IN " & "PARAMETERS OF A COMPOSITE TYPE " & "IS PERMITTED" ); RT2.BB := FALSE; RRT2.RR.BB := FALSE; PROC1A(RT2); -- NO ENTRY CALL PROC1B; -- NO ENTRY CALL PROC2A(RRT2); -- NO ENTRY CALL PROC2B; -- NO ENTRY CALL PROC3(AT2); -- CALL AT2(1).E IF GLOBAL /= 9 THEN FAILED ("INCORRECT GLOBAL VALUE AFTER PROC3"); ELSE PROC4; -- CALL AT1(1).E END IF; GLOBAL := 10; PROC5(ART2); -- CALL ART2(1).TT.E IF GLOBAL /= 9 THEN FAILED ("INCORRECT GLOBAL VALUE AFTER PROC5"); ELSE PROC6; -- CALL ART1(1).TT.E END IF; -- MAKE SURE ALL TASKS TERMINATED TERM (RT1.TT, '1'); TERM (RT2.TT, '2'); TERM (RRT1.RR.TT, '3'); TERM (RRT2.RR.TT, '4'); TERM (AT1(1), '5'); TERM (AT2(1), '6'); TERM (AT1(2), '7'); TERM (AT2(2), '8'); TERM (ART1(1).TT, '9'); TERM (ART2(1).TT, 'A'); TERM (ART1(2).TT, 'B'); TERM (ART2(2).TT, 'C'); RESULT; END C64201C;
with Ada.Real_Time; with Ada.Text_IO; with AWS.Default; with AWS.Server; with Router_Cb; procedure Main is WS : AWS.Server.HTTP; Port : constant Natural := AWS.Default.Server_Port; begin Ada.Text_IO.Put_Line ("Serving on 127.0.0.1:" & Port'Img); Router_Cb.Init; AWS.Server.Start (WS, "Hello World", Max_Connection => 1, Callback => Router_Cb.Router'Access, Port => Port); while Router_Cb.Server_Alive loop delay until Ada.Real_Time.Time_Last; end loop; AWS.Server.Shutdown (WS); end Main;
pragma License (Unrestricted); package Ada is pragma Pure; -- extended -- This package creates usable debug output. -- It is placed in the package Ada directly, -- therefore it does not need to write any additional "with" clause. package Debug is function File return String with Import, Convention => Intrinsic; function Line return Positive with Import, Convention => Intrinsic; function Source_Location return String with Import, Convention => Intrinsic; function Enclosing_Entity return String with Import, Convention => Intrinsic; function Compilation_ISO_Date return String with Import, Convention => Intrinsic; function Compilation_Date return String with Import, Convention => Intrinsic; function Compilation_Time return String with Import, Convention => Intrinsic; procedure Put ( S : String; Source_Location : String := Debug.Source_Location; Enclosing_Entity : String := Debug.Enclosing_Entity) with Import, Convention => Ada, External_Name => "__drake_debug_put"; function Put ( S : String; Source_Location : String := Debug.Source_Location; Enclosing_Entity : String := Debug.Enclosing_Entity) return Boolean -- always True to use in pragma Assert/Check with Import, Convention => Ada, External_Name => "__drake_debug_put"; end Debug; end Ada;
-- -- Copyright (C) 2021, AdaCore -- pragma Style_Checks (Off); -- This spec has been automatically generated from STM32L562.svd with System; package Interfaces.STM32.USART is pragma Preelaborate; pragma No_Elaboration_Code_All; --------------- -- Registers -- --------------- -- Control register 1 type CR1_Register is record -- USART enable UE : Boolean := False; -- USART enable in Stop mode UESM : Boolean := False; -- Receiver enable RE : Boolean := False; -- Transmitter enable TE : Boolean := False; -- IDLE interrupt enable IDLEIE : Boolean := False; -- RXNE interrupt enable RXNEIE : Boolean := False; -- Transmission complete interrupt enable TCIE : Boolean := False; -- interrupt enable TXEIE : Boolean := False; -- PE interrupt enable PEIE : Boolean := False; -- Parity selection PS : Boolean := False; -- Parity control enable PCE : Boolean := False; -- Receiver wakeup method WAKE : Boolean := False; -- Word length M0 : Boolean := False; -- Mute mode enable MME : Boolean := False; -- Character match interrupt enable CMIE : Boolean := False; -- unspecified Reserved_15_15 : Interfaces.STM32.Bit := 16#0#; -- DEDT DEDT : Interfaces.STM32.UInt5 := 16#0#; -- DEAT DEAT : Interfaces.STM32.UInt5 := 16#0#; -- unspecified Reserved_26_27 : Interfaces.STM32.UInt2 := 16#0#; -- Word length M1 : Boolean := False; -- FIFOEN FIFOEN : Boolean := False; -- TXFEIE TXFEIE : Boolean := False; -- RXFFIE RXFFIE : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record UE at 0 range 0 .. 0; UESM at 0 range 1 .. 1; RE at 0 range 2 .. 2; TE at 0 range 3 .. 3; IDLEIE at 0 range 4 .. 4; RXNEIE at 0 range 5 .. 5; TCIE at 0 range 6 .. 6; TXEIE at 0 range 7 .. 7; PEIE at 0 range 8 .. 8; PS at 0 range 9 .. 9; PCE at 0 range 10 .. 10; WAKE at 0 range 11 .. 11; M0 at 0 range 12 .. 12; MME at 0 range 13 .. 13; CMIE at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; DEDT at 0 range 16 .. 20; DEAT at 0 range 21 .. 25; Reserved_26_27 at 0 range 26 .. 27; M1 at 0 range 28 .. 28; FIFOEN at 0 range 29 .. 29; TXFEIE at 0 range 30 .. 30; RXFFIE at 0 range 31 .. 31; end record; -- Control register 2 type CR2_Register is record -- unspecified Reserved_0_3 : Interfaces.STM32.UInt4 := 16#0#; -- 7-bit Address Detection/4-bit Address Detection ADDM7 : Boolean := False; -- unspecified Reserved_5_11 : Interfaces.STM32.UInt7 := 16#0#; -- STOP bits STOP : Interfaces.STM32.UInt2 := 16#0#; -- unspecified Reserved_14_14 : Interfaces.STM32.Bit := 16#0#; -- Swap TX/RX pins SWAP : Boolean := False; -- RX pin active level inversion RXINV : Boolean := False; -- TX pin active level inversion TXINV : Boolean := False; -- Binary data inversion TAINV : Boolean := False; -- Most significant bit first MSBFIRST : Boolean := False; -- unspecified Reserved_20_23 : Interfaces.STM32.UInt4 := 16#0#; -- Address of the USART node ADD0_3 : Interfaces.STM32.UInt4 := 16#0#; -- Address of the USART node ADD4_7 : Interfaces.STM32.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record Reserved_0_3 at 0 range 0 .. 3; ADDM7 at 0 range 4 .. 4; Reserved_5_11 at 0 range 5 .. 11; STOP at 0 range 12 .. 13; Reserved_14_14 at 0 range 14 .. 14; SWAP at 0 range 15 .. 15; RXINV at 0 range 16 .. 16; TXINV at 0 range 17 .. 17; TAINV at 0 range 18 .. 18; MSBFIRST at 0 range 19 .. 19; Reserved_20_23 at 0 range 20 .. 23; ADD0_3 at 0 range 24 .. 27; ADD4_7 at 0 range 28 .. 31; end record; -- Control register 3 type CR3_Register is record -- Error interrupt enable EIE : Boolean := False; -- unspecified Reserved_1_2 : Interfaces.STM32.UInt2 := 16#0#; -- Half-duplex selection HDSEL : Boolean := False; -- unspecified Reserved_4_5 : Interfaces.STM32.UInt2 := 16#0#; -- DMA enable receiver DMAR : Boolean := False; -- DMA enable transmitter DMAT : Boolean := False; -- RTS enable RTSE : Boolean := False; -- CTS enable CTSE : Boolean := False; -- CTS interrupt enable CTSIE : Boolean := False; -- unspecified Reserved_11_11 : Interfaces.STM32.Bit := 16#0#; -- Overrun Disable OVRDIS : Boolean := False; -- DMA Disable on Reception Error DDRE : Boolean := False; -- Driver enable mode DEM : Boolean := False; -- Driver enable polarity selection DEP : Boolean := False; -- unspecified Reserved_16_19 : Interfaces.STM32.UInt4 := 16#0#; -- Wakeup from Stop mode interrupt flag selection WUS : Interfaces.STM32.UInt2 := 16#0#; -- Wakeup from Stop mode interrupt enable WUFIE : Boolean := False; -- TXFTIE TXFTIE : Boolean := False; -- unspecified Reserved_24_24 : Interfaces.STM32.Bit := 16#0#; -- RXFTCFG RXFTCFG : Interfaces.STM32.UInt3 := 16#0#; -- RXFTIE RXFTIE : Boolean := False; -- TXFTCFG TXFTCFG : Interfaces.STM32.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR3_Register use record EIE at 0 range 0 .. 0; Reserved_1_2 at 0 range 1 .. 2; HDSEL at 0 range 3 .. 3; Reserved_4_5 at 0 range 4 .. 5; DMAR at 0 range 6 .. 6; DMAT at 0 range 7 .. 7; RTSE at 0 range 8 .. 8; CTSE at 0 range 9 .. 9; CTSIE at 0 range 10 .. 10; Reserved_11_11 at 0 range 11 .. 11; OVRDIS at 0 range 12 .. 12; DDRE at 0 range 13 .. 13; DEM at 0 range 14 .. 14; DEP at 0 range 15 .. 15; Reserved_16_19 at 0 range 16 .. 19; WUS at 0 range 20 .. 21; WUFIE at 0 range 22 .. 22; TXFTIE at 0 range 23 .. 23; Reserved_24_24 at 0 range 24 .. 24; RXFTCFG at 0 range 25 .. 27; RXFTIE at 0 range 28 .. 28; TXFTCFG at 0 range 29 .. 31; end record; -- Baud rate register type BRR_Register is record -- BRR BRR : Interfaces.STM32.UInt20 := 16#0#; -- unspecified Reserved_20_31 : Interfaces.STM32.UInt12 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BRR_Register use record BRR at 0 range 0 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; -- Request register type RQR_Register is record -- unspecified Reserved_0_0 : Interfaces.STM32.Bit := 16#0#; -- Write-only. Send break request SBKRQ : Boolean := False; -- Write-only. Mute mode request MMRQ : Boolean := False; -- Write-only. Receive data flush request RXFRQ : Boolean := False; -- Write-only. TXFRQ TXFRQ : Boolean := False; -- unspecified Reserved_5_31 : Interfaces.STM32.UInt27 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RQR_Register use record Reserved_0_0 at 0 range 0 .. 0; SBKRQ at 0 range 1 .. 1; MMRQ at 0 range 2 .. 2; RXFRQ at 0 range 3 .. 3; TXFRQ at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; -- Interrupt & status register type ISR_Register is record -- Read-only. PE PE : Boolean; -- Read-only. FE FE : Boolean; -- Read-only. NF NF : Boolean; -- Read-only. ORE ORE : Boolean; -- Read-only. IDLE IDLE : Boolean; -- Read-only. RXNE RXNE : Boolean; -- Read-only. TC TC : Boolean; -- Read-only. TXE TXE : Boolean; -- unspecified Reserved_8_8 : Interfaces.STM32.Bit; -- Read-only. CTSIF CTSIF : Boolean; -- Read-only. CTS CTS : Boolean; -- unspecified Reserved_11_15 : Interfaces.STM32.UInt5; -- Read-only. BUSY BUSY : Boolean; -- Read-only. CMF CMF : Boolean; -- Read-only. SBKF SBKF : Boolean; -- Read-only. RWU RWU : Boolean; -- Read-only. WUF WUF : Boolean; -- Read-only. TEACK TEACK : Boolean; -- Read-only. REACK REACK : Boolean; -- Read-only. TXFE TXFE : Boolean; -- Read-only. RXFF RXFF : Boolean; -- unspecified Reserved_25_25 : Interfaces.STM32.Bit; -- Read-only. RXFT RXFT : Boolean; -- Read-only. TXFT TXFT : Boolean; -- unspecified Reserved_28_31 : Interfaces.STM32.UInt4; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record PE at 0 range 0 .. 0; FE at 0 range 1 .. 1; NF at 0 range 2 .. 2; ORE at 0 range 3 .. 3; IDLE at 0 range 4 .. 4; RXNE at 0 range 5 .. 5; TC at 0 range 6 .. 6; TXE at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; CTSIF at 0 range 9 .. 9; CTS at 0 range 10 .. 10; Reserved_11_15 at 0 range 11 .. 15; BUSY at 0 range 16 .. 16; CMF at 0 range 17 .. 17; SBKF at 0 range 18 .. 18; RWU at 0 range 19 .. 19; WUF at 0 range 20 .. 20; TEACK at 0 range 21 .. 21; REACK at 0 range 22 .. 22; TXFE at 0 range 23 .. 23; RXFF at 0 range 24 .. 24; Reserved_25_25 at 0 range 25 .. 25; RXFT at 0 range 26 .. 26; TXFT at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- Interrupt flag clear register type ICR_Register is record -- Write-only. Parity error clear flag PECF : Boolean := False; -- Write-only. Framing error clear flag FECF : Boolean := False; -- Write-only. Noise detected clear flag NCF : Boolean := False; -- Write-only. Overrun error clear flag ORECF : Boolean := False; -- Write-only. Idle line detected clear flag IDLECF : Boolean := False; -- unspecified Reserved_5_5 : Interfaces.STM32.Bit := 16#0#; -- Write-only. Transmission complete clear flag TCCF : Boolean := False; -- unspecified Reserved_7_8 : Interfaces.STM32.UInt2 := 16#0#; -- Write-only. CTS clear flag CTSCF : Boolean := False; -- unspecified Reserved_10_16 : Interfaces.STM32.UInt7 := 16#0#; -- Write-only. Character match clear flag CMCF : Boolean := False; -- unspecified Reserved_18_19 : Interfaces.STM32.UInt2 := 16#0#; -- Write-only. Wakeup from Stop mode clear flag WUCF : Boolean := False; -- unspecified Reserved_21_31 : Interfaces.STM32.UInt11 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ICR_Register use record PECF at 0 range 0 .. 0; FECF at 0 range 1 .. 1; NCF at 0 range 2 .. 2; ORECF at 0 range 3 .. 3; IDLECF at 0 range 4 .. 4; Reserved_5_5 at 0 range 5 .. 5; TCCF at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; CTSCF at 0 range 9 .. 9; Reserved_10_16 at 0 range 10 .. 16; CMCF at 0 range 17 .. 17; Reserved_18_19 at 0 range 18 .. 19; WUCF at 0 range 20 .. 20; Reserved_21_31 at 0 range 21 .. 31; end record; -- Receive data register type RDR_Register is record -- Read-only. Receive data value RDR : Interfaces.STM32.UInt9; -- unspecified Reserved_9_31 : Interfaces.STM32.UInt23; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RDR_Register use record RDR at 0 range 0 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- Transmit data register type TDR_Register is record -- Transmit data value TDR : Interfaces.STM32.UInt9 := 16#0#; -- unspecified Reserved_9_31 : Interfaces.STM32.UInt23 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TDR_Register use record TDR at 0 range 0 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; -- PRESC type PRESC_Register is record -- PRESCALER PRESCALER : Interfaces.STM32.UInt4 := 16#0#; -- unspecified Reserved_4_31 : Interfaces.STM32.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PRESC_Register use record PRESCALER at 0 range 0 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; -- CR1_DEDT array type CR1_DEDT_Field_Array is array (0 .. 4) of Boolean with Component_Size => 1, Size => 5; -- Type definition for CR1_DEDT type CR1_DEDT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- DEDT as a value Val : Interfaces.STM32.UInt5; when True => -- DEDT as an array Arr : CR1_DEDT_Field_Array; end case; end record with Unchecked_Union, Size => 5; for CR1_DEDT_Field use record Val at 0 range 0 .. 4; Arr at 0 range 0 .. 4; end record; -- CR1_DEAT array type CR1_DEAT_Field_Array is array (0 .. 4) of Boolean with Component_Size => 1, Size => 5; -- Type definition for CR1_DEAT type CR1_DEAT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- DEAT as a value Val : Interfaces.STM32.UInt5; when True => -- DEAT as an array Arr : CR1_DEAT_Field_Array; end case; end record with Unchecked_Union, Size => 5; for CR1_DEAT_Field use record Val at 0 range 0 .. 4; Arr at 0 range 0 .. 4; end record; -- Control register 1 type CR1_Register_1 is record -- USART enable UE : Boolean := False; -- USART enable in Stop mode UESM : Boolean := False; -- Receiver enable RE : Boolean := False; -- Transmitter enable TE : Boolean := False; -- IDLE interrupt enable IDLEIE : Boolean := False; -- RXNE interrupt enable RXNEIE : Boolean := False; -- Transmission complete interrupt enable TCIE : Boolean := False; -- interrupt enable TXEIE : Boolean := False; -- PE interrupt enable PEIE : Boolean := False; -- Parity selection PS : Boolean := False; -- Parity control enable PCE : Boolean := False; -- Receiver wakeup method WAKE : Boolean := False; -- Word length M0 : Boolean := False; -- Mute mode enable MME : Boolean := False; -- Character match interrupt enable CMIE : Boolean := False; -- Oversampling mode OVER8 : Boolean := False; -- DEDT0 DEDT : CR1_DEDT_Field := (As_Array => False, Val => 16#0#); -- DEAT0 DEAT : CR1_DEAT_Field := (As_Array => False, Val => 16#0#); -- Receiver timeout interrupt enable RTOIE : Boolean := False; -- End of Block interrupt enable EOBIE : Boolean := False; -- Word length M1 : Boolean := False; -- FIFOEN FIFOEN : Boolean := False; -- TXFEIE TXFEIE : Boolean := False; -- RXFFIE RXFFIE : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register_1 use record UE at 0 range 0 .. 0; UESM at 0 range 1 .. 1; RE at 0 range 2 .. 2; TE at 0 range 3 .. 3; IDLEIE at 0 range 4 .. 4; RXNEIE at 0 range 5 .. 5; TCIE at 0 range 6 .. 6; TXEIE at 0 range 7 .. 7; PEIE at 0 range 8 .. 8; PS at 0 range 9 .. 9; PCE at 0 range 10 .. 10; WAKE at 0 range 11 .. 11; M0 at 0 range 12 .. 12; MME at 0 range 13 .. 13; CMIE at 0 range 14 .. 14; OVER8 at 0 range 15 .. 15; DEDT at 0 range 16 .. 20; DEAT at 0 range 21 .. 25; RTOIE at 0 range 26 .. 26; EOBIE at 0 range 27 .. 27; M1 at 0 range 28 .. 28; FIFOEN at 0 range 29 .. 29; TXFEIE at 0 range 30 .. 30; RXFFIE at 0 range 31 .. 31; end record; -- CR2_ABRMOD array type CR2_ABRMOD_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for CR2_ABRMOD type CR2_ABRMOD_Field (As_Array : Boolean := False) is record case As_Array is when False => -- ABRMOD as a value Val : Interfaces.STM32.UInt2; when True => -- ABRMOD as an array Arr : CR2_ABRMOD_Field_Array; end case; end record with Unchecked_Union, Size => 2; for CR2_ABRMOD_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Control register 2 type CR2_Register_1 is record -- SLVEN SLVEN : Boolean := False; -- unspecified Reserved_1_2 : Interfaces.STM32.UInt2 := 16#0#; -- DIS_NSS DIS_NSS : Boolean := False; -- 7-bit Address Detection/4-bit Address Detection ADDM7 : Boolean := False; -- LIN break detection length LBDL : Boolean := False; -- LIN break detection interrupt enable LBDIE : Boolean := False; -- unspecified Reserved_7_7 : Interfaces.STM32.Bit := 16#0#; -- Last bit clock pulse LBCL : Boolean := False; -- Clock phase CPHA : Boolean := False; -- Clock polarity CPOL : Boolean := False; -- Clock enable CLKEN : Boolean := False; -- STOP bits STOP : Interfaces.STM32.UInt2 := 16#0#; -- LIN mode enable LINEN : Boolean := False; -- Swap TX/RX pins SWAP : Boolean := False; -- RX pin active level inversion RXINV : Boolean := False; -- TX pin active level inversion TXINV : Boolean := False; -- Binary data inversion DATAINV : Boolean := False; -- Most significant bit first MSBFIRST : Boolean := False; -- Auto baud rate enable ABREN : Boolean := False; -- ABRMOD0 ABRMOD : CR2_ABRMOD_Field := (As_Array => False, Val => 16#0#); -- Receiver timeout enable RTOEN : Boolean := False; -- Address of the USART node ADD0_3 : Interfaces.STM32.UInt4 := 16#0#; -- Address of the USART node ADD4_7 : Interfaces.STM32.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register_1 use record SLVEN at 0 range 0 .. 0; Reserved_1_2 at 0 range 1 .. 2; DIS_NSS at 0 range 3 .. 3; ADDM7 at 0 range 4 .. 4; LBDL at 0 range 5 .. 5; LBDIE at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; LBCL at 0 range 8 .. 8; CPHA at 0 range 9 .. 9; CPOL at 0 range 10 .. 10; CLKEN at 0 range 11 .. 11; STOP at 0 range 12 .. 13; LINEN at 0 range 14 .. 14; SWAP at 0 range 15 .. 15; RXINV at 0 range 16 .. 16; TXINV at 0 range 17 .. 17; DATAINV at 0 range 18 .. 18; MSBFIRST at 0 range 19 .. 19; ABREN at 0 range 20 .. 20; ABRMOD at 0 range 21 .. 22; RTOEN at 0 range 23 .. 23; ADD0_3 at 0 range 24 .. 27; ADD4_7 at 0 range 28 .. 31; end record; -- Control register 3 type CR3_Register_1 is record -- Error interrupt enable EIE : Boolean := False; -- Ir mode enable IREN : Boolean := False; -- Ir low-power IRLP : Boolean := False; -- Half-duplex selection HDSEL : Boolean := False; -- Smartcard NACK enable NACK : Boolean := False; -- Smartcard mode enable SCEN : Boolean := False; -- DMA enable receiver DMAR : Boolean := False; -- DMA enable transmitter DMAT : Boolean := False; -- RTS enable RTSE : Boolean := False; -- CTS enable CTSE : Boolean := False; -- CTS interrupt enable CTSIE : Boolean := False; -- One sample bit method enable ONEBIT : Boolean := False; -- Overrun Disable OVRDIS : Boolean := False; -- DMA Disable on Reception Error DDRE : Boolean := False; -- Driver enable mode DEM : Boolean := False; -- Driver enable polarity selection DEP : Boolean := False; -- unspecified Reserved_16_16 : Interfaces.STM32.Bit := 16#0#; -- Smartcard auto-retry count SCARCNT : Interfaces.STM32.UInt3 := 16#0#; -- Wakeup from Stop mode interrupt flag selection WUS : Interfaces.STM32.UInt2 := 16#0#; -- Wakeup from Stop mode interrupt enable WUFIE : Boolean := False; -- TXFTIE TXFTIE : Boolean := False; -- TCBGTIE TCBGTIE : Boolean := False; -- RXFTCFG RXFTCFG : Interfaces.STM32.UInt3 := 16#0#; -- RXFTIE RXFTIE : Boolean := False; -- TXFTCFG TXFTCFG : Interfaces.STM32.UInt3 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR3_Register_1 use record EIE at 0 range 0 .. 0; IREN at 0 range 1 .. 1; IRLP at 0 range 2 .. 2; HDSEL at 0 range 3 .. 3; NACK at 0 range 4 .. 4; SCEN at 0 range 5 .. 5; DMAR at 0 range 6 .. 6; DMAT at 0 range 7 .. 7; RTSE at 0 range 8 .. 8; CTSE at 0 range 9 .. 9; CTSIE at 0 range 10 .. 10; ONEBIT at 0 range 11 .. 11; OVRDIS at 0 range 12 .. 12; DDRE at 0 range 13 .. 13; DEM at 0 range 14 .. 14; DEP at 0 range 15 .. 15; Reserved_16_16 at 0 range 16 .. 16; SCARCNT at 0 range 17 .. 19; WUS at 0 range 20 .. 21; WUFIE at 0 range 22 .. 22; TXFTIE at 0 range 23 .. 23; TCBGTIE at 0 range 24 .. 24; RXFTCFG at 0 range 25 .. 27; RXFTIE at 0 range 28 .. 28; TXFTCFG at 0 range 29 .. 31; end record; -- Baud rate register type BRR_Register_1 is record -- BRR BRR : Interfaces.STM32.UInt16 := 16#0#; -- unspecified Reserved_16_31 : Interfaces.STM32.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BRR_Register_1 use record BRR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Guard time and prescaler register type GTPR_Register is record -- Prescaler value PSC : Interfaces.STM32.Byte := 16#0#; -- Guard time value GT : Interfaces.STM32.Byte := 16#0#; -- unspecified Reserved_16_31 : Interfaces.STM32.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for GTPR_Register use record PSC at 0 range 0 .. 7; GT at 0 range 8 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Receiver timeout register type RTOR_Register is record -- Receiver timeout value RTO : Interfaces.STM32.UInt24 := 16#0#; -- Block Length BLEN : Interfaces.STM32.Byte := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RTOR_Register use record RTO at 0 range 0 .. 23; BLEN at 0 range 24 .. 31; end record; -- Request register type RQR_Register_1 is record -- Write-only. Auto baud rate request ABRRQ : Boolean := False; -- Write-only. Send break request SBKRQ : Boolean := False; -- Write-only. Mute mode request MMRQ : Boolean := False; -- Write-only. Receive data flush request RXFRQ : Boolean := False; -- Write-only. Transmit data flush request TXFRQ : Boolean := False; -- unspecified Reserved_5_31 : Interfaces.STM32.UInt27 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RQR_Register_1 use record ABRRQ at 0 range 0 .. 0; SBKRQ at 0 range 1 .. 1; MMRQ at 0 range 2 .. 2; RXFRQ at 0 range 3 .. 3; TXFRQ at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; -- Interrupt & status register type ISR_Register_1 is record -- Read-only. PE PE : Boolean; -- Read-only. FE FE : Boolean; -- Read-only. NF NF : Boolean; -- Read-only. ORE ORE : Boolean; -- Read-only. IDLE IDLE : Boolean; -- Read-only. RXNE RXNE : Boolean; -- Read-only. TC TC : Boolean; -- Read-only. TXE TXE : Boolean; -- Read-only. LBDF LBDF : Boolean; -- Read-only. CTSIF CTSIF : Boolean; -- Read-only. CTS CTS : Boolean; -- Read-only. RTOF RTOF : Boolean; -- Read-only. EOBF EOBF : Boolean; -- unspecified Reserved_13_13 : Interfaces.STM32.Bit; -- Read-only. ABRE ABRE : Boolean; -- Read-only. ABRF ABRF : Boolean; -- Read-only. BUSY BUSY : Boolean; -- Read-only. CMF CMF : Boolean; -- Read-only. SBKF SBKF : Boolean; -- Read-only. RWU RWU : Boolean; -- Read-only. WUF WUF : Boolean; -- Read-only. TEACK TEACK : Boolean; -- Read-only. REACK REACK : Boolean; -- Read-only. TXFE TXFE : Boolean; -- Read-only. RXFF RXFF : Boolean; -- Read-only. TCBGT TCBGT : Boolean; -- Read-only. RXFT RXFT : Boolean; -- Read-only. TXFT TXFT : Boolean; -- unspecified Reserved_28_31 : Interfaces.STM32.UInt4; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register_1 use record PE at 0 range 0 .. 0; FE at 0 range 1 .. 1; NF at 0 range 2 .. 2; ORE at 0 range 3 .. 3; IDLE at 0 range 4 .. 4; RXNE at 0 range 5 .. 5; TC at 0 range 6 .. 6; TXE at 0 range 7 .. 7; LBDF at 0 range 8 .. 8; CTSIF at 0 range 9 .. 9; CTS at 0 range 10 .. 10; RTOF at 0 range 11 .. 11; EOBF at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; ABRE at 0 range 14 .. 14; ABRF at 0 range 15 .. 15; BUSY at 0 range 16 .. 16; CMF at 0 range 17 .. 17; SBKF at 0 range 18 .. 18; RWU at 0 range 19 .. 19; WUF at 0 range 20 .. 20; TEACK at 0 range 21 .. 21; REACK at 0 range 22 .. 22; TXFE at 0 range 23 .. 23; RXFF at 0 range 24 .. 24; TCBGT at 0 range 25 .. 25; RXFT at 0 range 26 .. 26; TXFT at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- Interrupt flag clear register type ICR_Register_1 is record -- Write-only. Parity error clear flag PECF : Boolean := False; -- Write-only. Framing error clear flag FECF : Boolean := False; -- Write-only. Noise detected clear flag NCF : Boolean := False; -- Write-only. Overrun error clear flag ORECF : Boolean := False; -- Write-only. Idle line detected clear flag IDLECF : Boolean := False; -- Write-only. TXFECF TXFECF : Boolean := False; -- Write-only. Transmission complete clear flag TCCF : Boolean := False; -- Write-only. TCBGTCF TCBGTCF : Boolean := False; -- Write-only. LIN break detection clear flag LBDCF : Boolean := False; -- Write-only. CTS clear flag CTSCF : Boolean := False; -- unspecified Reserved_10_10 : Interfaces.STM32.Bit := 16#0#; -- Write-only. Receiver timeout clear flag RTOCF : Boolean := False; -- Write-only. End of block clear flag EOBCF : Boolean := False; -- Write-only. UDRCF UDRCF : Boolean := False; -- unspecified Reserved_14_16 : Interfaces.STM32.UInt3 := 16#0#; -- Write-only. Character match clear flag CMCF : Boolean := False; -- unspecified Reserved_18_19 : Interfaces.STM32.UInt2 := 16#0#; -- Write-only. Wakeup from Stop mode clear flag WUCF : Boolean := False; -- unspecified Reserved_21_31 : Interfaces.STM32.UInt11 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ICR_Register_1 use record PECF at 0 range 0 .. 0; FECF at 0 range 1 .. 1; NCF at 0 range 2 .. 2; ORECF at 0 range 3 .. 3; IDLECF at 0 range 4 .. 4; TXFECF at 0 range 5 .. 5; TCCF at 0 range 6 .. 6; TCBGTCF at 0 range 7 .. 7; LBDCF at 0 range 8 .. 8; CTSCF at 0 range 9 .. 9; Reserved_10_10 at 0 range 10 .. 10; RTOCF at 0 range 11 .. 11; EOBCF at 0 range 12 .. 12; UDRCF at 0 range 13 .. 13; Reserved_14_16 at 0 range 14 .. 16; CMCF at 0 range 17 .. 17; Reserved_18_19 at 0 range 18 .. 19; WUCF at 0 range 20 .. 20; Reserved_21_31 at 0 range 21 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Universal synchronous asynchronous receiver transmitter type LPUART1_Peripheral is record -- Control register 1 CR1 : aliased CR1_Register; -- Control register 2 CR2 : aliased CR2_Register; -- Control register 3 CR3 : aliased CR3_Register; -- Baud rate register BRR : aliased BRR_Register; -- Request register RQR : aliased RQR_Register; -- Interrupt & status register ISR : aliased ISR_Register; -- Interrupt flag clear register ICR : aliased ICR_Register; -- Receive data register RDR : aliased RDR_Register; -- Transmit data register TDR : aliased TDR_Register; -- PRESC PRESC : aliased PRESC_Register; end record with Volatile; for LPUART1_Peripheral use record CR1 at 16#0# range 0 .. 31; CR2 at 16#4# range 0 .. 31; CR3 at 16#8# range 0 .. 31; BRR at 16#C# range 0 .. 31; RQR at 16#18# range 0 .. 31; ISR at 16#1C# range 0 .. 31; ICR at 16#20# range 0 .. 31; RDR at 16#24# range 0 .. 31; TDR at 16#28# range 0 .. 31; PRESC at 16#2C# range 0 .. 31; end record; -- Universal synchronous asynchronous receiver transmitter LPUART1_Periph : aliased LPUART1_Peripheral with Import, Address => LPUART1_Base; -- Universal synchronous asynchronous receiver transmitter SEC_LPUART1_Periph : aliased LPUART1_Peripheral with Import, Address => SEC_LPUART1_Base; -- Universal synchronous asynchronous receiver transmitter type SEC_UART4_Peripheral is record -- Control register 1 CR1 : aliased CR1_Register_1; -- Control register 2 CR2 : aliased CR2_Register_1; -- Control register 3 CR3 : aliased CR3_Register_1; -- Baud rate register BRR : aliased BRR_Register_1; -- Guard time and prescaler register GTPR : aliased GTPR_Register; -- Receiver timeout register RTOR : aliased RTOR_Register; -- Request register RQR : aliased RQR_Register_1; -- Interrupt & status register ISR : aliased ISR_Register_1; -- Interrupt flag clear register ICR : aliased ICR_Register_1; -- Receive data register RDR : aliased RDR_Register; -- Transmit data register TDR : aliased TDR_Register; -- PRESC PRESC : aliased PRESC_Register; end record with Volatile; for SEC_UART4_Peripheral use record CR1 at 16#0# range 0 .. 31; CR2 at 16#4# range 0 .. 31; CR3 at 16#8# range 0 .. 31; BRR at 16#C# range 0 .. 31; GTPR at 16#10# range 0 .. 31; RTOR at 16#14# range 0 .. 31; RQR at 16#18# range 0 .. 31; ISR at 16#1C# range 0 .. 31; ICR at 16#20# range 0 .. 31; RDR at 16#24# range 0 .. 31; TDR at 16#28# range 0 .. 31; PRESC at 16#2C# range 0 .. 31; end record; -- Universal synchronous asynchronous receiver transmitter SEC_UART4_Periph : aliased SEC_UART4_Peripheral with Import, Address => SEC_UART4_Base; -- Universal synchronous asynchronous receiver transmitter SEC_UART5_Periph : aliased SEC_UART4_Peripheral with Import, Address => SEC_UART5_Base; -- Universal synchronous asynchronous receiver transmitter SEC_USART1_Periph : aliased SEC_UART4_Peripheral with Import, Address => SEC_USART1_Base; -- Universal synchronous asynchronous receiver transmitter SEC_USART2_Periph : aliased SEC_UART4_Peripheral with Import, Address => SEC_USART2_Base; -- Universal synchronous asynchronous receiver transmitter SEC_USART3_Periph : aliased SEC_UART4_Peripheral with Import, Address => SEC_USART3_Base; -- Universal synchronous asynchronous receiver transmitter UART4_Periph : aliased SEC_UART4_Peripheral with Import, Address => UART4_Base; -- Universal synchronous asynchronous receiver transmitter UART5_Periph : aliased SEC_UART4_Peripheral with Import, Address => UART5_Base; -- Universal synchronous asynchronous receiver transmitter USART1_Periph : aliased SEC_UART4_Peripheral with Import, Address => USART1_Base; -- Universal synchronous asynchronous receiver transmitter USART2_Periph : aliased SEC_UART4_Peripheral with Import, Address => USART2_Base; -- Universal synchronous asynchronous receiver transmitter USART3_Periph : aliased SEC_UART4_Peripheral with Import, Address => USART3_Base; end Interfaces.STM32.USART;
----------------------------------------------------------------------- -- awa-questions-modules -- Module questions -- Copyright (C) 2012, 2013, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO; with Security.Permissions; with ASF.Applications; with AWA.Modules; with AWA.Questions.Models; package AWA.Questions.Modules is -- The name under which the module is registered. NAME : constant String := "questions"; -- Define the permissions. package ACL_Create_Questions is new Security.Permissions.Definition ("question-create"); package ACL_Delete_Questions is new Security.Permissions.Definition ("question-delete"); package ACL_Update_Questions is new Security.Permissions.Definition ("question-update"); package ACL_Answer_Questions is new Security.Permissions.Definition ("answer-create"); package ACL_Delete_Answer is new Security.Permissions.Definition ("answer-delete"); -- The maximum length for a short description. SHORT_DESCRIPTION_LENGTH : constant Positive := 200; -- ------------------------------ -- Module questions -- ------------------------------ type Question_Module is new AWA.Modules.Module with private; type Question_Module_Access is access all Question_Module'Class; -- Initialize the questions module. overriding procedure Initialize (Plugin : in out Question_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config); -- Get the questions module. function Get_Question_Module return Question_Module_Access; -- Create or save the question. procedure Save_Question (Model : in Question_Module; Question : in out AWA.Questions.Models.Question_Ref'Class); -- Delete the question. procedure Delete_Question (Model : in Question_Module; Question : in out AWA.Questions.Models.Question_Ref'Class); -- Load the question. procedure Load_Question (Model : in Question_Module; Question : in out AWA.Questions.Models.Question_Ref'Class; Id : in ADO.Identifier; Found : out Boolean); -- Create or save the answer. procedure Save_Answer (Model : in Question_Module; Question : in AWA.Questions.Models.Question_Ref'Class; Answer : in out AWA.Questions.Models.Answer_Ref'Class); -- Delete the answer. procedure Delete_Answer (Model : in Question_Module; Answer : in out AWA.Questions.Models.Answer_Ref'Class); -- Load the answer. procedure Load_Answer (Model : in Question_Module; Answer : in out AWA.Questions.Models.Answer_Ref'Class; Question : in out AWA.Questions.Models.Question_Ref'Class; Id : in ADO.Identifier; Found : out Boolean); private type Question_Module is new AWA.Modules.Module with null record; end AWA.Questions.Modules;
with Ada.Strings.Unbounded; package body Test_Unit is task type Boring_Task_Type is entry Drop_Off_Work (Work_In : in Range_Type); end Boring_Task_Type; task body Boring_Task_Type is Work : Range_Type := 5; Result : Integer := 0; Factor : constant Positive := 2; begin loop accept Drop_Off_Work (Work_In : in Range_Type) do Work := Work_In; end Drop_Off_Work; Result := Integer (Work) * Factor; end loop; end Boring_Task_Type; Boring_Task : Boring_Task_Type; procedure You_Do_It (Using : in Range_Type) is begin if Using = 5 then raise Dont_Like_5; else Boring_Task.Drop_Off_Work (Using); end if; end You_Do_It; procedure Do_It (This : in Range_Type) is begin You_Do_It (Using => This); exception when X : Dont_Like_5 => null; end Do_It; package body Parent_Class is procedure Method_1 (This : in out Object) is begin This.Component_1 := This.Component_1 * 2; end Method_1; end Parent_Class; package body Child_Class is procedure Method_1 (This : in out Object) is begin This.Component_1 := This.Component_1 * 3; This.Component_2 := This.Component_2 * 5; end Method_1; end Child_Class; end Test_Unit;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 5 9 -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-1999 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, 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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; with Unchecked_Conversion; package body System.Pack_59 is subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_59; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; function To_Ref is new Unchecked_Conversion (System.Address, Cluster_Ref); ------------ -- Get_59 -- ------------ function Get_59 (Arr : System.Address; N : Natural) return Bits_59 is C : constant Cluster_Ref := To_Ref (Arr + Bits * Ofs (Uns (N) / 8)); begin case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end Get_59; ------------ -- Set_59 -- ------------ procedure Set_59 (Arr : System.Address; N : Natural; E : Bits_59) is C : constant Cluster_Ref := To_Ref (Arr + Bits * Ofs (Uns (N) / 8)); begin case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end Set_59; end System.Pack_59;
----------------------------------------------------------------------- -- util-texts-builders -- Text builder -- Copyright (C) 2013, 2016, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Unchecked_Deallocation; package body Util.Texts.Builders is -- ------------------------------ -- Get the length of the item builder. -- ------------------------------ function Length (Source : in Builder) return Natural is begin return Source.Length; end Length; -- ------------------------------ -- Get the capacity of the builder. -- ------------------------------ function Capacity (Source : in Builder) return Natural is B : constant Block_Access := Source.Current; begin return Source.Length + B.Len - B.Last; end Capacity; -- ------------------------------ -- Get the builder block size. -- ------------------------------ function Block_Size (Source : in Builder) return Positive is begin return Source.Block_Size; end Block_Size; -- ------------------------------ -- Set the block size for the allocation of next chunks. -- ------------------------------ procedure Set_Block_Size (Source : in out Builder; Size : in Positive) is begin Source.Block_Size := Size; end Set_Block_Size; -- ------------------------------ -- Append the <tt>New_Item</tt> at the end of the source growing the buffer if necessary. -- ------------------------------ procedure Append (Source : in out Builder; New_Item : in Input) is B : Block_Access := Source.Current; Start : Natural := New_Item'First; Last : constant Natural := New_Item'Last; begin while Start <= Last loop declare Space : Natural := B.Len - B.Last; Size : constant Natural := Last - Start + 1; begin if Space > Size then Space := Size; elsif Space = 0 then if Size > Source.Block_Size then B.Next_Block := new Block (Size); else B.Next_Block := new Block (Source.Block_Size); end if; B := B.Next_Block; Source.Current := B; if B.Len > Size then Space := Size; else Space := B.Len; end if; end if; B.Content (B.Last + 1 .. B.Last + Space) := New_Item (Start .. Start + Space - 1); Source.Length := Source.Length + Space; B.Last := B.Last + Space; Start := Start + Space; end; end loop; end Append; -- ------------------------------ -- Append the <tt>New_Item</tt> at the end of the source growing the buffer if necessary. -- ------------------------------ procedure Append (Source : in out Builder; New_Item : in Element_Type) is B : Block_Access := Source.Current; begin if B.Len = B.Last then B.Next_Block := new Block (Source.Block_Size); B := B.Next_Block; Source.Current := B; end if; Source.Length := Source.Length + 1; B.Last := B.Last + 1; B.Content (B.Last) := New_Item; end Append; -- ------------------------------ -- Clear the source freeing any storage allocated for the buffer. -- ------------------------------ procedure Clear (Source : in out Builder) is procedure Free is new Ada.Unchecked_Deallocation (Object => Block, Name => Block_Access); Current, Next : Block_Access; begin Next := Source.First.Next_Block; while Next /= null loop Current := Next; Next := Current.Next_Block; Free (Current); end loop; Source.First.Next_Block := null; Source.First.Last := 0; Source.Current := Source.First'Unchecked_Access; Source.Length := 0; end Clear; -- ------------------------------ -- Iterate over the buffer content calling the <tt>Process</tt> procedure with each -- chunk. -- ------------------------------ procedure Iterate (Source : in Builder; Process : not null access procedure (Chunk : in Input)) is begin if Source.First.Last > 0 then Process (Source.First.Content (1 .. Source.First.Last)); declare B : Block_Access := Source.First.Next_Block; begin while B /= null loop Process (B.Content (1 .. B.Last)); B := B.Next_Block; end loop; end; end if; end Iterate; -- ------------------------------ -- Return the content starting from the tail and up to <tt>Length</tt> items. -- ------------------------------ function Tail (Source : in Builder; Length : in Natural) return Input is Last : constant Natural := Source.Current.Last; begin if Last >= Length then return Source.Current.Content (Last - Length + 1 .. Last); elsif Length >= Source.Length then return To_Array (Source); else declare Result : Input (1 .. Length); Offset : Natural := Source.Length - Length; B : access constant Block := Source.First'Access; Src_Pos : Positive := 1; Dst_Pos : Positive := 1; Len : Natural; begin -- Skip the data moving to next blocks as needed. while Offset /= 0 loop if Offset < B.Last then Src_Pos := Offset + 1; Offset := 0; else Offset := Offset - B.Last + 1; B := B.Next_Block; end if; end loop; -- Copy what remains until we reach the length. while Dst_Pos <= Length loop Len := B.Last - Src_Pos + 1; Result (Dst_Pos .. Dst_Pos + Len - 1) := B.Content (Src_Pos .. B.Last); Src_Pos := 1; Dst_Pos := Dst_Pos + Len; B := B.Next_Block; end loop; return Result; end; end if; end Tail; -- ------------------------------ -- Get the buffer content as an array. -- ------------------------------ function To_Array (Source : in Builder) return Input is Result : Input (1 .. Source.Length); begin if Source.First.Last > 0 then declare Pos : Positive := Source.First.Last; B : Block_Access := Source.First.Next_Block; begin Result (1 .. Pos) := Source.First.Content (1 .. Pos); while B /= null loop Result (Pos + 1 .. Pos + B.Last) := B.Content (1 .. B.Last); Pos := Pos + B.Last; B := B.Next_Block; end loop; end; end if; return Result; end To_Array; -- ------------------------------ -- Call the <tt>Process</tt> procedure with the full buffer content, trying to avoid -- secondary stack copies as much as possible. -- ------------------------------ procedure Get (Source : in Builder) is begin if Source.Length < Source.First.Len then Process (Source.First.Content (1 .. Source.Length)); else declare Content : constant Input := To_Array (Source); begin Process (Content); end; end if; end Get; -- ------------------------------ -- Setup the builder. -- ------------------------------ overriding procedure Initialize (Source : in out Builder) is begin Source.Current := Source.First'Unchecked_Access; end Initialize; -- ------------------------------ -- Finalize the builder releasing the storage. -- ------------------------------ overriding procedure Finalize (Source : in out Builder) is begin Clear (Source); end Finalize; end Util.Texts.Builders;
------------------------------------------------------------------------------ -- -- -- tiled-code-gen -- -- -- -- Copyright (C) 2021 Fabien Chouteau -- -- -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with TCG.Maps.List; package TCG.Outputs.LibGBA is procedure Gen_LibGBA_Source (Directory : String; Root_Package_Name : String; Map_List : TCG.Maps.List.List); end TCG.Outputs.LibGBA;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Unchecked_Deallocation; package body ABR is procedure Free is new Ada.Unchecked_Deallocation (Object => T_Noeud, Name => T_ABR); procedure Initialiser(Abr: out T_ABR) is begin Abr := Null; end Initialiser; function Est_Vide (Abr : T_Abr) return Boolean is begin return Abr = Null; end; function Taille (Abr : in T_ABR) return Integer is begin if Est_Vide (Abr) then return 0; else return 1 + Taille (Abr.all.Sous_Arbre_Gauche) + Taille (Abr.all.Sous_Arbre_Droit); end if; end Taille; procedure Inserer (Abr : in out T_ABR ; Cle : in Character ; Donnee : in Integer) is begin if (Est_Vide(Abr)) then Abr := New T_Noeud'(Cle, Donnee, Null, Null); elsif (ABR.all.Cle = Cle) then raise Cle_Presente_Exception; elsif (Cle < Abr.all.Cle) then Inserer(Abr.all.Sous_Arbre_Gauche, Cle, Donnee); elsif (Cle > Abr.all.Cle) then Inserer(Abr.all.Sous_Arbre_Droit, Cle, Donnee); end if; end Inserer; procedure Modifier (ABR : in out T_ABR ; Cle : in Character ; Donnee : in Integer) is begin if Est_Vide (ABR) then raise Cle_Absente_Exception; else if ABR.all.Cle = Cle then ABR.all.Donnee := Donnee; elsif ABR.all.Cle < Cle then Modifier (ABR.all.Sous_Arbre_Droit, Cle, Donnee); else Modifier (ABR.all.Sous_Arbre_Gauche, Cle, Donnee); end if; end if; end Modifier; function La_Donnee (Abr : in T_ABR ; Cle : in Character) return Integer is begin if Est_Vide (ABR) then raise Cle_Absente_Exception; else if ABR.all.Cle = Cle then return ABR.all.Donnee; elsif ABR.all.Cle < Cle then return La_Donnee (ABR.all.Sous_Arbre_Droit, Cle); else return La_Donnee (ABR.all.Sous_Arbre_Gauche, Cle); end if; end if; end La_Donnee; procedure Supprimer (Abr : in out T_ABR ; Cle : in Character) is tmp1 ,tmp2 : T_ABR; begin if (Abr = Null) then Null; else if (Cle < Abr.all.Cle) then Supprimer (Abr.all.Sous_Arbre_Gauche, Cle); elsif (Cle > Abr.all.Cle) then Supprimer (Abr.all.Sous_Arbre_Droit, Cle); else if (Abr.all.Sous_Arbre_Gauche = Null) then tmp1 := Abr.all.Sous_Arbre_Droit; Free (Abr); Abr := tmp1; elsif (Abr.all.Sous_Arbre_Droit = Null) then tmp1 := Abr.all.Sous_Arbre_Gauche; Free (Abr); Abr := tmp1; else tmp2 := Abr.all.Sous_Arbre_Droit; while (not Est_Vide (tmp2) and tmp2.all.Sous_Arbre_Gauche /= Null) loop tmp2 := tmp2.all.Sous_Arbre_Gauche; end loop; tmp1 := tmp2; Abr.all.Cle := tmp1.all.Cle; Supprimer (Abr.all.Sous_Arbre_Droit, tmp1.all.Cle); end if; end if; end if; end Supprimer; procedure Vider (Abr : in out T_ABR) is begin if not Est_Vide (ABR) then Vider (ABR.all.Sous_Arbre_Gauche); Vider (ABR.all.Sous_Arbre_Droit); free (ABR); end if; end Vider; procedure Afficher (ABR : in T_Abr) is begin if Est_Vide (ABR) then Afficher( Abr.all.Sous_Arbre_Gauche); Put_Line(Character'Image(ABR.all.Cle) & " : " & Integer'Image(ABR.all.Donnee)); Afficher( ABR.all.Sous_Arbre_Droit); end if; end Afficher; procedure Afficher_Debug (Abr : in T_Abr) is begin if not Est_Vide (ABR) then Put_Line (Character'Image(ABR.all.Cle) & " : " & Integer'Image(ABR.all.Donnee)); Afficher_Debug ( ABR.all.Sous_Arbre_Gauche); Afficher_Debug ( ABR.all.Sous_Arbre_Droit); end if; end Afficher_Debug; end ABR;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>read_data</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>input_r</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>input</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>buf_r</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>buf</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>128</bitwidth> </Value> <direction>2</direction> <if_type>1</if_type> <array_size>8</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>50</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>3</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>63</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>5</id> <name>indvar_flatten</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>65</item> <item>66</item> <item>67</item> <item>68</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>6</id> <name>r</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>70</item> <item>71</item> <item>72</item> <item>73</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>7</id> <name>c</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>74</item> <item>75</item> <item>76</item> <item>77</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>8</id> <name>exitcond_flatten</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>78</item> <item>80</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>9</id> <name>indvar_flatten_next</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>81</item> <item>83</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>10</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>84</item> <item>85</item> <item>86</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>12</id> <name>r_2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>88</item> <item>89</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>15</id> <name>exitcond5</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>90</item> <item>92</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>16</id> <name>c_mid2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>93</item> <item>94</item> <item>95</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>17</id> <name>tmp_mid2_v_v</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>96</item> <item>97</item> <item>98</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>18</id> <name>tmp</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>99</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>19</id> <name>tmp_mid2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>101</item> <item>102</item> <item>104</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>20</id> <name>tmp_7_mid2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>105</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>21</id> <name>c_cast2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>106</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>25</id> <name>tmp_9</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>107</item> <item>108</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>26</id> <name>tmp_s</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>109</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>27</id> <name>input_addr</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>110</item> <item>112</item> <item>113</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>28</id> <name>input_load</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>114</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>29</id> <name>buf_addr</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>115</item> <item>116</item> <item>117</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>30</id> <name>buf_load</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>118</item> </oprand_edges> <opcode>load</opcode> <m_Display>2</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>31</id> <name>tmp_4</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>119</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>32</id> <name>tmp_2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>121</item> <item>122</item> <item>123</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>33</id> <name>tmp_3</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>124</item> <item>126</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>34</id> <name>tmp_5</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>127</item> <item>128</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>35</id> <name>tmp_6</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>129</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>36</id> <name>tmp_7</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>130</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>37</id> <name>tmp_8</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>131</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>38</id> <name>tmp_10</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>132</item> <item>134</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>39</id> <name>tmp_11</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>135</item> <item>136</item> <item>137</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>40</id> <name>tmp_12</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>138</item> <item>139</item> <item>140</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>41</id> <name>tmp_13</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>141</item> <item>142</item> <item>143</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>42</id> <name>tmp_14</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>144</item> <item>145</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>43</id> <name>tmp_15</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>146</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>44</id> <name>tmp_16</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>147</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>45</id> <name>tmp_17</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>148</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>46</id> <name>tmp_18</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>149</item> <item>150</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>47</id> <name>tmp_19</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>152</item> <item>153</item> <item>155</item> <item>157</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>48</id> <name>tmp_20</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>158</item> <item>159</item> <item>160</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>49</id> <name>tmp_21</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>162</item> <item>163</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>50</id> <name>tmp_22</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>164</item> <item>165</item> </oprand_edges> <opcode>lshr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>51</id> <name>p_demorgan</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>166</item> <item>167</item> </oprand_edges> <opcode>and</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>52</id> <name>tmp_23</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>168</item> <item>169</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>53</id> <name>tmp_24</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>170</item> <item>171</item> </oprand_edges> <opcode>and</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>54</id> <name>tmp_25</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>172</item> <item>173</item> </oprand_edges> <opcode>and</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>55</id> <name>tmp_26</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>174</item> <item>175</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>56</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>176</item> <item>177</item> <item>215</item> </oprand_edges> <opcode>store</opcode> <m_Display>2</m_Display> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>58</id> <name>c_2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>178</item> <item>179</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>59</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>180</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>61</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>64</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>64</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_53"> <Value> <Obj> <type>2</type> <id>64</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_54"> <Value> <Obj> <type>2</type> <id>69</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_55"> <Value> <Obj> <type>2</type> <id>79</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>64</content> </item> <item class_id_reference="16" object_id="_56"> <Value> <Obj> <type>2</type> <id>82</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_57"> <Value> <Obj> <type>2</type> <id>87</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_58"> <Value> <Obj> <type>2</type> <id>91</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_59"> <Value> <Obj> <type>2</type> <id>103</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_60"> <Value> <Obj> <type>2</type> <id>111</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_61"> <Value> <Obj> <type>2</type> <id>125</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>15</content> </item> <item class_id_reference="16" object_id="_62"> <Value> <Obj> <type>2</type> <id>133</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <const_type>0</const_type> <content>127</content> </item> <item class_id_reference="16" object_id="_63"> <Value> <Obj> <type>2</type> <id>154</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>127</content> </item> <item class_id_reference="16" object_id="_64"> <Value> <Obj> <type>2</type> <id>156</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_65"> <Value> <Obj> <type>2</type> <id>161</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <const_type>0</const_type> <content>340282366920938463463374607431768211455</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_66"> <Obj> <type>3</type> <id>4</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>3</item> </node_objs> </item> <item class_id_reference="18" object_id="_67"> <Obj> <type>3</type> <id>11</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>6</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> <item>10</item> </node_objs> </item> <item class_id_reference="18" object_id="_68"> <Obj> <type>3</type> <id>60</id> <name>.reset</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>42</count> <item_version>0</item_version> <item>12</item> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>38</item> <item>39</item> <item>40</item> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> <item>49</item> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>58</item> <item>59</item> </node_objs> </item> <item class_id_reference="18" object_id="_69"> <Obj> <type>3</type> <id>62</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>61</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>104</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_70"> <id>63</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>3</sink_obj> </item> <item class_id_reference="20" object_id="_71"> <id>65</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>5</sink_obj> </item> <item class_id_reference="20" object_id="_72"> <id>66</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>5</sink_obj> </item> <item class_id_reference="20" object_id="_73"> <id>67</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>5</sink_obj> </item> <item class_id_reference="20" object_id="_74"> <id>68</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>5</sink_obj> </item> <item class_id_reference="20" object_id="_75"> <id>70</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>6</sink_obj> </item> <item class_id_reference="20" object_id="_76"> <id>71</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>6</sink_obj> </item> <item class_id_reference="20" object_id="_77"> <id>72</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>6</sink_obj> </item> <item class_id_reference="20" object_id="_78"> <id>73</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>6</sink_obj> </item> <item class_id_reference="20" object_id="_79"> <id>74</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_80"> <id>75</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_81"> <id>76</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_82"> <id>77</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_83"> <id>78</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_84"> <id>80</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_85"> <id>81</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>9</sink_obj> </item> <item class_id_reference="20" object_id="_86"> <id>83</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>9</sink_obj> </item> <item class_id_reference="20" object_id="_87"> <id>84</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_88"> <id>85</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_89"> <id>86</id> <edge_type>2</edge_type> <source_obj>62</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_90"> <id>88</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_91"> <id>89</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>90</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>92</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>93</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>94</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>95</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>96</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>97</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>98</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>99</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>102</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>104</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_103"> <id>105</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_104"> <id>106</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_105"> <id>107</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_106"> <id>108</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_107"> <id>109</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>110</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>112</id> <edge_type>1</edge_type> <source_obj>111</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>113</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>114</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>115</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>116</id> <edge_type>1</edge_type> <source_obj>111</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>117</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>118</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>119</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>122</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>123</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>124</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>126</id> <edge_type>1</edge_type> <source_obj>125</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>127</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>128</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>129</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>130</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>131</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>132</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>134</id> <edge_type>1</edge_type> <source_obj>133</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>135</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>136</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>137</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>138</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>139</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>140</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>141</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>142</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>143</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>144</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>145</id> <edge_type>1</edge_type> <source_obj>133</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>146</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>147</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>148</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>149</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>150</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>153</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>155</id> <edge_type>1</edge_type> <source_obj>154</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>157</id> <edge_type>1</edge_type> <source_obj>156</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>158</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>159</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>160</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>162</id> <edge_type>1</edge_type> <source_obj>161</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>163</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>164</id> <edge_type>1</edge_type> <source_obj>161</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>165</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>166</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>167</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>168</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>169</id> <edge_type>1</edge_type> <source_obj>161</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>170</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>171</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>172</id> <edge_type>1</edge_type> <source_obj>48</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>173</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>174</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>175</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>176</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>177</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>178</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>179</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>180</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>211</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>212</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>213</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>214</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>215</id> <edge_type>4</edge_type> <source_obj>30</source_obj> <sink_obj>56</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_174"> <mId>1</mId> <mTag>read_data</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>133</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_175"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>4</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_176"> <mId>3</mId> <mTag>RD_Loop_Row_RD_Loop_Col</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>11</item> <item>60</item> </basic_blocks> <mII>2</mII> <mDepth>6</mDepth> <mMinTripCount>64</mMinTripCount> <mMaxTripCount>64</mMaxTripCount> <mMinLatency>131</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_177"> <mId>4</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>62</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_178"> <states class_id="25" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_179"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_180"> <id>3</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_181"> <id>2</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_182"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_183"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_184"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_185"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_186"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_187"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_188"> <id>3</id> <operations> <count>8</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_189"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_190"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_191"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_192"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_193"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_194"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_195"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_196"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_197"> <id>4</id> <operations> <count>7</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_198"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_199"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_200"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_201"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_202"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_203"> <id>28</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_204"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_205"> <id>5</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_206"> <id>28</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_207"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_208"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_209"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_210"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_211"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_212"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_213"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_214"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_215"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_216"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_217"> <id>49</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_218"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_219"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_220"> <id>6</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_221"> <id>30</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_222"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_223"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_224"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_225"> <id>43</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_226"> <id>46</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_227"> <id>7</id> <operations> <count>15</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_228"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_229"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_230"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_231"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_232"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_233"> <id>30</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_234"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_235"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_236"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_237"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_238"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_239"> <id>55</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_240"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_241"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_242"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_243"> <id>8</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_244"> <id>61</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_245"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>47</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_246"> <inState>3</inState> <outState>4</outState> <condition> <id>58</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_247"> <inState>4</inState> <outState>5</outState> <condition> <id>59</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_248"> <inState>5</inState> <outState>6</outState> <condition> <id>60</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_249"> <inState>6</inState> <outState>7</outState> <condition> <id>61</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_250"> <inState>7</inState> <outState>2</outState> <condition> <id>62</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_251"> <inState>2</inState> <outState>8</outState> <condition> <id>57</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>8</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_252"> <inState>2</inState> <outState>3</outState> <condition> <id>63</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>50</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>3</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>5</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>6</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>10</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>5</first> <second>1</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>55</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>2</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>4</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>60</first> <second> <first>2</first> <second>6</second> </second> </item> <item> <first>62</first> <second> <first>2</first> <second>2</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="44" tracking_level="1" version="0" object_id="_253"> <region_name>RD_Loop_Row_RD_Loop_Col</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>11</item> <item>60</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>2</interval> <pipe_depth>6</pipe_depth> </item> </regions> <dp_fu_nodes class_id="45" tracking_level="0" version="0"> <count>45</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>58</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>65</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>72</first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> <item> <first>77</first> <second> <count>3</count> <item_version>0</item_version> <item>30</item> <item>30</item> <item>56</item> </second> </item> <item> <first>85</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>96</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>108</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>116</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>122</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>128</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>134</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>140</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>148</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>156</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>160</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>165</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>169</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>176</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>179</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>185</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>190</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>195</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>202</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>208</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>214</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>218</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>222</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>230</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>238</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>244</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>248</first> <second> <count>1</count> <item_version>0</item_version> <item>45</item> </second> </item> <item> <first>252</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>258</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>264</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>270</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>273</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>278</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>284</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>288</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>294</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>303</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>309</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>314</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>320</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>325</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="48" tracking_level="0" version="0"> <count>43</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>buf_addr_gep_fu_58</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>c_2_fu_190</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>c_cast2_fu_176</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>c_mid2_fu_140</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>c_phi_fu_108</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>exitcond5_fu_134</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>exitcond_flatten_fu_116</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>indvar_flatten_next_fu_122</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>indvar_flatten_phi_fu_85</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>input_addr_gep_fu_65</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>p_demorgan_fu_264</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>r_2_fu_128</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>r_phi_fu_96</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>tmp_10_fu_273</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>tmp_11_fu_222</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>tmp_12_fu_230</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>tmp_13_fu_278</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>tmp_14_fu_238</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>tmp_15_fu_284</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>tmp_16_fu_244</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>tmp_17_fu_248</first> <second> <count>1</count> <item_version>0</item_version> <item>45</item> </second> </item> <item> <first>tmp_18_fu_288</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>tmp_19_fu_294</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>tmp_20_fu_303</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>tmp_21_fu_252</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>tmp_22_fu_258</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>tmp_23_fu_309</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>tmp_24_fu_314</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>tmp_25_fu_320</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>tmp_26_fu_325</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>tmp_2_fu_195</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>tmp_3_fu_202</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>tmp_4_fu_165</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>tmp_5_fu_208</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>tmp_6_fu_214</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>tmp_7_fu_218</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>tmp_7_mid2_fu_160</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>tmp_8_fu_270</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>tmp_9_fu_179</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>tmp_fu_156</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>tmp_mid2_fu_169</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>tmp_mid2_v_v_fu_148</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>tmp_s_fu_185</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="50" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="51" tracking_level="0" version="0"> <first class_id="52" tracking_level="0" version="0"> <first>buf_r</first> <second>0</second> </first> <second> <count>3</count> <item_version>0</item_version> <item>30</item> <item>30</item> <item>56</item> </second> </item> <item> <first> <first>input_r</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>17</count> <item_version>0</item_version> <item> <first>81</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>92</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>104</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>332</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>336</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>341</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>347</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>352</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>357</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>362</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>367</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>372</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>377</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>382</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>388</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>394</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>400</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>17</count> <item_version>0</item_version> <item> <first>buf_addr_reg_357</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>c_2_reg_372</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>c_mid2_reg_341</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>c_reg_104</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>exitcond_flatten_reg_332</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>indvar_flatten_next_reg_336</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>indvar_flatten_reg_81</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>input_addr_reg_367</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>input_load_reg_377</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>p_demorgan_reg_394</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>r_reg_92</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>tmp_18_reg_400</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>tmp_4_reg_362</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>tmp_5_reg_382</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>tmp_6_reg_388</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>tmp_mid2_v_v_reg_347</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>tmp_reg_352</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>3</count> <item_version>0</item_version> <item> <first>81</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>92</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>104</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>3</count> <item_version>0</item_version> <item> <first>c_reg_104</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>indvar_flatten_reg_81</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>r_reg_92</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="53" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>buf_r(p0)</first> <second> <count>2</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>30</item> </second> </item> <item> <first>store</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> </second> </item> <item> <first>input_r(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="55" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="56" tracking_level="0" version="0"> <first>1</first> <second>RAM</second> </item> <item> <first>2</first> <second>RAM</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
-- Copyright (c) 2021 Bartek thindil Jasicki <thindil@laeran.pl> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Tcl.Strings; use Tcl.Strings; with Tk.Widget; use Tk.Widget; with Tk.TtkWidget; use Tk.TtkWidget; -- ****h* Tk/TtkButton -- FUNCTION -- Provides code for manipulate Tk widget ttk::button -- SOURCE package Tk.TtkButton is -- **** --## rule off REDUCEABLE_SCOPE -- ****t* TtkButton/TtkButton.Ttk_Button -- FUNCTION -- The Tk identifier of the ttk::button -- HISTORY -- 8.6.0 - Added -- SOURCE subtype Ttk_Button is Ttk_Widget; -- **** -- ****s* TtkButton/TtkButton.Ttk_Button_Options -- FUNCTION -- Data structure for all available options for the Tk ttk::button -- OPTIONS -- Command - The Tcl command which will be executed when the button -- was pressed -- Compound - Specifies if the button should display image and text in -- the same time. If yes (other value than NONE or EMPTY), -- then mean position of image related to the text -- Default - Specifies the state for the default button (activated -- when the user press Enter) -- Image - Tk image used to display on the button. Default option -- mean image used when other state's images are not -- specified -- State - The current state of the button -- Text - The text displayed on the button -- Text_Variable - The Tcl variable which value will be used for the text -- on the button -- Underline - The index of the character in the button text which will be -- underlined. The index starts from 0 -- Width - Width of the button. If greater than 0, allocate that -- much space for the button, if less than zero, it is -- minimum width, if zero, use natural width -- HISTORY -- 8.6.0 - Added -- SOURCE type Ttk_Button_Options is new Ttk_Widget_Options with record Command: Tcl_String := Null_Tcl_String; Compound: Compound_Type := EMPTY; Default: State_Type := NONE; Image: Ttk_Image_Option := Default_Ttk_Image_Option; State: Disabled_State_Type := NONE; Text: Tcl_String := Null_Tcl_String; Text_Variable: Tcl_String := Null_Tcl_String; Underline: Extended_Natural := -1; Width: Integer := 0; end record; -- **** -- ****f* TtkButton/TtkButton.Create_(function) -- FUNCTION -- Create a new Tk button widget with the selected pathname and options -- PARAMETERS -- Path_Name - Tk pathname for the newly created button -- Options - Options for the newly created button -- Interpreter - Tcl interpreter on which the button will be created. Can -- be empty. Default value is the default Tcl interpreter -- RESULT -- The Tk identifier of the newly created button widget -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Create the button with pathname .mybutton, text Quit and quitting from -- -- the program on activate -- My_Button: constant Ttk_Button := Create(".mybutton", (Text => To_Tcl_String("Quit"), -- Command => To_Tcl_String("exit"), others => <>)); -- SEE ALSO -- TtkButton.Create_(procedure) -- COMMANDS -- ttk::button Path_Name Options -- SOURCE function Create (Path_Name: Tk_Path_String; Options: Ttk_Button_Options; Interpreter: Tcl_Interpreter := Get_Interpreter) return Ttk_Button with Pre'Class => Path_Name'Length > 0 and Interpreter /= Null_Interpreter, Test_Case => (Name => "Test_Create_TtkButton1", Mode => Nominal); -- **** -- ****f* TtkButton/TtkButton.Create_(procedure) -- FUNCTION -- Create a new Tk button widget with the selected pathname and options -- PARAMETERS -- Button - Ttk_Button identifier which will be returned -- Path_Name - Tk pathname for the newly created button -- Options - Options for the newly created button -- Interpreter - Tcl interpreter on which the button will be created. Can -- be empty. Default value is the default Tcl interpreter -- OUTPUT -- The Button parameter as Tk identifier of the newly created button widget -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Create the button with pathname .mybutton, text Quit and quitting from -- -- the program on activate -- declare -- My_Button: Ttk_Button; -- begin -- Create(My_Button, ".mybutton", (Text => To_Tcl_String("Quit"), -- Command => To_Tcl_String("exit"), others => <>)); -- end; -- SEE ALSO -- TtkButton.Create_(function) -- COMMANDS -- ttk::button Path_Name Options -- SOURCE procedure Create (Button: out Ttk_Button; Path_Name: Tk_Path_String; Options: Ttk_Button_Options; Interpreter: Tcl_Interpreter := Get_Interpreter) with Pre'Class => Path_Name'Length > 0 and Interpreter /= Null_Interpreter, Test_Case => (Name => "Test_Create_TtkButton2", Mode => Nominal); -- **** -- ****f* TtkButton/TtkButton.Get_Options -- FUNCTION -- Get all values of Tk options of the selected button -- PARAMETERS -- Button - Ttk_Button which options' values will be taken -- RESULT -- Ttk_Button_Options record with values of the selected button options -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Get all values of option of button with pathname .mybutton -- My_Button_Options: constant Ttk_Button_Options := Get_Options(Get_Widget(".mybutton")); -- SEE ALSO -- TtkButton.Configure -- COMMANDS -- Button configure -- SOURCE function Get_Options(Button: Ttk_Button) return Ttk_Button_Options with Pre'Class => Button /= Null_Widget, Test_Case => (Name => "Test_Get_Options_TtkButton", Mode => Nominal); -- **** -- ****f* TtkButton/TtkButton.Configure -- FUNCTION -- Set the selected options for the selected button -- PARAMETERS -- Button - Ttk_Button which options will be set -- Options - The record with new values for the button options -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Disable button with pathname .mybutton -- Configure(Get_Widget(".mybutton"), (State => DISABLED, others => <>)); -- SEE ALSO -- TtkButton.Get_Options -- COMMANDS -- Button configure Options -- SOURCE procedure Configure(Button: Ttk_Button; Options: Ttk_Button_Options) with Pre'Class => Button /= Null_Widget, Test_Case => (Name => "Test_Configure_TtkButton", Mode => Nominal); -- **** -- ****d* TtkButton/TtkButton.Default_Ttk_Button_Options -- FUNCTION -- The default options for the Ttk_Button -- HISTORY -- 8.6.0 - Added -- SOURCE Default_Ttk_Button_Options: constant Ttk_Button_Options := Ttk_Button_Options'(others => <>); -- **** -- ****f* TtkButton/TtkButton.Invoke_(procedure) -- FUNCTION -- Invoke the Tcl command associated with the selected button. Does -- nothing if the button state is disabled. -- PARAMETERS -- Button - Ttk_Button which the command will be invoked -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Invoke the Tcl command of the Ttk_Button My_Button -- Invoke(My_Button); -- SEE ALSO -- TtkButton.Invoke_(function_and_string_result), TtkButton.Invoke_(function_and_integer_result), -- TtkButton.Invoke_(function_and_float_result) -- COMMANDS -- Button invoke -- SOURCE procedure Invoke(Button: Ttk_Button) with Pre => Button /= Null_Widget, Test_Case => (Name => "Test_Invoke_TtkButton1", Mode => Nominal); -- **** -- ****f* TtkButton/TtkButton.Invoke_(function) -- FUNCTION -- Invoke the Tcl command associated with the selected button. Does -- nothing if the button state is disabled. -- PARAMETERS -- Button - Ttk_Button which the command will be invoked -- RESULT -- The string with the return value of the associated Tcl command. -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Invoke the Tcl command of the Ttk_Button My_Button -- Result: constant String := Invoke(My_Button); -- SEE ALSO -- TtkButton.Invoke_(procedure) -- COMMANDS -- Button invoke -- SOURCE function Invoke(Button: Ttk_Button) return String with Pre => Button /= Null_Widget, Test_Case => (Name => "Test_Invoke_TtkButton2", Mode => Nominal); -- **** -- ****f* TtkButton/TtkButton.Generic_Scalar_Invoke_Button -- FUNCTION -- Invoke the Tcl command associated with the selected button. Does -- nothing if the button state is disabled. -- PARAMETERS -- Button - Ttk_Button which the command will be invoked -- RESULT -- Scalar type result with the value of associated Tcl command. -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Invoke the Tcl command of the Ttk_Button My_Button -- function Integer_Invoke is new Generic_Scalar_Invoke_Button(Integer); -- Result: constant Integer := Integer_Invoke(My_Button); -- SEE ALSO -- TtkButton.Invoke_(function), TtkButton.Generic_Float_Invoke_Button, -- COMMANDS -- Button invoke -- SOURCE generic type Result_Type is (<>); function Generic_Scalar_Invoke_Button (Button: Ttk_Button) return Result_Type; -- **** -- ****f* TtkButton/TtkButton.Generic_Float_Invoke_Button -- FUNCTION -- Invoke the Tcl command associated with the selected button. Does -- nothing if the button state is disabled. -- PARAMETERS -- Button - Ttk_Button which the command will be invoked -- RESULT -- Float type result with the value of associated Tcl command. -- HISTORY -- 8.6.0 - Added -- EXAMPLE -- -- Invoke the Tcl command of the Ttk_Button My_Button -- function Float_Invoke is new Generic_Float_Invoke_Button(Float); -- Result: constant Float := Float_Invoke(My_Button); -- SEE ALSO -- TtkButton.Invoke_(function), TtkButton.Generic_Scalar_Invoke_Button, -- COMMANDS -- Button invoke -- SOURCE generic type Result_Type is digits <>; function Generic_Float_Invoke_Button(Button: Ttk_Button) return Result_Type; -- **** --## rule on REDUCEABLE_SCOPE end Tk.TtkButton;
-- The MIT License (MIT) -- Copyright (c) 2015 Pavel Zhukov <landgraf@fedoraproject.org> -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. package Nanomsg.Pipeline is Nn_Proto_Pipeline : constant := 5; Nn_Push : constant Protocol_T := Nn_Proto_Pipeline * 16 + 0; Nn_Pull : constant Protocol_T := Nn_Proto_Pipeline * 16 + 1; end Nanomsg.Pipeline;
WITH P_StepHandler; USE P_StepHandler; WITH P_StructuralTypes; USE P_StructuralTypes; package P_StepHandler.KeyHandler is type KeyHandler is new T_StepHandler with private; type Ptr_KeyHandler is access KeyHandler; --- CONSTRUCTOR --- function Make (Self : in out KeyHandler) return KeyHandler; --- PROCEDURE --- procedure Handle (Self : in out KeyHandler); --- FUNCTION --- function PermutationChoice1_Key (BinaryKey : in out T_BinaryKey) return T_BinaryFormattedKey; -- procedure LeftShift (BinaryKey : in out T_BinaryKey; -- Round : in Positive); function PermutationChoice2_Key (Key : in out T_BinaryFormattedKey) return T_BinarySubKey; procedure KeyShift (Key : in out T_BinaryFormattedKey; Round : in Positive); --- SETTER --- procedure Set_KeyAccess (Self : in out KeyHandler; Ptr_Key : in Key_Access); procedure Set_SubKeyArrayAccess (Self : in out KeyHandler; Ptr_SubKeyAray : in BinarySubKeyArray_Access); PRIVATE type KeyHandler is new P_StepHandler.T_StepHandler with record Ptr_SubKeyArray : BinarySubKeyArray_Access; Ptr_Key : Key_Access; end record; end P_StepHandler.KeyHandler;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.Internals.Strings; with League.Strings.Internals; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.CMOF_Attributes; with AMF.Visitors.CMOF_Iterators; with AMF.Visitors.CMOF_Visitors; package body AMF.Internals.CMOF_Packages is use AMF.Internals.Tables.CMOF_Attributes; use type Matreshka.Internals.Strings.Shared_String_Access; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant CMOF_Package_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.CMOF_Visitors.CMOF_Visitor'Class then AMF.Visitors.CMOF_Visitors.CMOF_Visitor'Class (Visitor).Enter_Package (AMF.CMOF.Packages.CMOF_Package_Access (Self), Control); end if; end Enter_Element; ------------------------ -- Get_Nested_Package -- ------------------------ overriding function Get_Nested_Package (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package is begin return AMF.CMOF.Packages.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (Internal_Get_Nested_Package (Self.Element))); end Get_Nested_Package; ------------------------- -- Get_Nesting_Package -- ------------------------- overriding function Get_Nesting_Package (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Packages.CMOF_Package_Access is begin return AMF.CMOF.Packages.CMOF_Package_Access (AMF.Internals.Helpers.To_Element (Internal_Get_Nesting_Package (Self.Element))); end Get_Nesting_Package; -------------------- -- Get_Owned_Type -- -------------------- overriding function Get_Owned_Type (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Types.Collections.Set_Of_CMOF_Type is begin return AMF.CMOF.Types.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (Internal_Get_Owned_Type (Self.Element))); end Get_Owned_Type; ----------------------- -- Get_Package_Merge -- ----------------------- overriding function Get_Package_Merge (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Package_Merges.Collections.Set_Of_CMOF_Package_Merge is begin return AMF.CMOF.Package_Merges.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (Internal_Get_Package_Merge (Self.Element))); end Get_Package_Merge; -------------------------- -- Get_Packaged_Element -- -------------------------- overriding function Get_Packaged_Element (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Packageable_Elements.Collections. Set_Of_CMOF_Packageable_Element is begin return AMF.CMOF.Packageable_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (Internal_Get_Packaged_Element (Self.Element))); end Get_Packaged_Element; ------------- -- Get_Uri -- ------------- overriding function Get_Uri (Self : not null access constant CMOF_Package_Proxy) return Optional_String is Aux : constant Matreshka.Internals.Strings.Shared_String_Access := Internal_Get_Uri (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end Get_Uri; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant CMOF_Package_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.CMOF_Visitors.CMOF_Visitor'Class then AMF.Visitors.CMOF_Visitors.CMOF_Visitor'Class (Visitor).Leave_Package (AMF.CMOF.Packages.CMOF_Package_Access (Self), Control); end if; end Leave_Element; ------------------- -- Must_Be_Owned -- ------------------- overriding function Must_Be_Owned (Self : not null access constant CMOF_Package_Proxy) return Boolean is pragma Unreferenced (Self); -- [UML241] 7.3.38 Package (from Kernel) -- -- The query mustBeOwned() indicates whether elements of this type must -- have an owner. -- -- Package::mustBeOwned() : Boolean -- mustBeOwned = false begin return False; end Must_Be_Owned; ------------- -- Set_Uri -- ------------- overriding procedure Set_Uri (Self : not null access CMOF_Package_Proxy; To : Optional_String) is begin if To.Is_Empty then Internal_Set_Uri (Self.Element, null); else Internal_Set_Uri (Self.Element, League.Strings.Internals.Internal (To.Value)); end if; end Set_Uri; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant CMOF_Package_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.CMOF_Iterators.CMOF_Iterator'Class then AMF.Visitors.CMOF_Iterators.CMOF_Iterator'Class (Iterator).Visit_Package (Visitor, AMF.CMOF.Packages.CMOF_Package_Access (Self), Control); end if; end Visit_Element; ------------------------ -- All_Owned_Elements -- ------------------------ overriding function All_Owned_Elements (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Elements.Collections.Set_Of_CMOF_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented"); raise Program_Error; return All_Owned_Elements (Self); end All_Owned_Elements; ------------------------ -- Get_Qualified_Name -- ------------------------ overriding function Get_Qualified_Name (Self : not null access constant CMOF_Package_Proxy) return Optional_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Qualified_Name unimplemented"); raise Program_Error; return Get_Qualified_Name (Self); end Get_Qualified_Name; ----------------------------- -- Is_Distinguishable_From -- ----------------------------- overriding function Is_Distinguishable_From (Self : not null access constant CMOF_Package_Proxy; N : AMF.CMOF.Named_Elements.CMOF_Named_Element_Access; Ns : AMF.CMOF.Namespaces.CMOF_Namespace_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); raise Program_Error; return Is_Distinguishable_From (Self, N, Ns); end Is_Distinguishable_From; --------------------- -- Imported_Member -- --------------------- overriding function Imported_Member (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented"); raise Program_Error; return Imported_Member (Self); end Imported_Member; ------------------------- -- Get_Names_Of_Member -- ------------------------- overriding function Get_Names_Of_Member (Self : not null access constant CMOF_Package_Proxy; Element : AMF.CMOF.Named_Elements.CMOF_Named_Element_Access) return AMF.String_Collections.Set_Of_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented"); raise Program_Error; return Get_Names_Of_Member (Self, Element); end Get_Names_Of_Member; -------------------- -- Import_Members -- -------------------- overriding function Import_Members (Self : not null access constant CMOF_Package_Proxy; Imps : AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element) return AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented"); raise Program_Error; return Import_Members (Self, Imps); end Import_Members; ------------------------ -- Exclude_Collisions -- ------------------------ overriding function Exclude_Collisions (Self : not null access constant CMOF_Package_Proxy; Imps : AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element) return AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented"); raise Program_Error; return Exclude_Collisions (Self, Imps); end Exclude_Collisions; --------------------------------- -- Members_Are_Distinguishable -- --------------------------------- overriding function Members_Are_Distinguishable (Self : not null access constant CMOF_Package_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented"); raise Program_Error; return Members_Are_Distinguishable (Self); end Members_Are_Distinguishable; ------------------------- -- Set_Nesting_Package -- ------------------------- overriding procedure Set_Nesting_Package (Self : not null access CMOF_Package_Proxy; To : AMF.CMOF.Packages.CMOF_Package_Access) is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Set_Nesting_Package unimplemented"); raise Program_Error; end Set_Nesting_Package; --------------------- -- Visible_Members -- --------------------- overriding function Visible_Members (Self : not null access constant CMOF_Package_Proxy) return AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Visible_Members unimplemented"); raise Program_Error; return Visible_Members (Self); end Visible_Members; ------------------- -- Makes_Visible -- ------------------- overriding function Makes_Visible (Self : not null access constant CMOF_Package_Proxy; El : AMF.CMOF.Named_Elements.CMOF_Named_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Makes_Visible unimplemented"); raise Program_Error; return Makes_Visible (Self, El); end Makes_Visible; end AMF.Internals.CMOF_Packages;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ADA.NUMERICS.SHORT.COMPLEX.ELEMENTARY_FUNCTIONS -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ with Ada.Numerics.Short_Complex_Types; with Ada.Numerics.Generic_Complex_Elementary_Functions; package Ada.Numerics.Short_Complex_Elementary_Functions is new Ada.Numerics.Generic_Complex_Elementary_Functions (Ada.Numerics.Short_Complex_Types);
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.Utp.Coding_Rules.Hash is new AMF.Elements.Generic_Hash (Utp_Coding_Rule, Utp_Coding_Rule_Access);
----------------------------------------------------------------------- -- util-serialize-io -- IO Drivers for serialization -- Copyright (C) 2010, 2011, 2016, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Streams.Files; with Ada.Streams; with Ada.Streams.Stream_IO; with Ada.Exceptions; with Ada.IO_Exceptions; package body Util.Serialize.IO is -- use Util.Log; use type Util.Log.Loggers.Logger_Access; -- The logger' Log : aliased constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Util.Serialize.IO", Util.Log.WARN_LEVEL); procedure Write_Attribute (Stream : in out Output_Stream'Class; Name : in String; Value : in Ada.Strings.Unbounded.Unbounded_String) is begin Stream.Write_Attribute (Name, Ada.Strings.Unbounded.To_String (Value)); end Write_Attribute; procedure Write_Entity (Stream : in out Output_Stream'Class; Name : in String; Value : in Ada.Strings.Unbounded.Unbounded_String) is begin Stream.Write_Entity (Name, Ada.Strings.Unbounded.To_String (Value)); end Write_Entity; procedure Write_Entity (Stream : in out Output_Stream'Class; Name : in String; Value : in Util.Nullables.Nullable_String) is begin if Value.Is_Null then Stream.Write_Null_Entity (Name); else Stream.Write_Entity (Name, Value.Value); end if; end Write_Entity; procedure Write_Entity (Stream : in out Output_Stream'Class; Name : in String; Value : in Util.Nullables.Nullable_Time) is begin if Value.Is_Null then Stream.Write_Null_Entity (Name); else Stream.Write_Entity (Name, Value.Value); end if; end Write_Entity; procedure Write_Entity (Stream : in out Output_Stream'Class; Name : in String; Value : in Util.Nullables.Nullable_Boolean) is begin if Value.Is_Null then Stream.Write_Null_Entity (Name); else Stream.Write_Entity (Name, Value.Value); end if; end Write_Entity; procedure Write_Entity (Stream : in out Output_Stream'Class; Name : in String; Value : in Util.Nullables.Nullable_Integer) is begin if Value.Is_Null then Stream.Write_Null_Entity (Name); else Stream.Write_Entity (Name, Value.Value); end if; end Write_Entity; procedure Write_Entity (Stream : in out Output_Stream'Class; Name : in String; Value : in Util.Nullables.Nullable_Long) is begin if Value.Is_Null then Stream.Write_Null_Entity (Name); else Stream.Write_Entity (Name, Integer (Value.Value)); end if; end Write_Entity; -- ------------------------------ -- Read the file and parse it using the JSON parser. -- ------------------------------ procedure Parse (Handler : in out Parser; File : in String; Sink : in out Reader'Class) is Stream : aliased Util.Streams.Files.File_Stream; Buffer : Util.Streams.Buffered.Input_Buffer_Stream; begin if Handler.Error_Logger = null then Handler.Error_Logger := Log'Access; end if; Handler.Error_Logger.Info ("Reading file {0}", File); Handler.File := Ada.Strings.Unbounded.To_Unbounded_String (File); Buffer.Initialize (Input => Stream'Unchecked_Access, Size => 1024); Stream.Open (Mode => Ada.Streams.Stream_IO.In_File, Name => File); Sink.Start_Document; Parser'Class (Handler).Parse (Buffer, Sink); exception -- when Util.Serialize.Mappers.Field_Fatal_Error => -- null; when Ada.IO_Exceptions.Name_Error => Parser'Class (Handler).Error ("File '" & File & "' does not exist."); when E : others => if not Handler.Error_Flag then Parser'Class (Handler).Error ("Exception " & Ada.Exceptions.Exception_Name (E)); end if; end Parse; -- ------------------------------ -- Parse the content string. -- ------------------------------ procedure Parse_String (Handler : in out Parser; Content : in String; Sink : in out Reader'Class) is Stream : aliased Util.Streams.Buffered.Input_Buffer_Stream; begin if Handler.Error_Logger = null then Handler.Error_Logger := Log'Access; end if; Handler.File := Ada.Strings.Unbounded.To_Unbounded_String ("<inline>"); Stream.Initialize (Content => Content); Sink.Start_Document; Parser'Class (Handler).Parse (Stream, Sink); exception -- when Util.Serialize.Mappers.Field_Fatal_Error => -- null; when E : others => if not Handler.Error_Flag then Parser'Class (Handler).Error ("Exception " & Ada.Exceptions.Exception_Name (E)); end if; end Parse_String; -- ------------------------------ -- Returns true if the <b>Parse</b> operation detected at least one error. -- ------------------------------ function Has_Error (Handler : in Parser) return Boolean is begin return Handler.Error_Flag; end Has_Error; -- ------------------------------ -- Set the error logger to report messages while parsing and reading the input file. -- ------------------------------ procedure Set_Logger (Handler : in out Parser; Logger : in Util.Log.Loggers.Logger_Access) is begin Handler.Error_Logger := Logger; end Set_Logger; -- ------------------------------ -- Get the current location (file and line) to report an error message. -- ------------------------------ function Get_Location (Handler : in Parser) return String is begin return Ada.Strings.Unbounded.To_String (Handler.File); end Get_Location; -- ------------------------------ -- Report an error while parsing the input stream. The error message will be reported -- on the logger associated with the parser. The parser will be set as in error so that -- the <b>Has_Error</b> function will return True after parsing the whole file. -- ------------------------------ procedure Error (Handler : in out Parser; Message : in String) is begin Handler.Error_Logger.Error ("{0}: {1}", Parser'Class (Handler).Get_Location, Message); Handler.Error_Flag := True; end Error; end Util.Serialize.IO;
-- -- Color tables, known as "palettes" -- private package GID.Color_tables is -- Load a palette on its defined range, according to -- the format and subformats loaded by initial -- steps in GID.Load_image_header procedure Load_palette (image: in out Image_descriptor); -- if image.palette = null, nothing happens. -- Convert a RGB value packed in 2 bytes -- (15 bit, 5 bit each channel) into a RGB_Color -- This is for the TGA format. procedure Convert(c, d: in U8; rgb: out RGB_color); end GID.Color_tables;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName/> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>linebuffer</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>in_stream_V_value_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_stream.V.value.V</originalName> <rtlName/> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>out_stream_V_value_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out_stream.V.value.V</originalName> <rtlName/> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>288</bitwidth> </Value> <direction>1</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>12</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>403</lineNumber> <contextFuncName>linebuffer_2D&amp;lt;1920, 1080, 1, 1, 1, 1, 3, 3, unsigned int&amp;gt;</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first> <second class_id="11" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>../../../lib_files/Linebuffer.h</first> <second>linebuffer&amp;lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&amp;gt;</second> </first> <second>530</second> </item> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>linebuffer_2D&amp;lt;1920, 1080, 1, 1, 1, 1, 3, 3, unsigned int&amp;gt;</second> </first> <second>403</second> </item> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>linebuffer_3D&amp;lt;1920, 1080, 1, 1, 1, 3, 3, 1, 1, unsigned int&amp;gt;</second> </first> <second>492</second> </item> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>linebuffer_4D&amp;lt;1920, 1080, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&amp;gt;</second> </first> <second>505</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>call_U0</rtlName> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>16</item> <item>17</item> <item>18</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>13</id> <name/> <fileName>../../../lib_files/Linebuffer.h</fileName> <fileDirectory>..</fileDirectory> <lineNumber>531</lineNumber> <contextFuncName>linebuffer&amp;lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&amp;gt;</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_real/conv2d</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>../../../lib_files/Linebuffer.h</first> <second>linebuffer&amp;lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned int&amp;gt;</second> </first> <second>531</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>2</type> <id>15</id> <name>call</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:call&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_6"> <Obj> <type>3</type> <id>14</id> <name>linebuffer</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>12</item> <item>13</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_7"> <id>16</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_8"> <id>17</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_9"> <id>18</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>12</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_10"> <mId>1</mId> <mTag>linebuffer</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>14</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>2077921</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>1</mIsDfPipe> <mDfPipe class_id="23" tracking_level="1" version="0" object_id="_11"> <port_list class_id="24" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port_list> <process_list class_id="25" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_12"> <type>0</type> <name>call_U0</name> <ssdmobj_id>12</ssdmobj_id> <pins class_id="27" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_13"> <port class_id="29" tracking_level="1" version="0" object_id="_14"> <name>in_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id="30" tracking_level="1" version="0" object_id="_15"> <type>0</type> <name>call_U0</name> <ssdmobj_id>12</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_16"> <port class_id_reference="29" object_id="_17"> <name>out_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_15"/> </item> </pins> </item> </process_list> <channel_list class_id="31" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </channel_list> <net_list class_id="32" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </net_list> </mDfPipe> </item> </cdfg_regions> <fsm class_id="33" tracking_level="1" version="0" object_id="_18"> <states class_id="34" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="35" tracking_level="1" version="0" object_id="_19"> <id>1</id> <operations class_id="36" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="37" tracking_level="1" version="0" object_id="_20"> <id>12</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="35" object_id="_21"> <id>2</id> <operations> <count>11</count> <item_version>0</item_version> <item class_id_reference="37" object_id="_22"> <id>3</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_23"> <id>4</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_24"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_25"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_26"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_27"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_28"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_29"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_30"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="37" object_id="_31"> <id>12</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="37" object_id="_32"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="38" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="39" tracking_level="1" version="0" object_id="_33"> <inState>1</inState> <outState>2</outState> <condition class_id="40" tracking_level="0" version="0"> <id>0</id> <sop class_id="41" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="42" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="43" tracking_level="1" version="0" object_id="_34"> <dp_component_resource class_id="44" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="45" tracking_level="0" version="0"> <first>call_U0 (call)</first> <second class_id="46" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="47" tracking_level="0" version="0"> <first>BRAM</first> <second>8</second> </item> <item> <first>FF</first> <second>1097</second> </item> <item> <first>LUT</first> <second>644</second> </item> </second> </item> </dp_component_resource> <dp_expression_resource> <count>0</count> <item_version>0</item_version> </dp_expression_resource> <dp_fifo_resource> <count>0</count> <item_version>0</item_version> </dp_fifo_resource> <dp_memory_resource> <count>0</count> <item_version>0</item_version> </dp_memory_resource> <dp_multiplexer_resource> <count>0</count> <item_version>0</item_version> </dp_multiplexer_resource> <dp_register_resource> <count>0</count> <item_version>0</item_version> </dp_register_resource> <dp_component_map class_id="48" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>call_U0 (call)</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> </dp_component_map> <dp_expression_map> <count>0</count> <item_version>0</item_version> </dp_expression_map> <dp_fifo_map> <count>0</count> <item_version>0</item_version> </dp_fifo_map> <dp_memory_map> <count>0</count> <item_version>0</item_version> </dp_memory_map> </res> <node_label_latency class_id="50" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="51" tracking_level="0" version="0"> <first>12</first> <second class_id="52" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> <item> <first>13</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="53" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>14</first> <second class_id="55" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="56" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="57" tracking_level="1" version="0" object_id="_35"> <region_name>linebuffer</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>14</item> </basic_blocks> <nodes> <count>11</count> <item_version>0</item_version> <item>3</item> <item>4</item> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> <item>10</item> <item>11</item> <item>12</item> <item>13</item> </nodes> <anchor_node>-1</anchor_node> <region_type>16</region_type> <interval>0</interval> <pipe_depth>0</pipe_depth> </item> </regions> <dp_fu_nodes class_id="58" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="59" tracking_level="0" version="0"> <first>36</first> <second> <count>2</count> <item_version>0</item_version> <item>12</item> <item>12</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="61" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>1</count> <item_version>0</item_version> <item class_id="62" tracking_level="0" version="0"> <first>grp_call_fu_36</first> <second> <count>2</count> <item_version>0</item_version> <item>12</item> <item>12</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="63" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="64" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="65" tracking_level="0" version="0"> <first>in_stream_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> </second> </item> <item> <first>out_stream_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="66" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="67" tracking_level="0" version="0"> <first>1</first> <second>FIFO_SRL</second> </item> <item> <first>2</first> <second>FIFO_SRL</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
-- C37006A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- FOR A COMPONENT OF A RECORD, ACCESS, OR PRIVATE TYPE, OR FOR A -- LIMITED PRIVATE COMPONENT, CHECK THAT A NON-STATIC EXPRESSION CAN -- BE USED IN A DISCRIMINANT CONSTRAINT OR (EXCEPTING LIMITED PRIVATE -- COMPONENTS) IN SPECIFYING A DEFAULT INITIAL VALUE. -- R.WILLIAMS 8/28/86 WITH REPORT; USE REPORT; PROCEDURE C37006A IS SUBTYPE INT IS INTEGER RANGE 0 .. 100; TYPE ARR IS ARRAY (INT RANGE <>) OF INTEGER; TYPE REC1 (D1, D2 : INT) IS RECORD A : ARR (D1 .. D2); END RECORD; TYPE REC1_NAME IS ACCESS REC1; PROCEDURE CHECK (AR : ARR; STR : STRING) IS BEGIN IF AR'FIRST /= 1 OR AR'LAST /= 2 THEN FAILED ( "INCORRECT BOUNDS FOR R.COMP.A IN COMPONENT " & "OF " & STR & " TYPE"); ELSIF AR /= (3, 4) THEN FAILED ( "INITIALIZATION OF R.COMP.A IN COMPONENT OF " & STR & " TYPE FAILED" ); END IF; END CHECK; PACKAGE PACK IS TYPE PRIV (D1, D2 : INT) IS PRIVATE; TYPE LIM (D1, D2 : INT) IS LIMITED PRIVATE; FUNCTION PRIV_FUN (PARM1, PARM2 : INTEGER) RETURN PRIV; PROCEDURE PRIV_CHECK (R : PRIV); PROCEDURE LIM_CHECK (R : LIM); PRIVATE TYPE PRIV (D1, D2 : INT) IS RECORD A : ARR (D1 .. D2); END RECORD; TYPE LIM (D1, D2 : INT) IS RECORD A : ARR (D1 .. D2); END RECORD; END PACK; PACKAGE BODY PACK IS FUNCTION PRIV_FUN (PARM1, PARM2 : INTEGER) RETURN PRIV IS BEGIN RETURN (IDENT_INT (1), IDENT_INT (2), ARR'(1 => 3, 2 => 4)); END PRIV_FUN; PROCEDURE PRIV_CHECK (R : PRIV) IS BEGIN CHECK (R.A, "PRIVATE TYPE" ); END PRIV_CHECK; PROCEDURE LIM_CHECK (R : LIM) IS BEGIN IF R.A'FIRST /= 1 OR R.A'LAST /= 2 THEN FAILED ( "INCORRECT BOUNDS FOR R.COMP.A IN " & "COMPONENT OF LIMITED PRIVATE TYPE"); END IF; END LIM_CHECK; END PACK; USE PACK; BEGIN TEST ( "C37006A", "FOR A COMPONENT OF A RECORD, ACCESS, " & "OR PRIVATE TYPE, OR FOR A LIMITED PRIVATE " & "COMPONENT, CHECK THAT A NON-STATIC " & "EXPRESSION CAN BE USED IN A DISCRIMINANT " & "CONSTRAINT OR (EXCEPTING LIMITED PRIVATE " & "COMPONENTS) IN SPECIFYING A DEFAULT " & "INITIAL VALUE" ); BEGIN DECLARE TYPE REC2 IS RECORD COMP : REC1 (IDENT_INT (1), IDENT_INT (2)) := (IDENT_INT (1), IDENT_INT (2), ARR'(1 => 3, 2 => 4)); END RECORD; R : REC2; BEGIN IF R.COMP.D1 = 1 AND R.COMP.D2 = 2 THEN CHECK (R.COMP.A, "RECORD"); ELSE FAILED ( "INCORRECT VALUE FOR DISCRIMINANTS " & "OF RECORD TYPE COMPONENT" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & "RECORD TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & "RECORD TYPE COMPONENT" ); END; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED BY DECLARATION " & "OF RECORD TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED BY DECLARATION " & "OF RECORD TYPE COMPONENT" ); END; BEGIN DECLARE TYPE REC2 IS RECORD COMP : REC1_NAME (IDENT_INT (1), IDENT_INT (2)) := NEW REC1'(IDENT_INT (1), IDENT_INT (2), ARR'(1 => 3, 2 => 4)); END RECORD; R : REC2; BEGIN IF R.COMP.D1 = 1 AND R.COMP.D2 = 2 THEN CHECK (R.COMP.A, "ACCESS"); ELSE FAILED ( "INCORRECT VALUE FOR DISCRIMINANTS " & "OF ACCESS TYPE COMPONENT" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & "ACCESS TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & "ACCESS TYPE COMPONENT" ); END; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED BY DECLARATION " & "OF ACCESS TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED BY DECLARATION " & "OF ACCESS TYPE COMPONENT" ); END; BEGIN DECLARE TYPE REC2 IS RECORD COMP : PRIV (IDENT_INT (1), IDENT_INT (2)) := PRIV_FUN (IDENT_INT (1), IDENT_INT (2)); END RECORD; R : REC2; BEGIN IF R.COMP.D1 = 1 AND R.COMP.D2 = 2 THEN PRIV_CHECK (R.COMP); ELSE FAILED ( "INCORRECT VALUE FOR DISCRIMINANTS " & "OF PRIVATE TYPE COMPONENT" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & "PRIVATE TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & "PRIVATE TYPE COMPONENT" ); END; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED BY DECLARATION " & "OF PRIVATE TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED BY DECLARATION " & "OF PRIVATE TYPE COMPONENT" ); END; BEGIN DECLARE TYPE REC2 IS RECORD COMP : LIM (IDENT_INT (1), IDENT_INT (2)); END RECORD; R : REC2; BEGIN IF R.COMP.D1 = 1 AND R.COMP.D2 = 2 THEN LIM_CHECK (R.COMP); ELSE FAILED ( "INCORRECT VALUE FOR DISCRIMINANTS " & "OF LIM PRIV TYPE COMPONENT" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & " LIM PRIV TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED IN STATEMENT " & "SEQUENCE FOLLOWING DECLARATION OF " & " LIM PRIV TYPE COMPONENT" ); END; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED BY DECLARATION " & "OF LIM PRIV TYPE COMPONENT" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED BY DECLARATION " & "OF LIM PRIV TYPE COMPONENT" ); END; RESULT; END C37006A;
with Greeter; use Greeter; with Ada.Text_IO; use Ada.Text_IO; procedure Hello is package Int_IO is new Ada.Text_IO.Integer_IO (Integer); X : Integer := 2; procedure Do_It with Global => (Input => X); procedure Do_It is begin if X > 20 then Greeter.Greet ("Hello"); end if; end Do_It; begin -- Put_Line (Greeter.Hello_Text); Greeter.X := 10; for I in Integer range 0 .. 25 loop X := X + I; Do_It; end loop; Put_Line (Integer'Image (Greeter.X)); Put_Line (Integer'Image (X)); Int_IO.Put (X); New_Line; end Hello;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ package HAL.Real_Time_Clock is pragma Preelaborate; type RTC_Hour is mod 24; type RTC_Minute is mod 60; type RTC_Second is mod 60; type RTC_Time is record Hour : RTC_Hour; Min : RTC_Minute; Sec : RTC_Second; end record; type RTC_Month is (January, February, March, April, May, June, July, August, September, October, November, December); type RTC_Day_Of_Week is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); type RTC_Day is range 1 .. 31; type RTC_Year is range 00 .. 99; type RTC_Date is record Day_Of_Week : RTC_Day_Of_Week; Day : RTC_Day; Month : RTC_Month; Year : RTC_Year; end record; for RTC_Day_Of_Week use (Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6, Sunday => 7); for RTC_Month use (January => 1, February => 2, March => 3, April => 4, May => 5, June => 6, July => 7, August => 8, September => 9, October => 10, November => 11, December => 12); type RTC_Device is limited interface; type Any_RTC_Device is access all RTC_Device'Class; procedure Set (This : in out RTC_Device; Time : RTC_Time; Date : RTC_Date) is abstract; procedure Get (This : in out RTC_Device; Time : out RTC_Time; Date : out RTC_Date) is abstract; -- This procedure ensures coherent time and date values function Get_Time (This : RTC_Device) return HAL.Real_Time_Clock.RTC_Time is abstract; function Get_Date (This : RTC_Device) return HAL.Real_Time_Clock.RTC_Date is abstract; end HAL.Real_Time_Clock;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.UML.Realizations.Collections is pragma Preelaborate; package UML_Realization_Collections is new AMF.Generic_Collections (UML_Realization, UML_Realization_Access); type Set_Of_UML_Realization is new UML_Realization_Collections.Set with null record; Empty_Set_Of_UML_Realization : constant Set_Of_UML_Realization; type Ordered_Set_Of_UML_Realization is new UML_Realization_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Realization : constant Ordered_Set_Of_UML_Realization; type Bag_Of_UML_Realization is new UML_Realization_Collections.Bag with null record; Empty_Bag_Of_UML_Realization : constant Bag_Of_UML_Realization; type Sequence_Of_UML_Realization is new UML_Realization_Collections.Sequence with null record; Empty_Sequence_Of_UML_Realization : constant Sequence_Of_UML_Realization; private Empty_Set_Of_UML_Realization : constant Set_Of_UML_Realization := (UML_Realization_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Realization : constant Ordered_Set_Of_UML_Realization := (UML_Realization_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Realization : constant Bag_Of_UML_Realization := (UML_Realization_Collections.Bag with null record); Empty_Sequence_Of_UML_Realization : constant Sequence_Of_UML_Realization := (UML_Realization_Collections.Sequence with null record); end AMF.UML.Realizations.Collections;
-- This spec has been automatically generated from STM32F0xx.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.GPIO is pragma Preelaborate; --------------- -- Registers -- --------------- -- MODER array element subtype MODER_Element is STM32_SVD.UInt2; -- MODER array type MODER_Field_Array is array (0 .. 15) of MODER_Element with Component_Size => 2, Size => 32; -- GPIO port mode register type MODER_Register (As_Array : Boolean := False) is record case As_Array is when False => -- MODER as a value Val : STM32_SVD.UInt32; when True => -- MODER as an array Arr : MODER_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Bit_Order => System.Low_Order_First; for MODER_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- OTYPER_OT array element subtype OTYPER_OT_Element is STM32_SVD.Bit; -- OTYPER_OT array type OTYPER_OT_Field_Array is array (0 .. 15) of OTYPER_OT_Element with Component_Size => 1, Size => 16; -- Type definition for OTYPER_OT type OTYPER_OT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- OT as a value Val : STM32_SVD.UInt16; when True => -- OT as an array Arr : OTYPER_OT_Field_Array; end case; end record with Unchecked_Union, Size => 16; for OTYPER_OT_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- GPIO port output type register type OTYPER_Register is record -- Port x configuration bits (y = 0..15) OT : OTYPER_OT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OTYPER_Register use record OT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- OSPEEDR array element subtype OSPEEDR_Element is STM32_SVD.UInt2; -- OSPEEDR array type OSPEEDR_Field_Array is array (0 .. 15) of OSPEEDR_Element with Component_Size => 2, Size => 32; -- GPIO port output speed register type OSPEEDR_Register (As_Array : Boolean := False) is record case As_Array is when False => -- OSPEEDR as a value Val : STM32_SVD.UInt32; when True => -- OSPEEDR as an array Arr : OSPEEDR_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Bit_Order => System.Low_Order_First; for OSPEEDR_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- PUPDR array element subtype PUPDR_Element is STM32_SVD.UInt2; -- PUPDR array type PUPDR_Field_Array is array (0 .. 15) of PUPDR_Element with Component_Size => 2, Size => 32; -- GPIO port pull-up/pull-down register type PUPDR_Register (As_Array : Boolean := False) is record case As_Array is when False => -- PUPDR as a value Val : STM32_SVD.UInt32; when True => -- PUPDR as an array Arr : PUPDR_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Bit_Order => System.Low_Order_First; for PUPDR_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- IDR array element subtype IDR_Element is STM32_SVD.Bit; -- IDR array type IDR_Field_Array is array (0 .. 15) of IDR_Element with Component_Size => 1, Size => 16; -- Type definition for IDR type IDR_Field (As_Array : Boolean := False) is record case As_Array is when False => -- IDR as a value Val : STM32_SVD.UInt16; when True => -- IDR as an array Arr : IDR_Field_Array; end case; end record with Unchecked_Union, Size => 16; for IDR_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- GPIO port input data register type IDR_Register is record -- Read-only. Port input data (y = 0..15) IDR : IDR_Field; -- unspecified Reserved_16_31 : STM32_SVD.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IDR_Register use record IDR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- ODR array element subtype ODR_Element is STM32_SVD.Bit; -- ODR array type ODR_Field_Array is array (0 .. 15) of ODR_Element with Component_Size => 1, Size => 16; -- Type definition for ODR type ODR_Field (As_Array : Boolean := False) is record case As_Array is when False => -- ODR as a value Val : STM32_SVD.UInt16; when True => -- ODR as an array Arr : ODR_Field_Array; end case; end record with Unchecked_Union, Size => 16; for ODR_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- GPIO port output data register type ODR_Register is record -- Port output data (y = 0..15) ODR : ODR_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ODR_Register use record ODR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- BSRR_BS array element subtype BSRR_BS_Element is STM32_SVD.Bit; -- BSRR_BS array type BSRR_BS_Field_Array is array (0 .. 15) of BSRR_BS_Element with Component_Size => 1, Size => 16; -- Type definition for BSRR_BS type BSRR_BS_Field (As_Array : Boolean := False) is record case As_Array is when False => -- BS as a value Val : STM32_SVD.UInt16; when True => -- BS as an array Arr : BSRR_BS_Field_Array; end case; end record with Unchecked_Union, Size => 16; for BSRR_BS_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- BSRR_BR array element subtype BSRR_BR_Element is STM32_SVD.Bit; -- BSRR_BR array type BSRR_BR_Field_Array is array (0 .. 15) of BSRR_BR_Element with Component_Size => 1, Size => 16; -- Type definition for BSRR_BR type BSRR_BR_Field (As_Array : Boolean := False) is record case As_Array is when False => -- BR as a value Val : STM32_SVD.UInt16; when True => -- BR as an array Arr : BSRR_BR_Field_Array; end case; end record with Unchecked_Union, Size => 16; for BSRR_BR_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- GPIO port bit set/reset register type BSRR_Register is record -- Write-only. Port x set bit y (y= 0..15) BS : BSRR_BS_Field := (As_Array => False, Val => 16#0#); -- Write-only. Port x set bit y (y= 0..15) BR : BSRR_BR_Field := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BSRR_Register use record BS at 0 range 0 .. 15; BR at 0 range 16 .. 31; end record; -- LCKR_LCK array element subtype LCKR_LCK_Element is STM32_SVD.Bit; -- LCKR_LCK array type LCKR_LCK_Field_Array is array (0 .. 15) of LCKR_LCK_Element with Component_Size => 1, Size => 16; -- Type definition for LCKR_LCK type LCKR_LCK_Field (As_Array : Boolean := False) is record case As_Array is when False => -- LCK as a value Val : STM32_SVD.UInt16; when True => -- LCK as an array Arr : LCKR_LCK_Field_Array; end case; end record with Unchecked_Union, Size => 16; for LCKR_LCK_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; subtype LCKR_LCKK_Field is STM32_SVD.Bit; -- GPIO port configuration lock register type LCKR_Register is record -- Port x lock bit y (y= 0..15) LCK : LCKR_LCK_Field := (As_Array => False, Val => 16#0#); -- Port x lock bit y (y= 0..15) LCKK : LCKR_LCKK_Field := 16#0#; -- unspecified Reserved_17_31 : STM32_SVD.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for LCKR_Register use record LCK at 0 range 0 .. 15; LCKK at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- AFRL array element subtype AFRL_Element is STM32_SVD.UInt4; -- AFRL array type AFRL_Field_Array is array (0 .. 7) of AFRL_Element with Component_Size => 4, Size => 32; -- GPIO alternate function low register type AFRL_Register (As_Array : Boolean := False) is record case As_Array is when False => -- AFRL as a value Val : STM32_SVD.UInt32; when True => -- AFRL as an array Arr : AFRL_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Bit_Order => System.Low_Order_First; for AFRL_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- AFRH array element subtype AFRH_Element is STM32_SVD.UInt4; -- AFRH array type AFRH_Field_Array is array (8 .. 15) of AFRH_Element with Component_Size => 4, Size => 32; -- GPIO alternate function high register type AFRH_Register (As_Array : Boolean := False) is record case As_Array is when False => -- AFRH as a value Val : STM32_SVD.UInt32; when True => -- AFRH as an array Arr : AFRH_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Bit_Order => System.Low_Order_First; for AFRH_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- BRR_BR array element subtype BRR_BR_Element is STM32_SVD.Bit; -- BRR_BR array type BRR_BR_Field_Array is array (0 .. 15) of BRR_BR_Element with Component_Size => 1, Size => 16; -- Type definition for BRR_BR type BRR_BR_Field (As_Array : Boolean := False) is record case As_Array is when False => -- BR as a value Val : STM32_SVD.UInt16; when True => -- BR as an array Arr : BRR_BR_Field_Array; end case; end record with Unchecked_Union, Size => 16; for BRR_BR_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- Port bit reset register type BRR_Register is record -- Write-only. Port x Reset bit y BR : BRR_BR_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : STM32_SVD.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BRR_Register use record BR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- General-purpose I/Os type GPIO_Peripheral is record -- GPIO port mode register MODER : aliased MODER_Register; -- GPIO port output type register OTYPER : aliased OTYPER_Register; -- GPIO port output speed register OSPEEDR : aliased OSPEEDR_Register; -- GPIO port pull-up/pull-down register PUPDR : aliased PUPDR_Register; -- GPIO port input data register IDR : aliased IDR_Register; -- GPIO port output data register ODR : aliased ODR_Register; -- GPIO port bit set/reset register BSRR : aliased BSRR_Register; -- GPIO port configuration lock register LCKR : aliased LCKR_Register; -- GPIO alternate function low register AFRL : aliased AFRL_Register; -- GPIO alternate function high register AFRH : aliased AFRH_Register; -- Port bit reset register BRR : aliased BRR_Register; end record with Volatile; for GPIO_Peripheral use record MODER at 16#0# range 0 .. 31; OTYPER at 16#4# range 0 .. 31; OSPEEDR at 16#8# range 0 .. 31; PUPDR at 16#C# range 0 .. 31; IDR at 16#10# range 0 .. 31; ODR at 16#14# range 0 .. 31; BSRR at 16#18# range 0 .. 31; LCKR at 16#1C# range 0 .. 31; AFRL at 16#20# range 0 .. 31; AFRH at 16#24# range 0 .. 31; BRR at 16#28# range 0 .. 31; end record; -- General-purpose I/Os GPIOA_Periph : aliased GPIO_Peripheral with Import, Address => System'To_Address (16#48000000#); -- General-purpose I/Os GPIOB_Periph : aliased GPIO_Peripheral with Import, Address => System'To_Address (16#48000400#); -- General-purpose I/Os GPIOC_Periph : aliased GPIO_Peripheral with Import, Address => System'To_Address (16#48000800#); -- General-purpose I/Os GPIOD_Periph : aliased GPIO_Peripheral with Import, Address => System'To_Address (16#48000C00#); -- General-purpose I/Os GPIOE_Periph : aliased GPIO_Peripheral with Import, Address => System'To_Address (16#48001000#); -- General-purpose I/Os GPIOF_Periph : aliased GPIO_Peripheral with Import, Address => System'To_Address (16#48001400#); end STM32_SVD.GPIO;
-- This spec has been automatically generated from STM32L151.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.PWR is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR_PLS_Field is HAL.UInt3; subtype CR_VOS_Field is HAL.UInt2; -- power control register type CR_Register is record -- Low-power deep sleep LPSDSR : Boolean := False; -- Power down deepsleep PDDS : Boolean := False; -- Clear wakeup flag CWUF : Boolean := False; -- Clear standby flag CSBF : Boolean := False; -- Power voltage detector enable PVDE : Boolean := False; -- PVD level selection PLS : CR_PLS_Field := 16#0#; -- Disable backup domain write protection DBP : Boolean := False; -- Ultralow power mode ULP : Boolean := False; -- Fast wakeup FWU : Boolean := False; -- Voltage scaling range selection VOS : CR_VOS_Field := 16#2#; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- Low power run mode LPRUN : Boolean := False; -- unspecified Reserved_15_31 : HAL.UInt17 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record LPSDSR at 0 range 0 .. 0; PDDS at 0 range 1 .. 1; CWUF at 0 range 2 .. 2; CSBF at 0 range 3 .. 3; PVDE at 0 range 4 .. 4; PLS at 0 range 5 .. 7; DBP at 0 range 8 .. 8; ULP at 0 range 9 .. 9; FWU at 0 range 10 .. 10; VOS at 0 range 11 .. 12; Reserved_13_13 at 0 range 13 .. 13; LPRUN at 0 range 14 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; -- CSR_EWUP array type CSR_EWUP_Field_Array is array (1 .. 3) of Boolean with Component_Size => 1, Size => 3; -- Type definition for CSR_EWUP type CSR_EWUP_Field (As_Array : Boolean := False) is record case As_Array is when False => -- EWUP as a value Val : HAL.UInt3; when True => -- EWUP as an array Arr : CSR_EWUP_Field_Array; end case; end record with Unchecked_Union, Size => 3; for CSR_EWUP_Field use record Val at 0 range 0 .. 2; Arr at 0 range 0 .. 2; end record; -- power control/status register type CSR_Register is record -- Read-only. Wakeup flag WUF : Boolean := False; -- Read-only. Standby flag SBF : Boolean := False; -- Read-only. PVD output PVDO : Boolean := False; -- Read-only. Internal voltage reference (VREFINT) ready flag VREFINTRDYF : Boolean := True; -- Read-only. Voltage Scaling select flag VOSF : Boolean := False; -- Read-only. Regulator LP flag REGLPF : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Enable WKUP pin 1 EWUP : CSR_EWUP_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_11_31 : HAL.UInt21 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CSR_Register use record WUF at 0 range 0 .. 0; SBF at 0 range 1 .. 1; PVDO at 0 range 2 .. 2; VREFINTRDYF at 0 range 3 .. 3; VOSF at 0 range 4 .. 4; REGLPF at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; EWUP at 0 range 8 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Power control type PWR_Peripheral is record -- power control register CR : aliased CR_Register; -- power control/status register CSR : aliased CSR_Register; end record with Volatile; for PWR_Peripheral use record CR at 16#0# range 0 .. 31; CSR at 16#4# range 0 .. 31; end record; -- Power control PWR_Periph : aliased PWR_Peripheral with Import, Address => System'To_Address (16#40007000#); end STM32_SVD.PWR;
package lluvia is TYPE T_Mes IS (Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre); subtype T_Cantidad is Integer range 0 .. integer'Last; type T_Lluvias is array (T_Mes) of T_Cantidad; type T_Pais is (EEUU, Mejico,Canada); type T_Lluvias_por_Pais is array (T_Pais) of T_Lluvias; -- paises x meses -- tabla de dos dimensiones: paises x meses end lluvia;
with Gdk.Event; use Gdk.Event; with Gtk.Label; use Gtk.Label; with Gtk.Window; use Gtk.Window; with Gtk.Widget; use Gtk.Widget; with Gtk.Handlers; with Gtk.Main; procedure Windowed_Goodbye_World is Window : Gtk_Window; Label : Gtk_Label; package Handlers is new Gtk.Handlers.Callback (Gtk_Widget_Record); package Return_Handlers is new Gtk.Handlers.Return_Callback (Gtk_Widget_Record, Boolean); function Delete_Event (Widget : access Gtk_Widget_Record'Class) return Boolean is begin return False; end Delete_Event; procedure Destroy (Widget : access Gtk_Widget_Record'Class) is begin Gtk.Main.Main_Quit; end Destroy; begin Gtk.Main.Init; Gtk.Window.Gtk_New (Window); Gtk_New (Label, "Goodbye, World!"); Add (Window, Label); Return_Handlers.Connect ( Window, "delete_event", Return_Handlers.To_Marshaller (Delete_Event'Access) ); Handlers.Connect ( Window, "destroy", Handlers.To_Marshaller (Destroy'Access) ); Show_All (Label); Show (Window); Gtk.Main.Main; end Windowed_Goodbye_World;
pragma License (Unrestricted); -- separated and auto-loaded by compiler private generic type Num is delta <> digits <>; package Ada.Wide_Wide_Text_IO.Decimal_IO is Default_Fore : Field := Num'Fore; Default_Aft : Field := Num'Aft; Default_Exp : Field := 0; -- procedure Get ( -- File : File_Type; -- Input_File_Type -- Item : out Num; -- Width : Field := 0); -- procedure Get ( -- Item : out Num; -- Width : Field := 0); -- procedure Put ( -- File : File_Type; -- Output_File_Type -- Item : Num; -- Fore : Field := Default_Fore; -- Aft : Field := Default_Aft; -- Exp : Field := Default_Exp); -- procedure Put ( -- Item : Num; -- Fore : Field := Default_Fore; -- Aft : Field := Default_Aft; -- Exp : Field := Default_Exp); -- procedure Get ( -- From : String; -- Item : out Num; -- Last : out Positive); -- procedure Put ( -- To : out String; -- Item : Num; -- Aft : Field := Default_Aft; -- Exp : Field := Default_Exp); end Ada.Wide_Wide_Text_IO.Decimal_IO;
-- //////////////////////////////////////////////////////////// -- // -- // SFML - Simple and Fast Multimedia Library -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) -- // -- // This software is provided 'as-is', without any express or implied warranty. -- // In no event will the authors be held liable for any damages arising from the use of this software. -- // -- // Permission is granted to anyone to use this software for any purpose, -- // including commercial applications, and to alter it and redistribute it freely, -- // subject to the following restrictions: -- // -- // 1. The origin of this software must not be misrepresented; -- // you must not claim that you wrote the original software. -- // If you use this software in a product, an acknowledgment -- // in the product documentation would be appreciated but is not required. -- // -- // 2. Altered source versions must be plainly marked as such, -- // and must not be misrepresented as being the original software. -- // -- // 3. This notice may not be removed or altered from any source distribution. -- // -- //////////////////////////////////////////////////////////// -- //////////////////////////////////////////////////////////// -- // Headers -- //////////////////////////////////////////////////////////// with Sf.Config; with Sf.Graphics.Color; with Sf.Graphics.Rect; with Sf.Graphics.Types; with Sf.Window.Event; with Sf.Window.VideoMode; with Sf.Window.WindowHandle; with Sf.Window.Window; with Sf.Window.Types; package Sf.Graphics.RenderWindow is use Sf.Config; use Sf.Graphics.Color; use Sf.Graphics.Rect; use Sf.Graphics.Types; use Sf.Window.Event; use Sf.Window.VideoMode; use Sf.Window.WindowHandle; use Sf.Window.Window; use Sf.Window.Types; -- //////////////////////////////////////////////////////////// -- /// Construct a new renderwindow -- /// -- /// \param Mode : Video mode to use -- /// \param Title : Title of the window -- /// \param Style : Window style -- /// \param Params : Creation settings -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_Create (Mode : sfVideoMode; Title : Standard.String; Style : sfUint32 := sfResize or sfClose; Params : sfWindowSettings := (24, 8, 0)) return sfRenderWindow_Ptr; -- //////////////////////////////////////////////////////////// -- /// Construct a renderwindow from an existing control -- /// -- /// \param Handle : Platform-specific handle of the control -- /// \param Params : Creation settings -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_CreateFromHandle (Handle : sfWindowHandle; Params : sfWindowSettings) return sfRenderWindow_Ptr; -- //////////////////////////////////////////////////////////// -- /// Destroy an existing renderwindow -- /// -- /// \param RenderWindow : Renderwindow to destroy -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_Destroy (RenderWindow : sfRenderWindow_Ptr); -- //////////////////////////////////////////////////////////// -- /// Close a renderwindow (but doesn't destroy the internal data) -- /// -- /// \param RenderWindow : Renderwindow to close -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_Close (RenderWindow : sfRenderWindow_Ptr); -- //////////////////////////////////////////////////////////// -- /// Tell whether or not a renderwindow is opened -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_IsOpened (RenderWindow : sfRenderWindow_Ptr) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Get the width of the rendering region of a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- /// \return Width in pixels -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetWidth (RenderWindow : sfRenderWindow_Ptr) return sfUint32; -- //////////////////////////////////////////////////////////// -- /// Get the height of the rendering region of a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- /// \return Height in pixels -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetHeight (RenderWindow : sfRenderWindow_Ptr) return sfUint32; -- //////////////////////////////////////////////////////////// -- /// Get the creation settings of a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- /// \return Settings used to create the window -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetSettings (RenderWindow : sfRenderWindow_Ptr) return sfWindowSettings; -- //////////////////////////////////////////////////////////// -- /// Get the event on top of events stack of a window, if any, and pop it -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Event : Event to fill, if any -- /// -- /// \return sfTrue if an event was returned, sfFalse if events stack was empty -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetEvent (RenderWindow : sfRenderWindow_Ptr; Event : access sfEvent) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Enable / disable vertical synchronization on a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Enabled : sfTrue to enable v-sync, sfFalse to deactivate -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_UseVerticalSync (RenderWindow : sfRenderWindow_Ptr; Enabled : sfBool); -- //////////////////////////////////////////////////////////// -- /// Show or hide the mouse cursor on a window -- /// -- /// \param RenderWindow : RenderWindow object -- /// \param Show : sfTrue to show, sfFalse to hide -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_ShowMouseCursor (RenderWindow : sfRenderWindow_Ptr; Show : sfBool); -- //////////////////////////////////////////////////////////// -- /// Change the position of the mouse cursor on a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Left : Left coordinate of the cursor, relative to the window -- /// \param Top : Top coordinate of the cursor, relative to the window -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetCursorPosition (RenderWindow : sfRenderWindow_Ptr; Left, Top : sfUint32); -- //////////////////////////////////////////////////////////// -- /// Change the position of a window on screen. -- /// Only works for top-level windows -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Left : Left position -- /// \param Top : Top position -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetPosition (RenderWindow : sfRenderWindow_Ptr; Left, Top : Integer); -- //////////////////////////////////////////////////////////// -- /// Change the size of the rendering region of a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Width : New Width -- /// \param Height : New Height -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetSize (RenderWindow : sfRenderWindow_Ptr; Width, Height : sfUint32); -- //////////////////////////////////////////////////////////// -- /// Show or hide a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param State : sfTrue to show, sfFalse to hide -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_Show (RenderWindow : sfRenderWindow_Ptr; State : sfBool); -- //////////////////////////////////////////////////////////// -- /// Enable or disable automatic key-repeat for keydown events. -- /// Automatic key-repeat is enabled by default -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Enabled : sfTrue to enable, sfFalse to disable -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_EnableKeyRepeat (RenderWindow : sfRenderWindow_Ptr; Enabled : sfBool); -- //////////////////////////////////////////////////////////// -- /// Change the window's icon -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Width : Icon's width, in pixels -- /// \param Height : Icon's height, in pixels -- /// \param Pixels : Pointer to the pixels in memory, format must be RGBA 32 bits -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetIcon (RenderWindow : sfRenderWindow_Ptr; Width, Height : sfUint32; Pixels : sfUint8_Ptr); -- //////////////////////////////////////////////////////////// -- /// Activate or deactivate a window as the current target for rendering -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Active : sfTrue to activate, sfFalse to deactivate -- /// -- /// \return True if operation was successful, false otherwise -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_SetActive (RenderWindow : sfRenderWindow_Ptr; Active : sfBool) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Display a window on screen -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_Display (RenderWindow : sfRenderWindow_Ptr); -- //////////////////////////////////////////////////////////// -- /// Get the input manager of a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- /// \return Reference to the input -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetInput (RenderWindow : sfRenderWindow_Ptr) return sfInput_Ptr; -- //////////////////////////////////////////////////////////// -- /// Limit the framerate to a maximum fixed frequency for a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- /// \param Limit : Framerate limit, in frames per seconds (use 0 to disable limit) -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetFramerateLimit (RenderWindow : sfRenderWindow_Ptr; Limit : sfUint32); -- //////////////////////////////////////////////////////////// -- /// Get time elapsed since last frame of a window -- /// -- /// \param RenderWindow : Renderwindow object -- /// -- /// \return Time elapsed, in seconds -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetFrameTime (RenderWindow : sfRenderWindow_Ptr) return Float; -- //////////////////////////////////////////////////////////// -- /// Change the joystick threshold, ie. the value below which -- /// no move event will be generated -- /// -- /// \param RenderWindow : Renderwindow object -- /// \param Threshold : New threshold, in range [0, 100] -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetJoystickThreshold (RenderWindow : sfRenderWindow_Ptr; Threshold : Float); -- //////////////////////////////////////////////////////////// -- /// Draw something on a renderwindow -- /// -- /// \param RenderWindow : Renderwindow to draw in -- /// \param PostFX / Sprite / String / shape : Object to draw -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_DrawPostFX (RenderWindow : sfRenderWindow_Ptr; PostFX : sfPostFX_Ptr); procedure sfRenderWindow_DrawSprite (RenderWindow : sfRenderWindow_Ptr; Sprite : sfSprite_Ptr); procedure sfRenderWindow_DrawShape (RenderWindow : sfRenderWindow_Ptr; Shape : sfShape_Ptr); procedure sfRenderWindow_DrawString (RenderWindow : sfRenderWindow_Ptr; Str : sfString_Ptr); -- //////////////////////////////////////////////////////////// -- /// Save the content of a renderwindow to an image -- /// -- /// \param RenderWindow : Renderwindow to capture -- /// -- /// \return Image instance containing the contents of the screen -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_Capture (RenderWindow : sfRenderWindow_Ptr) return sfImage_Ptr; -- //////////////////////////////////////////////////////////// -- /// Clear the screen with the given color -- /// -- /// \param RenderWindow : Renderwindow to modify -- /// \param Color : Fill color -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_Clear (RenderWindow : sfRenderWindow_Ptr; Color : sfColor); -- //////////////////////////////////////////////////////////// -- /// Change the current active view of a renderwindow -- /// -- /// \param RenderWindow : Renderwindow to modify -- /// \param NewView : Pointer to the new view -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_SetView (RenderWindow : sfRenderWindow_Ptr; View : sfView_Ptr); -- //////////////////////////////////////////////////////////// -- /// Get the current active view of a renderwindow -- /// -- /// \param RenderWindow : Renderwindow -- /// -- /// \return Current active view -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetView (RenderWindow : sfRenderWindow_Ptr) return sfView_Ptr; -- //////////////////////////////////////////////////////////// -- /// Get the default view of a renderwindow -- /// -- /// \param RenderWindow : Renderwindow -- /// -- /// \return Default view of the render window -- /// -- //////////////////////////////////////////////////////////// function sfRenderWindow_GetDefaultView (RenderWindow : sfRenderWindow_Ptr) return sfView_Ptr; -- //////////////////////////////////////////////////////////// -- /// Convert a point in window coordinates into view coordinates -- /// -- /// \param RenderWindow : Target Renderwindow -- /// \param WindowX : X coordinate of the point to convert, relative to the window -- /// \param WindowY : Y coordinate of the point to convert, relative to the window -- /// \param ViewX : Pointer to fill with the X coordinate of the converted point -- /// \param ViewY : Pointer to fill with the Y coordinate of the converted point -- /// \param TargetView : Target view to convert the point to (pass NULL to use the current view) -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_ConvertCoords (RenderWindow : sfRenderWindow_Ptr; WindowX, WindowY : sfUint32; ViewX, ViewY : access Float; TargetView : sfView_Ptr); -- //////////////////////////////////////////////////////////// -- /// Tell SFML to preserve external OpenGL states, at the expense of -- /// more CPU charge. Use this function if you don't want SFML -- /// to mess up your own OpenGL states (if any). -- /// Don't enable state preservation if not needed, as it will allow -- /// SFML to do internal optimizations and improve performances. -- /// This parameter is false by default -- /// -- /// \param RenderWindow : Target Renderwindow -- /// \param Preserve : True to preserve OpenGL states, false to let SFML optimize -- /// -- //////////////////////////////////////////////////////////// procedure sfRenderWindow_PreserveOpenGLStates (RenderWindow : sfRenderWindow_Ptr; Preserve : sfBool); private pragma Import (C, sfRenderWindow_CreateFromHandle, "sfRenderWindow_CreateFromHandle"); pragma Import (C, sfRenderWindow_Destroy, "sfRenderWindow_Destroy"); pragma Import (C, sfRenderWindow_Close, "sfRenderWindow_Close"); pragma Import (C, sfRenderWindow_IsOpened, "sfRenderWindow_IsOpened"); pragma Import (C, sfRenderWindow_GetWidth, "sfRenderWindow_GetWidth"); pragma Import (C, sfRenderWindow_GetHeight, "sfRenderWindow_GetHeight"); pragma Import (C, sfRenderWindow_GetSettings, "sfRenderWindow_GetSettings"); pragma Import (C, sfRenderWindow_GetEvent, "sfRenderWindow_GetEvent"); pragma Import (C, sfRenderWindow_UseVerticalSync, "sfRenderWindow_UseVerticalSync"); pragma Import (C, sfRenderWindow_ShowMouseCursor, "sfRenderWindow_ShowMouseCursor"); pragma Import (C, sfRenderWindow_SetCursorPosition, "sfRenderWindow_SetCursorPosition"); pragma Import (C, sfRenderWindow_SetPosition, "sfRenderWindow_SetPosition"); pragma Import (C, sfRenderWindow_SetSize, "sfRenderWindow_SetSize"); pragma Import (C, sfRenderWindow_Show, "sfRenderWindow_Show"); pragma Import (C, sfRenderWindow_EnableKeyRepeat, "sfRenderWindow_EnableKeyRepeat"); pragma Import (C, sfRenderWindow_SetIcon, "sfRenderWindow_SetIcon"); pragma Import (C, sfRenderWindow_SetActive, "sfRenderWindow_SetActive"); pragma Import (C, sfRenderWindow_Display, "sfRenderWindow_Display"); pragma Import (C, sfRenderWindow_GetInput, "sfRenderWindow_GetInput"); pragma Import (C, sfRenderWindow_SetFramerateLimit, "sfRenderWindow_SetFramerateLimit"); pragma Import (C, sfRenderWindow_GetFrameTime, "sfRenderWindow_GetFrameTime"); pragma Import (C, sfRenderWindow_SetJoystickThreshold, "sfRenderWindow_SetJoystickThreshold"); pragma Import (C, sfRenderWindow_DrawPostFX, "sfRenderWindow_DrawPostFX"); pragma Import (C, sfRenderWindow_DrawSprite, "sfRenderWindow_DrawSprite"); pragma Import (C, sfRenderWindow_DrawShape, "sfRenderWindow_DrawShape"); pragma Import (C, sfRenderWindow_DrawString, "sfRenderWindow_DrawString"); pragma Import (C, sfRenderWindow_Capture, "sfRenderWindow_Capture"); pragma Import (C, sfRenderWindow_Clear, "sfRenderWindow_Clear"); pragma Import (C, sfRenderWindow_SetView, "sfRenderWindow_SetView"); pragma Import (C, sfRenderWindow_GetView, "sfRenderWindow_GetView"); pragma Import (C, sfRenderWindow_GetDefaultView, "sfRenderWindow_GetDefaultView"); pragma Import (C, sfRenderWindow_ConvertCoords, "sfRenderWindow_ConvertCoords"); pragma Import (C, sfRenderWindow_PreserveOpenGLStates, "sfRenderWindow_PreserveOpenGLStates"); end Sf.Graphics.RenderWindow;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- K R U N C H -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ procedure Krunch (Buffer : in out String; Len : in out Natural; Maxlen : Natural; No_Predef : Boolean) is pragma Assert (Buffer'First = 1); -- This is a documented requirement; the assert turns off index warnings B1 : Character renames Buffer (1); Curlen : Natural; Krlen : Natural; Num_Seps : Natural; Startloc : Natural; J : Natural; begin -- Deal with special predefined children cases. Startloc is the first -- location for the krunch, set to 1, except for the predefined children -- case, where it is set to 3, to start after the standard prefix. if No_Predef then Startloc := 1; Curlen := Len; Krlen := Maxlen; elsif Len >= 18 and then Buffer (1 .. 17) = "ada-wide_text_io-" then Startloc := 3; Buffer (2 .. 5) := "-wt-"; Buffer (6 .. Len - 12) := Buffer (18 .. Len); Curlen := Len - 12; Krlen := 8; elsif Len >= 23 and then Buffer (1 .. 22) = "ada-wide_wide_text_io-" then Startloc := 3; Buffer (2 .. 5) := "-zt-"; Buffer (6 .. Len - 17) := Buffer (23 .. Len); Curlen := Len - 17; Krlen := 8; elsif Len >= 4 and then Buffer (1 .. 4) = "ada-" then Startloc := 3; Buffer (2 .. Len - 2) := Buffer (4 .. Len); Curlen := Len - 2; Krlen := 8; elsif Len >= 5 and then Buffer (1 .. 5) = "gnat-" then Startloc := 3; Buffer (2 .. Len - 3) := Buffer (5 .. Len); Curlen := Len - 3; Krlen := 8; elsif Len >= 7 and then Buffer (1 .. 7) = "system-" then Startloc := 3; Buffer (2 .. Len - 5) := Buffer (7 .. Len); Curlen := Len - 5; Krlen := 8; elsif Len >= 11 and then Buffer (1 .. 11) = "interfaces-" then Startloc := 3; Buffer (2 .. Len - 9) := Buffer (11 .. Len); Curlen := Len - 9; -- Only fully krunch historical units. For new units, simply use -- the 'i-' prefix instead of 'interfaces-'. Packages Interfaces.C -- and Interfaces.Cobol are already in the right form. Package -- Interfaces.Definitions is krunched for backward compatibility. if (Curlen > 3 and then Buffer (3 .. 4) = "c-") or else (Curlen > 3 and then Buffer (3 .. 4) = "c_") or else (Curlen = 13 and then Buffer (3 .. 13) = "definitions") or else (Curlen = 9 and then Buffer (3 .. 9) = "fortran") or else (Curlen = 16 and then Buffer (3 .. 16) = "packed_decimal") or else (Curlen > 8 and then Buffer (3 .. 9) = "vxworks") or else (Curlen > 5 and then Buffer (3 .. 6) = "java") then Krlen := 8; else Krlen := Maxlen; end if; -- For the renamings in the obsolescent section, we also force krunching -- to 8 characters, but no other special processing is required here. -- Note that text_io and calendar are already short enough anyway. elsif (Len = 9 and then Buffer (1 .. 9) = "direct_io") or else (Len = 10 and then Buffer (1 .. 10) = "interfaces") or else (Len = 13 and then Buffer (1 .. 13) = "io_exceptions") or else (Len = 12 and then Buffer (1 .. 12) = "machine_code") or else (Len = 13 and then Buffer (1 .. 13) = "sequential_io") or else (Len = 20 and then Buffer (1 .. 20) = "unchecked_conversion") or else (Len = 22 and then Buffer (1 .. 22) = "unchecked_deallocation") then Startloc := 1; Krlen := 8; Curlen := Len; -- Special case of a child unit whose parent unit is a single letter that -- is A, G, I, or S. In order to prevent confusion with krunched names -- of predefined units use a tilde rather than a minus as the second -- character of the file name. elsif Len > 1 and then Buffer (2) = '-' and then (B1 = 'a' or else B1 = 'g' or else B1 = 'i' or else B1 = 's') and then Len <= Maxlen then Buffer (2) := '~'; return; -- Normal case, not a predefined file else Startloc := 1; Curlen := Len; Krlen := Maxlen; end if; -- Immediate return if file name is short enough now if Curlen <= Krlen then Len := Curlen; return; end if; -- If string contains Wide_Wide, replace by a single z J := Startloc; while J <= Curlen - 8 loop if Buffer (J .. J + 8) = "wide_wide" and then (J = Startloc or else Buffer (J - 1) = '-' or else Buffer (J - 1) = '_') and then (J + 8 = Curlen or else Buffer (J + 9) = '-' or else Buffer (J + 9) = '_') then Buffer (J) := 'z'; Buffer (J + 1 .. Curlen - 8) := Buffer (J + 9 .. Curlen); Curlen := Curlen - 8; end if; J := J + 1; end loop; -- For now, refuse to krunch a name that contains an ESC character (wide -- character sequence) since it's too much trouble to do this right ??? for J in 1 .. Curlen loop if Buffer (J) = ASCII.ESC then return; end if; end loop; -- Count number of separators (minus signs and underscores) and for now -- replace them by spaces. We keep them around till the end to control -- the krunching process, and then we eliminate them as the last step Num_Seps := 0; for J in Startloc .. Curlen loop if Buffer (J) = '-' or else Buffer (J) = '_' then Buffer (J) := ' '; Num_Seps := Num_Seps + 1; end if; end loop; -- Now we do the one character at a time krunch till we are short enough while Curlen - Num_Seps > Krlen loop declare Long_Length : Natural := 0; Long_Last : Natural := 0; Piece_Start : Natural; Ptr : Natural; begin Ptr := Startloc; -- Loop through pieces to find longest piece while Ptr <= Curlen loop Piece_Start := Ptr; -- Loop through characters in one piece of name while Ptr <= Curlen and then Buffer (Ptr) /= ' ' loop Ptr := Ptr + 1; end loop; if Ptr - Piece_Start > Long_Length then Long_Length := Ptr - Piece_Start; Long_Last := Ptr - 1; end if; Ptr := Ptr + 1; end loop; -- Remove last character of longest piece if Long_Last < Curlen then Buffer (Long_Last .. Curlen - 1) := Buffer (Long_Last + 1 .. Curlen); end if; Curlen := Curlen - 1; end; end loop; -- Final step, remove the spaces Len := 0; for J in 1 .. Curlen loop if Buffer (J) /= ' ' then Len := Len + 1; Buffer (Len) := Buffer (J); end if; end loop; return; end Krunch;
with SP.Memory; with Trendy_Test.Assertions.Integer_Assertions; use Trendy_Test.Assertions; use Trendy_Test.Assertions.Integer_Assertions; package body SP.Memory_Tests is type Int_Access is access Integer; package Int_Ptr is new SP.Memory (T => Integer, T_Access => Int_Access); procedure Test_Count (Op : in out Trendy_Test.Operation'Class) is begin Op.Register; declare I : Int_Ptr.Arc; J : Int_Ptr.Arc; begin Assert_EQ (Op, Integer (I.Count), 0); Assert_EQ (Op, Integer (J.Count), 0); Assert (Op, not I.Is_Valid); Assert (Op, not J.Is_Valid); I := Int_Ptr.Make (new Integer'(5)); Assert_EQ (Op, Integer (I.Count), 1); Assert_EQ (Op, Integer (J.Count), 0); Assert (Op, I.Is_Valid); Assert (Op, not J.Is_Valid); J := I; Assert_EQ (Op, Integer (I.Count), 2); Assert_EQ (Op, Integer (J.Count), 2); Assert (Op, I.Is_Valid); Assert (Op, J.Is_Valid); I.Reset; Assert_EQ (Op, Integer (I.Count), 0); Assert_EQ (Op, Integer (J.Count), 1); Assert (Op, not I.Is_Valid); Assert (Op, J.Is_Valid); J.Reset; Assert_EQ (Op, Integer (I.Count), 0); Assert_EQ (Op, Integer (J.Count), 0); Assert (Op, not I.Is_Valid); Assert (Op, not J.Is_Valid); end; end Test_Count; --------------------------------------------------------------------------- -- Test Registry --------------------------------------------------------------------------- function All_Tests return Trendy_Test.Test_Group is ( 1 => Test_Count'Access ); end SP.Memory_Tests;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P A R . U T I L -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Uintp; use Uintp; with GNAT.Spelling_Checker; use GNAT.Spelling_Checker; separate (Par) package body Util is --------------------- -- Bad_Spelling_Of -- --------------------- function Bad_Spelling_Of (T : Token_Type) return Boolean is Tname : constant String := Token_Type'Image (T); -- Characters of token name S : String (1 .. Tname'Last - 4); -- Characters of token name folded to lower case, omitting TOK_ at start M1 : String (1 .. 42) := "incorrect spelling of keyword ************"; M2 : String (1 .. 44) := "illegal abbreviation of keyword ************"; -- Buffers used to construct error message P1 : constant := 30; P2 : constant := 32; -- Starting subscripts in M1, M2 for keyword name SL : constant Natural := S'Length; -- Length of expected token name excluding TOK_ at start begin if Token /= Tok_Identifier then return False; end if; for J in S'Range loop S (J) := Fold_Lower (Tname (Integer (J) + 4)); end loop; Get_Name_String (Token_Name); -- A special check for case of PROGRAM used for PROCEDURE if T = Tok_Procedure and then Name_Len = 7 and then Name_Buffer (1 .. 7) = "program" then Error_Msg_SC ("PROCEDURE expected"); Token := T; return True; -- A special check for an illegal abbrevation elsif Name_Len < S'Length and then Name_Len >= 4 and then Name_Buffer (1 .. Name_Len) = S (1 .. Name_Len) then for J in 1 .. S'Last loop M2 (P2 + J - 1) := Fold_Upper (S (J)); end loop; Error_Msg_SC (M2 (1 .. P2 - 1 + S'Last)); Token := T; return True; end if; -- Now we go into the full circuit to check for a misspelling -- Never consider something a misspelling if either the actual or -- expected string is less than 3 characters (before this check we -- used to consider i to be a misspelled if in some cases!) if SL < 3 or else Name_Len < 3 then return False; -- Special case: prefix matches, i.e. the leading characters of the -- token that we have exactly match the required keyword. If there -- are at least two characters left over, assume that we have a case -- of two keywords joined together which should not be joined. elsif Name_Len > SL + 1 and then S = Name_Buffer (1 .. SL) then Scan_Ptr := Token_Ptr + S'Length; Error_Msg_S ("missing space"); Token := T; return True; end if; if Is_Bad_Spelling_Of (Name_Buffer (1 .. Name_Len), S) then for J in 1 .. S'Last loop M1 (P1 + J - 1) := Fold_Upper (S (J)); end loop; Error_Msg_SC (M1 (1 .. P1 - 1 + S'Last)); Token := T; return True; else return False; end if; end Bad_Spelling_Of; ---------------------- -- Check_95_Keyword -- ---------------------- -- On entry, the caller has checked that current token is an identifier -- whose name matches the name of the 95 keyword New_Tok. procedure Check_95_Keyword (Token_95, Next : Token_Type) is Scan_State : Saved_Scan_State; begin Save_Scan_State (Scan_State); -- at identifier/keyword Scan; -- past identifier/keyword if Token = Next then Restore_Scan_State (Scan_State); -- to identifier Error_Msg_Name_1 := Token_Name; Error_Msg_SC ("(Ada 83) keyword* cannot be used!"); Token := Token_95; else Restore_Scan_State (Scan_State); -- to identifier end if; end Check_95_Keyword; ---------------------- -- Check_Bad_Layout -- ---------------------- procedure Check_Bad_Layout is begin if Style.RM_Column_Check and then Token_Is_At_Start_Of_Line and then Start_Column <= Scope.Table (Scope.Last).Ecol then Error_Msg_BC ("(style) incorrect layout"); end if; end Check_Bad_Layout; -------------------------- -- Check_Misspelling_Of -- -------------------------- procedure Check_Misspelling_Of (T : Token_Type) is begin if Bad_Spelling_Of (T) then null; end if; end Check_Misspelling_Of; ----------------------------- -- Check_Simple_Expression -- ----------------------------- procedure Check_Simple_Expression (E : Node_Id) is begin if Expr_Form = EF_Non_Simple then Error_Msg_N ("this expression must be parenthesized", E); end if; end Check_Simple_Expression; --------------------------------------- -- Check_Simple_Expression_In_Ada_83 -- --------------------------------------- procedure Check_Simple_Expression_In_Ada_83 (E : Node_Id) is begin if Expr_Form = EF_Non_Simple then if Ada_83 then Error_Msg_N ("(Ada 83) this expression must be parenthesized!", E); end if; end if; end Check_Simple_Expression_In_Ada_83; ------------------------ -- Check_Subtype_Mark -- ------------------------ function Check_Subtype_Mark (Mark : Node_Id) return Node_Id is begin if Nkind (Mark) = N_Identifier or else Nkind (Mark) = N_Selected_Component or else (Nkind (Mark) = N_Attribute_Reference and then Is_Type_Attribute_Name (Attribute_Name (Mark))) or else Mark = Error then return Mark; else Error_Msg ("subtype mark expected", Sloc (Mark)); return Error; end if; end Check_Subtype_Mark; ------------------- -- Comma_Present -- ------------------- function Comma_Present return Boolean is Scan_State : Saved_Scan_State; Paren_Count : Nat; begin -- First check, if a comma is present, then a comma is present! if Token = Tok_Comma then T_Comma; return True; -- If we have a right paren, then that is taken as ending the list -- i.e. no comma is present. elsif Token = Tok_Right_Paren then return False; -- If pragmas, then get rid of them and make a recursive call -- to process what follows these pragmas. elsif Token = Tok_Pragma then P_Pragmas_Misplaced; return Comma_Present; -- At this stage we have an error, and the goal is to decide on whether -- or not we should diagnose an error and report a (non-existent) -- comma as being present, or simply to report no comma is present -- If we are a semicolon, then the question is whether we have a missing -- right paren, or whether the semicolon should have been a comma. To -- guess the right answer, we scan ahead keeping track of the paren -- level, looking for a clue that helps us make the right decision. -- This approach is highly accurate in the single error case, and does -- not make bad mistakes in the multiple error case (indeed we can't -- really make a very bad decision at this point in any case). elsif Token = Tok_Semicolon then Save_Scan_State (Scan_State); Scan; -- past semicolon -- Check for being followed by identifier => which almost certainly -- means we are still in a parameter list and the comma should have -- been a semicolon (such a sequence could not follow a semicolon) if Token = Tok_Identifier then Scan; if Token = Tok_Arrow then goto Assume_Comma; end if; end if; -- If that test didn't work, loop ahead looking for a comma or -- semicolon at the same parenthesis level. Always remember that -- we can't go badly wrong in an error situation like this! Paren_Count := 0; -- Here is the look ahead loop, Paren_Count tells us whether the -- token we are looking at is at the same paren level as the -- suspicious semicolon that we are trying to figure out. loop -- If we hit another semicolon or an end of file, and we have -- not seen a right paren or another comma on the way, then -- probably the semicolon did end the list. Indeed that is -- certainly the only single error correction possible here. if Token = Tok_Semicolon or else Token = Tok_EOF then Restore_Scan_State (Scan_State); return False; -- A comma at the same paren level as the semicolon is a strong -- indicator that the semicolon should have been a comma, indeed -- again this is the only possible single error correction. elsif Token = Tok_Comma then exit when Paren_Count = 0; -- A left paren just bumps the paren count elsif Token = Tok_Left_Paren then Paren_Count := Paren_Count + 1; -- A right paren that is at the same paren level as the semicolon -- also means that the only possible single error correction is -- to assume that the semicolon should have been a comma. If we -- are not at the same paren level, then adjust the paren level. elsif Token = Tok_Right_Paren then exit when Paren_Count = 0; Paren_Count := Paren_Count - 1; end if; -- Keep going, we haven't made a decision yet Scan; end loop; -- If we fall through the loop, it means that we found a terminating -- right paren or another comma. In either case it is reasonable to -- assume that the semicolon was really intended to be a comma. Also -- come here for the identifier arrow case. <<Assume_Comma>> Restore_Scan_State (Scan_State); Error_Msg_SC (""";"" illegal here, replaced by "","""); Scan; -- past the semicolon return True; -- If we are not at semicolon or a right paren, then we base the -- decision on whether or not the next token can be part of an -- expression. If not, then decide that no comma is present (the -- caller will eventually generate a missing right parent message) elsif Token in Token_Class_Eterm then return False; -- Otherwise we assume a comma is present, even if none is present, -- since the next token must be part of an expression, so if we were -- at the end of the list, then there is more than one error present. else T_Comma; -- to give error return True; end if; end Comma_Present; ----------------------- -- Discard_Junk_List -- ----------------------- procedure Discard_Junk_List (L : List_Id) is begin null; end Discard_Junk_List; ----------------------- -- Discard_Junk_Node -- ----------------------- procedure Discard_Junk_Node (N : Node_Id) is begin null; end Discard_Junk_Node; ------------ -- Ignore -- ------------ procedure Ignore (T : Token_Type) is begin if Token = T then if T = Tok_Comma then Error_Msg_SC ("unexpected "","" ignored"); elsif T = Tok_Left_Paren then Error_Msg_SC ("unexpected ""("" ignored"); elsif T = Tok_Right_Paren then Error_Msg_SC ("unexpected "")"" ignored"); elsif T = Tok_Semicolon then Error_Msg_SC ("unexpected "";"" ignored"); else declare Tname : constant String := Token_Type'Image (Token); Msg : String := "unexpected keyword ????????????????????????"; begin -- Loop to copy characters of keyword name (ignoring Tok_) for J in 5 .. Tname'Last loop Msg (J + 14) := Fold_Upper (Tname (J)); end loop; Msg (Tname'Last + 15 .. Tname'Last + 22) := " ignored"; Error_Msg_SC (Msg (1 .. Tname'Last + 22)); end; end if; Scan; -- Scan past ignored token end if; end Ignore; ---------------------------- -- Is_Reserved_Identifier -- ---------------------------- function Is_Reserved_Identifier return Boolean is begin if not Is_Reserved_Keyword (Token) then return False; else declare Ident_Casing : constant Casing_Type := Identifier_Casing (Current_Source_File); Key_Casing : constant Casing_Type := Keyword_Casing (Current_Source_File); begin -- If the casing of identifiers and keywords is different in -- this source file, and the casing of this token matches the -- keyword casing, then we return False, since it is pretty -- clearly intended to be a keyword. if Ident_Casing /= Unknown and then Key_Casing /= Unknown and then Ident_Casing /= Key_Casing and then Determine_Token_Casing = Key_Casing then return False; -- Otherwise assume that an identifier was intended else return True; end if; end; end if; end Is_Reserved_Identifier; ---------------------- -- Merge_Identifier -- ---------------------- procedure Merge_Identifier (Prev : Node_Id; Nxt : Token_Type) is begin if Token /= Tok_Identifier then return; end if; declare S : Saved_Scan_State; T : Token_Type; begin Save_Scan_State (S); Scan; T := Token; Restore_Scan_State (S); if T /= Nxt then return; end if; end; -- Check exactly one space between identifiers if Source (Token_Ptr - 1) /= ' ' or else Int (Token_Ptr) /= Int (Prev_Token_Ptr) + Length_Of_Name (Chars (Prev)) + 1 then return; end if; -- Do the merge Get_Name_String (Chars (Token_Node)); declare Buf : String (1 .. Name_Len) := Name_Buffer (1 .. Name_Len); begin Get_Name_String (Chars (Prev)); Add_Char_To_Name_Buffer ('_'); Add_Str_To_Name_Buffer (Buf); Set_Chars (Prev, Name_Find); end; Error_Msg_Node_1 := Prev; Error_Msg_SC ("unexpected identifier, possibly & was meant here"); Scan; end Merge_Identifier; ------------------- -- No_Constraint -- ------------------- procedure No_Constraint is begin if Token in Token_Class_Consk then Error_Msg_SC ("constraint not allowed here"); Discard_Junk_Node (P_Constraint_Opt); end if; end No_Constraint; -------------------- -- No_Right_Paren -- -------------------- function No_Right_Paren (Expr : Node_Id) return Node_Id is begin if Token = Tok_Right_Paren then Error_Msg_SC ("unexpected right parenthesis"); Resync_Expression; return Error; else return Expr; end if; end No_Right_Paren; --------------------- -- Pop_Scope_Stack -- --------------------- procedure Pop_Scope_Stack is begin pragma Assert (Scope.Last > 0); Scope.Decrement_Last; if Debug_Flag_P then Error_Msg_Uint_1 := UI_From_Int (Scope.Last); Error_Msg_SC ("decrement scope stack ptr, new value = ^!"); end if; end Pop_Scope_Stack; ---------------------- -- Push_Scope_Stack -- ---------------------- procedure Push_Scope_Stack is begin Scope.Increment_Last; Scope.Table (Scope.Last).Junk := False; Scope.Table (Scope.Last).Node := Empty; if Debug_Flag_P then Error_Msg_Uint_1 := UI_From_Int (Scope.Last); Error_Msg_SC ("increment scope stack ptr, new value = ^!"); end if; end Push_Scope_Stack; ---------------------- -- Separate_Present -- ---------------------- function Separate_Present return Boolean is Scan_State : Saved_Scan_State; begin if Token = Tok_Separate then return True; elsif Token /= Tok_Identifier then return False; else Save_Scan_State (Scan_State); Scan; -- past identifier if Token = Tok_Semicolon then Restore_Scan_State (Scan_State); return Bad_Spelling_Of (Tok_Separate); else Restore_Scan_State (Scan_State); return False; end if; end if; end Separate_Present; -------------------------- -- Signal_Bad_Attribute -- -------------------------- procedure Signal_Bad_Attribute is begin Error_Msg_N ("unrecognized attribute&", Token_Node); -- Check for possible misspelling Get_Name_String (Token_Name); declare AN : constant String := Name_Buffer (1 .. Name_Len); begin Error_Msg_Name_1 := First_Attribute_Name; while Error_Msg_Name_1 <= Last_Attribute_Name loop Get_Name_String (Error_Msg_Name_1); if Is_Bad_Spelling_Of (AN, Name_Buffer (1 .. Name_Len)) then Error_Msg_N ("\possible misspelling of %", Token_Node); exit; end if; Error_Msg_Name_1 := Error_Msg_Name_1 + 1; end loop; end; end Signal_Bad_Attribute; ------------------------------- -- Token_Is_At_Start_Of_Line -- ------------------------------- function Token_Is_At_Start_Of_Line return Boolean is begin return (Token_Ptr = First_Non_Blank_Location or else Token = Tok_EOF); end Token_Is_At_Start_Of_Line; end Util;
with OpenAL.Buffer; with OpenAL.Types; package OpenAL.Extension.Float32 is function Is_Present return Boolean; -- -- This will most likely result in an IEEE single precision float -- on the majority of platforms. -- type Sample_Float_32_t is digits 6; for Sample_Float_32_t'Size use 32; type Sample_Array_Float_32_t is array (Buffer.Sample_Size_t range <>) of aliased Sample_Float_32_t; -- proc_map : alBufferData procedure Set_Data_Mono_Float_32 (Buffer : in OpenAL.Buffer.Buffer_t; Data : in Sample_Array_Float_32_t; Frequency : in Types.Frequency_t); -- proc_map : alBufferData procedure Set_Data_Stereo_Float_32 (Buffer : in OpenAL.Buffer.Buffer_t; Data : in Sample_Array_Float_32_t; Frequency : in Types.Frequency_t); end OpenAL.Extension.Float32;
pragma SPARK_Mode; with Interfaces.C; use Interfaces.C; package Proc_Types is type Register is mod 2 ** 8 with Size => 8; type Double_Register is mod 2 ** 16 with Size => 16; subtype Pin_Type is unsigned_char; end Proc_Types;
-- SPDX-License-Identifier: MIT -- -- Copyright (c) 1999 - 2018 Gautier de Montmollin -- SWITZERLAND -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. with Ada.IO_Exceptions; with DCF.Unzip.Decompress; with DCF.Zip.Headers; package body DCF.Unzip.Streams is overriding procedure Write (Stream : in out Stream_Writer; Item : in Ada.Streams.Stream_Element_Array) is begin if Stream.Target /= null then Stream.Target.all.Set_Index (Stream.Index); Stream.Target.all.Write (Item); Stream.Index := Stream.Index + Item'Length; end if; end Write; procedure Unzip_File (Zip_Stream : in out DCF.Streams.Root_Zipstream_Type'Class; Header_Index : in DCF.Streams.Zs_Index_Type; Out_Stream_Ptr : P_Stream; Hint_Comp_Size : in File_Size_Type; -- Added 2007 for .ODS files Hint_Crc_32 : in Unsigned_32; -- Added 2012 for decryption Cat_Uncomp_Size : in File_Size_Type; Verify_Integrity : in Boolean) is Work_Index : DCF.Streams.Zs_Index_Type := Header_Index; Local_Header : Zip.Headers.Local_File_Header; Data_Descriptor_After_Data : Boolean; Encrypted : Boolean; Method : Pkzip_Method; use Zip; begin begin DCF.Streams.Set_Index (Zip_Stream, Header_Index); Zip.Headers.Read_And_Check (Zip_Stream, Local_Header); exception when Zip.Headers.Bad_Local_Header => raise Zip.Archive_Corrupted with "Bad local header"; when others => raise Zip.Archive_Corrupted; end; Method := Method_From_Code (Local_Header.Zip_Type); -- Calculate offset of data Work_Index := Work_Index + DCF.Streams.Zs_Size_Type (Local_Header.Filename_Length + Local_Header.Extra_Field_Length + Zip.Headers.Local_Header_Length); Data_Descriptor_After_Data := (Local_Header.Bit_Flag and Zip.Headers.Descriptor_Flag_Bit) /= 0; if Data_Descriptor_After_Data then -- Sizes and CRC are stored after the data -- We set size to avoid getting a sudden Zip_EOF ! if Method = Store and then Hint_Comp_Size = File_Size_Type'Last then -- For Stored (Method 0) data we need a correct "compressed" size. -- If the hint is the bogus fallback value, it is better to trust -- the local header, since this size is known in advance. Case found -- in Microsoft's OneDrive cloud storage (in 2018). Zip files, -- created by the server for downloading more than one file, are -- using the "Store" format and a postfixed Data Descriptor for -- writing the CRC value. null; -- Do not overwrite the compressed size in that case else Local_Header.Dd.Compressed_Size := Hint_Comp_Size; end if; Local_Header.Dd.Crc_32 := Hint_Crc_32; Local_Header.Dd.Uncompressed_Size := Cat_Uncomp_Size; else -- Sizes and CRC are before the data if Cat_Uncomp_Size /= Local_Header.Dd.Uncompressed_Size then raise Uncompressed_Size_Error; end if; end if; Encrypted := (Local_Header.Bit_Flag and Zip.Headers.Encryption_Flag_Bit) /= 0; if Encrypted then raise Constraint_Error with "Encryption is not supported"; end if; begin DCF.Streams.Set_Index (Zip_Stream, Work_Index); -- eventually skips the file name exception when others => raise Zip.Archive_Corrupted with "End of stream reached (location: between local header and archived data)"; end; -- Unzip correct type Unzip.Decompress.Decompress_Data (Zip_File => Zip_Stream, Format => Method, Output_Stream_Access => Out_Stream_Ptr, Data_Descriptor_After_Data => Data_Descriptor_After_Data, Hint => Local_Header, Verify_Integrity => Verify_Integrity); exception when Ada.IO_Exceptions.End_Error => raise Zip.Archive_Corrupted with "End of stream reached"; end Unzip_File; procedure Extract (Destination : in out Ada.Streams.Root_Stream_Type'Class; Archive_Info : in Zip.Zip_Info; -- Archive's Zip_info File : in Zip.Archived_File; Verify_Integrity : in Boolean) is begin Unzip_File (Zip_Stream => Archive_Info.Stream.all, Header_Index => File.File_Index, Out_Stream_Ptr => Destination'Unchecked_Access, Hint_Comp_Size => File.Compressed_Size, Hint_Crc_32 => File.CRC_32, Cat_Uncomp_Size => File.Uncompressed_Size, Verify_Integrity => Verify_Integrity); end Extract; end DCF.Unzip.Streams;
with AdaM.Any, Ada.Containers.Vectors, Ada.Streams; private with AdaM.library_Unit; package AdaM.Partition is type Item is new Any.item with private; -- View -- type View is access all Item'Class; procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : in View); procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : out View); for View'write use View_write; for View'read use View_read; -- Vector -- package Vectors is new ada.Containers.Vectors (Positive, View); subtype Vector is Vectors.Vector; -- Forge -- function new_Subprogram return Partition.view; procedure free (Self : in out Partition.view); procedure destruct (Self : in out Partition.item); -- Attributes -- overriding function Id (Self : access Item) return AdaM.Id; private type Item is new Any.item with record library_Units : library_Unit.Vector; end record; end AdaM.Partition;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- C H E C K S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Package containing routines used to deal with run-time checks. These -- routines are used both by the semantics and by the expander. In some -- cases, checks are enabled simply by setting a flag for the back end, -- and in other cases the code for the check is expanded. -- The approach used for range and length checks, in regards to suppressed -- checks, is to attempt to detect at compilation time that a constraint -- error will occur. If this is detected a warning or error is issued and the -- offending expression or statement replaced with a constraint error node. -- This always occurs whether checks are suppressed or not. Dynamic range -- checks are, of course, not inserted if checks are suppressed. with Errout; use Errout; with Namet; use Namet; with Table; with Types; use Types; with Uintp; use Uintp; with Urealp; use Urealp; package Checks is procedure Initialize; -- Called for each new main source program, to initialize internal -- variables used in the package body of the Checks unit. function Access_Checks_Suppressed (E : Entity_Id) return Boolean; function Accessibility_Checks_Suppressed (E : Entity_Id) return Boolean; function Alignment_Checks_Suppressed (E : Entity_Id) return Boolean; function Allocation_Checks_Suppressed (E : Entity_Id) return Boolean; function Atomic_Synchronization_Disabled (E : Entity_Id) return Boolean; function Discriminant_Checks_Suppressed (E : Entity_Id) return Boolean; function Division_Checks_Suppressed (E : Entity_Id) return Boolean; function Duplicated_Tag_Checks_Suppressed (E : Entity_Id) return Boolean; function Elaboration_Checks_Suppressed (E : Entity_Id) return Boolean; function Index_Checks_Suppressed (E : Entity_Id) return Boolean; function Length_Checks_Suppressed (E : Entity_Id) return Boolean; function Overflow_Checks_Suppressed (E : Entity_Id) return Boolean; function Predicate_Checks_Suppressed (E : Entity_Id) return Boolean; function Range_Checks_Suppressed (E : Entity_Id) return Boolean; function Storage_Checks_Suppressed (E : Entity_Id) return Boolean; function Tag_Checks_Suppressed (E : Entity_Id) return Boolean; function Validity_Checks_Suppressed (E : Entity_Id) return Boolean; -- These functions check to see if the named check is suppressed, either -- by an active scope suppress setting, or because the check has been -- specifically suppressed for the given entity. If no entity is relevant -- for the current check, then Empty is used as an argument. Note: the -- reason we insist on specifying Empty is to force the caller to think -- about whether there is any relevant entity that should be checked. function Is_Check_Suppressed (E : Entity_Id; C : Check_Id) return Boolean; -- This function is called if Checks_May_Be_Suppressed (E) is True to -- determine whether check C is suppressed either on the entity E or -- as the result of a scope suppress pragma. If Checks_May_Be_Suppressed -- is False, then the status of the check can be determined simply by -- examining Scope_Suppress, so this routine is not called in that case. function Overflow_Check_Mode return Overflow_Mode_Type; -- Returns current overflow checking mode, taking into account whether -- we are inside an assertion expression and the assertion policy. ----------------------------------------- -- Control of Alignment Check Warnings -- ----------------------------------------- -- When we have address clauses, there is an issue of whether the address -- specified is appropriate to the alignment. In the general case where the -- address is dynamic, we generate a check and a possible warning (this -- warning occurs for example if we have a restricted runtime with the -- restriction No_Exception_Propagation). We also issue this warning in -- the case where the address is static, but we don't know the alignment -- at the time we process the address clause. In such a case, we issue the -- warning, but we may be able to find out later (after the back end has -- annotated the actual alignment chosen) that the warning was not needed. -- To deal with deleting these potentially annoying warnings, we save the -- warning information in a table, and then delete the warnings in the -- post compilation validation stage if we can tell that the check would -- never fail (in general the back end will also optimize away the check -- in such cases). -- Table used to record information type Alignment_Warnings_Record is record E : Entity_Id; -- Entity whose alignment possibly warrants a warning A : Uint; -- Compile time known value of address clause for which the alignment -- is to be checked once we know the alignment. P : Node_Id; -- Prefix of address clause when it is of the form X'Address W : Error_Msg_Id; -- Id of warning message we might delete end record; package Alignment_Warnings is new Table.Table ( Table_Component_Type => Alignment_Warnings_Record, Table_Index_Type => Int, Table_Low_Bound => 0, Table_Initial => 10, Table_Increment => 200, Table_Name => "Alignment_Warnings"); procedure Validate_Alignment_Check_Warnings; -- This routine is called after back annotation of type data to delete any -- alignment warnings that turn out to be false alarms, based on knowing -- the actual alignment, and a compile-time known alignment value. ------------------------------------------- -- Procedures to Activate Checking Flags -- ------------------------------------------- procedure Activate_Division_Check (N : Node_Id); pragma Inline (Activate_Division_Check); -- Sets Do_Division_Check flag in node N, and handles possible local raise. -- Always call this routine rather than calling Set_Do_Division_Check to -- set an explicit value of True, to ensure handling the local raise case. procedure Activate_Overflow_Check (N : Node_Id); pragma Inline (Activate_Overflow_Check); -- Sets Do_Overflow_Check flag in node N, and handles possible local raise. -- Always call this routine rather than calling Set_Do_Overflow_Check to -- set an explicit value of True, to ensure handling the local raise case. -- Note that for discrete types, this call has no effect for MOD, REM, and -- unary "+" for which overflow is never possible in any case. -- -- Note: for the discrete-type case, it is legitimate to call this routine -- on an unanalyzed node where the Etype field is not set. However, for the -- floating-point case, Etype must be set (to a floating-point type). -- -- For floating-point, we set the flag if we have automatic overflow checks -- on the target, or if Check_Float_Overflow mode is set. For the floating- -- point case, we ignore all the unary operators ("+", "-", and abs) since -- none of these can result in overflow. If there are no overflow checks on -- the target, and Check_Float_Overflow mode is not set, then the call has -- no effect, since in such cases we want to generate NaN's and infinities. procedure Activate_Range_Check (N : Node_Id); pragma Inline (Activate_Range_Check); -- Sets Do_Range_Check flag in node N, and handles possible local raise. -- Always call this routine rather than calling Set_Do_Range_Check to -- set an explicit value of True, to ensure handling the local raise case. -------------------------------- -- Procedures to Apply Checks -- -------------------------------- -- General note on following checks. These checks are always active if -- Expander_Active and not Inside_A_Generic. They are inactive and have -- no effect Inside_A_Generic. In the case where not Expander_Active -- and not Inside_A_Generic, most of them are inactive, but some of them -- operate anyway since they may generate useful compile time warnings. procedure Apply_Access_Check (N : Node_Id); -- Determines whether an expression node requires a run-time access -- check and if so inserts the appropriate run-time check. procedure Apply_Accessibility_Check (N : Node_Id; Typ : Entity_Id; Insert_Node : Node_Id); -- Given a name N denoting an access parameter, emits a run-time -- accessibility check (if necessary), checking that the level of -- the object denoted by the access parameter is not deeper than the -- level of the type Typ. Program_Error is raised if the check fails. -- Insert_Node indicates the node where the check should be inserted. procedure Apply_Address_Clause_Check (E : Entity_Id; N : Node_Id); -- E is the entity for an object which has an address clause. If checks -- are enabled, then this procedure generates a check that the specified -- address has an alignment consistent with the alignment of the object, -- raising PE if this is not the case. The resulting check (if one is -- generated) is prepended to the Actions list of N_Freeze_Entity node N. -- Note that the check references E'Alignment, so it cannot be emitted -- before N (its freeze node), otherwise this would cause an illegal -- access before elaboration error in gigi. For the case of a clear overlay -- situation, we also check that the size of the overlaying object is not -- larger than the overlaid object. procedure Apply_Arithmetic_Overflow_Check (N : Node_Id); -- Handle overflow checking for an arithmetic operator. Also handles the -- cases of ELIMINATED and MINIMIZED overflow checking mode. If the mode -- is one of the latter two, then this routine can also be called with -- an if or case expression node to make sure that we properly handle -- overflow checking for dependent expressions. This routine handles -- front end vs back end overflow checks (in the front end case it expands -- the necessary check). Note that divide is handled separately using -- Apply_Divide_Checks. Node N may or may not have Do_Overflow_Check. -- In STRICT mode, there is nothing to do if this flag is off, but in -- MINIMIZED/ELIMINATED mode we still have to deal with possible use -- of doing operations in Long_Long_Integer or Bignum mode. procedure Apply_Constraint_Check (N : Node_Id; Typ : Entity_Id; No_Sliding : Boolean := False); -- Top-level procedure, calls all the others depending on the class of -- Typ. Checks that expression N satisfies the constraint of type Typ. -- No_Sliding is only relevant for constrained array types, if set to -- True, it checks that indexes are in range. procedure Apply_Discriminant_Check (N : Node_Id; Typ : Entity_Id; Lhs : Node_Id := Empty); -- Given an expression N of a discriminated type, or of an access type -- whose designated type is a discriminanted type, generates a check to -- ensure that the expression can be converted to the subtype given as -- the second parameter. Lhs is empty except in the case of assignments, -- where the target object may be needed to determine the subtype to -- check against (such as the cases of unconstrained formal parameters -- and unconstrained aliased objects). For the case of unconstrained -- formals, the check is performed only if the corresponding actual is -- constrained, i.e., whether Lhs'Constrained is True. procedure Apply_Divide_Checks (N : Node_Id); -- The node kind is N_Op_Divide, N_Op_Mod, or N_Op_Rem if either of the -- flags Do_Division_Check or Do_Overflow_Check is set, then this routine -- ensures that the appropriate checks are made. Note that overflow can -- occur in the signed case for the case of the largest negative number -- divided by minus one. This procedure only applies to Integer types. procedure Apply_Parameter_Aliasing_Checks (Call : Node_Id; Subp : Entity_Id); -- Given a subprogram call Call, add a check to verify that none of the -- actuals overlap. Subp denotes the subprogram being called. procedure Apply_Parameter_Validity_Checks (Subp : Entity_Id); -- Given a subprogram Subp, add both a pre and post condition pragmas that -- verify the proper initialization of scalars in parameters and function -- results. procedure Apply_Predicate_Check (N : Node_Id; Typ : Entity_Id; Fun : Entity_Id := Empty); -- N is an expression to which a predicate check may need to be applied for -- Typ, if Typ has a predicate function. When N is an actual in a call, Fun -- is the function being called, which is used to generate a better warning -- if the call leads to an infinite recursion. procedure Apply_Type_Conversion_Checks (N : Node_Id); -- N is an N_Type_Conversion node. A type conversion actually involves -- two sorts of checks. The first check is the checks that ensures that -- the operand in the type conversion fits onto the base type of the -- subtype it is being converted to (see RM 4.6 (28)-(50)). The second -- check is there to ensure that once the operand has been converted to -- a value of the target type, this converted value meets the -- constraints imposed by the target subtype (see RM 4.6 (51)). procedure Apply_Universal_Integer_Attribute_Checks (N : Node_Id); -- The argument N is an attribute reference node intended for processing -- by gigi. The attribute is one that returns a universal integer, but -- the attribute reference node is currently typed with the expected -- result type. This routine deals with range and overflow checks needed -- to make sure that the universal result is in range. function Build_Discriminant_Checks (N : Node_Id; T_Typ : Entity_Id) return Node_Id; -- Subsidiary routine for Apply_Discriminant_Check. Builds the expression -- that compares discriminants of the expression with discriminants of the -- type. Also used directly for membership tests (see Exp_Ch4.Expand_N_In). function Convert_From_Bignum (N : Node_Id) return Node_Id; -- Returns result of converting node N from Bignum. The returned value is -- not analyzed, the caller takes responsibility for this. Node N must be -- a subexpression node of type Bignum. The result is Long_Long_Integer. function Convert_To_Bignum (N : Node_Id) return Node_Id; -- Returns result of converting node N to Bignum. The returned value is not -- analyzed, the caller takes responsibility for this. Node N must be a -- subexpression node of a signed integer type or Bignum type (if it is -- already a Bignum, the returned value is Relocate_Node (N)). procedure Determine_Range (N : Node_Id; OK : out Boolean; Lo : out Uint; Hi : out Uint; Assume_Valid : Boolean := False); -- N is a node for a subexpression. If N is of a discrete type with no -- error indications, and no other peculiarities (e.g. missing Etype), -- then OK is True on return, and Lo and Hi are set to a conservative -- estimate of the possible range of values of N. Thus if OK is True on -- return, the value of the subexpression N is known to lie in the range -- Lo .. Hi (inclusive). For enumeration and character literals the values -- returned are the Pos value in the relevant enumeration type. If the -- expression is not of a discrete type, or some kind of error condition -- is detected, then OK is False on exit, and Lo/Hi are set to No_Uint. -- Thus the significance of OK being False on return is that no useful -- information is available on the range of the expression. Assume_Valid -- determines whether the processing is allowed to assume that values are -- in range of their subtypes. If it is set to True, then this assumption -- is valid, if False, then processing is done using base types to allow -- invalid values. procedure Determine_Range_R (N : Node_Id; OK : out Boolean; Lo : out Ureal; Hi : out Ureal; Assume_Valid : Boolean := False); -- Similar to Determine_Range, but for a node N of floating-point type. OK -- is True on return only for IEEE floating-point types and only if we do -- not have to worry about extended precision (i.e. on the x86, we must be -- using -msse2 -mfpmath=sse). At the current time, this is used only in -- GNATprove, though we could consider using it more generally in future. -- For that to happen, the possibility of arguments of infinite or NaN -- value should be taken into account, which is not the case currently. procedure Install_Null_Excluding_Check (N : Node_Id); -- Determines whether an access node requires a run-time access check and -- if so inserts the appropriate run-time check. procedure Install_Primitive_Elaboration_Check (Subp_Body : Node_Id); -- Insert a check which ensures that subprogram body Subp_Body has been -- properly elaborated. The check is installed only when Subp_Body is the -- body of a nonabstract library-level primitive of a tagged type. Further -- restrictions may apply, see the body for details. function Make_Bignum_Block (Loc : Source_Ptr) return Node_Id; -- This function is used by top level overflow checking routines to do a -- mark/release operation on the secondary stack around bignum operations. -- The block created looks like: -- -- declare -- M : Mark_Id := SS_Mark; -- begin -- SS_Release (M); -- end; -- -- The idea is that the caller will insert any needed extra declarations -- after the declaration of M, and any needed statements (in particular -- the bignum operations) before the call to SS_Release, and then do an -- Insert_Action of the whole block (it is returned unanalyzed). The Loc -- parameter is used to supply Sloc values for the constructed tree. procedure Minimize_Eliminate_Overflows (N : Node_Id; Lo : out Uint; Hi : out Uint; Top_Level : Boolean); -- This is the main routine for handling MINIMIZED and ELIMINATED overflow -- processing. On entry N is a node whose result is a signed integer -- subtype. The Do_Overflow_Check flag may or may not be set on N. If the -- node is an arithmetic operation, then a range analysis is carried out, -- and there are three possibilities: -- -- The node is left unchanged (apart from expansion of an exponentiation -- operation). This happens if the routine can determine that the result -- is definitely in range. The Do_Overflow_Check flag is turned off in -- this case. -- -- The node is transformed into an arithmetic operation with a result -- type of Long_Long_Integer. -- -- The node is transformed into a function call that calls an appropriate -- function in the System.Bignums package to compute a Bignum result. -- -- In the first two cases, Lo and Hi are set to the bounds of the possible -- range of results, computed as accurately as possible. In the third case -- Lo and Hi are set to No_Uint (there are some cases where we could get an -- advantage from keeping result ranges for Bignum values, but it could use -- a lot of space and is very unlikely to be valuable). -- -- If the node is not an arithmetic operation, then it is unchanged but -- Lo and Hi are still set (to the bounds of the result subtype if nothing -- better can be determined). -- -- Note: this function is recursive, if called with an arithmetic operator, -- recursive calls are made to process the operands using this procedure. -- So we end up doing things top down. Nothing happens to an arithmetic -- expression until this procedure is called on the top level node and -- then the recursive calls process all the children. We have to do it -- this way. If we try to do it bottom up in natural expansion order, then -- there are two problems. First, where do we stash the bounds, and more -- importantly, semantic processing will be messed up. Consider A+B+C where -- A,B,C are all of type integer, if we processed A+B before doing semantic -- analysis of the addition of this result to C, that addition could end up -- with a Long_Long_Integer left operand and an Integer right operand, and -- we would get a semantic error. -- -- The routine is called in three situations if we are operating in either -- MINIMIZED or ELIMINATED modes. -- -- Overflow processing applied to the top node of an expression tree when -- that node is an arithmetic operator. In this case the result is -- converted to the appropriate result type (there is special processing -- when the parent is a conversion, see body for details). -- -- Overflow processing applied to the operands of a comparison operation. -- In this case, the comparison is done on the result Long_Long_Integer -- or Bignum values, without raising any exceptions. -- -- Overflow processing applied to the left operand of a membership test. -- In this case no exception is raised if a Long_Long_Integer or Bignum -- result is outside the range of the type of that left operand (it is -- just that the result of IN is false in that case). -- -- Note that if Bignum values appear, the caller must take care of doing -- the appropriate mark/release operations on the secondary stack. -- -- Top_Level is used to avoid inefficient unnecessary transitions into the -- Bignum domain. If Top_Level is True, it means that the caller will have -- to convert any Bignum value back to Long_Long_Integer, possibly checking -- that the value is in range. This is the normal case for a top level -- operator in a subexpression. There is no point in going into Bignum mode -- to avoid an overflow just so we can check for overflow the next moment. -- For calls from comparisons and membership tests, and for all recursive -- calls, we do want to transition into the Bignum domain if necessary. -- Note that this setting is only relevant in ELIMINATED mode. ------------------------------------------------------- -- Control and Optimization of Range/Overflow Checks -- ------------------------------------------------------- -- Range checks are controlled by the Do_Range_Check flag. The front end -- is responsible for setting this flag in relevant nodes. Originally the -- back end generated all the corresponding range checks, but later on we -- decided to generate all the range checks in the front end and this is -- the current situation. -- Overflow checks are similarly controlled by the Do_Overflow_Check flag. -- The difference here is that if back end overflow checks are inactive -- (Backend_Overflow_Checks_On_Target set False), then the actual overflow -- checks are generated by the front end, but if back end overflow checks -- are active (Backend_Overflow_Checks_On_Target set True), then the back -- end does generate the checks. -- The following two routines are used to set these flags, they allow -- for the possibility of eliminating checks. Checks can be eliminated -- if an identical check has already been performed. procedure Enable_Overflow_Check (N : Node_Id); -- First this routine determines if an overflow check is needed by doing -- an appropriate range check. If a check is not needed, then the call -- has no effect. If a check is needed then this routine sets the flag -- Do_Overflow_Check in node N to True, unless it can be determined that -- the check is not needed. The only condition under which this is the -- case is if there was an identical check earlier on. procedure Enable_Range_Check (N : Node_Id); -- Set Do_Range_Check flag in node N True, unless it can be determined -- that the check is not needed. The only condition under which this is -- the case is if there was an identical check earlier on. This routine -- is not responsible for doing range analysis to determine whether or -- not such a check is needed -- the caller is expected to do this. The -- one other case in which the request to set the flag is ignored is -- when Kill_Range_Check is set in an N_Unchecked_Conversion node. -- The following routines are used to keep track of processing sequences -- of statements (e.g. the THEN statements of an IF statement). A check -- that appears within such a sequence can eliminate an identical check -- within this sequence of statements. However, after the end of the -- sequence of statements, such a check is no longer of interest, since -- it may not have been executed. procedure Conditional_Statements_Begin; -- This call marks the start of processing of a sequence of statements. -- Every call to this procedure must be followed by a matching call to -- Conditional_Statements_End. procedure Conditional_Statements_End; -- This call removes from consideration all saved checks since the -- corresponding call to Conditional_Statements_Begin. These two -- procedures operate in a stack like manner. -- The mechanism for optimizing checks works by remembering checks -- that have already been made, but certain conditions, for example -- an assignment to a variable involved in a check, may mean that the -- remembered check is no longer valid, in the sense that if the same -- expression appears again, another check is required because the -- value may have changed. -- The following routines are used to note conditions which may render -- some or all of the stored and remembered checks to be invalidated. procedure Kill_Checks (V : Entity_Id); -- This procedure records an assignment or other condition that causes -- the value of the variable to be changed, invalidating any stored -- checks that reference the value. Note that all such checks must -- be discarded, even if they are not in the current statement range. procedure Kill_All_Checks; -- This procedure kills all remembered checks ----------------------------- -- Length and Range Checks -- ----------------------------- -- In the following procedures, there are three arguments which have -- a common meaning as follows: -- Expr The expression to be checked. If a check is required, -- the appropriate flag will be placed on this node. Whether -- this node is further examined depends on the setting of -- the parameter Source_Typ, as described below. -- Target_Typ The target type on which the check is to be based. For -- example, if we have a scalar range check, then the check -- is that we are in range of this type. -- Source_Typ Normally Empty, but can be set to a type, in which case -- this type is used for the check, see below. -- The checks operate in one of two modes: -- If Source_Typ is Empty, then the node Expr is examined, at the very -- least to get the source subtype. In addition for some of the checks, -- the actual form of the node may be examined. For example, a node of -- type Integer whose actual form is an Integer conversion from a type -- with range 0 .. 3 can be determined to have a value in range 0 .. 3. -- If Source_Typ is given, then nothing can be assumed about the Expr, -- and indeed its contents are not examined. In this case the check is -- based on the assumption that Expr can be an arbitrary value of the -- given Source_Typ. -- Currently, the only case in which a Source_Typ is explicitly supplied -- is for the case of Out and In_Out parameters, where, for the conversion -- on return (the Out direction), the types must be reversed. This is -- handled by the caller. procedure Apply_Length_Check (Expr : Node_Id; Target_Typ : Entity_Id; Source_Typ : Entity_Id := Empty); -- This procedure builds a sequence of declarations to do a length check -- that checks if the lengths of the two arrays Target_Typ and source type -- are the same. The resulting actions are inserted at Node using a call -- to Insert_Actions. -- -- For access types, the Directly_Designated_Type is retrieved and -- processing continues as enumerated above, with a guard against null -- values. -- -- Note: calls to Apply_Length_Check currently never supply an explicit -- Source_Typ parameter, but Apply_Length_Check takes this parameter and -- processes it as described above for consistency with the other routines -- in this section. procedure Apply_Length_Check_On_Assignment (Expr : Node_Id; Target_Typ : Entity_Id; Target : Node_Id; Source_Typ : Entity_Id := Empty); -- Similar to Apply_Length_Check, but takes the target of an assignment for -- which the check is to be done. Used to filter out specific cases where -- the check is superfluous. procedure Apply_Static_Length_Check (Expr : Node_Id; Target_Typ : Entity_Id; Source_Typ : Entity_Id := Empty); -- Tries to determine statically whether the two array types source type -- and Target_Typ have the same length. If it can be determined at compile -- time that they do not, then an N_Raise_Constraint_Error node replaces -- Expr, and a warning message is issued. procedure Apply_Range_Check (Expr : Node_Id; Target_Typ : Entity_Id; Source_Typ : Entity_Id := Empty; Insert_Node : Node_Id := Empty); -- For a Node of kind N_Range, constructs a range check action that tests -- first that the range is not null and then that the range is contained in -- the Target_Typ range. -- -- For scalar types, constructs a range check action that first tests that -- the expression is contained in the Target_Typ range. The difference -- between this and Apply_Scalar_Range_Check is that the latter generates -- the actual checking code against the Etype of the expression. -- -- For constrained array types, construct series of range check actions -- to check that each Expr range is properly contained in the range of -- Target_Typ. -- -- For a type conversion to an unconstrained array type, constructs a range -- check action to check that the bounds of the source type are within the -- constraints imposed by the Target_Typ. -- -- For access types, the Directly_Designated_Type is retrieved and -- processing continues as enumerated above, with a guard against null -- values. -- -- The source type is used by type conversions to unconstrained array -- types to retrieve the corresponding bounds. -- Insert_Node indicates the node where the check should be inserted. -- If it is empty, then the check is inserted directly at Expr instead. procedure Apply_Scalar_Range_Check (Expr : Node_Id; Target_Typ : Entity_Id; Source_Typ : Entity_Id := Empty; Fixed_Int : Boolean := False); -- For scalar types, determines whether an expression node should be -- flagged as needing a run-time range check. If the node requires such a -- check, the Do_Range_Check flag is turned on. The Fixed_Int flag if set -- causes any fixed-point values to be treated as though they were discrete -- values (i.e. the underlying integer value is used). type Check_Result is private; -- Type used to return result of Get_Range_Checks call, for later use in -- call to Insert_Range_Checks procedure. function Get_Range_Checks (Expr : Node_Id; Target_Typ : Entity_Id; Source_Typ : Entity_Id := Empty; Warn_Node : Node_Id := Empty) return Check_Result; -- Like Apply_Range_Check, except it does not modify anything. Instead -- it returns an encapsulated result of the check operations for later -- use in a call to Insert_Range_Checks. If Warn_Node is non-empty, its -- Sloc is used, in the static case, for the generated warning or error. -- Additionally, it is used rather than Expr (or Low/High_Bound of Expr) -- in constructing the check. procedure Append_Range_Checks (Checks : Check_Result; Stmts : List_Id; Suppress_Typ : Entity_Id; Static_Sloc : Source_Ptr); -- Called to append range checks as returned by a call to Get_Range_Checks. -- Stmts is a list to which either the dynamic check is appended or the -- raise Constraint_Error statement is appended (for static checks). -- Suppress_Typ is the type to check to determine if checks are suppressed. -- Static_Sloc is the Sloc at which the raise CE node points. procedure Insert_Range_Checks (Checks : Check_Result; Node : Node_Id; Suppress_Typ : Entity_Id; Static_Sloc : Source_Ptr; Do_Before : Boolean := False); -- Called to insert range checks as returned by a call to Get_Range_Checks. -- Node is the node after which either the dynamic check is inserted or -- the raise Constraint_Error statement is inserted (for static checks). -- Suppress_Typ is the type to check to determine if checks are suppressed. -- Static_Sloc is the Sloc at which the raise CE node points. Normally the -- checks are inserted after Node; if Do_Before is True, they are before. ----------------------- -- Expander Routines -- ----------------------- -- In most cases, the processing for range checks done by semantic analysis -- only results in setting the Do_Range_Check flag, rather than actually -- generating checks. The following routines must be called later on in the -- expansion process upon seeing the Do_Range_Check flag; they generate the -- actual checks and reset the flag. The remaining cases where range checks -- are still directly generated during semantic analysis occur as part of -- the processing of constraints in (sub)type and object declarations. procedure Generate_Range_Check (N : Node_Id; Target_Type : Entity_Id; Reason : RT_Exception_Code); -- This procedure is called to actually generate and insert a range check. -- A check is generated to ensure that the value of N lies within the range -- of the target type. Note that the base type of N may be different from -- the base type of the target type. This happens in the conversion case. -- The Reason parameter is the exception code to be used for the exception -- if raised. -- -- Note: if the expander is not active, or if we are in GNATprove mode, -- then we do not generate explicit range checks. Instead we just turn the -- Do_Range_Check flag on, since in these cases that's what we want to see -- in the tree (GNATprove in particular depends on this flag being set). If -- we generate the actual range checks, then we make sure the flag is off -- afterward, since the code we generate takes complete care of the checks. -- -- Historical note: We used to just pass on the Do_Range_Check flag to the -- back end to generate the check, but now in code-generation mode we never -- have this flag set, since the front end takes care of the check. The -- normal processing flow now is that the analyzer typically turns on the -- Do_Range_Check flag, and if it is set, this routine is called, which -- turns the flag off in code-generation mode. procedure Generate_Index_Checks (N : Node_Id); -- This procedure is called to generate index checks on the subscripts for -- the indexed component node N. Each subscript expression is examined, and -- if the Do_Range_Check flag is set, an appropriate index check is -- generated and the flag is reset. -- Similarly, we set the flag Do_Discriminant_Check in the semantic -- analysis to indicate that a discriminant check is required for selected -- component of a discriminated type. The following routine is called from -- the expander to actually generate the call. procedure Generate_Discriminant_Check (N : Node_Id); -- N is a selected component for which a discriminant check is required to -- make sure that the discriminants have appropriate values for the -- selection. This is done by calling the appropriate discriminant checking -- routine for the selector. ----------------------- -- Validity Checking -- ----------------------- -- In (RM 13.9.1(9-11)) we have the following rules on invalid values -- If the representation of a scalar object does not represent value of -- the object's subtype (perhaps because the object was not initialized), -- the object is said to have an invalid representation. It is a bounded -- error to evaluate the value of such an object. If the error is -- detected, either Constraint_Error or Program_Error is raised. -- Otherwise, execution continues using the invalid representation. The -- rules of the language outside this subclause assume that all objects -- have valid representations. The semantics of operations on invalid -- representations are as follows: -- -- 10 If the representation of the object represents a value of the -- object's type, the value of the type is used. -- -- 11 If the representation of the object does not represent a value -- of the object's type, the semantics of operations on such -- representations is implementation-defined, but does not by -- itself lead to erroneous or unpredictable execution, or to -- other objects becoming abnormal. -- We quote the rules in full here since they are quite delicate. Most -- of the time, we can just compute away with wrong values, and get a -- possibly wrong result, which is well within the range of allowed -- implementation defined behavior. The two tricky cases are subscripted -- array assignments, where we don't want to do wild stores, and case -- statements where we don't want to do wild jumps. -- In GNAT, we control validity checking with a switch -gnatV that can take -- three parameters, n/d/f for None/Default/Full. These modes have the -- following meanings: -- None (no validity checking) -- In this mode, there is no specific checking for invalid values -- and the code generator assumes that all stored values are always -- within the bounds of the object subtype. The consequences are as -- follows: -- For case statements, an out of range invalid value will cause -- Constraint_Error to be raised, or an arbitrary one of the case -- alternatives will be executed. Wild jumps cannot result even -- in this mode, since we always do a range check -- For subscripted array assignments, wild stores will result in -- the expected manner when addresses are calculated using values -- of subscripts that are out of range. -- It could perhaps be argued that this mode is still conformant with -- the letter of the RM, since implementation defined is a rather -- broad category, but certainly it is not in the spirit of the -- RM requirement, since wild stores certainly seem to be a case of -- erroneous behavior. -- Default (default standard RM-compatible validity checking) -- In this mode, which is the default, minimal validity checking is -- performed to ensure no erroneous behavior as follows: -- For case statements, an out of range invalid value will cause -- Constraint_Error to be raised. -- For subscripted array assignments, invalid out of range -- subscript values will cause Constraint_Error to be raised. -- Full (Full validity checking) -- In this mode, the protections guaranteed by the standard mode are -- in place, and the following additional checks are made: -- For every assignment, the right side is checked for validity -- For every call, IN and IN OUT parameters are checked for validity -- For every subscripted array reference, both for stores and loads, -- all subscripts are checked for validity. -- These checks are not required by the RM, but will in practice -- improve the detection of uninitialized variables, particularly -- if used in conjunction with pragma Normalize_Scalars. -- In the above description, we talk about performing validity checks, -- but we don't actually generate a check in a case where the compiler -- can be sure that the value is valid. Note that this assurance must -- be achieved without assuming that any uninitialized value lies within -- the range of its type. The following are cases in which values are -- known to be valid. The flag Is_Known_Valid is used to keep track of -- some of these cases. -- If all possible stored values are valid, then any uninitialized -- value must be valid. -- Literals, including enumeration literals, are clearly always valid -- Constants are always assumed valid, with a validity check being -- performed on the initializing value where necessary to ensure that -- this is the case. -- For variables, the status is set to known valid if there is an -- initializing expression. Again a check is made on the initializing -- value if necessary to ensure that this assumption is valid. The -- status can change as a result of local assignments to a variable. -- If a known valid value is unconditionally assigned, then we mark -- the left side as known valid. If a value is assigned that is not -- known to be valid, then we mark the left side as invalid. This -- kind of processing does NOT apply to non-local variables since we -- are not following the flow graph (more properly the flow of actual -- processing only corresponds to the flow graph for local assignments). -- For non-local variables, we preserve the current setting, i.e. a -- validity check is performed when assigning to a knonwn valid global. -- Note: no validity checking is required if range checks are suppressed -- regardless of the setting of the validity checking mode. -- The following procedures are used in handling validity checking procedure Apply_Subscript_Validity_Checks (Expr : Node_Id); -- Expr is the node for an indexed component. If validity checking and -- range checking are enabled, all subscripts for this indexed component -- are checked for validity. procedure Check_Valid_Lvalue_Subscripts (Expr : Node_Id); -- Expr is a lvalue, i.e. an expression representing the target of an -- assignment. This procedure checks for this expression involving an -- assignment to an array value. We have to be sure that all the subscripts -- in such a case are valid, since according to the rules in (RM -- 13.9.1(9-11)) such assignments are not permitted to result in erroneous -- behavior in the case of invalid subscript values. procedure Ensure_Valid (Expr : Node_Id; Holes_OK : Boolean := False; Related_Id : Entity_Id := Empty; Is_Low_Bound : Boolean := False; Is_High_Bound : Boolean := False); -- Ensure that Expr represents a valid value of its type. If this type -- is not a scalar type, then the call has no effect, since validity -- is only an issue for scalar types. The effect of this call is to -- check if the value is known valid, if so, nothing needs to be done. -- If this is not known, then either Expr is set to be range checked, -- or specific checking code is inserted so that an exception is raised -- if the value is not valid. -- -- The optional argument Holes_OK indicates whether it is necessary to -- worry about enumeration types with non-standard representations leading -- to "holes" in the range of possible representations. If Holes_OK is -- True, then such values are assumed valid (this is used when the caller -- will make a separate check for this case anyway). If Holes_OK is False, -- then this case is checked, and code is inserted to ensure that Expr is -- valid, raising Constraint_Error if the value is not valid. -- -- Related_Id denotes the entity of the context where Expr appears. Flags -- Is_Low_Bound and Is_High_Bound specify whether the expression to check -- is the low or the high bound of a range. These three optional arguments -- signal Remove_Side_Effects to create an external symbol of the form -- Chars (Related_Id)_FIRST/_LAST. For suggested use of these parameters -- see the warning in the body of Sem_Ch3.Process_Range_Expr_In_Decl. function Expr_Known_Valid (Expr : Node_Id) return Boolean; -- This function tests it the value of Expr is known to be valid in the -- sense of RM 13.9.1(9-11). In the case of GNAT, it is only discrete types -- which are a concern, since for non-discrete types we simply continue -- computation with invalid values, which does not lead to erroneous -- behavior. Thus Expr_Known_Valid always returns True if the type of Expr -- is non-discrete. For discrete types the value returned is True only if -- it can be determined that the value is Valid. Otherwise False is -- returned. procedure Insert_Valid_Check (Expr : Node_Id; Related_Id : Entity_Id := Empty; Is_Low_Bound : Boolean := False; Is_High_Bound : Boolean := False); -- Inserts code that will check for the value of Expr being valid, in the -- sense of the 'Valid attribute returning True. Constraint_Error will be -- raised if the value is not valid. -- -- Related_Id denotes the entity of the context where Expr appears. Flags -- Is_Low_Bound and Is_High_Bound specify whether the expression to check -- is the low or the high bound of a range. These three optional arguments -- signal Remove_Side_Effects to create an external symbol of the form -- Chars (Related_Id)_FIRST/_LAST. For suggested use of these parameters -- see the warning in the body of Sem_Ch3.Process_Range_Expr_In_Decl. procedure Null_Exclusion_Static_Checks (N : Node_Id; Comp : Node_Id := Empty; Array_Comp : Boolean := False); -- Ada 2005 (AI-231): Test for and warn on null-excluding objects or -- components that will raise an exception due to initialization by null. -- -- When a value for Comp is supplied (as in the case of an uninitialized -- null-excluding component within a composite object), a reported warning -- will indicate the offending component instead of the object itself. -- Array_Comp being True indicates an array object with null-excluding -- components, and any reported warning will indicate that. procedure Remove_Checks (Expr : Node_Id); -- Remove all checks from Expr except those that are only executed -- conditionally (on the right side of And Then/Or Else. This call -- removes only embedded checks (Do_Range_Check, Do_Overflow_Check). procedure Validity_Check_Range (N : Node_Id; Related_Id : Entity_Id := Empty); -- If N is an N_Range node, then Ensure_Valid is called on its bounds, if -- validity checking of operands is enabled. Related_Id denotes the entity -- of the context where N appears. ----------------------------- -- Handling of Check Names -- ----------------------------- -- The following table contains Name_Id's for recognized checks. The first -- entries (corresponding to the values of the subtype Predefined_Check_Id) -- contain the Name_Id values for the checks that are predefined, including -- All_Checks (see Types). Remaining entries are those that are introduced -- by pragma Check_Names. package Check_Names is new Table.Table ( Table_Component_Type => Name_Id, Table_Index_Type => Check_Id, Table_Low_Bound => 1, Table_Initial => 30, Table_Increment => 200, Table_Name => "Name_Check_Names"); function Get_Check_Id (N : Name_Id) return Check_Id; -- Function to search above table for matching name. If found returns the -- corresponding Check_Id value in the range 1 .. Check_Name.Last. If not -- found returns No_Check_Id. private type Check_Result is array (Positive range 1 .. 2) of Node_Id; -- There are two cases for the result returned by Range_Check: -- -- For the static case the result is one or two nodes that should cause -- a Constraint_Error. Typically these will include Expr itself or the -- direct descendants of Expr, such as Low/High_Bound (Expr)). It is the -- responsibility of the caller to rewrite and substitute the nodes with -- N_Raise_Constraint_Error nodes. -- -- For the non-static case a single N_Raise_Constraint_Error node with a -- non-empty Condition field is returned. -- -- Unused entries in Check_Result, if any, are simply set to Empty For -- external clients, the required processing on this result is achieved -- using the Insert_Range_Checks routine. pragma Inline (Apply_Length_Check); pragma Inline (Apply_Range_Check); pragma Inline (Apply_Static_Length_Check); end Checks;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Lexical_Elements; package Program.Elements.Qualified_Expressions is pragma Pure (Program.Elements.Qualified_Expressions); type Qualified_Expression is limited interface and Program.Elements.Expressions.Expression; type Qualified_Expression_Access is access all Qualified_Expression'Class with Storage_Size => 0; not overriding function Subtype_Mark (Self : Qualified_Expression) return not null Program.Elements.Expressions.Expression_Access is abstract; not overriding function Operand (Self : Qualified_Expression) return not null Program.Elements.Expressions.Expression_Access is abstract; type Qualified_Expression_Text is limited interface; type Qualified_Expression_Text_Access is access all Qualified_Expression_Text'Class with Storage_Size => 0; not overriding function To_Qualified_Expression_Text (Self : in out Qualified_Expression) return Qualified_Expression_Text_Access is abstract; not overriding function Apostrophe_Token (Self : Qualified_Expression_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Left_Bracket_Token (Self : Qualified_Expression_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Right_Bracket_Token (Self : Qualified_Expression_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Qualified_Expressions;
with Piles; with Ada.Text_IO; use Ada.Text_IO; with Ada.Unchecked_Deallocation; --// Pour libérer la mémoire allouée dynamiquement procedure Exemples_Memoire_Dynamique is type T_Pointeur_Integer is access Integer; procedure Free is new Ada.Unchecked_Deallocation (Integer, T_Pointeur_Integer); -- ou Ada.Unchecked_Deallocation (Object => Integer, Name => T_Pointeur_Integer); -- Allocation dynamique de mémoire et libération de cette mémoire. procedure Illustrer_Memoire_Dynamique is Ptr1 : T_Pointeur_Integer; begin Ptr1 := new Integer; -- Allocation dyamique de mémoire Ptr1.all := 5; -- Utilisation de cette mémoire Put_Line ("Ptr1.all = " & Integer'Image (Ptr1.all)); Free (Ptr1); -- Libération de la mémoire pragma Assert (Ptr1 = Null); -- Free met le pointeur à Null end Illustrer_Memoire_Dynamique; -- Mémoire allouée dynamiquement et non libérée. procedure Illustrer_Memoire_Dynamique_Sans_Free is Ptr1 : T_Pointeur_Integer; begin Ptr1 := new Integer; Ptr1.all := 5; Put_Line ("Ptr1.all = " & Integer'Image (Ptr1.all)); Free (Ptr1); end Illustrer_Memoire_Dynamique_Sans_Free; -- Illustrer la libération explicite de la mémoire et les précautions à -- prendre... procedure Illustrer_Memoire_Dynamique_Erreur is Ptr1, Ptr2 : T_Pointeur_Integer; begin Ptr1 := new Integer; Ptr2 := Ptr1; Ptr1.all := 5; pragma Assert (Ptr1.all = 5); pragma Assert (Ptr2.all = 5); Free (Ptr1); pragma Assert (Ptr1 = Null); -- le pointeur est bien mis à Null pragma Assert (Ptr2 /= Null); -- XXX Quelle est la valeur de Ptr2.all ? Null. --Put_Line ("Ptr2.all = " & Integer'Image (Ptr2.all)); --Ptr2.all := 7; --pragma Assert (Ptr2.all = 7); -- XXX A-t-on le droit de manipuler Ptr2.all ? Non. -- Si on éxucute le programme une exception est levée. -- XXX Que se passe-t-il si on exécute le programme avec valkyrie ? -- -- -- Le terme "Unchecked" dans Unchecked_Deallocation vient de là. Ada -- n'a pas de moyen de contrôler que quand on libère de la mémoire il -- n'y a plus aucun pointeur dans le programme qui la référence. C'est -- à la charge du programmeur ! Utiliser un ramasse-miettes (garbage -- collector) résoud ce problème car il ne libèrera la mémoire que s'il -- n'y a plus aucune référence dessus. end Illustrer_Memoire_Dynamique_Erreur; -- Illustrer les conséquence d'avoir un paramètre en in qui est un pointeur. procedure Illustrer_Pointeur_In is procedure SP (Ptr : in T_Pointeur_Integer) is begin Ptr.all := 123; end SP; Ptr : T_Pointeur_Integer; begin Ptr := new Integer; Ptr.all := 111; SP (Ptr); -- XXX Quelle est la valeur de Ptr.all ? 123 Put_Line ("valeur de Ptr.all ? " & Integer'Image (Ptr.all)); Free (Ptr); end Illustrer_Pointeur_In; -- Illustrer la question "Faut-il Detruire un pile chaînée si c'est -- une variable locale d'un sous-programme ?". procedure Illustrer_Pile_Locale is package Pile is new Piles (Integer); use Pile; P : T_Pile; begin Initialiser (P); Empiler (P, 4); Put_Line ("Sommet = " & Integer'Image (Sommet (P))); Empiler (P, 2); Put_Line ("Sommet = " & Integer'Image (Sommet (P))); Detruire (P); -- XXX P étant une variable locale du sous-programme, a-t-on besoin -- d'appeler Detruire dessus ? OUI end Illustrer_Pile_Locale; begin Illustrer_Memoire_Dynamique; Illustrer_Memoire_Dynamique_Sans_Free; Illustrer_Memoire_Dynamique_Erreur; Illustrer_Pointeur_In; Illustrer_Pile_Locale; end Exemples_Memoire_Dynamique;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (VxWorks PPC AE653 vThreads) -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This version is for the AE653 vThreads full run-time package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). pragma No_Elaboration_Code_All; -- Allow the use of that restriction in units that WITH this unit type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 1.0 / 60.0; -- Storage-related Declarations type Address is private; pragma Preelaborable_Initialization (Address); Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 32; Memory_Size : constant := 2 ** 32; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := High_Order_First; pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning -- Priority-related Declarations (RM D.1) -- Ada priorities are mapped to VxWorks priorities using the following -- transformation: 255 - Ada Priority -- Ada priorities are used as follows: -- 256 is reserved for the VxWorks kernel -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 -- 247 is a catchall default "interrupt" priority for signals, -- allowing higher priority than normal tasks, but lower than -- hardware priority levels. Protected Object ceilings can -- override these values. -- 246 is used by the Interrupt_Manager task Max_Priority : constant Positive := 245; Max_Interrupt_Priority : constant Positive := 255; subtype Any_Priority is Integer range 0 .. 255; subtype Priority is Any_Priority range 0 .. 245; subtype Interrupt_Priority is Any_Priority range 246 .. 255; Default_Priority : constant Priority := 122; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; Command_Line_Args : constant Boolean := False; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Machine_Overflows : constant Boolean := True; Machine_Rounds : constant Boolean := True; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := True; Stack_Check_Limits : constant Boolean := False; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Always_Compatible_Rep : constant Boolean := False; Suppress_Standard_Library : constant Boolean := False; Use_Ada_Main_Program_Name : constant Boolean := True; Frontend_Exceptions : constant Boolean := False; ZCX_By_Default : constant Boolean := False; Executable_Extension : constant String := ".out"; end System;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- S Y S T E M . I M G _ B I U -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992,1993,1994,1995 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, 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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Unsigned_Types; use System.Unsigned_Types; package body System.Img_BIU is ----------------------------- -- Set_Image_Based_Integer -- ----------------------------- procedure Set_Image_Based_Integer (V : Integer; B : Natural; W : Integer; S : out String; P : in out Natural) is Start : Natural; begin -- Positive case can just use the unsigned circuit directly if V >= 0 then Set_Image_Based_Unsigned (Unsigned (V), B, W, S, P); -- Negative case has to set a minus sign. Note also that we have to be -- careful not to generate overflow with the largest negative number. else P := P + 1; S (P) := ' '; Start := P; declare pragma Suppress (Overflow_Check); pragma Suppress (Range_Check); begin Set_Image_Based_Unsigned (Unsigned (-V), B, W - 1, S, P); end; -- Set minus sign in last leading blank location. Because of the -- code above, there must be at least one such location. while S (Start + 1) = ' ' loop Start := Start + 1; end loop; S (Start) := '-'; end if; end Set_Image_Based_Integer; ------------------------------ -- Set_Image_Based_Unsigned -- ------------------------------ procedure Set_Image_Based_Unsigned (V : Unsigned; B : Natural; W : Integer; S : out String; P : in out Natural) is Start : constant Natural := P; F, T : Natural; BU : constant Unsigned := Unsigned (B); Hex : constant array (Unsigned range 0 .. 15) of Character := "0123456789ABCDEF"; procedure Set_Digits (T : Unsigned); -- Set digits of absolute value of T procedure Set_Digits (T : Unsigned) is begin if T >= BU then Set_Digits (T / BU); P := P + 1; S (P) := Hex (T mod BU); else P := P + 1; S (P) := Hex (T); end if; end Set_Digits; -- Start of processing for Set_Image_Based_Unsigned begin if B >= 10 then P := P + 1; S (P) := '1'; end if; P := P + 1; S (P) := Character'Val (Character'Pos ('0') + B mod 10); P := P + 1; S (P) := '#'; Set_Digits (V); P := P + 1; S (P) := '#'; -- Add leading spaces if required by width parameter if P - Start < W then F := P; P := Start + W; T := P; while F > Start loop S (T) := S (F); T := T - 1; F := F - 1; end loop; for J in Start + 1 .. T loop S (J) := ' '; end loop; end if; end Set_Image_Based_Unsigned; end System.Img_BIU;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . E X C E P T I O N S -- -- (Version for No Exception Handlers/No_Exception_Propagation) -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Version is for use when there are no handlers in the partition (i.e. either -- of Restriction No_Exception_Handlers or No_Exception_Propagation is set). with System; package Ada.Exceptions is pragma Preelaborate; -- In accordance with Ada 2005 AI-362 type Exception_Id is private; pragma Preelaborable_Initialization (Exception_Id); Null_Id : constant Exception_Id; procedure Raise_Exception (E : Exception_Id; Message : String := ""); pragma No_Return (Raise_Exception); -- Unconditionally call __gnat_last_chance_handler. Message should be a -- null terminated string. Note that the exception is still raised even -- if E is the null exception id. This is a deliberate simplification for -- this profile (the use of Raise_Exception with a null id is very rare in -- any case, and this way we avoid introducing Raise_Exception_Always and -- we also avoid the if test in Raise_Exception). private ------------------ -- Exception_Id -- ------------------ type Exception_Id is access all System.Address; Null_Id : constant Exception_Id := null; pragma Inline_Always (Raise_Exception); end Ada.Exceptions;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . T E X T _ I O . C O M P L E X _ A U X -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the routines for Ada.Text_IO.Complex_IO that are -- shared among separate instantiations of this package. The routines in -- this package are identical semantically to those in Complex_IO itself, -- except that the generic parameter Complex has been replaced by separate -- real and imaginary values of type Long_Long_Float, and default parameters -- have been removed because they are supplied explicitly by the calls from -- within the generic template. package Ada.Text_IO.Complex_Aux is procedure Get (File : File_Type; ItemR : out Long_Long_Float; ItemI : out Long_Long_Float; Width : Field); procedure Put (File : File_Type; ItemR : Long_Long_Float; ItemI : Long_Long_Float; Fore : Field; Aft : Field; Exp : Field); procedure Gets (From : String; ItemR : out Long_Long_Float; ItemI : out Long_Long_Float; Last : out Positive); procedure Puts (To : out String; ItemR : Long_Long_Float; ItemI : Long_Long_Float; Aft : Field; Exp : Field); end Ada.Text_IO.Complex_Aux;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2014, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- Document type declaration analyzer. ------------------------------------------------------------------------------ private package XML.SAX.Simple_Readers.Analyzer is procedure Analyze_Document_Type_Declaration (Self : in out Simple_Reader'Class); -- Analyzes document type declaration. -- XXX It will report declarations of notations, entities, elements and -- attributes in right order. end XML.SAX.Simple_Readers.Analyzer;
with openGL.Primitive.indexed, openGL.Geometry.lit_colored_textured, openGL.Model.hexagon; package body openGL.Model.hexagon_Column.lit_colored_textured_rounded is type Geometry_view is access all Geometry.lit_colored_textured.item'Class; --------- --- Forge -- function new_hexagon_Column (Radius : in Real; Height : in Real; Upper, Lower : in hex_Face; Shaft : in shaft_Face) return View is Self : constant View := new Item; begin Self.Radius := Radius; Self.Height := Height; Self.upper_Face := Upper; Self.lower_Face := Lower; Self.Shaft := Shaft; return Self; end new_hexagon_Column; -------------- --- Attributes -- overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in Font.font_id_Map_of_font) return Geometry.views is pragma unreferenced (Fonts); use Geometry.lit_colored_textured, Model.hexagon, Texture; shaft_Height : constant Real := Self.Height; height_Offset : constant Vector_3 := (0.0, shaft_Height / 2.0, 0.0); mid_Sites : constant hexagon.Sites := vertex_Sites (Self.Radius); upper_Sites : hexagon.Sites := mid_Sites; lower_Sites : hexagon.Sites := mid_Sites; function new_hexagon_Face (Vertices : in Geometry.lit_colored_textured.Vertex_array; Flip : in Boolean := False) return Geometry_view is use Primitive; function the_Indices return Indices is begin if Flip then return (1, 7, 6, 5, 4, 3, 2, 7); else return (1, 2, 3, 4, 5, 6, 7, 2); end if; end the_Indices; the_Geometry : constant Geometry_view := Geometry.lit_colored_textured.new_Geometry (texture_is_Alpha => False); the_Primitive : constant Primitive.view := Primitive.indexed.new_Primitive (triangle_Fan, the_Indices).all'Access; begin the_Geometry.Vertices_are (Vertices); the_Geometry.add (the_Primitive); return the_Geometry; end new_hexagon_Face; function new_shaft_Face (Vertices : in Geometry.lit_colored_textured.Vertex_array) return Geometry_view is use Primitive; the_Indices : constant Indices := (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2); the_Geometry : constant Geometry_view := Geometry.lit_colored_textured.new_Geometry (texture_is_Alpha => False); the_Primitive : constant Primitive.indexed.view := Primitive.indexed.new_Primitive (triangle_Strip, the_Indices); begin the_Geometry.Vertices_are (Vertices); the_Geometry.add (Primitive.view (the_Primitive)); return the_Geometry; end new_shaft_Face; upper_Face : Geometry_view; lower_Face : Geometry_view; shaft_Face : Geometry_view; begin for i in mid_Sites'Range loop upper_Sites (i) := upper_Sites (i) + height_Offset; lower_Sites (i) := lower_Sites (i) - height_Offset; end loop; -- Upper -- declare the_Vertices : constant Geometry.lit_colored_textured.Vertex_array := (1 => (Site => height_Offset, Normal => Normal, Color => +Self.upper_Face.center_Color, Coords => (0.0, 0.0), Shine => default_Shine), 2 => (Site => upper_Sites (1), Normal => Normal, Color => +Self.upper_Face.Colors (1), Coords => (0.0, 0.0), Shine => default_Shine), 3 => (Site => upper_Sites (2), Normal => Normal, Color => +Self.upper_Face.Colors (2), Coords => (1.0, 0.0), Shine => default_Shine), 4 => (Site => upper_Sites (3), Normal => Normal, Color => +Self.upper_Face.Colors (3), Coords => (1.0, 1.0), Shine => default_Shine), 5 => (Site => upper_Sites (4), Normal => Normal, Color => +Self.upper_Face.Colors (4), Coords => (0.0, 1.0), Shine => default_Shine), 6 => (Site => upper_Sites (5), Normal => Normal, Color => +Self.upper_Face.Colors (5), Coords => (0.0, 1.0), Shine => default_Shine), 7 => (Site => upper_Sites (6), Normal => Normal, Color => +Self.upper_Face.Colors (6), Coords => (0.0, 1.0), Shine => default_Shine)); begin upper_Face := new_hexagon_Face (Vertices => the_Vertices); if Self.upper_Face.Texture /= null_Asset then upper_Face.Texture_is (Textures.fetch (Self.upper_Face.Texture)); end if; end; -- Lower -- declare the_Vertices : constant Geometry.lit_colored_textured.Vertex_array := (1 => (Site => -height_Offset, Normal => -Normal, Color => +Self.lower_Face.center_Color, Coords => (0.0, 0.0), Shine => default_Shine), 2 => (Site => lower_Sites (1), Normal => -Normal, Color => +Self.lower_Face.Colors (1), Coords => (0.0, 0.0), Shine => default_Shine), 3 => (Site => lower_Sites (2), Normal => -Normal, Color => +Self.lower_Face.Colors (2), Coords => (1.0, 0.0), Shine => default_Shine), 4 => (Site => lower_Sites (3), Normal => -Normal, Color => +Self.lower_Face.Colors (3), Coords => (1.0, 1.0), Shine => default_Shine), 5 => (Site => lower_Sites (4), Normal => -Normal, Color => +Self.lower_Face.Colors (4), Coords => (0.0, 1.0), Shine => default_Shine), 6 => (Site => lower_Sites (5), Normal => -Normal, Color => +Self.lower_Face.Colors (5), Coords => (0.0, 1.0), Shine => default_Shine), 7 => (Site => lower_Sites (6), Normal => -Normal, Color => +Self.lower_Face.Colors (6), Coords => (0.0, 1.0), Shine => default_Shine)); begin lower_Face := new_hexagon_Face (Vertices => the_Vertices, flip => True); if Self.lower_Face.Texture /= null_Asset then lower_Face.Texture_is (Textures.fetch (Self.lower_Face.Texture)); end if; end; --- Shaft -- declare type shaft_Normals is array (1 .. 6) of Vector_3; function get_Normals return shaft_Normals is use linear_Algebra_3D; Rotation : constant Matrix_3x3 := y_Rotation_from (-math.to_Radians (60.0)); the_Normal : Vector_3 := (1.0, 0.0, 0.0); Result : shaft_Normals; begin Result (1) := the_Normal; the_Normal := Rotation * the_Normal; Result (2) := the_Normal; the_Normal := Rotation * the_Normal; Result (3) := the_Normal; the_Normal := (0.0, 0.0, 1.0); Result (4) := the_Normal; the_Normal := Rotation * the_Normal; Result (5) := the_Normal; the_Normal := Rotation * the_Normal; Result (6) := the_Normal; return Result; end get_Normals; Normals : constant shaft_Normals := get_Normals; shaft_Color : constant rgba_Color := +Self.Shaft.Color; the_Vertices : constant Geometry.lit_colored_textured.Vertex_array := ( 1 => (Site => upper_Sites (1), Normal => Normals (1), Color => shaft_Color, Coords => (0.0, 1.0), Shine => default_Shine), 2 => (Site => lower_Sites (1), Normal => Normals (1), Color => shaft_Color, Coords => (0.0, 0.0), Shine => default_Shine), 3 => (Site => upper_Sites (2), Normal => Normals (2), Color => shaft_Color, Coords => (0.2, 1.0), Shine => default_Shine), 4 => (Site => lower_Sites (2), Normal => Normals (2), Color => shaft_Color, Coords => (0.2, 0.0), Shine => default_Shine), 5 => (Site => upper_Sites (3), Normal => Normals (3), Color => shaft_Color, Coords => (0.4, 1.0), Shine => default_Shine), 6 => (Site => lower_Sites (3), Normal => Normals (3), Color => shaft_Color, Coords => (0.4, 0.0), Shine => default_Shine), 7 => (Site => upper_Sites (4), Normal => Normals (4), Color => shaft_Color, Coords => (0.6, 1.0), Shine => default_Shine), 8 => (Site => lower_Sites (4), Normal => Normals (4), Color => shaft_Color, Coords => (0.6, 0.0), Shine => default_Shine), 9 => (Site => upper_Sites (5), Normal => Normals (5), Color => shaft_Color, Coords => (0.8, 1.0), Shine => default_Shine), 10 => (Site => lower_Sites (5), Normal => Normals (5), Color => shaft_Color, Coords => (0.8, 0.0), Shine => default_Shine), 11 => (Site => upper_Sites (6), Normal => Normals (6), Color => shaft_Color, Coords => (1.0, 1.0), Shine => default_Shine), 12 => (Site => lower_Sites (6), Normal => Normals (6), Color => shaft_Color, Coords => (1.0, 0.0), Shine => default_Shine)); begin shaft_Face := new_shaft_Face (Vertices => the_Vertices); if Self.Shaft.Texture /= null_Asset then shaft_Face.Texture_is (Textures.fetch (Self.Shaft.Texture)); end if; end; return (1 => upper_Face.all'Access, 2 => lower_Face.all'Access, 3 => shaft_Face.all'Access); end to_GL_Geometries; end openGL.Model.hexagon_Column.lit_colored_textured_rounded;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (VxWorks 6.x PPC RTP) -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the VxWorks version of this package for RTPs package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). pragma No_Elaboration_Code_All; -- Allow the use of that restriction in units that WITH this unit type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 1.0 / 60.0; -- Storage-related Declarations type Address is private; pragma Preelaborable_Initialization (Address); Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 32; Memory_Size : constant := 2 ** 32; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := High_Order_First; pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning -- Priority-related Declarations (RM D.1) -- Ada priorities are mapped to VxWorks priorities using the following -- transformation: 255 - Ada Priority -- Ada priorities are used as follows: -- 256 is reserved for the VxWorks kernel -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 -- 247 is a catchall default "interrupt" priority for signals, -- allowing higher priority than normal tasks, but lower than -- hardware priority levels. Protected Object ceilings can -- override these values. -- 246 is used by the Interrupt_Manager task Max_Priority : constant Positive := 245; Max_Interrupt_Priority : constant Positive := 255; subtype Any_Priority is Integer range 0 .. 255; subtype Priority is Any_Priority range 0 .. 245; subtype Interrupt_Priority is Any_Priority range 246 .. 255; Default_Priority : constant Priority := 122; private pragma Linker_Options ("--specs=vxworks-ppc-link.spec"); -- Setup proper set of -L's for this configuration type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := True; Stack_Check_Limits : constant Boolean := False; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Always_Compatible_Rep : constant Boolean := False; Suppress_Standard_Library : constant Boolean := False; Use_Ada_Main_Program_Name : constant Boolean := False; Frontend_Exceptions : constant Boolean := False; ZCX_By_Default : constant Boolean := True; Executable_Extension : constant String := ".vxe"; end System;
-- Copyright 2017-2019 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program 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 -- along with this program. If not, see <http://www.gnu.org/licenses/>. with System; package Pck is package Top is type Top_T is tagged private; type Top_A is access Top_T'Class; procedure Assign (Obj: in out Top_T; TV : Integer); private type Top_T is tagged record N : Integer := 1; A : Integer := 48; end record; end Top; package Middle is type Middle_T is new Top.Top_T with private; type Middle_A is access Middle_T'Class; procedure Assign (Obj: in out Middle_T; MV : Character); private type Middle_T is new Top.Top_T with record N : Character := 'a'; end record; end Middle; type Bottom_T is new Middle.Middle_T with record N : Float := 4.0; X : Integer := 6; A : Character := 'J'; end record; type Bottom_A is access Bottom_T'Class; procedure Assign (Obj: in out Bottom_T; BV : Float); procedure Do_Nothing (A : System.Address); type Integer_Array is array (Natural range <>) of Integer; package Dyn_Top is type Dyn_Top_T (Disc : Natural) is tagged private; type Dyn_Top_A is access Dyn_Top_T'Class; procedure Assign (Obj: in out Dyn_Top_T; TV : Integer); private type Dyn_Top_T (Disc : Natural) is tagged record S : Integer_Array (1 .. Disc) := (others => Disc); N : Integer := 1; A : Integer := 48; end record; end Dyn_Top; package Dyn_Middle is type Dyn_Middle_T is new Dyn_Top.Dyn_Top_T with private; type Dyn_Middle_A is access Dyn_Middle_T'Class; procedure Assign (Obj: in out Dyn_Middle_T; MV : Character); private type Dyn_Middle_T is new Dyn_Top.Dyn_Top_T with record N : Character := 'a'; U : Integer := 42; end record; end Dyn_Middle; end Pck;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . P O O L _ G L O B A L -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Pools; use System.Storage_Pools; with System.Memory; package body System.Pool_Global is package SSE renames System.Storage_Elements; -------------- -- Allocate -- -------------- overriding procedure Allocate (Pool : in out Unbounded_No_Reclaim_Pool; Address : out System.Address; Storage_Size : SSE.Storage_Count; Alignment : SSE.Storage_Count) is use SSE; pragma Warnings (Off, Pool); Aligned_Size : Storage_Count := Storage_Size; Aligned_Address : System.Address; Allocated : System.Address; begin if Alignment > Standard'System_Allocator_Alignment then Aligned_Size := Aligned_Size + Alignment; end if; Allocated := Memory.Alloc (Memory.size_t (Aligned_Size)); -- The call to Alloc returns an address whose alignment is compatible -- with the worst case alignment requirement for the machine; thus the -- Alignment argument can be safely ignored. if Allocated = Null_Address then raise Storage_Error; end if; -- Case where alignment requested is greater than the alignment that is -- guaranteed to be provided by the system allocator. if Alignment > Standard'System_Allocator_Alignment then -- Realign the returned address Aligned_Address := To_Address (To_Integer (Allocated) + Integer_Address (Alignment) - (To_Integer (Allocated) mod Integer_Address (Alignment))); -- Save the block address declare Saved_Address : System.Address; pragma Import (Ada, Saved_Address); for Saved_Address'Address use Aligned_Address - Storage_Offset (System.Address'Size / Storage_Unit); begin Saved_Address := Allocated; end; Address := Aligned_Address; else Address := Allocated; end if; end Allocate; ---------------- -- Deallocate -- ---------------- overriding procedure Deallocate (Pool : in out Unbounded_No_Reclaim_Pool; Address : System.Address; Storage_Size : SSE.Storage_Count; Alignment : SSE.Storage_Count) is use System.Storage_Elements; pragma Warnings (Off, Pool); pragma Warnings (Off, Storage_Size); begin -- Case where the alignment of the block exceeds the guaranteed -- alignment required by the system storage allocator, meaning that -- this was specially wrapped at allocation time. if Alignment > Standard'System_Allocator_Alignment then -- Retrieve the block address declare Saved_Address : System.Address; pragma Import (Ada, Saved_Address); for Saved_Address'Address use Address - Storage_Offset (System.Address'Size / Storage_Unit); begin Memory.Free (Saved_Address); end; else Memory.Free (Address); end if; end Deallocate; ------------------ -- Storage_Size -- ------------------ overriding function Storage_Size (Pool : Unbounded_No_Reclaim_Pool) return SSE.Storage_Count is pragma Warnings (Off, Pool); begin -- Intuitively, should return System.Memory_Size. But on Sun/Alsys, -- System.Memory_Size > System.Max_Int, which means all you can do with -- it is raise CONSTRAINT_ERROR... return SSE.Storage_Count'Last; end Storage_Size; end System.Pool_Global;
-- Swagger Petstore -- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 -- Contact: apiteam@swagger.io -- -- NOTE: This package is auto generated by the swagger code generator 1.5.0. -- https://github.com/swagger-api/swagger-codegen.git -- Do not edit the class manually.with IO.OpenAPI.Model.Default; with IO.OpenAPI.Api.Models; with Swagger.Clients; package IO.OpenAPI.Api.Clients is type Client_Type is new Swagger.Clients.Client_Type with null record; -- Add a new pet to the store procedure addPet (Client : in out Client_Type; body : in IO.OpenAPI.Api.Models.object); -- Update an existing pet procedure updatePet (Client : in out Client_Type; body : in IO.OpenAPI.Api.Models.object); -- Finds Pets by status procedure findPetsByStatus (Client : in out Client_Type; status : in array; Result : out array); -- Finds Pets by tags procedure findPetsByTags (Client : in out Client_Type; tags : in array; Result : out array); -- Find pet by ID procedure getPetById (Client : in out Client_Type; petId : in integer; Result : out Pet); -- Updates a pet in the store with form data procedure updatePetWithForm (Client : in out Client_Type; petId : in integer; body : in IO.OpenAPI.Api.Models.object); -- Deletes a pet procedure deletePet (Client : in out Client_Type; petId : in integer; api_key : in string); -- uploads an image procedure uploadFile (Client : in out Client_Type; petId : in integer; body : in IO.OpenAPI.Api.Models.string; Result : out ApiResponse); -- Returns pet inventories by status procedure getInventory (Client : in out Client_Type; Result : out object); -- Place an order for a pet procedure placeOrder (Client : in out Client_Type; body : in IO.OpenAPI.Api.Models.object; Result : out Order); -- Find purchase order by ID procedure getOrderById (Client : in out Client_Type; orderId : in integer; Result : out Order); -- Delete purchase order by ID procedure deleteOrder (Client : in out Client_Type; orderId : in integer); -- Create user procedure createUser (Client : in out Client_Type; body : in IO.OpenAPI.Api.Models.object); -- Creates list of users with given input array procedure createUsersWithArrayInput (Client : in out Client_Type; body : in IO.OpenAPI.Api.Models.array); -- Creates list of users with given input array procedure createUsersWithListInput (Client : in out Client_Type; body : in IO.OpenAPI.Api.Models.array); -- Logs user into the system procedure loginUser (Client : in out Client_Type; username : in string; password : in string; Result : out string); -- Logs out current logged in user session procedure logoutUser (Client : in out Client_Type); -- Get user by user name procedure getUserByName (Client : in out Client_Type; username : in string; Result : out User); -- Updated user procedure updateUser (Client : in out Client_Type; username : in string; body : in IO.OpenAPI.Api.Models.object); -- Delete user procedure deleteUser (Client : in out Client_Type; username : in string); end IO.OpenAPI.Api.Clients;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with xcb.xcb_screen_t; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_screen_iterator_t is -- Item -- type Item is record data : access xcb.xcb_screen_t.Item; the_rem : aliased Interfaces.C.int; index : aliased Interfaces.C.int; end record; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_screen_iterator_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_screen_iterator_t.Item, Element_Array => xcb.xcb_screen_iterator_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_screen_iterator_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_screen_iterator_t.Pointer, Element_Array => xcb.xcb_screen_iterator_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_screen_iterator_t;
-- Task 2 of RTPL WS17/18 -- Team members: Hannes B. and Gabriel Z. package convert with SPARK_Mode is -- Procedure for option 2 procedure opt2; -- Procedure for option 3 procedure opt3; private -- Float values for user input F1 : Float := 1.0; F2 : Float := 2.0; -- Convert Celsius to Fahrenheit function myCel2Fahr (cel : Float) return Float with Pre => cel >= -273.15, Post => myCel2Fahr'Result >= -459.67, Global => null, Depends => (myCel2Fahr'Result => cel); -- Convert Celsius to Fahrenheit function myFahr2Cel (fahr : Float) return Float with Pre => fahr >= -459.67, Post => myFahr2Cel'Result >= -273.15, Global => null, Depends => (myFahr2Cel'Result => fahr); end convert;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . H E L P E R S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- ------------------------------------------------------------------------------ package body Ada.Containers.Helpers is Max_Count : constant := 2**31 - 1; -- Used in assertions below, to make sure the counts don't wrap around. -- This can help detect bugs in which Adjust and Finalize calls are -- improperly generated. An extra Decrement could otherwise cause -- wraparound from 0 to 2**32-1. The highest count seen so far is -- around 25, so this should be plenty. package body Generic_Implementation is use type SAC.Atomic_Unsigned; ------------ -- Adjust -- ------------ procedure Adjust (Control : in out Reference_Control_Type) is begin if Control.T_Counts /= null then Busy (Control.T_Counts.all); end if; end Adjust; ---------- -- Busy -- ---------- procedure Busy (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Increment (T_Counts.Busy); pragma Assert (T_Counts.Busy <= Max_Count); end if; end Busy; -------------- -- Finalize -- -------------- procedure Finalize (Control : in out Reference_Control_Type) is begin if Control.T_Counts /= null then Unbusy (Control.T_Counts.all); Control.T_Counts := null; end if; end Finalize; -- No need to protect against double Finalize here, because these types -- are limited. procedure Finalize (Busy : in out With_Busy) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Unbusy (Busy.T_Counts.all); end Finalize; procedure Finalize (Lock : in out With_Lock) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Unlock (Lock.T_Counts.all); end Finalize; ---------------- -- Initialize -- ---------------- procedure Initialize (Busy : in out With_Busy) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Generic_Implementation.Busy (Busy.T_Counts.all); end Initialize; procedure Initialize (Lock : in out With_Lock) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Generic_Implementation.Lock (Lock.T_Counts.all); end Initialize; ---------- -- Lock -- ---------- procedure Lock (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Increment (T_Counts.Lock); pragma Assert (T_Counts.Lock <= Max_Count); SAC.Increment (T_Counts.Busy); pragma Assert (T_Counts.Busy <= Max_Count); end if; end Lock; -------------- -- TC_Check -- -------------- procedure TC_Check (T_Counts : Tamper_Counts) is begin if T_Check then if T_Counts.Busy > 0 then raise Program_Error with "attempt to tamper with cursors"; end if; -- The lock status (which monitors "element tampering") always -- implies that the busy status (which monitors "cursor -- tampering") is set too; this is a representation invariant. -- Thus if the busy count is zero, then the lock count -- must also be zero. pragma Assert (T_Counts.Lock = 0); end if; end TC_Check; -------------- -- TE_Check -- -------------- procedure TE_Check (T_Counts : Tamper_Counts) is begin if T_Check and then T_Counts.Lock > 0 then raise Program_Error with "attempt to tamper with elements"; end if; end TE_Check; ------------ -- Unbusy -- ------------ procedure Unbusy (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Decrement (T_Counts.Busy); pragma Assert (T_Counts.Busy <= Max_Count); end if; end Unbusy; ------------ -- Unlock -- ------------ procedure Unlock (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Decrement (T_Counts.Lock); pragma Assert (T_Counts.Lock <= Max_Count); SAC.Decrement (T_Counts.Busy); pragma Assert (T_Counts.Busy <= Max_Count); end if; end Unlock; ----------------- -- Zero_Counts -- ----------------- procedure Zero_Counts (T_Counts : out Tamper_Counts) is begin if T_Check then T_Counts := (others => <>); end if; end Zero_Counts; end Generic_Implementation; end Ada.Containers.Helpers;
-- OEML _ REST API -- This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> -- -- The version of the OpenAPI document: v1 -- Contact: support@coinapi.io -- -- NOTE: This package is auto generated by OpenAPI-Generator 5.1.1. -- https://openapi-generator.tech -- Do not edit the class manually. package body .Models is pragma Style_Checks ("-mr"); pragma Warnings (Off, "*use clause for package*"); use Swagger.Streams; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Severity_Type) is begin Into.Start_Entity (Name); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Severity_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Severity_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Severity_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : Severity_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Message_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("type", Value.P_Type); Serialize (Into, "severity", Value.Severity); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Into.Write_Entity ("message", Value.Message); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Message_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Message_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "type", Value.P_Type); Deserialize (Object, "severity", Value.Severity); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); Swagger.Streams.Deserialize (Object, "message", Value.Message); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Message_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : Message_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ValidationError_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("type", Value.P_Type); Into.Write_Entity ("title", Value.Title); Serialize (Into, "status", Value.Status); Into.Write_Entity ("traceId", Value.Trace_Id); Into.Write_Entity ("errors", Value.Errors); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ValidationError_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out ValidationError_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "type", Value.P_Type); Swagger.Streams.Deserialize (Object, "title", Value.Title); Swagger.Streams.Deserialize (Object, "status", Value.Status); Swagger.Streams.Deserialize (Object, "traceId", Value.Trace_Id); Swagger.Streams.Deserialize (Object, "errors", Value.Errors); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out ValidationError_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : ValidationError_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrdType_Type) is begin Into.Start_Entity (Name); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrdType_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrdType_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrdType_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrdType_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrdStatus_Type) is begin Into.Start_Entity (Name); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrdStatus_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrdStatus_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrdStatus_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrdStatus_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderCancelAllRequest_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderCancelAllRequest_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderCancelAllRequest_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderCancelAllRequest_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrderCancelAllRequest_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderCancelSingleRequest_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Into.Write_Entity ("exchange_order_id", Value.Exchange_Order_Id); Into.Write_Entity ("client_order_id", Value.Client_Order_Id); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderCancelSingleRequest_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderCancelSingleRequest_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); Swagger.Streams.Deserialize (Object, "exchange_order_id", Value.Exchange_Order_Id); Swagger.Streams.Deserialize (Object, "client_order_id", Value.Client_Order_Id); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderCancelSingleRequest_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrderCancelSingleRequest_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrdSide_Type) is begin Into.Start_Entity (Name); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrdSide_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrdSide_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrdSide_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrdSide_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in TimeInForce_Type) is begin Into.Start_Entity (Name); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in TimeInForce_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out TimeInForce_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out TimeInForce_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : TimeInForce_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderNewSingleRequest_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Into.Write_Entity ("client_order_id", Value.Client_Order_Id); Into.Write_Entity ("symbol_id_exchange", Value.Symbol_Id_Exchange); Into.Write_Entity ("symbol_id_coinapi", Value.Symbol_Id_Coinapi); Serialize (Into, "amount_order", Value.Amount_Order); Serialize (Into, "price", Value.Price); Serialize (Into, "side", Value.Side); Serialize (Into, "order_type", Value.Order_Type); Serialize (Into, "time_in_force", Value.Time_In_Force); Serialize (Into, "expire_time", Value.Expire_Time); Serialize (Into, "exec_inst", Value.Exec_Inst); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderNewSingleRequest_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderNewSingleRequest_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); Swagger.Streams.Deserialize (Object, "client_order_id", Value.Client_Order_Id); Swagger.Streams.Deserialize (Object, "symbol_id_exchange", Value.Symbol_Id_Exchange); Swagger.Streams.Deserialize (Object, "symbol_id_coinapi", Value.Symbol_Id_Coinapi); Swagger.Streams.Deserialize (Object, "amount_order", Value.Amount_Order); Swagger.Streams.Deserialize (Object, "price", Value.Price); Deserialize (Object, "side", Value.Side); Deserialize (Object, "order_type", Value.Order_Type); Deserialize (Object, "time_in_force", Value.Time_In_Force); Swagger.Streams.Deserialize (Object, "expire_time", Value.Expire_Time); Swagger.Streams.Deserialize (Object, "exec_inst", Value.Exec_Inst); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderNewSingleRequest_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrderNewSingleRequest_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Fills_Type) is begin Into.Start_Entity (Name); Serialize (Into, "time", Value.Time); Serialize (Into, "price", Value.Price); Serialize (Into, "amount", Value.Amount); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Fills_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Fills_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "time", Value.Time); Swagger.Streams.Deserialize (Object, "price", Value.Price); Swagger.Streams.Deserialize (Object, "amount", Value.Amount); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Fills_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : Fills_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderExecutionReport_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Into.Write_Entity ("client_order_id", Value.Client_Order_Id); Into.Write_Entity ("symbol_id_exchange", Value.Symbol_Id_Exchange); Into.Write_Entity ("symbol_id_coinapi", Value.Symbol_Id_Coinapi); Serialize (Into, "amount_order", Value.Amount_Order); Serialize (Into, "price", Value.Price); Serialize (Into, "side", Value.Side); Serialize (Into, "order_type", Value.Order_Type); Serialize (Into, "time_in_force", Value.Time_In_Force); Serialize (Into, "expire_time", Value.Expire_Time); Serialize (Into, "exec_inst", Value.Exec_Inst); Into.Write_Entity ("client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange); Into.Write_Entity ("exchange_order_id", Value.Exchange_Order_Id); Serialize (Into, "amount_open", Value.Amount_Open); Serialize (Into, "amount_filled", Value.Amount_Filled); Serialize (Into, "avg_px", Value.Avg_Px); Serialize (Into, "status", Value.Status); Serialize (Into, "status_history", Value.Status_History); Into.Write_Entity ("error_message", Value.Error_Message); Serialize (Into, "fills", Value.Fills); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderExecutionReport_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderExecutionReport_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); Swagger.Streams.Deserialize (Object, "client_order_id", Value.Client_Order_Id); Swagger.Streams.Deserialize (Object, "symbol_id_exchange", Value.Symbol_Id_Exchange); Swagger.Streams.Deserialize (Object, "symbol_id_coinapi", Value.Symbol_Id_Coinapi); Swagger.Streams.Deserialize (Object, "amount_order", Value.Amount_Order); Swagger.Streams.Deserialize (Object, "price", Value.Price); Deserialize (Object, "side", Value.Side); Deserialize (Object, "order_type", Value.Order_Type); Deserialize (Object, "time_in_force", Value.Time_In_Force); Swagger.Streams.Deserialize (Object, "expire_time", Value.Expire_Time); Swagger.Streams.Deserialize (Object, "exec_inst", Value.Exec_Inst); Swagger.Streams.Deserialize (Object, "client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange); Swagger.Streams.Deserialize (Object, "exchange_order_id", Value.Exchange_Order_Id); Swagger.Streams.Deserialize (Object, "amount_open", Value.Amount_Open); Swagger.Streams.Deserialize (Object, "amount_filled", Value.Amount_Filled); Swagger.Streams.Deserialize (Object, "avg_px", Value.Avg_Px); Deserialize (Object, "status", Value.Status); Swagger.Streams.Deserialize (Object, "status_history", Value.Status_History); Swagger.Streams.Deserialize (Object, "error_message", Value.Error_Message); Deserialize (Object, "fills", Value.Fills); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderExecutionReport_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrderExecutionReport_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderExecutionReportAllOf_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange); Into.Write_Entity ("exchange_order_id", Value.Exchange_Order_Id); Serialize (Into, "amount_open", Value.Amount_Open); Serialize (Into, "amount_filled", Value.Amount_Filled); Serialize (Into, "avg_px", Value.Avg_Px); Serialize (Into, "status", Value.Status); Serialize (Into, "status_history", Value.Status_History); Into.Write_Entity ("error_message", Value.Error_Message); Serialize (Into, "fills", Value.Fills); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in OrderExecutionReportAllOf_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderExecutionReportAllOf_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "client_order_id_format_exchange", Value.Client_Order_Id_Format_Exchange); Swagger.Streams.Deserialize (Object, "exchange_order_id", Value.Exchange_Order_Id); Swagger.Streams.Deserialize (Object, "amount_open", Value.Amount_Open); Swagger.Streams.Deserialize (Object, "amount_filled", Value.Amount_Filled); Swagger.Streams.Deserialize (Object, "avg_px", Value.Avg_Px); Deserialize (Object, "status", Value.Status); Swagger.Streams.Deserialize (Object, "status_history", Value.Status_History); Swagger.Streams.Deserialize (Object, "error_message", Value.Error_Message); Deserialize (Object, "fills", Value.Fills); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out OrderExecutionReportAllOf_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : OrderExecutionReportAllOf_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in BalanceData_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("asset_id_exchange", Value.Asset_Id_Exchange); Into.Write_Entity ("asset_id_coinapi", Value.Asset_Id_Coinapi); Serialize (Into, "balance", Value.Balance); Serialize (Into, "available", Value.Available); Serialize (Into, "locked", Value.Locked); Into.Write_Entity ("last_updated_by", Value.Last_Updated_By); Serialize (Into, "rate_usd", Value.Rate_Usd); Serialize (Into, "traded", Value.Traded); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in BalanceData_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out BalanceData_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "asset_id_exchange", Value.Asset_Id_Exchange); Swagger.Streams.Deserialize (Object, "asset_id_coinapi", Value.Asset_Id_Coinapi); Swagger.Streams.Deserialize (Object, "balance", Value.Balance); Swagger.Streams.Deserialize (Object, "available", Value.Available); Swagger.Streams.Deserialize (Object, "locked", Value.Locked); Swagger.Streams.Deserialize (Object, "last_updated_by", Value.Last_Updated_By); Swagger.Streams.Deserialize (Object, "rate_usd", Value.Rate_Usd); Swagger.Streams.Deserialize (Object, "traded", Value.Traded); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out BalanceData_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : BalanceData_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Balance_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Serialize (Into, "data", Value.Data); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Balance_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Balance_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); Deserialize (Object, "data", Value.Data); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Balance_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : Balance_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Position_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("exchange_id", Value.Exchange_Id); Serialize (Into, "data", Value.Data); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Position_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Position_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "exchange_id", Value.Exchange_Id); Deserialize (Object, "data", Value.Data); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Position_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : Position_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in PositionData_Type) is begin Into.Start_Entity (Name); Into.Write_Entity ("symbol_id_exchange", Value.Symbol_Id_Exchange); Into.Write_Entity ("symbol_id_coinapi", Value.Symbol_Id_Coinapi); Serialize (Into, "avg_entry_price", Value.Avg_Entry_Price); Serialize (Into, "quantity", Value.Quantity); Serialize (Into, "side", Value.Side); Serialize (Into, "unrealized_pnl", Value.Unrealized_Pnl); Serialize (Into, "leverage", Value.Leverage); Into.Write_Entity ("cross_margin", Value.Cross_Margin); Serialize (Into, "liquidation_price", Value.Liquidation_Price); Into.Write_Entity ("raw_data", Value.Raw_Data); Into.End_Entity (Name); end Serialize; procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in PositionData_Type_Vectors.Vector) is begin Into.Start_Array (Name); for Item of Value loop Serialize (Into, "", Item); end loop; Into.End_Array (Name); end Serialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out PositionData_Type) is Object : Swagger.Value_Type; begin Swagger.Streams.Deserialize (From, Name, Object); Swagger.Streams.Deserialize (Object, "symbol_id_exchange", Value.Symbol_Id_Exchange); Swagger.Streams.Deserialize (Object, "symbol_id_coinapi", Value.Symbol_Id_Coinapi); Swagger.Streams.Deserialize (Object, "avg_entry_price", Value.Avg_Entry_Price); Swagger.Streams.Deserialize (Object, "quantity", Value.Quantity); Deserialize (Object, "side", Value.Side); Swagger.Streams.Deserialize (Object, "unrealized_pnl", Value.Unrealized_Pnl); Swagger.Streams.Deserialize (Object, "leverage", Value.Leverage); Swagger.Streams.Deserialize (Object, "cross_margin", Value.Cross_Margin); Swagger.Streams.Deserialize (Object, "liquidation_price", Value.Liquidation_Price); Deserialize (Object, "raw_data", Value.Raw_Data); end Deserialize; procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out PositionData_Type_Vectors.Vector) is List : Swagger.Value_Array_Type; Item : PositionData_Type; begin Value.Clear; Swagger.Streams.Deserialize (From, Name, List); for Data of List loop Deserialize (Data, "", Item); Value.Append (Item); end loop; end Deserialize; end .Models;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- B I N D E -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Binderr; use Binderr; with Butil; use Butil; with Debug; use Debug; with Fname; use Fname; with Lib; use Lib; with Namet; use Namet; with Opt; use Opt; with Output; use Output; with Targparm; use Targparm; package body Binde is -- The following data structures are used to represent the graph that is -- used to determine the elaboration order (using a topological sort). -- The following structures are used to record successors. If A is a -- successor of B in this table, it means that A must be elaborated -- before B is elaborated. type Successor_Id is new Nat; -- Identification of single successor entry No_Successor : constant Successor_Id := 0; -- Used to indicate end of list of successors type Elab_All_Id is new Nat; -- Identification of Elab_All entry link No_Elab_All_Link : constant Elab_All_Id := 0; -- Used to indicate end of list -- Succ_Reason indicates the reason for a particular elaboration link type Succ_Reason is (Withed, -- After directly with's Before, so the spec of Before must be -- elaborated before After is elaborated. Elab, -- After directly mentions Before in a pragma Elaborate, so the -- body of Before must be elaborate before After is elaborated. Elab_All, -- After either mentions Before directly in a pragma Elaborate_All, -- or mentions a third unit, X, which itself requires that Before be -- elaborated before unit X is elaborated. The Elab_All_Link list -- traces the dependencies in the latter case. Elab_All_Desirable, -- This is just like Elab_All, except that the elaborate all was not -- explicitly present in the source, but rather was created by the -- front end, which decided that it was "desirable". Elab_Desirable, -- This is just like Elab, except that the elaborate was not -- explicitly present in the source, but rather was created by the -- front end, which decided that it was "desirable". Spec_First); -- After is a body, and Before is the corresponding spec -- Successor_Link contains the information for one link type Successor_Link is record Before : Unit_Id; -- Predecessor unit After : Unit_Id; -- Successor unit Next : Successor_Id; -- Next successor on this list Reason : Succ_Reason; -- Reason for this link Elab_Body : Boolean; -- Set True if this link is needed for the special Elaborate_Body -- processing described below. Reason_Unit : Unit_Id; -- For Reason = Elab, or Elab_All or Elab_Desirable, records the unit -- containing the pragma leading to the link. Elab_All_Link : Elab_All_Id; -- If Reason = Elab_All or Elab_Desirable, then this points to the -- first elment in a list of Elab_All entries that record the with -- chain leading resulting in this particular dependency. end record; -- Note on handling of Elaborate_Body. Basically, if we have a pragma -- Elaborate_Body in a unit, it means that the spec and body have to -- be handled as a single entity from the point of view of determining -- an elaboration order. What we do is to essentially remove the body -- from consideration completely, and transfer all its links (other -- than the spec link) to the spec. Then when then the spec gets chosen, -- we choose the body right afterwards. We mark the links that get moved -- from the body to the spec by setting their Elab_Body flag True, so -- that we can understand what is going on! Succ_First : constant := 1; package Succ is new Table.Table ( Table_Component_Type => Successor_Link, Table_Index_Type => Successor_Id, Table_Low_Bound => Succ_First, Table_Initial => 500, Table_Increment => 200, Table_Name => "Succ"); -- For the case of Elaborate_All, the following table is used to record -- chains of with relationships that lead to the Elab_All link. These -- are used solely for diagnostic purposes type Elab_All_Entry is record Needed_By : Unit_Name_Type; -- Name of unit from which referencing unit was with'ed or otherwise -- needed as a result of Elaborate_All or Elaborate_Desirable. Next_Elab : Elab_All_Id; -- Link to next entry on chain (No_Elab_All_Link marks end of list) end record; package Elab_All_Entries is new Table.Table ( Table_Component_Type => Elab_All_Entry, Table_Index_Type => Elab_All_Id, Table_Low_Bound => 1, Table_Initial => 2000, Table_Increment => 200, Table_Name => "Elab_All_Entries"); -- A Unit_Node record is built for each active unit type Unit_Node_Record is record Successors : Successor_Id; -- Pointer to list of links for successor nodes Num_Pred : Int; -- Number of predecessors for this unit. Normally non-negative, but -- can go negative in the case of units chosen by the diagnose error -- procedure (when cycles are being removed from the graph). Nextnp : Unit_Id; -- Forward pointer for list of units with no predecessors Elab_Order : Nat; -- Position in elaboration order (zero = not placed yet) Visited : Boolean; -- Used in computing transitive closure for elaborate all and -- also in locating cycles and paths in the diagnose routines. Elab_Position : Natural; -- Initialized to zero. Set non-zero when a unit is chosen and -- placed in the elaboration order. The value represents the -- ordinal position in the elaboration order. end record; package UNR is new Table.Table ( Table_Component_Type => Unit_Node_Record, Table_Index_Type => Unit_Id, Table_Low_Bound => First_Unit_Entry, Table_Initial => 500, Table_Increment => 200, Table_Name => "UNR"); No_Pred : Unit_Id; -- Head of list of items with no predecessors Num_Left : Int; -- Number of entries not yet dealt with Cur_Unit : Unit_Id; -- Current unit, set by Gather_Dependencies, and picked up in Build_Link -- to set the Reason_Unit field of the created dependency link. Num_Chosen : Natural := 0; -- Number of units chosen in the elaboration order so far ----------------------- -- Local Subprograms -- ----------------------- function Better_Choice (U1, U2 : Unit_Id) return Boolean; -- U1 and U2 are both permitted candidates for selection as the next unit -- to be elaborated. This function determines whether U1 is a better choice -- than U2, i.e. should be elaborated in preference to U2, based on a set -- of heuristics that establish a friendly and predictable order (see body -- for details). The result is True if U1 is a better choice than U2, and -- False if it is a worse choice, or there is no preference between them. procedure Build_Link (Before : Unit_Id; After : Unit_Id; R : Succ_Reason; Ea_Id : Elab_All_Id := No_Elab_All_Link); -- Establish a successor link, Before must be elaborated before After, -- and the reason for the link is R. Ea_Id is the contents to be placed -- in the Elab_All_Link of the entry. procedure Choose (Chosen : Unit_Id); -- Chosen is the next entry chosen in the elaboration order. This -- procedure updates all data structures appropriately. function Corresponding_Body (U : Unit_Id) return Unit_Id; pragma Inline (Corresponding_Body); -- Given a unit which is a spec for which there is a separate body, -- return the unit id of the body. It is an error to call this routine -- with a unit that is not a spec, or which does not have a separate body. function Corresponding_Spec (U : Unit_Id) return Unit_Id; pragma Inline (Corresponding_Spec); -- Given a unit which is a body for which there is a separate spec, -- return the unit id of the spec. It is an error to call this routine -- with a unit that is not a body, or which does not have a separate spec. procedure Diagnose_Elaboration_Problem; -- Called when no elaboration order can be found. Outputs an appropriate -- diagnosis of the problem, and then abandons the bind. procedure Elab_All_Links (Before : Unit_Id; After : Unit_Id; Reason : Succ_Reason; Link : Elab_All_Id); -- Used to compute the transitive closure of elaboration links for an -- Elaborate_All pragma (Reason = Elab_All) or for an indication of -- Elaborate_All_Desirable (Reason = Elab_All_Desirable). Unit After has -- a pragma Elaborate_All or the front end has determined that a reference -- probably requires Elaborate_All is required, and unit Before must be -- previously elaborated. First a link is built making sure that unit -- Before is elaborated before After, then a recursive call ensures that -- we also build links for any units needed by Before (i.e. these units -- must/should also be elaborated before After). Link is used to build -- a chain of Elab_All_Entries to explain the reason for a link. The -- value passed is the chain so far. procedure Elab_Error_Msg (S : Successor_Id); -- Given a successor link, outputs an error message of the form -- "& must be elaborated before & ..." where ... is the reason. procedure Gather_Dependencies; -- Compute dependencies, building the Succ and UNR tables function Make_Elab_Entry (Unam : Unit_Name_Type; Link : Elab_All_Id) return Elab_All_Id; -- Make an Elab_All_Entries table entry with the given Unam and Link function Unit_Id_Of (Uname : Unit_Name_Type) return Unit_Id; -- This function uses the Info field set in the names table to obtain -- the unit Id of a unit, given its name id value. function Worse_Choice (U1, U2 : Unit_Id) return Boolean; -- This is like Better_Choice, and has the same interface, but returns -- true if U1 is a worse choice than U2 in the sense of the -h (horrible -- elaboration order) switch. We still have to obey Ada rules, so it is -- not quite the direct inverse of Better_Choice. procedure Write_Dependencies; -- Write out dependencies (called only if appropriate option is set) procedure Write_Elab_All_Chain (S : Successor_Id); -- If the reason for the link S is Elaborate_All or Elaborate_Desirable, -- then this routine will output the "needed by" explanation chain. ------------------- -- Better_Choice -- ------------------- function Better_Choice (U1, U2 : Unit_Id) return Boolean is function Body_Unit (U : Unit_Id) return Boolean; -- Determines if given unit is a body function Waiting_Body (U : Unit_Id) return Boolean; -- Determines if U is a waiting body, defined as a body which has -- not been elaborated, but whose spec has been elaborated. function Body_Unit (U : Unit_Id) return Boolean is begin return Units.Table (U).Utype = Is_Body or else Units.Table (U).Utype = Is_Body_Only; end Body_Unit; function Waiting_Body (U : Unit_Id) return Boolean is begin return Units.Table (U).Utype = Is_Body and then UNR.Table (Corresponding_Spec (U)).Elab_Position /= 0; end Waiting_Body; -- Start of processing for Better_Choice -- Note: the checks here are applied in sequence, and the ordering is -- significant (i.e. the more important criteria are applied first). begin -- Prefer a waiting body to any other case if Waiting_Body (U1) and not Waiting_Body (U2) then return True; elsif Waiting_Body (U2) and not Waiting_Body (U1) then return False; -- Prefer a predefined unit to a non-predefined unit elsif Units.Table (U1).Predefined and not Units.Table (U2).Predefined then return True; elsif Units.Table (U2).Predefined and not Units.Table (U1).Predefined then return False; -- Prefer an internal unit to a non-internal unit elsif Units.Table (U1).Internal and not Units.Table (U2).Internal then return True; elsif Units.Table (U2).Internal and not Units.Table (U1).Internal then return False; -- Prefer a body to a spec elsif Body_Unit (U1) and not Body_Unit (U2) then return True; elsif Body_Unit (U2) and not Body_Unit (U1) then return False; -- If both are waiting bodies, then prefer the one whose spec is -- more recently elaborated. Consider the following: -- spec of A -- spec of B -- body of A or B? -- The normal waiting body preference would have placed the body of -- A before the spec of B if it could. Since it could not, there it -- must be the case that A depends on B. It is therefore a good idea -- to put the body of B first. elsif Waiting_Body (U1) and then Waiting_Body (U2) then return UNR.Table (Corresponding_Spec (U1)).Elab_Position > UNR.Table (Corresponding_Spec (U2)).Elab_Position; -- Otherwise decide on the basis of alphabetical order else return Uname_Less (Units.Table (U1).Uname, Units.Table (U2).Uname); end if; end Better_Choice; ---------------- -- Build_Link -- ---------------- procedure Build_Link (Before : Unit_Id; After : Unit_Id; R : Succ_Reason; Ea_Id : Elab_All_Id := No_Elab_All_Link) is Cspec : Unit_Id; begin Succ.Increment_Last; Succ.Table (Succ.Last).Before := Before; Succ.Table (Succ.Last).Next := UNR.Table (Before).Successors; UNR.Table (Before).Successors := Succ.Last; Succ.Table (Succ.Last).Reason := R; Succ.Table (Succ.Last).Reason_Unit := Cur_Unit; Succ.Table (Succ.Last).Elab_All_Link := Ea_Id; -- Deal with special Elab_Body case. If the After of this link is -- a body whose spec has Elaborate_All set, and this is not the link -- directly from the body to the spec, then we make the After of the -- link reference its spec instead, marking the link appropriately. if Units.Table (After).Utype = Is_Body then Cspec := Corresponding_Spec (After); if Units.Table (Cspec).Elaborate_Body and then Cspec /= Before then Succ.Table (Succ.Last).After := Cspec; Succ.Table (Succ.Last).Elab_Body := True; UNR.Table (Cspec).Num_Pred := UNR.Table (Cspec).Num_Pred + 1; return; end if; end if; -- Fall through on normal case Succ.Table (Succ.Last).After := After; Succ.Table (Succ.Last).Elab_Body := False; UNR.Table (After).Num_Pred := UNR.Table (After).Num_Pred + 1; end Build_Link; ------------ -- Choose -- ------------ procedure Choose (Chosen : Unit_Id) is S : Successor_Id; U : Unit_Id; begin if Debug_Flag_C then Write_Str ("Choosing Unit "); Write_Unit_Name (Units.Table (Chosen).Uname); Write_Eol; end if; -- Add to elaboration order. Note that units having no elaboration -- code are not treated specially yet. The special casing of this -- is in Bindgen, where Gen_Elab_Calls skips over them. Meanwhile -- we need them here, because the object file list is also driven -- by the contents of the Elab_Order table. Elab_Order.Increment_Last; Elab_Order.Table (Elab_Order.Last) := Chosen; -- Remove from No_Pred list. This is a little inefficient and may -- be we should doubly link the list, but it will do for now! if No_Pred = Chosen then No_Pred := UNR.Table (Chosen).Nextnp; else -- Note that we just ignore the situation where it does not -- appear in the No_Pred list, this happens in calls from the -- Diagnose_Elaboration_Problem routine, where cycles are being -- removed arbitrarily from the graph. U := No_Pred; while U /= No_Unit_Id loop if UNR.Table (U).Nextnp = Chosen then UNR.Table (U).Nextnp := UNR.Table (Chosen).Nextnp; exit; end if; U := UNR.Table (U).Nextnp; end loop; end if; -- For all successors, decrement the number of predecessors, and -- if it becomes zero, then add to no predecessor list. S := UNR.Table (Chosen).Successors; while S /= No_Successor loop U := Succ.Table (S).After; UNR.Table (U).Num_Pred := UNR.Table (U).Num_Pred - 1; if Debug_Flag_N then Write_Str (" decrementing Num_Pred for unit "); Write_Unit_Name (Units.Table (U).Uname); Write_Str (" new value = "); Write_Int (Int (UNR.Table (U).Num_Pred)); Write_Eol; end if; if UNR.Table (U).Num_Pred = 0 then UNR.Table (U).Nextnp := No_Pred; No_Pred := U; end if; S := Succ.Table (S).Next; end loop; -- All done, adjust number of units left count and set elaboration pos Num_Left := Num_Left - 1; Num_Chosen := Num_Chosen + 1; UNR.Table (Chosen).Elab_Position := Num_Chosen; Units.Table (Chosen).Elab_Position := Num_Chosen; -- If we just chose a spec with Elaborate_Body set, then we -- must immediately elaborate the body, before any other units. if Units.Table (Chosen).Elaborate_Body then -- If the unit is a spec only, then there is no body. This is a bit -- odd given that Elaborate_Body is here, but it is valid in an -- RCI unit, where we only have the interface in the stub bind. if Units.Table (Chosen).Utype = Is_Spec_Only and then Units.Table (Chosen).RCI then null; else Choose (Corresponding_Body (Chosen)); end if; end if; end Choose; ------------------------ -- Corresponding_Body -- ------------------------ -- Currently if the body and spec are separate, then they appear as -- two separate units in the same ALI file, with the body appearing -- first and the spec appearing second. function Corresponding_Body (U : Unit_Id) return Unit_Id is begin pragma Assert (Units.Table (U).Utype = Is_Spec); return U - 1; end Corresponding_Body; ------------------------ -- Corresponding_Spec -- ------------------------ -- Currently if the body and spec are separate, then they appear as -- two separate units in the same ALI file, with the body appearing -- first and the spec appearing second. function Corresponding_Spec (U : Unit_Id) return Unit_Id is begin pragma Assert (Units.Table (U).Utype = Is_Body); return U + 1; end Corresponding_Spec; ---------------------------------- -- Diagnose_Elaboration_Problem -- ---------------------------------- procedure Diagnose_Elaboration_Problem is function Find_Path (Ufrom, Uto : Unit_Id; ML : Nat) return Boolean; -- Recursive routine used to find a path from node Ufrom to node Uto. -- If a path exists, returns True and outputs an appropriate set of -- error messages giving the path. Also calls Choose for each of the -- nodes so that they get removed from the remaining set. There are -- two cases of calls, either Ufrom = Uto for an attempt to find a -- cycle, or Ufrom is a spec and Uto the corresponding body for the -- case of an unsatisfiable Elaborate_Body pragma. ML is the minimum -- acceptable length for a path. --------------- -- Find_Path -- --------------- function Find_Path (Ufrom, Uto : Unit_Id; ML : Nat) return Boolean is function Find_Link (U : Unit_Id; PL : Nat) return Boolean; -- This is the inner recursive routine, it determines if a path -- exists from U to Uto, and if so returns True and outputs the -- appropriate set of error messages. PL is the path length --------------- -- Find_Link -- --------------- function Find_Link (U : Unit_Id; PL : Nat) return Boolean is S : Successor_Id; begin -- Recursion ends if we are at terminating node and the path -- is sufficiently long, generate error message and return True. if U = Uto and then PL >= ML then Choose (U); return True; -- All done if already visited, otherwise mark as visited elsif UNR.Table (U).Visited then return False; -- Otherwise mark as visited and look at all successors else UNR.Table (U).Visited := True; S := UNR.Table (U).Successors; while S /= No_Successor loop if Find_Link (Succ.Table (S).After, PL + 1) then Elab_Error_Msg (S); Choose (U); return True; end if; S := Succ.Table (S).Next; end loop; -- Falling through means this does not lead to a path return False; end if; end Find_Link; -- Start of processing for Find_Path begin -- Initialize all non-chosen nodes to not visisted yet for U in Units.First .. Units.Last loop UNR.Table (U).Visited := UNR.Table (U).Elab_Position /= 0; end loop; -- Now try to find the path return Find_Link (Ufrom, 0); end Find_Path; -- Start of processing for Diagnose_Elaboration_Error begin Set_Standard_Error; -- Output state of things if debug flag N set if Debug_Flag_N then declare NP : Int; begin Write_Eol; Write_Eol; Write_Str ("Diagnose_Elaboration_Problem called"); Write_Eol; Write_Str ("List of remaining unchosen units and predecessors"); Write_Eol; for U in Units.First .. Units.Last loop if UNR.Table (U).Elab_Position = 0 then NP := UNR.Table (U).Num_Pred; Write_Eol; Write_Str (" Unchosen unit: #"); Write_Int (Int (U)); Write_Str (" "); Write_Unit_Name (Units.Table (U).Uname); Write_Str (" (Num_Pred = "); Write_Int (NP); Write_Char (')'); Write_Eol; if NP = 0 then if Units.Table (U).Elaborate_Body then Write_Str (" (not chosen because of Elaborate_Body)"); Write_Eol; else Write_Str (" ****************** why not chosen?"); Write_Eol; end if; end if; -- Search links list to find unchosen predecessors for S in Succ.First .. Succ.Last loop declare SL : Successor_Link renames Succ.Table (S); begin if SL.After = U and then UNR.Table (SL.Before).Elab_Position = 0 then Write_Str (" unchosen predecessor: #"); Write_Int (Int (SL.Before)); Write_Str (" "); Write_Unit_Name (Units.Table (SL.Before).Uname); Write_Eol; NP := NP - 1; end if; end; end loop; if NP /= 0 then Write_Str (" **************** Num_Pred value wrong!"); Write_Eol; end if; end if; end loop; end; end if; -- Output the header for the error, and manually increment the -- error count. We are using Error_Msg_Output rather than Error_Msg -- here for two reasons: -- This is really only one error, not one for each line -- We want this output on standard output since it is voluminous -- But we do need to deal with the error count manually in this case Errors_Detected := Errors_Detected + 1; Error_Msg_Output ("elaboration circularity detected", Info => False); -- Try to find cycles starting with any of the remaining nodes that have -- not yet been chosen. There must be at least one (there is some reason -- we are being called!) for U in Units.First .. Units.Last loop if UNR.Table (U).Elab_Position = 0 then if Find_Path (U, U, 1) then raise Unrecoverable_Error; end if; end if; end loop; -- We should never get here, since we were called for some reason, -- and we should have found and eliminated at least one bad path. raise Program_Error; end Diagnose_Elaboration_Problem; -------------------- -- Elab_All_Links -- -------------------- procedure Elab_All_Links (Before : Unit_Id; After : Unit_Id; Reason : Succ_Reason; Link : Elab_All_Id) is begin if UNR.Table (Before).Visited then return; end if; -- Build the direct link for Before UNR.Table (Before).Visited := True; Build_Link (Before, After, Reason, Link); -- Process all units with'ed by Before recursively for W in Units.Table (Before).First_With .. Units.Table (Before).Last_With loop -- Skip if this with is an interface to a stand-alone library. -- Skip also if no ALI file for this with, happens with certain -- specialized generic files that do not get compiled. if not Withs.Table (W).SAL_Interface and then Withs.Table (W).Afile /= No_File and then Generic_Separately_Compiled (Withs.Table (W).Sfile) then Elab_All_Links (Unit_Id_Of (Withs.Table (W).Uname), After, Reason, Make_Elab_Entry (Withs.Table (W).Uname, Link)); end if; end loop; -- Process corresponding body, if there is one if Units.Table (Before).Utype = Is_Spec then Elab_All_Links (Corresponding_Body (Before), After, Reason, Make_Elab_Entry (Units.Table (Corresponding_Body (Before)).Uname, Link)); end if; end Elab_All_Links; -------------------- -- Elab_Error_Msg -- -------------------- procedure Elab_Error_Msg (S : Successor_Id) is SL : Successor_Link renames Succ.Table (S); begin -- Nothing to do if internal unit involved and no -da flag if not Debug_Flag_A and then (Is_Internal_File_Name (Units.Table (SL.Before).Sfile) or else Is_Internal_File_Name (Units.Table (SL.After).Sfile)) then return; end if; -- Here we want to generate output Error_Msg_Name_1 := Units.Table (SL.Before).Uname; if SL.Elab_Body then Error_Msg_Name_2 := Units.Table (Corresponding_Body (SL.After)).Uname; else Error_Msg_Name_2 := Units.Table (SL.After).Uname; end if; Error_Msg_Output (" & must be elaborated before &", Info => True); Error_Msg_Name_1 := Units.Table (SL.Reason_Unit).Uname; case SL.Reason is when Withed => Error_Msg_Output (" reason: with clause", Info => True); when Elab => Error_Msg_Output (" reason: pragma Elaborate in unit &", Info => True); when Elab_All => Error_Msg_Output (" reason: pragma Elaborate_All in unit &", Info => True); when Elab_All_Desirable => Error_Msg_Output (" reason: implicit Elaborate_All in unit &", Info => True); Error_Msg_Output (" recompile & with -gnatwl for full details", Info => True); when Elab_Desirable => Error_Msg_Output (" reason: implicit Elaborate in unit &", Info => True); Error_Msg_Output (" recompile & with -gnatwl for full details", Info => True); when Spec_First => Error_Msg_Output (" reason: spec always elaborated before body", Info => True); end case; Write_Elab_All_Chain (S); if SL.Elab_Body then Error_Msg_Name_1 := Units.Table (SL.Before).Uname; Error_Msg_Name_2 := Units.Table (SL.After).Uname; Error_Msg_Output (" & must therefore be elaborated before &", True); Error_Msg_Name_1 := Units.Table (SL.After).Uname; Error_Msg_Output (" (because & has a pragma Elaborate_Body)", True); end if; Write_Eol; end Elab_Error_Msg; --------------------- -- Find_Elab_Order -- --------------------- procedure Find_Elab_Order is U : Unit_Id; Best_So_Far : Unit_Id; begin Succ.Init; Num_Left := Int (Units.Last - Units.First + 1); -- Initialize unit table for elaboration control for U in Units.First .. Units.Last loop UNR.Increment_Last; UNR.Table (UNR.Last).Successors := No_Successor; UNR.Table (UNR.Last).Num_Pred := 0; UNR.Table (UNR.Last).Nextnp := No_Unit_Id; UNR.Table (UNR.Last).Elab_Order := 0; UNR.Table (UNR.Last).Elab_Position := 0; end loop; -- Output warning if -p used with no -gnatE units if Pessimistic_Elab_Order and not Dynamic_Elaboration_Checks_Specified then if OpenVMS_On_Target then Error_Msg ("?use of /PESSIMISTIC_ELABORATION questionable"); else Error_Msg ("?use of -p switch questionable"); end if; Error_Msg ("?since all units compiled with static elaboration model"); end if; -- Gather dependencies and output them if option set Gather_Dependencies; -- Output elaboration dependencies if option is set if Elab_Dependency_Output or Debug_Flag_E then Write_Dependencies; end if; -- Initialize the no predecessor list No_Pred := No_Unit_Id; for U in UNR.First .. UNR.Last loop if UNR.Table (U).Num_Pred = 0 then UNR.Table (U).Nextnp := No_Pred; No_Pred := U; end if; end loop; -- OK, now we determine the elaboration order proper. All we do is to -- select the best choice from the no predecessor list until all the -- nodes have been chosen. Outer : loop -- If there are no nodes with predecessors, then either we are -- done, as indicated by Num_Left being set to zero, or we have -- a circularity. In the latter case, diagnose the circularity, -- removing it from the graph and continue Get_No_Pred : while No_Pred = No_Unit_Id loop exit Outer when Num_Left < 1; Diagnose_Elaboration_Problem; end loop Get_No_Pred; U := No_Pred; Best_So_Far := No_Unit_Id; -- Loop to choose best entry in No_Pred list No_Pred_Search : loop if Debug_Flag_N then Write_Str (" considering choice of "); Write_Unit_Name (Units.Table (U).Uname); Write_Eol; if Units.Table (U).Elaborate_Body then Write_Str (" Elaborate_Body = True, Num_Pred for body = "); Write_Int (Int (UNR.Table (Corresponding_Body (U)).Num_Pred)); else Write_Str (" Elaborate_Body = False"); end if; Write_Eol; end if; -- This is a candididate to be considered for choice if Best_So_Far = No_Unit_Id or else ((not Pessimistic_Elab_Order) and then Better_Choice (U, Best_So_Far)) or else (Pessimistic_Elab_Order and then Worse_Choice (U, Best_So_Far)) then if Debug_Flag_N then Write_Str (" tentatively chosen (best so far)"); Write_Eol; end if; Best_So_Far := U; end if; U := UNR.Table (U).Nextnp; exit No_Pred_Search when U = No_Unit_Id; end loop No_Pred_Search; -- If no candididate chosen, it means that no unit has No_Pred = 0, -- but there are units left, hence we have a circular dependency, -- which we will get Diagnose_Elaboration_Problem to diagnose it. if Best_So_Far = No_Unit_Id then Diagnose_Elaboration_Problem; -- Otherwise choose the best candidate found else Choose (Best_So_Far); end if; end loop Outer; end Find_Elab_Order; ------------------------- -- Gather_Dependencies -- ------------------------- procedure Gather_Dependencies is Withed_Unit : Unit_Id; begin -- Loop through all units for U in Units.First .. Units.Last loop Cur_Unit := U; -- If this is not an interface to a stand-alone library and -- there is a body and a spec, then spec must be elaborated first -- Note that the corresponding spec immediately follows the body if not Units.Table (U).SAL_Interface and then Units.Table (U).Utype = Is_Body then Build_Link (Corresponding_Spec (U), U, Spec_First); end if; -- If this unit is not an interface to a stand-alone library, -- process WITH references for this unit ignoring generic units and -- interfaces to stand-alone libraries. if not Units.Table (U).SAL_Interface then for W in Units.Table (U).First_With .. Units.Table (U).Last_With loop if Withs.Table (W).Sfile /= No_File and then (not Withs.Table (W).SAL_Interface) then -- Check for special case of withing a unit that does not -- exist any more. If the unit was completely missing we -- would already have detected this, but a nasty case arises -- when we have a subprogram body with no spec, and some -- obsolete unit with's a previous (now disappeared) spec. if Get_Name_Table_Info (Withs.Table (W).Uname) = 0 then Error_Msg_Name_1 := Units.Table (U).Sfile; Error_Msg_Name_2 := Withs.Table (W).Uname; Error_Msg ("% depends on & which no longer exists"); goto Next_With; end if; Withed_Unit := Unit_Id (Unit_Id_Of (Withs.Table (W).Uname)); -- Pragma Elaborate_All case, for this we use the recursive -- Elab_All_Links procedure to establish the links. if Withs.Table (W).Elaborate_All then -- Reset flags used to stop multiple visits to a given -- node. for Uref in UNR.First .. UNR.Last loop UNR.Table (Uref).Visited := False; end loop; -- Now establish all the links we need Elab_All_Links (Withed_Unit, U, Elab_All, Make_Elab_Entry (Withs.Table (W).Uname, No_Elab_All_Link)); -- Elaborate_All_Desirable case, for this we establish -- the same links as above, but with a different reason. elsif Withs.Table (W).Elab_All_Desirable then -- Reset flags used to stop multiple visits to a given -- node. for Uref in UNR.First .. UNR.Last loop UNR.Table (Uref).Visited := False; end loop; -- Now establish all the links we need Elab_All_Links (Withed_Unit, U, Elab_All_Desirable, Make_Elab_Entry (Withs.Table (W).Uname, No_Elab_All_Link)); -- Pragma Elaborate case. We must build a link for the -- withed unit itself, and also the corresponding body -- if there is one. -- However, skip this processing if there is no ALI file -- for the WITH entry, because this means it is a -- generic (even when we fix the generics so that an ALI -- file is present, we probably still will have no ALI -- file for unchecked and other special cases). elsif Withs.Table (W).Elaborate and then Withs.Table (W).Afile /= No_File then Build_Link (Withed_Unit, U, Withed); if Units.Table (Withed_Unit).Utype = Is_Spec then Build_Link (Corresponding_Body (Withed_Unit), U, Elab); end if; -- Elaborate_Desirable case, for this we establish -- the same links as above, but with a different reason. elsif Withs.Table (W).Elab_Desirable then Build_Link (Withed_Unit, U, Withed); if Units.Table (Withed_Unit).Utype = Is_Spec then Build_Link (Corresponding_Body (Withed_Unit), U, Elab_Desirable); end if; -- Case of normal WITH with no elaboration pragmas, just -- build the single link to the directly referenced unit else Build_Link (Withed_Unit, U, Withed); end if; end if; <<Next_With>> null; end loop; end if; end loop; end Gather_Dependencies; --------------------- -- Make_Elab_Entry -- --------------------- function Make_Elab_Entry (Unam : Unit_Name_Type; Link : Elab_All_Id) return Elab_All_Id is begin Elab_All_Entries.Increment_Last; Elab_All_Entries.Table (Elab_All_Entries.Last).Needed_By := Unam; Elab_All_Entries.Table (Elab_All_Entries.Last).Next_Elab := Link; return Elab_All_Entries.Last; end Make_Elab_Entry; ---------------- -- Unit_Id_Of -- ---------------- function Unit_Id_Of (Uname : Unit_Name_Type) return Unit_Id is Info : constant Int := Get_Name_Table_Info (Uname); begin pragma Assert (Info /= 0 and then Unit_Id (Info) /= No_Unit_Id); return Unit_Id (Info); end Unit_Id_Of; ------------------ -- Worse_Choice -- ------------------ function Worse_Choice (U1, U2 : Unit_Id) return Boolean is function Body_Unit (U : Unit_Id) return Boolean; -- Determines if given unit is a body function Waiting_Body (U : Unit_Id) return Boolean; -- Determines if U is a waiting body, defined as a body which has -- not been elaborated, but whose spec has been elaborated. --------------- -- Body_Unit -- --------------- function Body_Unit (U : Unit_Id) return Boolean is begin return Units.Table (U).Utype = Is_Body or else Units.Table (U).Utype = Is_Body_Only; end Body_Unit; ------------------ -- Waiting_Body -- ------------------ function Waiting_Body (U : Unit_Id) return Boolean is begin return Units.Table (U).Utype = Is_Body and then UNR.Table (Corresponding_Spec (U)).Elab_Position /= 0; end Waiting_Body; -- Start of processing for Worse_Choice begin -- Note: the checks here are applied in sequence, and the ordering is -- significant (i.e. the more important criteria are applied first). -- If either unit is internal, then use Better_Choice, since the -- language requires that predefined units not mess up in the choice -- of elaboration order, and for internal units, any problems are -- ours and not the programmers. if Units.Table (U1).Internal or else Units.Table (U2).Internal then return Better_Choice (U1, U2); -- Prefer anything else to a waiting body (!) elsif Waiting_Body (U1) and not Waiting_Body (U2) then return False; elsif Waiting_Body (U2) and not Waiting_Body (U1) then return True; -- Prefer a spec to a body (!) elsif Body_Unit (U1) and not Body_Unit (U2) then return False; elsif Body_Unit (U2) and not Body_Unit (U1) then return True; -- If both are waiting bodies, then prefer the one whose spec is -- less recently elaborated. Consider the following: -- spec of A -- spec of B -- body of A or B? -- The normal waiting body preference would have placed the body of -- A before the spec of B if it could. Since it could not, there it -- must be the case that A depends on B. It is therefore a good idea -- to put the body of B last so that if there is an elaboration order -- problem, we will find it (that's what horrible order is about) elsif Waiting_Body (U1) and then Waiting_Body (U2) then return UNR.Table (Corresponding_Spec (U1)).Elab_Position < UNR.Table (Corresponding_Spec (U2)).Elab_Position; -- Otherwise decide on the basis of alphabetical order. We do not try -- to reverse the usual choice here, since it can cause cancelling -- errors with the other inversions. else return Uname_Less (Units.Table (U1).Uname, Units.Table (U2).Uname); end if; end Worse_Choice; ------------------------ -- Write_Dependencies -- ------------------------ procedure Write_Dependencies is begin Write_Eol; Write_Str (" ELABORATION ORDER DEPENDENCIES"); Write_Eol; Write_Eol; Info_Prefix_Suppress := True; for S in Succ_First .. Succ.Last loop Elab_Error_Msg (S); end loop; Info_Prefix_Suppress := False; Write_Eol; end Write_Dependencies; -------------------------- -- Write_Elab_All_Chain -- -------------------------- procedure Write_Elab_All_Chain (S : Successor_Id) is ST : constant Successor_Link := Succ.Table (S); After : constant Unit_Name_Type := Units.Table (ST.After).Uname; L : Elab_All_Id; Nam : Unit_Name_Type; First_Name : Boolean := True; begin if ST.Reason in Elab_All .. Elab_All_Desirable then L := ST.Elab_All_Link; while L /= No_Elab_All_Link loop Nam := Elab_All_Entries.Table (L).Needed_By; Error_Msg_Name_1 := Nam; Error_Msg_Output (" &", Info => True); Get_Name_String (Nam); if Name_Buffer (Name_Len) = 'b' then if First_Name then Error_Msg_Output (" must be elaborated along with its spec:", Info => True); else Error_Msg_Output (" which must be elaborated " & "along with its spec:", Info => True); end if; else if First_Name then Error_Msg_Output (" is withed by:", Info => True); else Error_Msg_Output (" which is withed by:", Info => True); end if; end if; First_Name := False; L := Elab_All_Entries.Table (L).Next_Elab; end loop; Error_Msg_Name_1 := After; Error_Msg_Output (" &", Info => True); end if; end Write_Elab_All_Chain; end Binde;
-- Portable pixmap format (PPM) -- Portable graymap format (PGM) -- Portable bitmap format (PBM) private package GID.Decoding_PNM is -------------------- -- Image decoding -- -------------------- generic type Primary_color_range is mod <>; with procedure Set_X_Y (x, y: Natural); with procedure Put_Pixel ( red, green, blue : Primary_color_range; alpha : Primary_color_range ); with procedure Feedback (percents: Natural); -- procedure Load (image: in out Image_descriptor); function Get_Token( stream : Stream_Access; needs_EOL : Boolean:= False; single_char : Boolean:= False ) return String; function Get_Integer( stream : Stream_Access; needs_EOL : Boolean:= False; single_char : Boolean:= False ) return Integer; function Get_Positive_32( stream : Stream_Access; needs_EOL : Boolean:= False; single_char : Boolean:= False ) return Positive_32; end GID.Decoding_PNM;
----------------------------------------------------------------------- -- gen-artifacts-distribs-libs -- Unix shared library extraction and distribution -- Copyright (C) 2012, 2018, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Directories; with Util.Log.Loggers; with Util.Streams.Pipes; with Util.Streams.Texts; with Util.Beans.Objects; with Util.Files; with EL.Variables.Default; with EL.Contexts.Default; with Gen.Utils; package body Gen.Artifacts.Distribs.Libs is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Gen.Artifacts.Distribs.Exec"); -- ------------------------------ -- Create a distribution rule to extract the shared libraries used by an executable -- and copy a selected subset in the target directory. -- ------------------------------ function Create_Rule (Node : in DOM.Core.Node) return Distrib_Rule_Access is procedure Collect_Libraries (Rule : in out Libs_Rule'Class; Node : in DOM.Core.Node); -- ------------------------------ -- Collect the library patterns for the distribution rule. -- ------------------------------ procedure Collect_Libraries (Rule : in out Libs_Rule'Class; Node : in DOM.Core.Node) is Name : constant String := Gen.Utils.Get_Data_Content (Node); begin Rule.Libraries.Append (Name); end Collect_Libraries; procedure Iterate is new Gen.Utils.Iterate_Nodes (T => Libs_Rule'Class, Process => Collect_Libraries); Ctx : EL.Contexts.Default.Default_Context; Command : constant String := Gen.Utils.Get_Data_Content (Node, "command"); Result : constant Libs_Rule_Access := new Libs_Rule; begin if Command = "" then Result.Command := EL.Expressions.Create_Expression ("ldd #{src}", Ctx); else Result.Command := EL.Expressions.Create_Expression (Command, Ctx); end if; Iterate (Result.all, Node, "library"); return Result.all'Access; end Create_Rule; -- ------------------------------ -- Get a name to qualify the installation rule (used for logs). -- ------------------------------ overriding function Get_Install_Name (Rule : in Libs_Rule) return String is pragma Unreferenced (Rule); begin return "libs"; end Get_Install_Name; -- ------------------------------ -- Get the target path associate with the given source file for the distribution rule. -- ------------------------------ overriding function Get_Target_Path (Rule : in Libs_Rule; Base : in String; File : in File_Record) return String is pragma Unreferenced (File); Dir : constant String := Ada.Strings.Unbounded.To_String (Rule.Dir); begin return Util.Files.Compose (Base, Dir); end Get_Target_Path; -- ------------------------------ -- Check if the library whose absolute path is defined in <b>Source</b> must be -- copied in the target directory and copy that library if needed. -- ------------------------------ procedure Copy (Rule : in Libs_Rule; Dir : in String; Source : in String) is Name : constant String := Ada.Directories.Simple_Name (Source); Path : constant String := Ada.Directories.Compose (Dir, Name); Iter : Util.Strings.Vectors.Cursor := Rule.Libraries.First; Found : Boolean := not Util.Strings.Vectors.Has_Element (Iter); begin Log.Debug ("Checking library {0}", Path); while not Found and then Util.Strings.Vectors.Has_Element (Iter) loop declare Lib : constant String := Util.Strings.Vectors.Element (Iter); Matcher : constant GNAT.Regpat.Pattern_Matcher := Make_Regexp (Lib); begin Found := GNAT.Regpat.Match (Matcher, Name); end; Util.Strings.Vectors.Next (Iter); end loop; if Found then Log.Info ("Copy {0} To {1}", Source, Path); -- Make sure the target directory exists. Ada.Directories.Create_Path (Dir); Ada.Directories.Copy_File (Source_Name => Source, Target_Name => Path, Form => "preserve=all_attributes, mode=overwrite"); end if; end Copy; overriding procedure Install (Rule : in Libs_Rule; Path : in String; Files : in File_Vector; Context : in out Generator'Class) is Ctx : EL.Contexts.Default.Default_Context; Variables : aliased EL.Variables.Default.Default_Variable_Mapper; Source : constant String := Get_Source_Path (Files); begin if Rule.Level >= Util.Log.INFO_LEVEL then Log.Info ("install {0} to {1}", Source, Path); end if; Variables.Bind ("src", Util.Beans.Objects.To_Object (Source)); Ctx.Set_Variable_Mapper (Variables'Unchecked_Access); declare Cmd : constant Util.Beans.Objects.Object := Rule.Command.Get_Value (Ctx); Command : constant String := Util.Beans.Objects.To_String (Cmd); Pipe : aliased Util.Streams.Pipes.Pipe_Stream; Reader : Util.Streams.Texts.Reader_Stream; begin -- Execute 'ldd' with the executable and read the output to extract the library path. -- Lines have the form: -- libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb758a000) -- and we extract the absolute path to make the copy. Pipe.Open (Command); Reader.Initialize (Pipe'Unchecked_Access); while not Reader.Is_Eof loop declare Line : Ada.Strings.Unbounded.Unbounded_String; Pos : Natural; Last : Natural; begin Reader.Read_Line (Line, True); Pos := Ada.Strings.Unbounded.Index (Line, "=> "); if Pos > 0 then Pos := Pos + 3; Last := Ada.Strings.Unbounded.Index (Line, " ", Pos); if Last = 0 then Last := Ada.Strings.Unbounded.Length (Line); else Last := Last - 1; end if; if Pos < Last then Rule.Copy (Path, Ada.Strings.Unbounded.Slice (Line, Pos, Last)); end if; end if; end; end loop; Pipe.Close; if Pipe.Get_Exit_Status /= 0 then Context.Error ("Command {0} exited with status {1}", Command, Integer'Image (Pipe.Get_Exit_Status)); end if; end; end Install; end Gen.Artifacts.Distribs.Libs;
------------------------------------------------------------------------- -- GL.Frustum -- -- Copyright (c) Gautier de Montmollin/Rod Kay 2001 .. 2007 -- CH - 8810 Horgen -- SWITZERLAND -- -- Permission granted to: -- 1/ use this library, without any warranty, for any purpose; -- 2/ modify this library's sources (specification, body of this -- package and of child packages on which it depends) in any -- way, with an appropriate commenting of changes; -- 3/ copy and distribute this library's sources without restriction, -- provided this copyright note remains attached and unmodified. ------------------------------------------------------------------------- with GL.Geometry; package GL.Frustums is type plane_Id is (Left, Right, High, Low, Near, Far); type plane_Array is array (plane_Id) of GL.Geometry.Plane; procedure Normalise (the_Planes : in out plane_Array); function Current_Planes return plane_Array; -- -- returns the frustum planes calculated from the current GL projection and modelview matrices. end GL.Frustums;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ U T I L -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Package containing utility procedures used throughout the semantics with Einfo; use Einfo; with Types; use Types; with Uintp; use Uintp; with Urealp; use Urealp; package Sem_Util is procedure Add_Access_Type_To_Process (E : Entity_Id; A : Entity_Id); -- Add A to the list of access types to process when expanding the -- freeze node of E. function Alignment_In_Bits (E : Entity_Id) return Uint; -- If the alignment of the type or object E is currently known to the -- compiler, then this function returns the alignment value in bits. -- Otherwise Uint_0 is returned, indicating that the alignment of the -- entity is not yet known to the compiler. procedure Apply_Compile_Time_Constraint_Error (N : Node_Id; Msg : String; Ent : Entity_Id := Empty; Typ : Entity_Id := Empty; Loc : Source_Ptr := No_Location; Rep : Boolean := True); -- N is a subexpression which will raise constraint error when evaluated -- at runtime. Msg is a message that explains the reason for raising the -- exception. The last character is ? if the message is always a -- warning, even in Ada 95, and is not a ? if the message represents an -- illegality (because of violation of static expression rules) in Ada 95 -- (but not in Ada 83). Typically this routine posts all messages at -- the Sloc of node N. However, if Loc /= No_Location, Loc is the Sloc -- used to output the message. After posting the appropriate message, -- and if the flag Rep is set, this routine replaces the expression -- with an N_Raise_Constraint_Error node. This node is then marked as -- being static if the original node is static, but sets the flag -- Raises_Constraint_Error, preventing further evaluation. -- The error message may contain a } or & insertion character. -- This normally references Etype (N), unless the Ent argument is given -- explicitly, in which case it is used instead. The type of the raise -- node that is built is normally Etype (N), but if the Typ parameter -- is present, this is used instead. function Build_Actual_Subtype (T : Entity_Id; N : Node_Or_Entity_Id) return Node_Id; -- Build an anonymous subtype for an entity or expression, using the -- bounds of the entity or the discriminants of the enclosing record. -- T is the type for which the actual subtype is required, and N is either -- a defining identifier, or any subexpression. function Build_Actual_Subtype_Of_Component (T : Entity_Id; N : Node_Id) return Node_Id; -- Determine whether a selected component has a type that depends on -- discriminants, and build actual subtype for it if so. function Build_Discriminal_Subtype_Of_Component (T : Entity_Id) return Node_Id; -- Determine whether a record component has a type that depends on -- discriminants, and build actual subtype for it if so. procedure Build_Elaboration_Entity (N : Node_Id; Spec_Id : Entity_Id); -- Given a compilation unit node N, allocate an elaboration boolean for -- the compilation unit, and install it in the Elaboration_Entity field -- of Spec_Id, the entity for the compilation unit. procedure Check_Fully_Declared (T : Entity_Id; N : Node_Id); -- Verify that the full declaration of type T has been seen. If not, -- place error message on node N. Used in object declarations, type -- conversions, qualified expressions. procedure Check_Potentially_Blocking_Operation (N : Node_Id); -- N is one of the statement forms that is a potentially blocking -- operation. If it appears within a protected action, emit warning -- and raise Program_Error. procedure Check_VMS (Construct : Node_Id); -- Check that this the target is OpenVMS, and if so, return with -- no effect, otherwise post an error noting this can only be used -- with OpenVMS ports. The argument is the construct in question -- and is used to post the error message. function Collect_Primitive_Operations (T : Entity_Id) return Elist_Id; -- Called upon type derivation and extension. We scan the declarative -- part in which the type appears, and collect subprograms that have -- one subsidiary subtype of the type. These subprograms can only -- appear after the type itself. function Compile_Time_Constraint_Error (N : Node_Id; Msg : String; Ent : Entity_Id := Empty; Loc : Source_Ptr := No_Location) return Node_Id; -- Subsidiary to Apply_Compile_Time_Constraint_Error and Checks routines. -- Does not modify any nodes, but generates a warning (or error) message. -- For convenience, the function always returns its first argument. procedure Conditional_Delay (New_Ent, Old_Ent : Entity_Id); -- Sets the Has_Delayed_Freeze flag of New if the Delayed_Freeze flag -- of Old is set and Old has no yet been Frozen (i.e. Is_Frozen is false); function Current_Entity (N : Node_Id) return Entity_Id; -- Find the currently visible definition for a given identifier, that is to -- say the first entry in the visibility chain for the Chars of N. function Current_Entity_In_Scope (N : Node_Id) return Entity_Id; -- Find whether there is a previous definition for identifier N in the -- current scope. Because declarations for a scope are not necessarily -- contiguous (e.g. for packages) the first entry on the visibility chain -- for N is not necessarily in the current scope. function Current_Scope return Entity_Id; -- Get entity representing current scope function Current_Subprogram return Entity_Id; -- Returns current enclosing subprogram. If Current_Scope is a subprogram, -- then that is what is returned, otherwise the Enclosing_Subprogram of -- the Current_Scope is returned. The returned value is Empty if this -- is called from a library package which is not within any subprogram. function Defining_Entity (N : Node_Id) return Entity_Id; -- Given a declaration N, returns the associated defining entity. If -- the declaration has a specification, the entity is obtained from -- the specification. If the declaration has a defining unit name, -- then the defining entity is obtained from the defining unit name -- ignoring any child unit prefixes. function Denotes_Discriminant (N : Node_Id) return Boolean; -- Returns True if node N is an N_Identifier node for a discriminant. -- Returns False for any other kind of node, or for an N_Identifier -- node that does not denote a discriminant. function Depends_On_Discriminant (N : Node_Id) return Boolean; -- Returns True if N denotes a discriminant or if N is a range, a subtype -- indication or a scalar subtype where one of the bounds is a -- discriminant. function Designate_Same_Unit (Name1 : Node_Id; Name2 : Node_Id) return Boolean; -- Return true if Name1 and Name2 designate the same unit name; -- each of these names is supposed to be a selected component name, -- an expanded name, a defining program unit name or an identifier function Enclosing_Generic_Body (E : Entity_Id) return Node_Id; -- Returns the Node_Id associated with the innermost enclosing -- generic body, if any. If none, then returns Empty. function Enclosing_Lib_Unit_Entity return Entity_Id; -- Returns the entity of enclosing N_Compilation_Unit Node which is the -- root of the current scope (which must not be Standard_Standard, and -- the caller is responsible for ensuring this condition). function Enclosing_Lib_Unit_Node (N : Node_Id) return Node_Id; -- Returns the enclosing N_Compilation_Unit Node that is the root -- of a subtree containing N. function Enclosing_Subprogram (E : Entity_Id) return Entity_Id; -- Utility function to return the Ada entity of the subprogram enclosing -- the entity E, if any. Returns Empty if no enclosing subprogram. procedure Ensure_Freeze_Node (E : Entity_Id); -- Make sure a freeze node is allocated for entity E. If necessary, -- build and initialize a new freeze node and set Has_Delayed_Freeze -- true for entity E. procedure Enter_Name (Def_Id : Node_Id); -- Insert new name in symbol table of current scope with check for -- duplications (error message is issued if a conflict is found) -- Note: Enter_Name is not used for overloadable entities, instead -- these are entered using Sem_Ch6.Enter_Overloadable_Entity. function Find_Corresponding_Discriminant (Id : Node_Id; Typ : Entity_Id) return Entity_Id; -- Because discriminants may have different names in a generic unit -- and in an instance, they are resolved positionally when possible. -- A reference to a discriminant carries the discriminant that it -- denotes when analyzed. Subsequent uses of this id on a different -- type denote the discriminant at the same position in this new type. function First_Actual (Node : Node_Id) return Node_Id; -- Node is an N_Function_Call or N_Procedure_Call_Statement node. The -- result returned is the first actual parameter in declaration order -- (not the order of parameters as they appeared in the source, which -- can be quite different as a result of the use of named parameters). -- Empty is returned for a call with no parameters. The procedure for -- iterating through the actuals in declaration order is to use this -- function to find the first actual, and then use Next_Actual to obtain -- the next actual in declaration order. Note that the value returned -- is always the expression (not the N_Parameter_Association nodes -- even if named association is used). function Full_Qualified_Name (E : Entity_Id) return String_Id; -- Generates the string literal corresponding to the E's full qualified -- name in upper case. An ASCII.NUL is appended as the last character procedure Gather_Components (Typ : Entity_Id; Comp_List : Node_Id; Governed_By : List_Id; Into : Elist_Id; Report_Errors : out Boolean); -- The purpose of this procedure is to gather the valid components -- in a record type according to the values of its discriminants, in order -- to validate the components of a record aggregate. -- -- Typ is the type of the aggregate when its constrained discriminants -- need to be collected, otherwise it is Empty. -- -- Comp_List is an N_Component_List node. -- -- Governed_By is a list of N_Component_Association nodes, -- where each choice list contains the name of a discriminant and -- the expression field gives its value. The values of the -- discriminants governing the (possibly nested) variant parts in -- Comp_List are found in this Component_Association List. -- -- Into is the list where the valid components are appended. -- Note that Into need not be an Empty list. If it's not, components -- are attached to its tail. -- -- Report_Errors is set to True if the values of the discriminants -- are non-static. -- This procedure is also used when building a record subtype. If the -- discriminant constraint of the subtype is static, the components of the -- subtype are only those of the variants selected by the values of the -- discriminants. Otherwise all components of the parent must be included -- in the subtype for semantic analysis. function Get_Actual_Subtype (N : Node_Id) return Entity_Id; -- Given a node for an expression, obtain the actual subtype of the -- expression. In the case of a parameter where the formal is an -- unconstrained array or discriminated type, this will be the -- previously constructed subtype of the actual. Note that this is -- not quite the "Actual Subtype" of the RM, since it is always -- a constrained type, i.e. it is the subtype of the value of the -- actual. The actual subtype is also returned in other cases where -- it has already been constructed for an object. Otherwise the -- expression type is returned unchanged, except for the case of an -- unconstrained array type, where an actual subtype is created, using -- Insert_Actions if necessary to insert any associated actions. function Get_Actual_Subtype_If_Available (N : Node_Id) return Entity_Id; -- This is like Get_Actual_Subtype, except that it never constructs an -- actual subtype. If an actual subtype is already available, i.e. the -- Actual_Subtype field of the corresponding entity is set, then it is -- returned. Otherwise the Etype of the node is returned. function Get_Default_External_Name (E : Node_Or_Entity_Id) return Node_Id; -- This is used to construct the string literal node representing a -- default external name, i.e. one that is constructed from the name -- of an entity, or (in the case of extended DEC import/export pragmas, -- an identifier provided as the external name. Letters in the name are -- according to the setting of Opt.External_Name_Default_Casing. procedure Get_Index_Bounds (N : Node_Id; L, H : out Node_Id); -- This procedure assigns to L and H respectively the values of the -- low and high bounds of node N, which must be a range, subtype -- indication, or the name of a scalar subtype. The result in L, H -- may be set to Error if there was an earlier error in the range. function Get_Enum_Lit_From_Pos (T : Entity_Id; Pos : Uint; Loc : Source_Ptr) return Entity_Id; -- This function obtains the E_Enumeration_Literal entity for the -- specified value from the enumneration type or subtype T. The -- second argument is the Pos value, which is assumed to be in range. -- The third argument supplies a source location for constructed -- nodes returned by this function. function Get_Name_Entity_Id (Id : Name_Id) return Entity_Id; -- An entity value is associated with each name in the name table. The -- Get_Name_Entity_Id function fetches the Entity_Id of this entity, -- which is the innermost visible entity with the given name. See the -- body of Sem_Ch8 for further details on handling of entity visibility. function Get_Referenced_Object (N : Node_Id) return Node_Id; -- Given a node, return the renamed object if the node represents -- a renamed object, otherwise return the node unchanged. The node -- may represent an arbitrary expression. function Get_Subprogram_Body (E : Entity_Id) return Node_Id; -- Given the entity for a subprogram (E_Function or E_Procedure), -- return the corresponding N_Subprogram_Body node. If the corresponding -- body of the declaration is missing (as for an imported subprogram) -- return Empty. function Get_Task_Body_Procedure (E : Entity_Id) return Node_Id; pragma Inline (Get_Task_Body_Procedure); -- Given an entity for a task type or subtype, retrieves the -- Task_Body_Procedure field from the corresponding task type -- declaration. function Has_Infinities (E : Entity_Id) return Boolean; -- Determines if the range of the floating-point type E includes -- infinities. Returns False if E is not a floating-point type. function Has_Private_Component (Type_Id : Entity_Id) return Boolean; -- Check if a type has a (sub)component of a private type that has not -- yet received a full declaration. function Has_Tagged_Component (Typ : Entity_Id) return Boolean; -- Typ must be a composite type (array or record). This function is used -- to check if '=' has to be expanded into a bunch component comparaisons. function In_Instance return Boolean; -- Returns True if the current scope is within a generic instance. function In_Instance_Body return Boolean; -- Returns True if current scope is within the body of an instance, where -- several semantic checks (e.g. accessibility checks) are relaxed. function In_Instance_Not_Visible return Boolean; -- Returns True if current scope is with the private part or the body of -- an instance. Other semantic checks are suppressed in this context. function In_Instance_Visible_Part return Boolean; -- Returns True if current scope is within the visible part of a package -- instance, where several additional semantic checks apply. function In_Subprogram_Or_Concurrent_Unit return Boolean; -- Determines if the current scope is within a subprogram compilation -- unit (inside a subprogram declaration, subprogram body, or generic -- subprogram declaration) or within a task or protected body. The test -- is for appearing anywhere within such a construct (that is it does not -- need to be directly within). function In_Visible_Part (Scope_Id : Entity_Id) return Boolean; -- Determine whether a declaration occurs within the visible part of a -- package specification. The package must be on the scope stack, and the -- corresponding private part must not. function Is_AAMP_Float (E : Entity_Id) return Boolean; -- Defined for all type entities. Returns True only for the base type -- of float types with AAMP format. The particular format is determined -- by the Digits_Value value which is 6 for the 32-bit floating point type, -- or 9 for the 48-bit type. This is not an attribute function (like -- VAX_Float) in order to not use up an extra flag and to prevent -- the dependency of Einfo on Targparm which would be required for a -- synthesized attribute. function Is_Dependent_Component_Of_Mutable_Object (Object : Node_Id) return Boolean; -- Returns True if Object is the name of a subcomponent that -- depends on discriminants of a variable whose nominal subtype -- is unconstrained and not indefinite, and the variable is -- not aliased. Otherwise returns False. The nodes passed -- to this function are assumed to denote objects. function Is_Actual_Parameter (N : Node_Id) return Boolean; -- Determines if N is an actual parameter in a subprogram call. function Is_Aliased_View (Obj : Node_Id) return Boolean; -- Determine if Obj is an aliased view, i.e. the name of an -- object to which 'Access or 'Unchecked_Access can apply. function Is_Atomic_Object (N : Node_Id) return Boolean; -- Determines if the given node denotes an atomic object in the sense -- of the legality checks described in RM C.6(12). function Is_False (U : Uint) return Boolean; -- The argument is a Uint value which is the Boolean'Pos value of a -- Boolean operand (i.e. is either 0 for False, or 1 for True). This -- function simply tests if it is False (i.e. zero) function Is_Fixed_Model_Number (U : Ureal; T : Entity_Id) return Boolean; -- Returns True iff the number U is a model number of the fixed- -- point type T, i.e. if it is an exact multiple of Small. function Is_Fully_Initialized_Type (Typ : Entity_Id) return Boolean; -- Typ is a type entity. This function returns true if this type is -- fully initialized, meaning that an object of the type is fully -- initialized. Note that initialization resulting from the use of -- pragma Normalized_Scalars does not count. function Is_Inherited_Operation (E : Entity_Id) return Boolean; -- E is a subprogram. Return True is E is an implicit operation inherited -- by a derived type declarations. function Is_Library_Level_Entity (E : Entity_Id) return Boolean; -- A library-level declaration is one that is accessible from Standard, -- i.e. a library unit or an entity declared in a library package. function Is_Local_Variable_Reference (Expr : Node_Id) return Boolean; -- Determines whether Expr is a refeference to a variable or IN OUT -- mode parameter of the current enclosing subprogram. function Is_Object_Reference (N : Node_Id) return Boolean; -- Determines if the tree referenced by N represents an object. Both -- variable and constant objects return True (compare Is_Variable). function Is_OK_Variable_For_Out_Formal (AV : Node_Id) return Boolean; -- Used to test if AV is an acceptable formal for an OUT or IN OUT -- formal. Note that the Is_Variable function is not quite the right -- test because this is a case in which conversions whose expression -- is a variable (in the Is_Variable sense) with a non-tagged type -- target are considered view conversions and hence variables. function Is_RCI_Pkg_Spec_Or_Body (Cunit : Node_Id) return Boolean; -- Return True if a compilation unit is the specification or the -- body of a remote call interface package. function Is_Remote_Access_To_Class_Wide_Type (E : Entity_Id) return Boolean; -- Return True if E is a remote access-to-class-wide-limited_private type function Is_Remote_Access_To_Subprogram_Type (E : Entity_Id) return Boolean; -- Return True if E is a remote access to subprogram type. function Is_Remote_Call (N : Node_Id) return Boolean; -- Return True if N denotes a potentially remote call function Is_Selector_Name (N : Node_Id) return Boolean; -- Given an N_Identifier node N, determines if it is a Selector_Name. -- As described in Sinfo, Selector_Names are special because they -- represent use of the N_Identifier node for a true identifier, when -- normally such nodes represent a direct name. function Is_Statement (N : Node_Id) return Boolean; -- Check if the node N is a statement node. Note that this includes -- the case of procedure call statements (unlike the direct use of -- the N_Statement_Other_Than_Procedure_Call subtype from Sinfo) function Is_Transfer (N : Node_Id) return Boolean; -- Returns True if the node N is a statement which is known to cause -- an unconditional transfer of control at runtime, i.e. the following -- statement definitely will not be executed. function Is_True (U : Uint) return Boolean; -- The argument is a Uint value which is the Boolean'Pos value of a -- Boolean operand (i.e. is either 0 for False, or 1 for True). This -- function simply tests if it is True (i.e. non-zero) function Is_Variable (N : Node_Id) return Boolean; -- Determines if the tree referenced by N represents a variable, i.e. -- can appear on the left side of an assignment. There is one situation, -- namely formal parameters, in which non-tagged type conversions are -- also considered variables, but Is_Variable returns False for such -- cases, since it has no knowledge of the context. Note that this is -- the point at which Assignment_OK is checked, and True is returned -- for any tree thus marked. function Is_Volatile_Object (N : Node_Id) return Boolean; -- Determines if the given node denotes an volatile object in the sense -- of the legality checks described in RM C.6(12). procedure Kill_Size_Check_Code (E : Entity_Id); -- Called when an address clause or pragma Import is applied to an -- entity. If the entity is a variable or a constant, and size check -- code is present, this size check code is killed, since the object -- will not be allocated by the program. function New_External_Entity (Kind : Entity_Kind; Scope_Id : Entity_Id; Sloc_Value : Source_Ptr; Related_Id : Entity_Id; Suffix : Character; Suffix_Index : Nat := 0; Prefix : Character := ' ') return Entity_Id; -- This function creates an N_Defining_Identifier node for an internal -- created entity, such as an implicit type or subtype, or a record -- initialization procedure. The entity name is constructed with a call -- to New_External_Name (Related_Id, Suffix, Suffix_Index, Prefix), so -- that the generated name may be referenced as a public entry, and the -- Is_Public flag is set if needed (using Set_Public_Status). If the -- entity is for a type or subtype, the size/align fields are initialized -- to unknown (Uint_0). function New_Internal_Entity (Kind : Entity_Kind; Scope_Id : Entity_Id; Sloc_Value : Source_Ptr; Id_Char : Character) return Entity_Id; -- This function is similar to New_External_Entity, except that the -- name is constructed by New_Internal_Name (Id_Char). This is used -- when the resulting entity does not have to be referenced as a -- public entity (and in this case Is_Public is not set). procedure Next_Actual (Actual_Id : in out Node_Id); pragma Inline (Next_Actual); -- Next_Actual (N) is equivalent to N := Next_Actual (N) function Next_Actual (Actual_Id : Node_Id) return Node_Id; -- Find next actual parameter in declaration order. As described for -- First_Actual, this is the next actual in the declaration order, not -- the call order, so this does not correspond to simply taking the -- next entry of the Parameter_Associations list. The argument is an -- actual previously returned by a call to First_Actual or Next_Actual. -- Note tha the result produced is always an expression, not a parameter -- assciation node, even if named notation was used. procedure Normalize_Actuals (N : Node_Id; S : Entity_Id; Report : Boolean; Success : out Boolean); -- Reorders lists of actuals according to names of formals, value returned -- in Success indicates success of reordering. For more details, see body. -- Errors are reported only if Report is set to True. procedure Note_Possible_Modification (N : Node_Id); -- This routine is called if the sub-expression N maybe the target of -- an assignment (e.g. it is the left side of an assignment, used as -- an out parameters, or used as prefixes of access attributes). It -- sets May_Be_Modified in the associated entity if there is one, -- taking into account the rule that in the case of renamed objects, -- it is the flag in the renamed object that must be set. function Object_Access_Level (Obj : Node_Id) return Uint; -- Return the accessibility level of the view of the object Obj. -- For convenience, qualified expressions applied to object names -- are also allowed as actuals for this function. function Private_Component (Type_Id : Entity_Id) return Entity_Id; -- Returns some private component (if any) of the given Type_Id. -- Used to enforce the rules on visibility of operations on composite -- types, that depend on the full view of the component type. For a -- record type there may be several such components, we just return -- the first one. procedure Process_End_Label (N : Node_Id; Typ : Character); -- N is a node whose End_Label is to be processed, generating all -- appropriate cross-reference entries, and performing style checks -- for any identifier references in the end label. Typ is either -- 'e' or 't indicating the type of the cross-reference entity -- (e for spec, t for body, see Lib.Xref spec for details). function Real_Convert (S : String) return Node_Id; -- S is a possibly signed syntactically valid real literal. The result -- returned is an N_Real_Literal node representing the literal value. function Requires_Transient_Scope (Id : Entity_Id) return Boolean; -- E is a type entity. The result is True when temporaries of this -- type need to be wrapped in a transient scope to be reclaimed -- properly when a secondary stack is in use. Examples of types -- requiring such wrapping are controlled types and variable-sized -- types including unconstrained arrays procedure Reset_Analyzed_Flags (N : Node_Id); -- Reset the Analyzed flags in all nodes of the tree whose root is N function Same_Name (N1, N2 : Node_Id) return Boolean; -- Determine if two (possibly expanded) names are the same name function Same_Type (T1, T2 : Entity_Id) return Boolean; -- Determines if T1 and T2 represent exactly the same type. Two types -- are the same if they are identical, or if one is an unconstrained -- subtype of the other, or they are both common subtypes of the same -- type with identical constraints. The result returned is conservative. -- It is True if the types are known to be the same, but a result of -- False is indecisive (e.g. the compiler may not be able to tell that -- two constraints are identical). function Scope_Within_Or_Same (Scope1, Scope2 : Entity_Id) return Boolean; -- Determines if the entity Scope1 is the same as Scope2, or if it is -- inside it, where both entities represent scopes. Note that scopes -- are only partially ordered, so Scope_Within_Or_Same (A,B) and -- Scope_Within_Or_Same (B,A) can both be False for a given pair A,B. function Scope_Within (Scope1, Scope2 : Entity_Id) return Boolean; -- Like Scope_Within_Or_Same, except that this function returns -- False in the case where Scope1 and Scope2 are the same scope. procedure Set_Current_Entity (E : Entity_Id); -- Establish the entity E as the currently visible definition of its -- associated name (i.e. the Node_Id associated with its name) procedure Set_Entity_With_Style_Check (N : Node_Id; Val : Entity_Id); -- This procedure has the same calling sequence as Set_Entity, but -- if Style_Check is set, then it calls a style checking routine which -- can check identifier spelling style. procedure Set_Name_Entity_Id (Id : Name_Id; Val : Entity_Id); -- Sets the Entity_Id value associated with the given name, which is the -- Id of the innermost visible entity with the given name. See the body -- of package Sem_Ch8 for further details on the handling of visibility. procedure Set_Next_Actual (Ass1_Id : Node_Id; Ass2_Id : Node_Id); -- The arguments may be parameter associations, whose descendants -- are the optional formal name and the actual parameter. Positional -- parameters are already members of a list, and do not need to be -- chained separately. See also First_Actual and Next_Actual. procedure Set_Public_Status (Id : Entity_Id); -- If an entity (visible or otherwise) is defined in a library -- package, or a package that is itself public, then this subprogram -- labels the entity public as well. procedure Set_Scope_Is_Transient (V : Boolean := True); -- Set the flag Is_Transient of the current scope procedure Set_Size_Info (T1, T2 : Entity_Id); -- Copies the Esize field and Has_Biased_Representation flag from -- (sub)type entity T2 to (sub)type entity T1. Also copies the -- Is_Unsigned_Type flag in the fixed-point and discrete cases, -- and also copies the alignment value from T2 to T1. It does NOT -- copy the RM_Size field, which must be separately set if this -- is required to be copied also. function Scope_Is_Transient return Boolean; -- True if the current scope is transient. function Static_Integer (N : Node_Id) return Uint; -- This function analyzes the given expression node and then resolves it -- as any integer type. If the result is static, then the value of the -- universal expression is returned, otherwise an error message is output -- and a value of No_Uint is returned. function Statically_Different (E1, E2 : Node_Id) return Boolean; -- Return True if it can be statically determined that the Expressions -- E1 and E2 refer to different objects function Subprogram_Access_Level (Subp : Entity_Id) return Uint; -- Return the accessibility level of the view denoted by Subp. procedure Trace_Scope (N : Node_Id; E : Entity_Id; Msg : String); -- Print debugging information on entry to each unit being analyzed. procedure Transfer_Entities (From : Entity_Id; To : Entity_Id); -- Move a list of entities from one scope to another, and recompute -- Is_Public based upon the new scope. function Type_Access_Level (Typ : Entity_Id) return Uint; -- Return the accessibility level of Typ. function Unit_Declaration_Node (Unit_Id : Entity_Id) return Node_Id; -- Unit_Id is the simple name of a program unit, this function returns -- the corresponding xxx_Declaration node for the entity. Also applies -- to the body entities for subprograms in tasks, in which case it -- returns the subprogram or task body node for it. The unit may be -- a child unit with any number of ancestors. function Within_Init_Proc return Boolean; -- Determines if Current_Scope is within an Init_Proc procedure Wrong_Type (Expr : Node_Id; Expected_Type : Entity_Id); -- Output error message for incorrectly typed expression. Expr is the -- node for the incorrectly typed construct (Etype (Expr) is the type -- found), and Expected_Type is the entity for the expected type. Note -- that Expr does not have to be a subexpression, anything with an -- Etype field may be used. private pragma Inline (Current_Entity); pragma Inline (Get_Name_Entity_Id); pragma Inline (Is_False); pragma Inline (Is_Statement); pragma Inline (Is_True); pragma Inline (Set_Current_Entity); pragma Inline (Set_Name_Entity_Id); pragma Inline (Set_Size_Info); end Sem_Util;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2016-2020, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision: 5682 $ $Date: 2017-01-11 00:55:53 +0300 (Wed, 11 Jan 2017) $ ------------------------------------------------------------------------------ -- Abstract_GL_Widget provides integration between implementation of OpenGL -- API and application. ------------------------------------------------------------------------------ with Web.HTML.Canvases; private with OpenGL.Contexts; with OpenGL.Functions; package Web.UI.Widgets.GL_Widgets is type Abstract_GL_Widget is abstract new Web.UI.Widgets.Abstract_Widget with private; function Functions (Self : in out Abstract_GL_Widget'Class) return access OpenGL.Functions.OpenGL_Functions'Class; -- Returns OpenGL functions to be used with OpenGL context of widget. procedure Update (Self : in out Abstract_GL_Widget); -- Requests redraw. not overriding procedure Initialize_GL (Self : in out Abstract_GL_Widget) is abstract; -- This dispatching subprogram is called once before the first call to -- Paint_GL. Reimplement it in a derived type. -- -- This subprogram should set up any required OpenGL resources and state. -- -- The framebuffer is not yet available at this stage, so avoid issuing -- draw calls from here. not overriding procedure Paint_GL (Self : in out Abstract_GL_Widget) is abstract; -- This dispatching subprogram is called whenever the widget needs to be -- painted. Reimplement it in a derived type. -- -- Current context is set to context of this widget. -- -- Before invoking this function, the context and the framebuffer are -- bound, and the viewport is set up by a call to glViewport. No other -- state is set and no clearing or drawing is performed by the framework. not overriding procedure Resize_GL (Self : in out Abstract_GL_Widget; Width : Integer; Height : Integer) is null; -- This dispatching subprogram is called whenever the widget has been -- resized. Reimplement it in a subclass. The new size is passed in Width -- and Height. not overriding procedure Context_Lost (Self : in out Abstract_GL_Widget) is null; not overriding procedure Context_Restored (Self : in out Abstract_GL_Widget) is null; overriding procedure Set_Disabled (Self : in out Abstract_GL_Widget; Disabled : Boolean := True) is null; package Constructors is procedure Initialize (Self : in out Abstract_GL_Widget'Class; Canvas : in out Web.HTML.Canvases.HTML_Canvas_Element'Class); end Constructors; private type Context_Lost_Dispatcher (Owner : not null access Abstract_GL_Widget'Class) is limited new Web.DOM.Event_Listeners.Event_Listener with null record; overriding procedure Handle_Event (Self : in out Context_Lost_Dispatcher; Event : in out Web.DOM.Events.Event'Class); type Context_Restored_Dispatcher (Owner : not null access Abstract_GL_Widget'Class) is limited new Web.DOM.Event_Listeners.Event_Listener with null record; overriding procedure Handle_Event (Self : in out Context_Restored_Dispatcher; Event : in out Web.DOM.Events.Event'Class); type Abstract_GL_Widget is abstract new Web.UI.Widgets.Abstract_Widget with record Canvas : Web.HTML.Canvases.HTML_Canvas_Element; Context : OpenGL.Contexts.OpenGL_Context_Access; Lost : aliased Context_Lost_Dispatcher (Abstract_GL_Widget'Unchecked_Access); Restored : aliased Context_Restored_Dispatcher (Abstract_GL_Widget'Unchecked_Access); Initialized : Boolean := False; Redraw_Needed : Boolean := True; -- Redraw should be done on next handling of animation frame. end record; end Web.UI.Widgets.GL_Widgets;
----------------------------------------------------------------------- -- asf-contexts-exceptions -- Exception handlers in faces context -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Contexts.Faces; -- Iterate over the exception events which are in the queue and execute the given procedure. -- The procedure should return True in <b>Remove</b> to indicate that the exception has been -- processed. -- -- Notes: this procedure should not be called directly (use ASF.Contexts.Faces.Iterate). -- This procedure is separate to avoid circular dependency. procedure ASF.Contexts.Exceptions.Iterate (Queue : in out Exception_Queue; Context : in out ASF.Contexts.Faces.Faces_Context'Class; Process : not null access procedure (Event : in ASF.Events.Exceptions.Exception_Event'Class; Remove : out Boolean; Context : in out ASF.Contexts.Faces.Faces_Context'Class));
pragma License (Unrestricted); -- extended unit with Ada.Iterator_Interfaces; -- diff (Copy_On_Write) private with Ada.Containers.Hash_Tables; private with Ada.Finalization; private with Ada.Streams; generic type Element_Type (<>) is limited private; with function Hash (Element : Element_Type) return Hash_Type; with function Equivalent_Elements (Left, Right : Element_Type) return Boolean; -- diff ("=") package Ada.Containers.Limited_Hashed_Sets is pragma Preelaborate; pragma Remote_Types; type Set is tagged limited private with Constant_Indexing => Constant_Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type; pragma Preelaborable_Initialization (Set); type Cursor is private; pragma Preelaborable_Initialization (Cursor); -- diff -- Empty_Set : constant Set; function Empty_Set return Set; No_Element : constant Cursor; function Has_Element (Position : Cursor) return Boolean; package Set_Iterator_Interfaces is new Iterator_Interfaces (Cursor, Has_Element); -- diff ("=") function Equivalent_Sets (Left, Right : Set) return Boolean; -- diff (To_Set) -- diff (Generic_Array_To_Set) -- -- -- -- function Capacity (Container : Set) return Count_Type; procedure Reserve_Capacity ( Container : in out Set; Capacity : Count_Type); function Length (Container : Set) return Count_Type; function Is_Empty (Container : Set) return Boolean; procedure Clear (Container : in out Set); -- diff (Element) -- diff (Replace_Element) -- -- -- procedure Query_Element ( Position : Cursor; Process : not null access procedure (Element : Element_Type)); type Constant_Reference_Type ( Element : not null access constant Element_Type) is private with Implicit_Dereference => Element; function Constant_Reference (Container : aliased Set; Position : Cursor) return Constant_Reference_Type; -- diff (Assign) -- diff (Copy) procedure Move (Target : in out Set; Source : in out Set); procedure Insert ( Container : in out Set'Class; New_Item : not null access function return Element_Type; Position : out Cursor; Inserted : out Boolean); procedure Insert ( Container : in out Set'Class; New_Item : not null access function return Element_Type); -- diff (Include) -- diff (Replace) procedure Exclude (Container : in out Set; Item : Element_Type); procedure Delete (Container : in out Set; Item : Element_Type); procedure Delete (Container : in out Set; Position : in out Cursor); -- diff (Union) -- diff (Union) -- diff ("or") -- procedure Intersection (Target : in out Set; Source : Set); -- diff (Intersection) -- diff ("and") -- procedure Difference (Target : in out Set; Source : Set); -- diff (Difference) -- diff ("-") -- -- diff (Symmetric_Difference) -- diff (Symmetric_Difference) -- diff ("xor") -- function Overlap (Left, Right : Set) return Boolean; function Is_Subset (Subset : Set; Of_Set : Set) return Boolean; function First (Container : Set) return Cursor; function Next (Position : Cursor) return Cursor; procedure Next (Position : in out Cursor); function Find (Container : Set; Item : Element_Type) return Cursor; function Contains (Container : Set; Item : Element_Type) return Boolean; function Equivalent_Elements (Left, Right : Cursor) return Boolean; function Equivalent_Elements (Left : Cursor; Right : Element_Type) return Boolean; -- function Equivalent_Elements (Left : Element_Type; Right : Cursor) -- return Boolean; -- modified procedure Iterate ( Container : Set'Class; -- not primitive Process : not null access procedure (Position : Cursor)); -- modified function Iterate (Container : Set'Class) -- not primitive return Set_Iterator_Interfaces.Forward_Iterator'Class; generic type Key_Type (<>) is private; with function Key (Element : Element_Type) return Key_Type; with function Hash (Key : Key_Type) return Hash_Type; with function Equivalent_Keys (Left, Right : Key_Type) return Boolean; package Generic_Keys is function Key (Position : Cursor) return Key_Type; -- diff (Element) -- diff (Replace) -- -- -- procedure Exclude (Container : in out Set; Key : Key_Type); procedure Delete (Container : in out Set; Key : Key_Type); function Find (Container : Set; Key : Key_Type) return Cursor; function Contains (Container : Set; Key : Key_Type) return Boolean; procedure Update_Element_Preserving_Key ( Container : in out Set; Position : Cursor; Process : not null access procedure ( Element : in out Element_Type)); type Reference_Type ( Element : not null access Element_Type) is private with Implicit_Dereference => Element; function Reference_Preserving_Key ( Container : aliased in out Set; Position : Cursor) return Reference_Type; function Constant_Reference (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type; function Reference_Preserving_Key ( Container : aliased in out Set; Key : Key_Type) return Reference_Type; private type Reference_Type ( Element : not null access Element_Type) is null record; -- dummy 'Read and 'Write procedure Missing_Read ( Stream : access Streams.Root_Stream_Type'Class; Item : out Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Write ( Stream : access Streams.Root_Stream_Type'Class; Item : Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; for Reference_Type'Read use Missing_Read; for Reference_Type'Write use Missing_Write; end Generic_Keys; -- extended generic with function "=" (Left, Right : Element_Type) return Boolean is <>; package Equivalents is function "=" (Left, Right : Set) return Boolean; end Equivalents; private type Element_Access is access Element_Type; type Node is limited record Super : aliased Hash_Tables.Node; Element : Element_Access; end record; -- place Super at first whether Element_Type is controlled-type for Node use record Super at 0 range 0 .. Hash_Tables.Node_Size - 1; end record; -- diff (Data) -- -- -- -- -- diff (Data_Access) type Set is limited new Finalization.Limited_Controlled with record Table : Hash_Tables.Table_Access; Length : Count_Type := 0; end record; -- diff (Adjust) overriding procedure Finalize (Object : in out Set) renames Clear; type Cursor is access Node; type Constant_Reference_Type ( Element : not null access constant Element_Type) is null record; type Set_Access is access constant Set; for Set_Access'Storage_Size use 0; type Set_Iterator is new Set_Iterator_Interfaces.Forward_Iterator with record First : Cursor; end record; overriding function First (Object : Set_Iterator) return Cursor; overriding function Next (Object : Set_Iterator; Position : Cursor) return Cursor; package Streaming is -- diff (Read) -- -- -- diff (Write) -- -- procedure Missing_Read ( Stream : access Streams.Root_Stream_Type'Class; Item : out Cursor) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Write ( Stream : access Streams.Root_Stream_Type'Class; Item : Cursor) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Read ( Stream : access Streams.Root_Stream_Type'Class; Item : out Constant_Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Write ( Stream : access Streams.Root_Stream_Type'Class; Item : Constant_Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; end Streaming; -- diff ('Read) -- diff ('Write) for Cursor'Read use Streaming.Missing_Read; for Cursor'Write use Streaming.Missing_Write; for Constant_Reference_Type'Read use Streaming.Missing_Read; for Constant_Reference_Type'Write use Streaming.Missing_Write; No_Element : constant Cursor := null; end Ada.Containers.Limited_Hashed_Sets;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . F A T _ V A X _ G _ F L O A T -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005,2009 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains an instantiation of the floating-point attribute -- runtime routines for VAX F-float for use on VMS targets. with System.Fat_Gen; package System.Fat_VAX_G_Float is pragma Pure; pragma Warnings (Off); -- This unit is normally used only for VMS, but we compile it for other -- targets for the convenience of testing vms code using -gnatdm. type Fat_VAX_G is digits 15; pragma Float_Representation (VAX_Float, Fat_VAX_G); -- Note the only entity from this package that is accessed by Rtsfind -- is the name of the package instantiation. Entities within this package -- (i.e. the individual floating-point attribute routines) are accessed -- by name using selected notation. package Attr_VAX_G_Float is new System.Fat_Gen (Fat_VAX_G); end System.Fat_VAX_G_Float;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . F I N A L I Z A T I O N _ I M P L E M E N T A T I O N -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, 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. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Exceptions; with Ada.Tags; with Ada.Unchecked_Conversion; with System.Storage_Elements; with System.Soft_Links; package body System.Finalization_Implementation is use Ada.Exceptions; use System.Finalization_Root; package SSL renames System.Soft_Links; package SSE renames System.Storage_Elements; use type SSE.Storage_Offset; ----------------------- -- Local Subprograms -- ----------------------- function To_Finalizable_Ptr is new Ada.Unchecked_Conversion (Address, Finalizable_Ptr); function To_Addr is new Ada.Unchecked_Conversion (Finalizable_Ptr, Address); type RC_Ptr is access all Record_Controller; function To_RC_Ptr is new Ada.Unchecked_Conversion (Address, RC_Ptr); procedure Raise_Exception_No_Defer (E : in Exception_Id; Message : in String := ""); pragma Import (Ada, Raise_Exception_No_Defer, "ada__exceptions__raise_exception_no_defer"); pragma No_Return (Raise_Exception_No_Defer); -- Raise an exception without deferring abort. Note that we have to -- use this rather kludgy Ada Import interface, since this subprogram -- is not available in the visible spec of Ada.Exceptions. procedure Raise_From_Finalize (L : Finalizable_Ptr; From_Abort : Boolean; E_Occ : Exception_Occurrence); -- Deal with an exception raised during finalization of a list. L is a -- pointer to the list of element not yet finalized. From_Abort is true -- if the finalization actions come from an abort rather than a normal -- exit. E_Occ represents the exception being raised. function RC_Offset (T : Ada.Tags.Tag) return SSE.Storage_Offset; pragma Import (Ada, RC_Offset, "ada__tags__get_rc_offset"); function Parent_Size (Obj : Address) return SSE.Storage_Count; pragma Import (Ada, Parent_Size, "ada__tags__parent_size"); function Get_RC_Dynamically (Obj : Address) return Address; -- Given an the address of an object (obj) of a tagged extension with -- controlled component, computes the address of the record controller -- located just after the _parent field ------------- -- Adjust -- ------------- procedure Adjust (Object : in out Record_Controller) is First_Comp : Finalizable_Ptr; My_Offset : constant SSE.Storage_Offset := Object.My_Address - Object'Address; procedure Ptr_Adjust (Ptr : in out Finalizable_Ptr); -- Subtract the offset to the pointer procedure Reverse_Adjust (P : Finalizable_Ptr); -- Adjust the components in the reverse order in which they are stored -- on the finalization list. (Adjust and Finalization are not done in -- the same order) procedure Ptr_Adjust (Ptr : in out Finalizable_Ptr) is begin if Ptr /= null then Ptr := To_Finalizable_Ptr (To_Addr (Ptr) - My_Offset); end if; end Ptr_Adjust; procedure Reverse_Adjust (P : Finalizable_Ptr) is begin if P /= null then Ptr_Adjust (P.Next); Reverse_Adjust (P.Next); Adjust (P.all); Object.F := P; -- Successfully adjusted, so place in list. end if; end Reverse_Adjust; -- Start of processing for Adjust begin -- Adjust the components and their finalization pointers next. -- We must protect against an exception in some call to Adjust, so -- we keep pointing to the list of successfully adjusted components, -- which can be finalized if an exception is raised. First_Comp := Object.F; Object.F := null; -- nothing adjusted yet. Ptr_Adjust (First_Comp); -- set addresss of first component. Reverse_Adjust (First_Comp); -- Then Adjust the controller itself Object.My_Address := Object'Address; exception when others => -- Finalize those components that were successfully adjusted, and -- propagate exception. The object itself is not yet attached to -- global finalization list, so we cannot rely on the outer call -- to Clean to take care of these components. Finalize (Object); raise; end Adjust; -------------------------- -- Attach_To_Final_List -- -------------------------- procedure Attach_To_Final_List (L : in out Finalizable_Ptr; Obj : in out Finalizable; Nb_Link : Short_Short_Integer) is begin -- Simple case: attachement to a one way list if Nb_Link = 1 then Obj.Next := L; L := Obj'Unchecked_Access; -- Dynamically allocated objects: they are attached to a doubly -- linked list, so that an element can be finalized at any moment -- by means of an unchecked deallocation. Attachement is -- protected against multi-threaded access. elsif Nb_Link = 2 then Locked_Processing : begin SSL.Lock_Task.all; Obj.Next := L.Next; Obj.Prev := L.Next.Prev; L.Next.Prev := Obj'Unchecked_Access; L.Next := Obj'Unchecked_Access; SSL.Unlock_Task.all; exception when others => SSL.Unlock_Task.all; raise; end Locked_Processing; -- Attachement of arrays to the final list (used only for objects -- returned by function). Obj, in this case is the last element, -- but all other elements are already threaded after it. We just -- attach the rest of the final list at the end of the array list. elsif Nb_Link = 3 then declare P : Finalizable_Ptr := Obj'Unchecked_Access; begin while P.Next /= null loop P := P.Next; end loop; P.Next := L; L := Obj'Unchecked_Access; end; end if; end Attach_To_Final_List; --------------------- -- Deep_Tag_Adjust -- --------------------- procedure Deep_Tag_Adjust (L : in out SFR.Finalizable_Ptr; A : System.Address; B : Short_Short_Integer) is V : constant SFR.Finalizable_Ptr := To_Finalizable_Ptr (A); Offset : constant SSE.Storage_Offset := RC_Offset (V'Tag); Controller : RC_Ptr; begin -- Has controlled components if Offset /= 0 then if Offset > 0 then Controller := To_RC_Ptr (A + Offset); else Controller := To_RC_Ptr (Get_RC_Dynamically (A)); end if; Adjust (Controller.all); Attach_To_Final_List (L, Controller.all, B); -- Is controlled elsif V.all in Finalizable then Adjust (V.all); Attach_To_Final_List (L, Finalizable (V.all), 1); end if; end Deep_Tag_Adjust; --------------------- -- Deep_Tag_Attach -- ---------------------- procedure Deep_Tag_Attach (L : in out SFR.Finalizable_Ptr; A : System.Address; B : Short_Short_Integer) is V : constant SFR.Finalizable_Ptr := To_Finalizable_Ptr (A); Offset : constant SSE.Storage_Offset := RC_Offset (V'Tag); Controller : RC_Ptr; begin if Offset /= 0 then if Offset > 0 then Controller := To_RC_Ptr (A + Offset); else Controller := To_RC_Ptr (Get_RC_Dynamically (A)); end if; Attach_To_Final_List (L, Controller.all, B); -- Is controlled elsif V.all in Finalizable then Attach_To_Final_List (L, V.all, B); end if; end Deep_Tag_Attach; ----------------------- -- Deep_Tag_Finalize -- ----------------------- procedure Deep_Tag_Finalize (L : in out SFR.Finalizable_Ptr; A : System.Address; B : Boolean) is V : constant SFR.Finalizable_Ptr := To_Finalizable_Ptr (A); Offset : constant SSE.Storage_Offset := RC_Offset (V'Tag); Controller : RC_Ptr; begin -- Has controlled components if Offset /= 0 then if Offset > 0 then Controller := To_RC_Ptr (A + Offset); else Controller := To_RC_Ptr (Get_RC_Dynamically (A)); end if; if B then Finalize_One (Controller.all); else Finalize (Controller.all); end if; -- Is controlled elsif V.all in Finalizable then if B then Finalize_One (V.all); else Finalize (V.all); end if; end if; end Deep_Tag_Finalize; ------------------------- -- Deep_Tag_Initialize -- ------------------------- procedure Deep_Tag_Initialize (L : in out SFR.Finalizable_Ptr; A : System.Address; B : Short_Short_Integer) is V : constant SFR.Finalizable_Ptr := To_Finalizable_Ptr (A); Offset : constant SSE.Storage_Offset := RC_Offset (V'Tag); Controller : RC_Ptr; begin -- This procedure should not be called if the object has no -- controlled components if Offset = 0 then raise Program_Error; -- Has controlled components else if Offset > 0 then Controller := To_RC_Ptr (A + Offset); else Controller := To_RC_Ptr (Get_RC_Dynamically (A)); end if; end if; Initialize (Controller.all); Attach_To_Final_List (L, Controller.all, B); -- Is controlled if V.all in Finalizable then Initialize (V.all); Attach_To_Final_List (Controller.F, Finalizable (Controller.all), 1); end if; end Deep_Tag_Initialize; ----------------------------- -- Detach_From_Final_List -- ----------------------------- -- We know that the detach object is neither at the beginning nor at the -- end of the list, thank's to the dummy First and Last Elements but the -- object may not be attached at all if it is Finalize_Storage_Only procedure Detach_From_Final_List (Obj : in out Finalizable) is begin -- When objects are not properly attached to a doubly linked -- list do not try to detach them. The only case where it can -- happen is when dealing with Finalize_Storage_Only objects -- which are not always attached. if Obj.Next /= null and then Obj.Prev /= null then SSL.Lock_Task.all; Obj.Next.Prev := Obj.Prev; Obj.Prev.Next := Obj.Next; SSL.Unlock_Task.all; end if; exception when others => SSL.Unlock_Task.all; raise; end Detach_From_Final_List; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Limited_Record_Controller) is begin Finalize_List (Object.F); end Finalize; -------------------------- -- Finalize_Global_List -- -------------------------- procedure Finalize_Global_List is begin -- There are three case here: -- a. the application uses tasks, in which case Finalize_Global_Tasks -- will defer abortion -- b. the application doesn't use tasks but uses other tasking -- constructs, such as ATCs and protected objects. In this case, -- the binder will call Finalize_Global_List instead of -- Finalize_Global_Tasks, letting abort undeferred, and leading -- to assertion failures in the GNULL -- c. the application doesn't use any tasking construct in which case -- deferring abort isn't necessary. -- -- Until another solution is found to deal with case b, we need to -- call abort_defer here to pass the checks, but we do not need to -- undefer abortion, since Finalize_Global_List is the last procedure -- called before exiting the partition. SSL.Abort_Defer.all; Finalize_List (Global_Final_List); end Finalize_Global_List; ------------------- -- Finalize_List -- ------------------- procedure Finalize_List (L : Finalizable_Ptr) is P : Finalizable_Ptr := L; Q : Finalizable_Ptr; type Fake_Exception_Occurrence is record Id : Exception_Id; end record; type Ptr is access all Fake_Exception_Occurrence; -- Let's get the current exception before starting to finalize in -- order to check if we are in the abort case if an exception is -- raised. function To_Ptr is new Ada.Unchecked_Conversion (Exception_Occurrence_Access, Ptr); X : Exception_Id := To_Ptr (System.Soft_Links.Get_Current_Excep.all).Id; begin while P /= null loop Q := P.Next; Finalize (P.all); P := Q; end loop; exception when E_Occ : others => Raise_From_Finalize ( Q, X = Standard'Abort_Signal'Identity, E_Occ); end Finalize_List; ------------------ -- Finalize_One -- ------------------ procedure Finalize_One (Obj : in out Finalizable) is begin Detach_From_Final_List (Obj); Finalize (Obj); exception when E_Occ : others => Raise_From_Finalize (null, False, E_Occ); end Finalize_One; ------------------------ -- Get_RC_Dynamically -- ------------------------ function Get_RC_Dynamically (Obj : Address) return Address is -- define a faked record controller to avoid generating -- unnecessary expanded code for controlled types type Faked_Record_Controller is record Tag, Prec, Next : Address; end record; -- Reconstruction of a type with characteristics -- comparable to the original type D : constant := Storage_Unit - 1; type Faked_Type_Of_Obj is record Parent : SSE.Storage_Array (1 .. (Parent_Size (Obj) + D) / Storage_Unit); Controller : Faked_Record_Controller; end record; type Obj_Ptr is access all Faked_Type_Of_Obj; function To_Obj_Ptr is new Ada.Unchecked_Conversion (Address, Obj_Ptr); begin return To_Obj_Ptr (Obj).Controller'Address; end Get_RC_Dynamically; ---------------- -- Initialize -- ---------------- procedure Initialize (Object : in out Limited_Record_Controller) is begin null; end Initialize; procedure Initialize (Object : in out Record_Controller) is begin Object.My_Address := Object'Address; end Initialize; ------------------------- -- Raise_From_Finalize -- ------------------------- procedure Raise_From_Finalize (L : Finalizable_Ptr; From_Abort : Boolean; E_Occ : Exception_Occurrence) is Msg : constant String := Exception_Message (E_Occ); P : Finalizable_Ptr := L; Q : Finalizable_Ptr; begin -- We already got an exception. We now finalize the remainder of -- the list, ignoring all further exceptions. while P /= null loop Q := P.Next; begin Finalize (P.all); exception when others => null; end; P := Q; end loop; -- If finalization from an Abort, then nothing to do if From_Abort then null; -- If no message, then add our own message saying what happened elsif Msg = "" then Raise_Exception_No_Defer (E => Program_Error'Identity, Message => "exception " & Exception_Name (E_Occ) & " raised during finalization"); -- If there was a message, pass it on else Raise_Exception_No_Defer (Program_Error'Identity, Msg); end if; end Raise_From_Finalize; -- Initialization of package, set Adafinal soft link begin SSL.Adafinal := Finalize_Global_List'Access; end System.Finalization_Implementation;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>dct</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>input_r</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>input</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>output_r</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>output</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>1</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>56</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>7</id> <name>buf_2d_in</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>dct.c</first> <second>dct</second> </first> <second>81</second> </item> </second> </item> </inlineStackInfo> <originalName>buf_2d_in</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>89</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>8</id> <name>buf_2d_out</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>90</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>9</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>91</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>11</id> <name>r_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>93</item> <item>94</item> <item>95</item> <item>96</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>12</id> <name>exitcond1_i</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>97</item> <item>99</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>14</id> <name>r</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>100</item> <item>102</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>15</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>103</item> <item>104</item> <item>105</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>19</id> <name>tmp</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>106</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>20</id> <name>tmp_i</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>108</item> <item>109</item> <item>111</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>21</id> <name>tmp_s</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>113</item> <item>114</item> <item>115</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>22</id> <name>tmp_33_cast</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>116</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>23</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>117</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>25</id> <name>c_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>118</item> <item>119</item> <item>120</item> <item>121</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>26</id> <name>c_i_cast6</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>122</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>27</id> <name>exitcond_i</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>123</item> <item>124</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>29</id> <name>c</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>125</item> <item>126</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>30</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>127</item> <item>128</item> <item>129</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>33</id> <name>tmp_9_i</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>130</item> <item>131</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>34</id> <name>tmp_i_15</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>132</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>35</id> <name>input_addr</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>133</item> <item>135</item> <item>136</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>36</id> <name>input_load</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>137</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>37</id> <name>tmp_1_i_cast</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>138</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>38</id> <name>tmp_22</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>139</item> <item>140</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>39</id> <name>tmp_37_cast</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>141</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>40</id> <name>buf_2d_in_addr</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>142</item> <item>143</item> <item>144</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>41</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>62</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>145</item> <item>146</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>42</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>147</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>45</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>read_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>85</second> </item> <item> <first> <first>dct.c</first> <second>read_data</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>148</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>47</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>dct</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>87</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>150</item> <item>151</item> <item>152</item> <item>204</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>48</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>153</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>50</id> <name>r_i2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>154</item> <item>155</item> <item>156</item> <item>157</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>51</id> <name>exitcond1_i3</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>158</item> <item>159</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>53</id> <name>r_1</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>r</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>160</item> <item>161</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>54</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>162</item> <item>163</item> <item>164</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>58</id> <name>tmp_21</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>165</item> <item>166</item> <item>167</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>59</id> <name>tmp_35_cast</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>168</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>60</id> <name>tmp_3</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>169</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>61</id> <name>tmp_1_i5</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>170</item> <item>171</item> <item>172</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>62</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>73</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>73</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>173</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>64</id> <name>c_i6</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>174</item> <item>175</item> <item>176</item> <item>177</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>65</id> <name>c_i6_cast2</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>73</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>73</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>178</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>66</id> <name>exitcond_i7</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>73</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>73</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>179</item> <item>180</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>68</id> <name>c_1</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>73</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>73</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>181</item> <item>182</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>69</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>73</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>73</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>183</item> <item>184</item> <item>185</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>72</id> <name>tmp_3_i8_cast</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>186</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>73</id> <name>tmp_23</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>187</item> <item>188</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>74</id> <name>tmp_38_cast</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>189</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>75</id> <name>buf_2d_out_addr</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>190</item> <item>191</item> <item>192</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>76</id> <name>buf_2d_out_load</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>193</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>77</id> <name>tmp_4_i</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>194</item> <item>195</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>78</id> <name>tmp_5_i</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>196</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>79</id> <name>output_addr</name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>197</item> <item>198</item> <item>199</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>80</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>200</item> <item>201</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>81</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>73</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>73</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>202</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>84</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>write_data</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>90</second> </item> <item> <first> <first>dct.c</first> <second>write_data</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>203</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>86</id> <name></name> <fileName>dct.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory> <lineNumber>91</lineNumber> <contextFuncName>dct</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.c</first> <second>dct</second> </first> <second>91</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_59"> <Value> <Obj> <type>2</type> <id>88</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_60"> <Value> <Obj> <type>2</type> <id>92</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_61"> <Value> <Obj> <type>2</type> <id>98</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_62"> <Value> <Obj> <type>2</type> <id>101</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_63"> <Value> <Obj> <type>2</type> <id>110</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_64"> <Value> <Obj> <type>2</type> <id>134</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_65"> <Value> <Obj> <type>2</type> <id>149</id> <name>dct_2d</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:dct_2d&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_66"> <Obj> <type>3</type> <id>10</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>7</item> <item>8</item> <item>9</item> </node_objs> </item> <item class_id_reference="18" object_id="_67"> <Obj> <type>3</type> <id>16</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>11</item> <item>12</item> <item>14</item> <item>15</item> </node_objs> </item> <item class_id_reference="18" object_id="_68"> <Obj> <type>3</type> <id>24</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> </node_objs> </item> <item class_id_reference="18" object_id="_69"> <Obj> <type>3</type> <id>31</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>25</item> <item>26</item> <item>27</item> <item>29</item> <item>30</item> </node_objs> </item> <item class_id_reference="18" object_id="_70"> <Obj> <type>3</type> <id>43</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>10</count> <item_version>0</item_version> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>38</item> <item>39</item> <item>40</item> <item>41</item> <item>42</item> </node_objs> </item> <item class_id_reference="18" object_id="_71"> <Obj> <type>3</type> <id>46</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>45</item> </node_objs> </item> <item class_id_reference="18" object_id="_72"> <Obj> <type>3</type> <id>49</id> <name>read_data.exit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>47</item> <item>48</item> </node_objs> </item> <item class_id_reference="18" object_id="_73"> <Obj> <type>3</type> <id>55</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>50</item> <item>51</item> <item>53</item> <item>54</item> </node_objs> </item> <item class_id_reference="18" object_id="_74"> <Obj> <type>3</type> <id>63</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>58</item> <item>59</item> <item>60</item> <item>61</item> <item>62</item> </node_objs> </item> <item class_id_reference="18" object_id="_75"> <Obj> <type>3</type> <id>70</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>64</item> <item>65</item> <item>66</item> <item>68</item> <item>69</item> </node_objs> </item> <item class_id_reference="18" object_id="_76"> <Obj> <type>3</type> <id>82</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>10</count> <item_version>0</item_version> <item>72</item> <item>73</item> <item>74</item> <item>75</item> <item>76</item> <item>77</item> <item>78</item> <item>79</item> <item>80</item> <item>81</item> </node_objs> </item> <item class_id_reference="18" object_id="_77"> <Obj> <type>3</type> <id>85</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>84</item> </node_objs> </item> <item class_id_reference="18" object_id="_78"> <Obj> <type>3</type> <id>87</id> <name>write_data.exit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>86</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>120</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_79"> <id>89</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_80"> <id>90</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_81"> <id>91</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>9</sink_obj> </item> <item class_id_reference="20" object_id="_82"> <id>93</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_83"> <id>94</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_84"> <id>95</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_85"> <id>96</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_86"> <id>97</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_87"> <id>99</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_88"> <id>100</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_89"> <id>102</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_90"> <id>103</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_91"> <id>104</id> <edge_type>2</edge_type> <source_obj>24</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>105</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>106</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>109</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>111</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>114</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>115</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>116</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>117</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>118</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>119</id> <edge_type>2</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>120</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_103"> <id>121</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_104"> <id>122</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_105"> <id>123</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_106"> <id>124</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_107"> <id>125</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>126</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>127</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>128</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>129</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>130</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>131</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>132</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>133</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>135</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>136</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>137</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>138</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>139</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>140</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>141</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>142</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>143</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>144</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>145</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>146</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>147</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>148</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>150</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>151</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>152</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>153</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>154</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>155</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>156</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>157</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>158</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>159</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>160</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>161</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>162</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>163</id> <edge_type>2</edge_type> <source_obj>63</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>164</id> <edge_type>2</edge_type> <source_obj>87</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>166</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>167</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>168</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>169</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>171</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>172</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>173</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>174</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>175</id> <edge_type>2</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>176</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>177</id> <edge_type>2</edge_type> <source_obj>82</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>178</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>179</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>180</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>181</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>182</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>183</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>184</id> <edge_type>2</edge_type> <source_obj>82</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>185</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>186</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>187</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>188</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>189</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>190</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>191</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>192</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>193</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>194</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>195</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>196</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>197</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>198</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>199</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>200</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>80</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>201</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>80</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>202</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>203</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>204</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>257</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>258</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>259</id> <edge_type>2</edge_type> <source_obj>16</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>260</id> <edge_type>2</edge_type> <source_obj>24</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>261</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>262</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>263</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>264</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>265</id> <edge_type>2</edge_type> <source_obj>49</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>266</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>87</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>267</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>268</id> <edge_type>2</edge_type> <source_obj>63</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>269</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>85</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>270</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>82</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>271</id> <edge_type>2</edge_type> <source_obj>82</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>272</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>55</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_199"> <mId>1</mId> <mTag>dct</mTag> <mType>0</mType> <sub_regions> <count>5</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>7</item> <item>8</item> <item>12</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>3959</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_200"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>10</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_201"> <mId>3</mId> <mTag>RD_Loop_Row</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>4</item> <item>5</item> <item>6</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>144</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_202"> <mId>4</mId> <mTag>Region 1</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>16</item> <item>24</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_203"> <mId>5</mId> <mTag>RD_Loop_Col</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>31</item> <item>43</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>16</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_204"> <mId>6</mId> <mTag>Region 2</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>46</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_205"> <mId>7</mId> <mTag>Region 3</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>49</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>3669</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_206"> <mId>8</mId> <mTag>WR_Loop_Row</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>9</item> <item>10</item> <item>11</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>144</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_207"> <mId>9</mId> <mTag>Region 4</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>55</item> <item>63</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_208"> <mId>10</mId> <mTag>WR_Loop_Col</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>70</item> <item>82</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>16</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_209"> <mId>11</mId> <mTag>Region 5</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>85</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_210"> <mId>12</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>87</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_211"> <states class_id="25" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_212"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_213"> <id>4</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_214"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_215"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_216"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_217"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_218"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_219"> <id>2</id> <operations> <count>13</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_220"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_221"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_222"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_223"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_224"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_225"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_226"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_227"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_228"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_229"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_230"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_231"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_232"> <id>47</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_233"> <id>3</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_234"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_235"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_236"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_237"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_238"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_239"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_240"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_241"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_242"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_243"> <id>36</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_244"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_245"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_246"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_247"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_248"> <id>4</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_249"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_250"> <id>36</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_251"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_252"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_253"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_254"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_255"> <id>5</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_256"> <id>47</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_257"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_258"> <id>6</id> <operations> <count>13</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_259"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_260"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_261"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_262"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_263"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_264"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_265"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_266"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_267"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_268"> <id>60</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_269"> <id>61</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_270"> <id>62</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_271"> <id>86</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_272"> <id>7</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_273"> <id>64</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_274"> <id>65</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_275"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_276"> <id>67</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_277"> <id>68</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_278"> <id>69</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_279"> <id>72</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_280"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_281"> <id>74</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_282"> <id>75</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_283"> <id>76</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_284"> <id>77</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_285"> <id>83</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_286"> <id>84</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_287"> <id>8</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_288"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_289"> <id>76</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_290"> <id>78</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_291"> <id>79</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_292"> <id>80</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_293"> <id>81</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_294"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>25</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_295"> <inState>2</inState> <outState>5</outState> <condition> <id>26</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>12</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_296"> <inState>2</inState> <outState>3</outState> <condition> <id>28</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_297"> <inState>3</inState> <outState>4</outState> <condition> <id>29</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>27</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_298"> <inState>4</inState> <outState>3</outState> <condition> <id>32</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_299"> <inState>3</inState> <outState>2</outState> <condition> <id>34</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>27</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_300"> <inState>5</inState> <outState>6</outState> <condition> <id>37</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_301"> <inState>6</inState> <outState>7</outState> <condition> <id>39</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>51</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_302"> <inState>7</inState> <outState>8</outState> <condition> <id>40</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>66</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_303"> <inState>8</inState> <outState>7</outState> <condition> <id>43</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_304"> <inState>7</inState> <outState>6</outState> <condition> <id>45</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>66</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>56</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>7</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>37</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>48</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>76</first> <second> <first>4</first> <second>1</second> </second> </item> <item> <first>77</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>78</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>80</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>81</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>84</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>86</first> <second> <first>3</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>10</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>24</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>43</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>46</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>49</first> <second> <first>1</first> <second>2</second> </second> </item> <item> <first>55</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>63</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>70</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>82</first> <second> <first>4</first> <second>5</second> </second> </item> <item> <first>85</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>87</first> <second> <first>3</first> <second>3</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="44" tracking_level="0" version="0"> <count>43</count> <item_version>0</item_version> <item class_id="45" tracking_level="0" version="0"> <first>48</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>52</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>56</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>63</first> <second> <count>2</count> <item_version>0</item_version> <item>36</item> <item>36</item> </second> </item> <item> <first>68</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>74</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>80</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>86</first> <second> <count>2</count> <item_version>0</item_version> <item>76</item> <item>76</item> </second> </item> <item> <first>91</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>98</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>108</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>119</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>130</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>141</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>148</first> <second> <count>2</count> <item_version>0</item_version> <item>47</item> <item>47</item> </second> </item> <item> <first>156</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>162</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>168</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>172</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>180</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>188</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>192</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>196</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>202</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>208</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>213</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>218</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>222</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>227</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>231</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>237</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>243</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>251</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>255</first> <second> <count>1</count> <item_version>0</item_version> <item>60</item> </second> </item> <item> <first>259</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>267</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>271</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>277</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>283</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>287</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>292</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>297</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>302</first> <second> <count>1</count> <item_version>0</item_version> <item>78</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="47" tracking_level="0" version="0"> <count>38</count> <item_version>0</item_version> <item class_id="48" tracking_level="0" version="0"> <first>buf_2d_in_addr_gep_fu_68</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>buf_2d_in_alloca_fu_48</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>buf_2d_out_addr_gep_fu_80</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>buf_2d_out_alloca_fu_52</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>c_1_fu_277</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>c_fu_202</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>c_i6_cast2_fu_267</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>c_i6_phi_fu_141</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>c_i_cast6_fu_192</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>c_i_phi_fu_119</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>exitcond1_i3_fu_231</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>exitcond1_i_fu_156</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>exitcond_i7_fu_271</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>exitcond_i_fu_196</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>input_addr_gep_fu_56</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>output_addr_gep_fu_91</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>r_1_fu_237</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>r_fu_162</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>r_i2_phi_fu_130</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>r_i_phi_fu_108</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>tmp_1_i5_fu_259</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>tmp_1_i_cast_fu_218</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>tmp_21_fu_243</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>tmp_22_fu_222</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>tmp_23_fu_287</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>tmp_33_cast_fu_188</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>tmp_35_cast_fu_251</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>tmp_37_cast_fu_227</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>tmp_38_cast_fu_292</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>tmp_3_fu_255</first> <second> <count>1</count> <item_version>0</item_version> <item>60</item> </second> </item> <item> <first>tmp_3_i8_cast_fu_283</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>tmp_4_i_fu_297</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>tmp_5_i_fu_302</first> <second> <count>1</count> <item_version>0</item_version> <item>78</item> </second> </item> <item> <first>tmp_9_i_fu_208</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>tmp_fu_168</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>tmp_i_15_fu_213</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>tmp_i_fu_172</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>tmp_s_fu_180</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>1</count> <item_version>0</item_version> <item> <first>grp_dct_2d_fu_148</first> <second> <count>2</count> <item_version>0</item_version> <item>47</item> <item>47</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="49" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="50" tracking_level="0" version="0"> <first class_id="51" tracking_level="0" version="0"> <first>buf_2d_in</first> <second>0</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first> <first>buf_2d_in</first> <second>100</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first> <first>buf_2d_out</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>76</item> <item>76</item> </second> </item> <item> <first> <first>buf_2d_out</first> <second>100</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first> <first>dct_coeff_table</first> <second>100</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first> <first>input_r</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>36</item> <item>36</item> </second> </item> <item> <first> <first>output_r</first> <second>0</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>16</count> <item_version>0</item_version> <item> <first>104</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>115</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>126</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>137</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>309</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>314</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>319</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>327</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>332</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>337</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>345</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>350</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>355</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>363</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>368</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>373</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>16</count> <item_version>0</item_version> <item> <first>buf_2d_out_addr_reg_368</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>c_1_reg_363</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>c_i6_reg_137</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>c_i_reg_115</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>c_reg_327</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>input_addr_reg_332</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>r_1_reg_345</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>r_i2_reg_126</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>r_i_reg_104</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>r_reg_309</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> <item> <first>tmp_1_i5_reg_355</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>tmp_22_reg_337</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>tmp_33_cast_reg_319</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>tmp_35_cast_reg_350</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>tmp_4_i_reg_373</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>tmp_i_reg_314</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>4</count> <item_version>0</item_version> <item> <first>104</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>115</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>126</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>137</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>4</count> <item_version>0</item_version> <item> <first>c_i6_reg_137</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>c_i_reg_115</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>r_i2_reg_126</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>r_i_reg_104</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="52" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="53" tracking_level="0" version="0"> <first>input_r(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>36</item> <item>36</item> </second> </item> </second> </item> <item> <first>output_r(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>store</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="54" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>1</first> <second>RAM</second> </item> <item> <first>2</first> <second>RAM</second> </item> </port2core> <node2core> <count>2</count> <item_version>0</item_version> <item> <first>7</first> <second>RAM</second> </item> <item> <first>8</first> <second>RAM</second> </item> </node2core> </syndb> </boost_serialization>
--=========================================================================== -- -- This package is the interface for the Alpha part of the EDC Client -- for the second block (the block on the right) -- --=========================================================================== -- -- Copyright 2021 (C) Holger Rodriguez -- -- SPDX-License-Identifier: BSD-3-Clause -- package Edc_Client.Alpha.Block2 is -------------------------------------------------------------------------- -- Shows a Single Letter -------------------------------------------------------------------------- subtype Single_Letter_Positions is Integer range 1 .. 4; procedure Show_Single_Letter (Position : Single_Letter_Positions; Value : Single_Letter_String) with Pre => Initialized; -------------------------------------------------------------------------- -- Shows Double Letters -------------------------------------------------------------------------- subtype Double_Letters_Positions is Integer range 1 .. 2; procedure Show_Double_Letters (Position : Double_Letters_Positions; Value : Double_Letters_String) with Pre => Initialized; -------------------------------------------------------------------------- -- Shows Four Letters -------------------------------------------------------------------------- procedure Show_Four_Letters (Value : Four_Letters_String) with Pre => Initialized; end Edc_Client.Alpha.Block2;
with Ada.Real_Time; use Ada.Real_Time; with STM32F4.SDRAM; use STM32F4.SDRAM; package body STM32F4.LCD is function As_Word is new Ada.Unchecked_Conversion (Source => System.Address, Target => Word); ------------------- -- Init_LCD_GPIO -- ------------------- procedure Init_LCD_GPIO is Conf : GPIO_Port_Configuration; begin Enable_Clock (GPIO_A); Enable_Clock (GPIO_B); Enable_Clock (GPIO_C); Enable_Clock (GPIO_D); Enable_Clock (GPIO_F); Enable_Clock (GPIO_G); Configure_Alternate_Function (GPIO_A, (Pin_3, Pin_4, Pin_6, Pin_11, Pin_12), GPIO_AF_LTDC); Conf.Speed := Speed_50MHz; Conf.Mode := Mode_AF; Conf.Output_Type := Push_Pull; Conf.Resistors := Floating; Conf.Locked := True; Configure_IO (GPIO_A, (Pin_3, Pin_4, Pin_6, Pin_11, Pin_12), Conf); Configure_Alternate_Function (GPIO_B, (Pin_0, Pin_1), GPIO_AF_LTDC_2); Configure_Alternate_Function (GPIO_B, (Pin_8, Pin_9, Pin_10, Pin_11), GPIO_AF_LTDC); Configure_IO (GPIO_B, (Pin_0, Pin_1, Pin_8, Pin_9, Pin_10, Pin_11), Conf); Configure_Alternate_Function (GPIO_C, (Pin_6, Pin_7, Pin_10), GPIO_AF_LTDC); Configure_IO (GPIO_C, (Pin_6, Pin_7, Pin_10), Conf); Configure_Alternate_Function (GPIO_D, (Pin_3, Pin_6), GPIO_AF_LTDC); Configure_IO (GPIO_D, (Pin_3, Pin_6), Conf); Configure_Alternate_Function (GPIO_F, Pin_10, GPIO_AF_LTDC); Configure_IO (GPIO_F, Pin_10, Conf); Configure_Alternate_Function (GPIO_G, (Pin_6, Pin_7, Pin_11), GPIO_AF_LTDC); Configure_Alternate_Function (GPIO_G, (Pin_10, Pin_12), GPIO_AF_LTDC_2); Configure_IO (GPIO_G, (Pin_6, Pin_7, Pin_10, Pin_11, Pin_12), Conf); end Init_LCD_GPIO; ------------------ -- Init_LCD_SPI -- ------------------ procedure Init_LCD_SPI is Conf : GPIO_Port_Configuration; SPI_Conf : SPI_Configuration; begin Enable_Clock (SCK_GPIO); Enable_Clock (MISO_GPIO); Enable_Clock (MOSI_GPIO); Enable_Clock (LCD_SPI); Configure_Alternate_Function (SCK_GPIO, SCK_Pin, SCK_AF); Configure_Alternate_Function (MISO_GPIO, MISO_Pin, MISO_AF); Configure_Alternate_Function (MOSI_GPIO, MOSI_Pin, MOSI_AF); Conf.Speed := Speed_25MHz; Conf.Mode := Mode_AF; Conf.Output_Type := Push_Pull; Conf.Resistors := Pull_Down; Conf.Locked := True; Configure_IO (SCK_GPIO, SCK_Pin, Conf); Configure_IO (MISO_GPIO, MISO_Pin, Conf); Configure_IO (MOSI_GPIO, MOSI_Pin, Conf); Reset (LCD_SPI); if not Enabled (LCD_SPI) then SPI_Conf.Direction := D2Lines_FullDuplex; SPI_Conf.Mode := Master; SPI_Conf.Data_Size := Data_8; SPI_Conf.Clock_Polarity := Low; SPI_Conf.Clock_Phase := P1Edge; SPI_Conf.Slave_Management := Soft; SPI_Conf.Baud_Rate_Prescaler := BRP_16; SPI_Conf.First_Bit := MSB; SPI_Conf.CRC_Poly := 7; Configure (LCD_SPI, SPI_Conf); Enable (LCD_SPI); end if; end Init_LCD_SPI; ----------------- -- Chip_Select -- ----------------- procedure Chip_Select (Enabled : Boolean) is begin if Enabled then Clear (NCS_GPIO, NCS_Pin); else Set (NCS_GPIO, NCS_Pin); end if; end Chip_Select; ------------------------- -- LCD_CtrlLinesConfig -- ------------------------- procedure LCD_CtrlLinesConfig is Conf : GPIO_Port_Configuration; begin Enable_Clock (NCS_GPIO); Enable_Clock (WRX_GPIO); Conf.Speed := Speed_50MHz; Conf.Mode := Mode_Out; Conf.Output_Type := Push_Pull; Conf.Resistors := Floating; Conf.Locked := True; Configure_IO (NCS_GPIO, NCS_Pin, Conf); Configure_IO (WRX_GPIO, WRX_Pin, Conf); Chip_Select (false); end LCD_CtrlLinesConfig; ---------------------- -- LCD_WriteCommand -- ---------------------- procedure LCD_WriteCommand (Cmd : Half_Word) is begin Clear (WRX_GPIO, WRX_Pin); Chip_Select (true); Send (LCD_SPI, Cmd); while not Tx_Is_Empty (LCD_SPI) loop null; end loop; while Busy (LCD_SPI) loop null; end loop; Chip_Select (false); end LCD_WriteCommand; ------------------- -- LCD_WriteData -- ------------------- procedure LCD_WriteData (Cmd : Half_Word) is begin Set (WRX_GPIO, WRX_Pin); Chip_Select (true); Send (LCD_SPI, Cmd); while not Tx_Is_Empty (LCD_SPI) loop null; end loop; while Busy (LCD_SPI) loop -- if SPI_Get_Flags (LCD_SPI).Frame_Fmt_Error = 1 then -- raise Program_Error; -- end if; null; end loop; Chip_Select (false); end LCD_WriteData; -------------------- -- Relative_Delay -- -------------------- procedure Relative_Delay (Ms : Integer) is Next_Start : Time := Clock; Period : constant Time_Span := Milliseconds (Ms); begin Next_Start := Next_Start + Period; delay until Next_Start; end Relative_Delay; ----------------- -- LCD_PowerOn -- ----------------- procedure LCD_PowerOn is begin LCD_WriteCommand (16#CA#); LCD_WriteData (16#C3#); LCD_WriteData (16#08#); LCD_WriteData (16#50#); LCD_WriteCommand (LCD_POWERB); LCD_WriteData (16#00#); LCD_WriteData (16#C1#); LCD_WriteData (16#30#); LCD_WriteCommand (LCD_POWER_SEQ); LCD_WriteData (16#64#); LCD_WriteData (16#03#); LCD_WriteData (16#12#); LCD_WriteData (16#81#); LCD_WriteCommand (LCD_DTCA); LCD_WriteData (16#85#); LCD_WriteData (16#00#); LCD_WriteData (16#78#); LCD_WriteCommand (LCD_POWERA); LCD_WriteData (16#39#); LCD_WriteData (16#2C#); LCD_WriteData (16#00#); LCD_WriteData (16#34#); LCD_WriteData (16#02#); LCD_WriteCommand (LCD_PRC); LCD_WriteData (16#20#); LCD_WriteCommand (LCD_DTCB); LCD_WriteData (16#00#); LCD_WriteData (16#00#); LCD_WriteCommand (LCD_FRC); LCD_WriteData (16#00#); LCD_WriteData (16#1B#); LCD_WriteCommand (LCD_DFC); LCD_WriteData (16#0A#); LCD_WriteData (16#A2#); LCD_WriteCommand (LCD_POWER1); LCD_WriteData (16#10#); LCD_WriteCommand (LCD_POWER2); LCD_WriteData (16#10#); LCD_WriteCommand (LCD_VCOM1); LCD_WriteData (16#45#); LCD_WriteData (16#15#); LCD_WriteCommand (LCD_VCOM2); LCD_WriteData (16#90#); LCD_WriteCommand (LCD_MAC); LCD_WriteData (16#C8#); LCD_WriteCommand (LCD_3GAMMA_EN); LCD_WriteData (16#00#); LCD_WriteCommand (LCD_RGB_INTERFACE); LCD_WriteData (16#C2#); LCD_WriteCommand (LCD_DFC); LCD_WriteData (16#0A#); LCD_WriteData (16#A7#); LCD_WriteData (16#27#); LCD_WriteData (16#04#); -- colomn address set LCD_WriteCommand (LCD_COLUMN_ADDR); LCD_WriteData (16#00#); LCD_WriteData (16#00#); LCD_WriteData (16#00#); LCD_WriteData (16#EF#); -- Page Address Set LCD_WriteCommand (LCD_PAGE_ADDR); LCD_WriteData (16#00#); LCD_WriteData (16#00#); LCD_WriteData (16#01#); LCD_WriteData (16#3F#); LCD_WriteCommand (LCD_INTERFACE); LCD_WriteData (16#01#); LCD_WriteData (16#00#); LCD_WriteData (16#06#); LCD_WriteCommand (LCD_GRAM); Relative_Delay (200); LCD_WriteCommand (LCD_GAMMA); LCD_WriteData (16#01#); LCD_WriteCommand (LCD_PGAMMA); LCD_WriteData (16#0F#); LCD_WriteData (16#29#); LCD_WriteData (16#24#); LCD_WriteData (16#0C#); LCD_WriteData (16#0E#); LCD_WriteData (16#09#); LCD_WriteData (16#4E#); LCD_WriteData (16#78#); LCD_WriteData (16#3C#); LCD_WriteData (16#09#); LCD_WriteData (16#13#); LCD_WriteData (16#05#); LCD_WriteData (16#17#); LCD_WriteData (16#11#); LCD_WriteData (16#00#); LCD_WriteCommand (LCD_NGAMMA); LCD_WriteData (16#00#); LCD_WriteData (16#16#); LCD_WriteData (16#1B#); LCD_WriteData (16#04#); LCD_WriteData (16#11#); LCD_WriteData (16#07#); LCD_WriteData (16#31#); LCD_WriteData (16#33#); LCD_WriteData (16#42#); LCD_WriteData (16#05#); LCD_WriteData (16#0C#); LCD_WriteData (16#0A#); LCD_WriteData (16#28#); LCD_WriteData (16#2F#); LCD_WriteData (16#0F#); LCD_WriteCommand (LCD_SLEEP_OUT); Relative_Delay (200); LCD_WriteCommand (LCD_DISPLAY_ON); -- GRAM start writing LCD_WriteCommand (LCD_GRAM); end LCD_PowerOn; ------------------- -- Reload_Config -- ------------------- procedure Reload_Config is begin LTDC.SRC.IMR := 1; loop exit when LTDC.SRC.IMR = 0; end loop; end Reload_Config; ------------------- -- Reload_Config -- ------------------- procedure Reload_Config_Vbr is begin LTDC.SRC.VBR := 1; loop exit when LTDC.SRC.VBR = 0; end loop; end Reload_Config_Vbr; --------------- -- Get_Layer -- --------------- function Get_Layer (Layer : LCD_Layer) return Layer_Access is begin if Layer = Layer1 then return Layer1_Reg'Access; else return Layer2_Reg'Access; end if; end Get_Layer; ---------------------- -- Initialize_Layer -- ---------------------- procedure Initialize_Layer (Layer : LCD_Layer; Pixel_Fmt : Word; Blending_Factor_1 : Bits_3; Blending_Factor_2 : Bits_3) is L : constant Layer_Access := Get_Layer (Layer); FB : constant Frame_Buffer_Access := Current_Frame_Buffer (Layer); begin -- Clear Layer frame buffer FB.all := (others => Black); -- Windowing configuration. declare WHPC : LWHPC_Registers := L.all.WHPC; WVPC : LWVPC_Registers := L.all.WVPC; PFC : LPFC_Register := L.all.PFC; CAC : LCAC_Registers := L.all.CAC; DCC : LDCC_Registers := L.all.DCC; BFC : LBFC_Registers := L.all.BFC; CFBL : LCFBL_Registers := L.all.CFBL; CFBLN : LCFBLN_Registers := L.all.CFBLN; begin WHPC.Horizontal_Start := 3; WHPC.Horizontal_Stop := (LCD_PIXEL_WIDTH + 3 - 1); WVPC.Vertical_Start := 4; WVPC.Vertical_Stop := (LCD_PIXEL_HEIGHT + 4 - 1); L.all.WHPC := WHPC; L.all.WVPC := WVPC; PFC := Pixel_Fmt; L.all.PFC := PFC; CAC.CONSTA := 255; L.all.CAC := CAC; DCC.DCBlue := 0; DCC.DCGreen := 0; DCC.DCRed := 0; DCC.DCALPHA := 0; L.all.DCC := DCC; BFC.BF1 := Blending_Factor_1; BFC.BF2 := Blending_Factor_2; L.all.BFC := BFC; CFBL.CFBLL := (LCD_PIXEL_WIDTH * 2) + 3; CFBL.CFBP := LCD_PIXEL_WIDTH * 2; L.all.CFBL := CFBL; CFBLN.CFBLNBR := LCD_PIXEL_HEIGHT; L.all.CFBLN := CFBLN; end; -- Flip_Buffers; Reload_Config; end Initialize_Layer; ---------------- -- Initialize -- ---------------- procedure Initialize is begin LCD_CtrlLinesConfig; Chip_Select (true); Chip_Select (false); Init_LCD_SPI; LCD_PowerOn; LTDC_Clock_Enable; Init_LCD_GPIO; STM32F4.SDRAM.Initialize; LTDC.GC.VSPOL := Polarity_active_Low; LTDC.GC.HSPOL := Polarity_active_Low; LTDC.GC.DEPOL := Polarity_active_Low; LTDC.GC.PCPOL := Polarity_active_Low; LTDC.BCC.BCRed := 16#FF#; Set_PLLSAI_Factors (LCD => 4, SAI1 => 7, VCO => 192, DivR => 2); Enable_PLLSAI; LTDC.SSC.HSW := 9; LTDC.SSC.VSH := 1; declare SCC : Word with Volatile, Address => System'To_Address (SSCR_Base); begin SCC := (9 * (2**16)) or (1); end; LTDC.BPC.AHBP := 29; LTDC.BPC.AVBP := 3; LTDC.AWC.AAW := 269; LTDC.AWC.AAH := 323; LTDC.TWC.TOTALW := 279; LTDC.TWC.TOTALH := 327; Set_Background (16#00#, 16#00#, 16#00#); Reload_Config; declare GC : GC_Registers; begin -- Enable LTDC GC := LTDC.GC; GC.LTDCEN := 1; LTDC.GC := GC; end; STM32F4.LCD.Initialize_Layer (Layer1, Default_Pixel_Fmt, BF1_Pixel_Alpha, BF2_Pixel_Alpha); -- STM32F4.LCD.Initialize_Layer (Layer2, Default_Pixel_Fmt, -- BF1_Pixel_Alpha, -- BF2_Pixel_Alpha); -- STM32F4.LCD.Set_Layer_State (Layer2, Disabled); Reload_Config; Set_Layer_State (Layer1, Enabled); declare GC : GC_Registers; begin GC := LTDC.GC; -- enable Dither GC.DEN := 1; LTDC.GC := GC; end; end Initialize; -------------------------- -- Current_Frame_Buffer -- -------------------------- function Current_Frame_Buffer (Layer : LCD_Layer) return Frame_Buffer_Access is begin return Frame_Buffer_Array (Layer, Current_Frame_Buffer_Index)'Access; end Current_Frame_Buffer; -------------------- -- Set_Layer_CFBA -- -------------------- procedure Set_Layer_FB_Address (Layer : LCD_Layer; FBA : Frame_Buffer_Access) is L : constant Layer_Access := Get_Layer (Layer); begin L.all.CFBA := As_Word (FBA.all'Address); end Set_Layer_FB_Address; --------------------- -- Set_Layer_State -- --------------------- procedure Set_Layer_State (Layer : LCD_Layer; State : Layer_State) is L : constant Layer_Access := Get_Layer (Layer); Ctrl : LC_Registers; begin Ctrl := L.all.Ctrl; Ctrl.LEN := (if State = Enabled then 1 else 0); L.all.Ctrl := Ctrl; Reload_Config_Vbr; end Set_Layer_State; -------------------- -- Set_Background -- -------------------- procedure Set_Background (R, G, B : Byte) is begin LTDC.BCC.BCRed := R; LTDC.BCC.BCBlue := G; LTDC.BCC.BCGreen := B; end Set_Background; --------------- -- Set_Pixel -- --------------- procedure Set_Pixel (Layer : LCD_Layer; X : Width; Y : Height; Value : Pixel) is FB : constant Frame_Buffer_Access := Current_Frame_Buffer (Layer); Pix_Index : constant Frame_Buffer_Range := Frame_Buffer_Range (X + Y * LCD_PIXEL_WIDTH); begin FB (Pix_Index) := Value; end Set_Pixel; ----------------- -- Pixel_Value -- ----------------- function Pixel_Value (Layer : LCD_Layer; X : Width; Y : Height) return Pixel is FB : constant Frame_Buffer_Access := Current_Frame_Buffer (Layer); Pix_Index : constant Frame_Buffer_Range := Frame_Buffer_Range (X + Y * LCD_PIXEL_WIDTH); begin return FB (Pix_Index); end Pixel_Value; ------------------ -- Flip_Buffers -- ------------------ procedure Flip_Buffers is begin Set_Layer_FB_Address (Layer1, Frame_Buffer_Array (Layer1, Current_Frame_Buffer_Index)'Access); Current_Frame_Buffer_Index := Current_Frame_Buffer_Index + 1; Reload_Config_Vbr; -- Current_Frame_Buffer_Index := Current_Frame_Buffer_Index + 1; -- Current_Frame_Buffer (Layer1).all := (others => Black); -- Current_Frame_Buffer_Index := Current_Frame_Buffer_Index + 1; end Flip_Buffers; procedure Flip_Copy_Buffers is begin Flip_Buffers; Frame_Buffer_Array(Layer1, Current_Frame_Buffer_Index) := Frame_Buffer_Array(Layer1, Current_Frame_Buffer_Index + 1); end Flip_Copy_Buffers; end STM32F4.LCD;
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- with Ada.Containers; generic with package Bounded is new Ada.Strings.Wide_Bounded.Generic_Bounded_Length (<>); function Ada.Strings.Wide_Bounded.Wide_Hash (Key : in Bounded.Bounded_Wide_String) return Containers.Hash_Type; pragma Preelaborate (Wide_Hash);
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with HAL; use HAL; with HAL.I2C; use HAL.I2C; with nRF51.GPIO; use nRF51.GPIO; with NRF51_SVD.TWI; package nRF51.TWI is type TWI_Speed is (TWI_100kbps, TWI_250kbps, TWI_400kbps); type TWI_Master (Periph : not null access NRF51_SVD.TWI.TWI_Peripheral) is new HAL.I2C.I2C_Port with private; procedure Enable (This : in out TWI_Master); procedure Disable (This : in out TWI_Master); function Enabled (This : TWI_Master) return Boolean; procedure Configure (This : in out TWI_Master; SCL, SDA : GPIO_Pin_Index; Speed : TWI_Speed); procedure Disconnect (This : in out TWI_Master); -- Disconect the peripheral from the GPIO points overriding procedure Master_Transmit (This : in out TWI_Master; Addr : I2C_Address; Data : I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) with Pre => Enabled (This); overriding procedure Master_Receive (This : in out TWI_Master; Addr : I2C_Address; Data : out I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) with Pre => Enabled (This); overriding procedure Mem_Write (This : in out TWI_Master; Addr : I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : I2C_Memory_Address_Size; Data : I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) with Pre => Enabled (This); overriding procedure Mem_Read (This : in out TWI_Master; Addr : I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : I2C_Memory_Address_Size; Data : out I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) with Pre => Enabled (This); private type TWI_Master (Periph : not null access NRF51_SVD.TWI.TWI_Peripheral) is new HAL.I2C.I2C_Port with record Do_Stop_Sequence : Boolean := True; end record; end nRF51.TWI;
with Ada.Containers; use Ada.Containers; with Ada.Directories; use Ada.Directories; with Blueprint; use Blueprint; with AAA.Strings; use AAA.Strings; with Ada.Command_Line; with Templates_Parser; with Filesystem; with Commands; package body Commands.Import is ------------- -- Execute -- ------------- overriding procedure Execute (Cmd : in out Instance; Args : AAA.Strings.Vector) is begin null; end Execute; -------------------- -- Setup_Switches -- -------------------- overriding procedure Setup_Switches (Cmd : in out Instance; Config : in out CLIC.Subcommand.Switches_Configuration) is use CLIC.Subcommand; begin null; end Setup_Switches; end Commands.Import;
----------------------------------------------------------------------- -- awa-settings-modules -- Module awa-settings -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Unchecked_Deallocation; with ADO.Sessions; with ADO.Queries; with AWA.Services.Contexts; with AWA.Settings.Models; with AWA.Modules.Get; with AWA.Users.Models; with Util.Log.Loggers; with Util.Beans.Objects; with Util.Beans.Basic; package body AWA.Settings.Modules is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Awa.Settings.Module"); package ASC renames AWA.Services.Contexts; -- Load the setting value for the current user. -- Return the default value if there is no such setting. procedure Load (Name : in String; Default : in String; Value : out Ada.Strings.Unbounded.Unbounded_String); -- Save the setting value for the current user. procedure Save (Name : in String; Value : in String); -- ------------------------------ -- Set the user setting with the given name in the setting manager cache -- and in the database. -- ------------------------------ procedure Set (Manager : in out Setting_Manager; Name : in String; Value : in String) is begin Manager.Data.Set (Name, Value); end Set; -- ------------------------------ -- Get the user setting with the given name from the setting manager cache. -- Load the user setting from the database if necessary. -- ------------------------------ procedure Get (Manager : in out Setting_Manager; Name : in String; Default : in String; Value : out Ada.Strings.Unbounded.Unbounded_String) is begin Manager.Data.Get (Name, Default, Value); end Get; -- ------------------------------ -- Get the current setting manager for the current user. -- ------------------------------ function Current return Setting_Manager_Access is Ctx : constant ASC.Service_Context_Access := ASC.Current; Obj : Util.Beans.Objects.Object := Ctx.Get_Session_Attribute (SESSION_ATTR_NAME); Bean : constant access Util.Beans.Basic.Readonly_Bean'Class := Util.Beans.Objects.To_Bean (Obj); begin if Bean = null or else not (Bean.all in Setting_Manager'Class) then declare Mgr : constant Setting_Manager_Access := new Setting_Manager; begin Obj := Util.Beans.Objects.To_Object (Mgr.all'Access); Ctx.Set_Session_Attribute (SESSION_ATTR_NAME, Obj); return Mgr; end; else return Setting_Manager'Class (Bean.all)'Unchecked_Access; end if; end Current; -- ------------------------------ -- Initialize the settings module. -- ------------------------------ overriding procedure Initialize (Plugin : in out Setting_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config) is begin Log.Info ("Initializing the settings module"); AWA.Modules.Module (Plugin).Initialize (App, Props); end Initialize; -- ------------------------------ -- Get the settings module. -- ------------------------------ function Get_Setting_Module return Setting_Module_Access is function Get is new AWA.Modules.Get (Setting_Module, Setting_Module_Access, NAME); begin return Get; end Get_Setting_Module; -- ------------------------------ -- Load the setting value for the current user. -- Return the default value if there is no such setting. -- ------------------------------ procedure Load (Name : in String; Default : in String; Value : out Ada.Strings.Unbounded.Unbounded_String) is Ctx : constant Services.Contexts.Service_Context_Access := AWA.Services.Contexts.Current; User : constant AWA.Users.Models.User_Ref := Ctx.Get_User; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); Query : ADO.Queries.Context; Setting : AWA.Settings.Models.User_Setting_Ref; Found : Boolean; begin Query.Set_Join ("INNER JOIN awa_setting AS a ON o.setting_id = a.id "); Query.Set_Filter ("a.name = :name AND o.user_id = :user"); Query.Bind_Param ("name", Name); Query.Bind_Param ("user", User.Get_Id); Setting.Find (DB, Query, Found); if not Found then Value := Ada.Strings.Unbounded.To_Unbounded_String (Default); else Value := Setting.Get_Value; end if; end Load; -- Save the setting value for the current user. procedure Save (Name : in String; Value : in String) is Ctx : constant Services.Contexts.Service_Context_Access := AWA.Services.Contexts.Current; User : constant AWA.Users.Models.User_Ref := Ctx.Get_User; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); Setting : AWA.Settings.Models.User_Setting_Ref; Query : ADO.Queries.Context; Found : Boolean; begin Ctx.Start; Query.Set_Join ("INNER JOIN awa_setting AS a ON o.setting_id = a.id "); Query.Set_Filter ("a.name = :name AND o.user_id = :user"); Query.Bind_Param ("name", Name); Query.Bind_Param ("user", User.Get_Id); Setting.Find (DB, Query, Found); if not Found then declare Setting_Def : AWA.Settings.Models.Setting_Ref; begin Query.Clear; Query.Set_Filter ("o.name = :name"); Query.Bind_Param ("name", Name); Setting_Def.Find (DB, Query, Found); if not Found then Setting_Def.Set_Name (Name); Setting_Def.Save (DB); end if; Setting.Set_Setting (Setting_Def); end; Setting.Set_User (User); end if; Setting.Set_Value (Value); Setting.Save (DB); Ctx.Commit; end Save; procedure Free is new Ada.Unchecked_Deallocation (Object => Setting_Data, Name => Setting_Data_Access); use Ada.Strings.Unbounded; protected body Settings is procedure Get (Name : in String; Default : in String; Value : out Ada.Strings.Unbounded.Unbounded_String) is Item : Setting_Data_Access := First; Previous : Setting_Data_Access := null; begin while Item /= null loop if Item.Name = Name then Value := Item.Value; if Previous /= null then Previous.Next_Setting := Item.Next_Setting; First := Item; end if; return; end if; Previous := Item; Item := Item.Next_Setting; end loop; Load (Name, Default, Value); Item := new Setting_Data; Item.Name := Ada.Strings.Unbounded.To_Unbounded_String (Name); Item.Value := Value; Item.Next_Setting := First; First := Item; end Get; procedure Set (Name : in String; Value : in String) is Item : Setting_Data_Access := First; Previous : Setting_Data_Access := null; begin while Item /= null loop if Item.Name = Name then if Previous /= null then Previous.Next_Setting := Item.Next_Setting; First := Item; end if; if Item.Value = Value then return; end if; Item.Value := Ada.Strings.Unbounded.To_Unbounded_String (Value); Save (Name, Value); return; end if; Previous := Item; Item := Item.Next_Setting; end loop; Item := new Setting_Data; Item.Name := Ada.Strings.Unbounded.To_Unbounded_String (Name); Item.Value := Ada.Strings.Unbounded.To_Unbounded_String (Value); Item.Next_Setting := First; First := Item; Save (Name, Value); end Set; procedure Clear is begin while First /= null loop declare Item : Setting_Data_Access := First; begin First := Item.Next_Setting; Free (Item); end; end loop; end Clear; end Settings; end AWA.Settings.Modules;
pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; with GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h; with glib; with glib.Values; with System; with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h; -- limited with GStreamer.GST_Low_Level.glib_2_0_glib_garray_h; with System; -- limited with GStreamer.GST_Low_Level.glib_2_0_glib_gstring_h; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h is -- GStreamer -- * Copyright (C) <2005,2006> Wim Taymans <wim@fluendo.com> -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Library General Public -- * License as published by the Free Software Foundation; either -- * version 2 of the License, or (at your option) any later version. -- * -- * This library 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 -- * Library General Public License for more details. -- * -- * You should have received a copy of the GNU Library General Public -- * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -- -- * Unless otherwise indicated, Source Code is licensed under MIT license. -- * See further explanation attached in License Statement (distributed in the file -- * LICENSE). -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy of -- * this software and associated documentation files (the "Software"), to deal in -- * the Software without restriction, including without limitation the rights to -- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -- * of the Software, and to permit persons to whom the Software is furnished to do -- * so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in all -- * copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- * SOFTWARE. -- --* -- * GstRTSPMsgType: -- * @GST_RTSP_MESSAGE_INVALID: invalid message type -- * @GST_RTSP_MESSAGE_REQUEST: RTSP request message -- * @GST_RTSP_MESSAGE_RESPONSE: RTSP response message -- * @GST_RTSP_MESSAGE_HTTP_REQUEST: HTTP request message. Since 0.10.25 -- * @GST_RTSP_MESSAGE_HTTP_RESPONSE: HTTP response message. Since 0.10.25 -- * @GST_RTSP_MESSAGE_DATA: data message -- * -- * The type of a message. -- type GstRTSPMsgType is (GST_RTSP_MESSAGE_INVALID, GST_RTSP_MESSAGE_REQUEST, GST_RTSP_MESSAGE_RESPONSE, GST_RTSP_MESSAGE_HTTP_REQUEST, GST_RTSP_MESSAGE_HTTP_RESPONSE, GST_RTSP_MESSAGE_DATA); pragma Convention (C, GstRTSPMsgType); -- gst/rtsp/gstrtspmessage.h:71 type GstRTSPMessage; type anon_410; type anon_411 is record method : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPMethod; -- gst/rtsp/gstrtspmessage.h:88 uri : access GLIB.gchar; -- gst/rtsp/gstrtspmessage.h:89 version : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPVersion; -- gst/rtsp/gstrtspmessage.h:90 end record; pragma Convention (C_Pass_By_Copy, anon_411); type anon_412 is record code : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPStatusCode; -- gst/rtsp/gstrtspmessage.h:93 reason : access GLIB.gchar; -- gst/rtsp/gstrtspmessage.h:94 version : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPVersion; -- gst/rtsp/gstrtspmessage.h:95 end record; pragma Convention (C_Pass_By_Copy, anon_412); type anon_413 is record channel : aliased GLIB.guint8; -- gst/rtsp/gstrtspmessage.h:98 end record; pragma Convention (C_Pass_By_Copy, anon_413); type anon_410 (discr : unsigned := 0) is record case discr is when 0 => request : aliased anon_411; -- gst/rtsp/gstrtspmessage.h:91 when 1 => response : aliased anon_412; -- gst/rtsp/gstrtspmessage.h:96 when others => data : aliased anon_413; -- gst/rtsp/gstrtspmessage.h:99 end case; end record; pragma Convention (C_Pass_By_Copy, anon_410); pragma Unchecked_Union (anon_410);--subtype GstRTSPMessage is u_GstRTSPMessage; -- gst/rtsp/gstrtspmessage.h:73 --* -- * GstRTSPMessage: -- * @type: the message type -- * -- * An RTSP message containing request, response or data messages. Depending on -- * the @type, the appropriate structure may be accessed. -- type GstRTSPMessage is record c_type : aliased GstRTSPMsgType; -- gst/rtsp/gstrtspmessage.h:84 type_data : aliased anon_410; -- gst/rtsp/gstrtspmessage.h:100 hdr_fields : System.Address; -- access GStreamer.GST_Low_Level.glib_2_0_glib_garray_h.GArray -- gst/rtsp/gstrtspmessage.h:103 c_body : access GLIB.guint8; -- gst/rtsp/gstrtspmessage.h:105 body_size : aliased GLIB.guint; -- gst/rtsp/gstrtspmessage.h:106 end record; pragma Convention (C_Pass_By_Copy, GstRTSPMessage); -- gst/rtsp/gstrtspmessage.h:82 --< private > -- memory management function gst_rtsp_message_new (msg : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:110 pragma Import (C, gst_rtsp_message_new, "gst_rtsp_message_new"); function gst_rtsp_message_init (msg : access GstRTSPMessage) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:111 pragma Import (C, gst_rtsp_message_init, "gst_rtsp_message_init"); function gst_rtsp_message_unset (msg : access GstRTSPMessage) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:112 pragma Import (C, gst_rtsp_message_unset, "gst_rtsp_message_unset"); function gst_rtsp_message_free (msg : access GstRTSPMessage) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:113 pragma Import (C, gst_rtsp_message_free, "gst_rtsp_message_free"); function gst_rtsp_message_get_type (msg : access GstRTSPMessage) return GstRTSPMsgType; -- gst/rtsp/gstrtspmessage.h:115 pragma Import (C, gst_rtsp_message_get_type, "gst_rtsp_message_get_type"); -- request function gst_rtsp_message_new_request (msg : System.Address; method : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPMethod; uri : access GLIB.gchar) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:118 pragma Import (C, gst_rtsp_message_new_request, "gst_rtsp_message_new_request"); function gst_rtsp_message_init_request (msg : access GstRTSPMessage; method : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPMethod; uri : access GLIB.gchar) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:121 pragma Import (C, gst_rtsp_message_init_request, "gst_rtsp_message_init_request"); function gst_rtsp_message_parse_request (msg : access GstRTSPMessage; method : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPMethod; uri : System.Address; version : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPVersion) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:124 pragma Import (C, gst_rtsp_message_parse_request, "gst_rtsp_message_parse_request"); -- response function gst_rtsp_message_new_response (msg : System.Address; code : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPStatusCode; reason : access GLIB.gchar; request : access constant GstRTSPMessage) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:130 pragma Import (C, gst_rtsp_message_new_response, "gst_rtsp_message_new_response"); function gst_rtsp_message_init_response (msg : access GstRTSPMessage; code : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPStatusCode; reason : access GLIB.gchar; request : access constant GstRTSPMessage) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:134 pragma Import (C, gst_rtsp_message_init_response, "gst_rtsp_message_init_response"); function gst_rtsp_message_parse_response (msg : access GstRTSPMessage; code : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPStatusCode; reason : System.Address; version : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPVersion) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:138 pragma Import (C, gst_rtsp_message_parse_response, "gst_rtsp_message_parse_response"); -- data function gst_rtsp_message_new_data (msg : System.Address; channel : GLIB.guint8) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:144 pragma Import (C, gst_rtsp_message_new_data, "gst_rtsp_message_new_data"); function gst_rtsp_message_init_data (msg : access GstRTSPMessage; channel : GLIB.guint8) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:146 pragma Import (C, gst_rtsp_message_init_data, "gst_rtsp_message_init_data"); function gst_rtsp_message_parse_data (msg : access GstRTSPMessage; channel : access GLIB.guint8) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:148 pragma Import (C, gst_rtsp_message_parse_data, "gst_rtsp_message_parse_data"); -- headers function gst_rtsp_message_add_header (msg : access GstRTSPMessage; field : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPHeaderField; value : access GLIB.gchar) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:152 pragma Import (C, gst_rtsp_message_add_header, "gst_rtsp_message_add_header"); function gst_rtsp_message_take_header (msg : access GstRTSPMessage; field : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPHeaderField; value : access GLIB.gchar) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:155 pragma Import (C, gst_rtsp_message_take_header, "gst_rtsp_message_take_header"); function gst_rtsp_message_remove_header (msg : access GstRTSPMessage; field : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPHeaderField; indx : GLIB.gint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:158 pragma Import (C, gst_rtsp_message_remove_header, "gst_rtsp_message_remove_header"); function gst_rtsp_message_get_header (msg : access constant GstRTSPMessage; field : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPHeaderField; value : System.Address; indx : GLIB.gint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:161 pragma Import (C, gst_rtsp_message_get_header, "gst_rtsp_message_get_header"); function gst_rtsp_message_append_headers (msg : access constant GstRTSPMessage; str : access GStreamer.GST_Low_Level.glib_2_0_glib_gstring_h.GString) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:165 pragma Import (C, gst_rtsp_message_append_headers, "gst_rtsp_message_append_headers"); -- handling the body function gst_rtsp_message_set_body (msg : access GstRTSPMessage; data : access GLIB.guint8; size : GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:169 pragma Import (C, gst_rtsp_message_set_body, "gst_rtsp_message_set_body"); function gst_rtsp_message_take_body (msg : access GstRTSPMessage; data : access GLIB.guint8; size : GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:172 pragma Import (C, gst_rtsp_message_take_body, "gst_rtsp_message_take_body"); function gst_rtsp_message_get_body (msg : access constant GstRTSPMessage; data : System.Address; size : access GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:175 pragma Import (C, gst_rtsp_message_get_body, "gst_rtsp_message_get_body"); function gst_rtsp_message_steal_body (msg : access GstRTSPMessage; data : System.Address; size : access GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:178 pragma Import (C, gst_rtsp_message_steal_body, "gst_rtsp_message_steal_body"); -- debug function gst_rtsp_message_dump (msg : access GstRTSPMessage) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspmessage.h:183 pragma Import (C, gst_rtsp_message_dump, "gst_rtsp_message_dump"); end GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.OCL.Operation_Call_Exps.Collections is pragma Preelaborate; package OCL_Operation_Call_Exp_Collections is new AMF.Generic_Collections (OCL_Operation_Call_Exp, OCL_Operation_Call_Exp_Access); type Set_Of_OCL_Operation_Call_Exp is new OCL_Operation_Call_Exp_Collections.Set with null record; Empty_Set_Of_OCL_Operation_Call_Exp : constant Set_Of_OCL_Operation_Call_Exp; type Ordered_Set_Of_OCL_Operation_Call_Exp is new OCL_Operation_Call_Exp_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_OCL_Operation_Call_Exp : constant Ordered_Set_Of_OCL_Operation_Call_Exp; type Bag_Of_OCL_Operation_Call_Exp is new OCL_Operation_Call_Exp_Collections.Bag with null record; Empty_Bag_Of_OCL_Operation_Call_Exp : constant Bag_Of_OCL_Operation_Call_Exp; type Sequence_Of_OCL_Operation_Call_Exp is new OCL_Operation_Call_Exp_Collections.Sequence with null record; Empty_Sequence_Of_OCL_Operation_Call_Exp : constant Sequence_Of_OCL_Operation_Call_Exp; private Empty_Set_Of_OCL_Operation_Call_Exp : constant Set_Of_OCL_Operation_Call_Exp := (OCL_Operation_Call_Exp_Collections.Set with null record); Empty_Ordered_Set_Of_OCL_Operation_Call_Exp : constant Ordered_Set_Of_OCL_Operation_Call_Exp := (OCL_Operation_Call_Exp_Collections.Ordered_Set with null record); Empty_Bag_Of_OCL_Operation_Call_Exp : constant Bag_Of_OCL_Operation_Call_Exp := (OCL_Operation_Call_Exp_Collections.Bag with null record); Empty_Sequence_Of_OCL_Operation_Call_Exp : constant Sequence_Of_OCL_Operation_Call_Exp := (OCL_Operation_Call_Exp_Collections.Sequence with null record); end AMF.OCL.Operation_Call_Exps.Collections;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.Internals.Unicode; package body League.Character_Sets is use Matreshka.Internals.Code_Point_Sets; function Wrap (Self : Shared_Code_Point_Set_Access) return Universal_Character_Set; --------- -- "-" -- --------- function "-" (Left, Right : Universal_Character_Set) return Universal_Character_Set is begin return Wrap (new Shared_Code_Point_Set'(Left.Data.all - Right.Data.all)); end "-"; --------- -- "=" -- --------- function "=" (Left, Right : Universal_Character_Set) return Boolean is begin return Left.Data.all = Right.Data.all; end "="; ----------- -- "and" -- ----------- function "and" (Left, Right : Universal_Character_Set) return Universal_Character_Set is begin return Wrap (new Shared_Code_Point_Set'(Left.Data.all and Right.Data.all)); end "and"; ----------- -- "not" -- ----------- function "not" (Right : Universal_Character_Set) return Universal_Character_Set is begin return Wrap (new Shared_Code_Point_Set'(not Right.Data.all)); end "not"; ---------- -- "or" -- ---------- function "or" (Left, Right : Universal_Character_Set) return Universal_Character_Set is begin return Wrap (new Shared_Code_Point_Set'(Left.Data.all or Right.Data.all)); end "or"; ----------- -- "xor" -- ----------- function "xor" (Left, Right : Universal_Character_Set) return Universal_Character_Set is begin return Wrap (new Shared_Code_Point_Set'(Left.Data.all xor Right.Data.all)); end "xor"; ------------ -- Adjust -- ------------ overriding procedure Adjust (Self : in out Universal_Character_Set) is begin Reference (Self.Data); end Adjust; -------------- -- Finalize -- -------------- overriding procedure Finalize (Self : in out Universal_Character_Set) is begin -- Finalize can be called more than once (as specified by language -- standard), thus implementation should provide protection from -- multiple finalization. if Self.Data /= null then Dereference (Self.Data); end if; end Finalize; --------- -- Has -- --------- function Has (Set : Universal_Character_Set; Element : Wide_Wide_Character) return Boolean is begin return Has (Set, League.Characters.To_Universal_Character (Element)); end Has; --------- -- Has -- --------- function Has (Set : Universal_Character_Set; Element : League.Characters.Universal_Character) return Boolean is begin return Has (Set.Data.all, Element); end Has; -------------- -- Is_Empty -- -------------- function Is_Empty (Set : Universal_Character_Set) return Boolean is begin return Is_Empty (Set.Data.all); end Is_Empty; --------------- -- Is_Subset -- --------------- function Is_Subset (Elements : Universal_Character_Set; Set : Universal_Character_Set) return Boolean is begin return Is_Subset (Elements.Data.all, Set.Data.all); end Is_Subset; ---------- -- Read -- ---------- procedure Read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : out Universal_Character_Set) is Last : Second_Stage_Array_Index; begin Second_Stage_Array_Index'Read (Stream, Last); Dereference (Item.Data); Item.Data := new Shared_Code_Point_Set (Last); First_Stage_Map'Read (Stream, Item.Data.First_Stage); Second_Stage_Array'Read (Stream, Item.Data.Second_Stages); end Read; ------------ -- To_Set -- ------------ function To_Set (Sequence : Wide_Wide_String) return Universal_Character_Set is begin return Wrap (new Shared_Code_Point_Set'(To_Set (Sequence))); end To_Set; ------------ -- To_Set -- ------------ function To_Set (Sequence : League.Strings.Universal_String) return Universal_Character_Set is begin return To_Set (League.Strings.To_Wide_Wide_String (Sequence)); end To_Set; ------------ -- To_Set -- ------------ function To_Set (Low, High : Wide_Wide_Character) return Universal_Character_Set is use Matreshka.Internals.Unicode; Lo : constant Code_Unit_32 := Code_Point'Min (Code_Point'Last, Wide_Wide_Character'Pos (Low)); Hi : constant Code_Unit_32 := Code_Point'Min (Code_Point'Last, Wide_Wide_Character'Pos (High)); begin return Wrap (new Shared_Code_Point_Set'(To_Set (Lo, Hi))); end To_Set; ---------- -- Wrap -- ---------- function Wrap (Self : Shared_Code_Point_Set_Access) return Universal_Character_Set is begin return Universal_Character_Set' (Ada.Finalization.Controlled with Data => Self); end Wrap; ----------- -- Write -- ----------- procedure Write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Universal_Character_Set) is begin Second_Stage_Array_Index'Write (Stream, Item.Data.Last); First_Stage_Map'Write (Stream, Item.Data.First_Stage); Second_Stage_Array'Write (Stream, Item.Data.Second_Stages); end Write; end League.Character_Sets;
-- -- -- package Copyright (c) Francois Fabien -- -- AdaPcre -- -- Body -- -- -- -- Last revision : 15 Oct 2012 -- -- -- ------------------------------------------------------------------------ -- interface to PCRE -- -- partial binding : substring extraction is not implemented. -- ------------------------------------------------------------------------ with Interfaces.C.Strings; use Interfaces.C.Strings; with Interfaces.C; use Interfaces.C; with Ada.Unchecked_Conversion; with Ada.Strings.Fixed; use Ada.Strings; with System; use System; package body AdaPcre is pragma Linker_Options ("-lpcre"); use Interfaces; function To_chars_ptr is new Ada.Unchecked_Conversion (Address, chars_ptr); function Pcre_Compile (pattern : chars_ptr; option : Options; errptr : access chars_ptr; erroffset : access Integer; tableptr : Table_Type) return Pcre_Type; pragma Import (C, Pcre_Compile, "pcre_compile"); procedure Compile (Matcher : out Pcre_Type; Pattern : String; Error_Msg : out Message; Last_Msg : out Natural; Error_Offset : out Natural; Option : Options := 0; Table : Table_Type := Null_Table) is Unknown : constant String := "Unknown error in pcre_compile"; Error_Ptr : aliased chars_ptr; ErrOffset : aliased Integer := 0; Pat : chars_ptr := New_String (Pattern); begin Last_Msg := 0; Error_Offset := 0; Matcher := Pcre_Compile (Pat, Option, Error_Ptr'Access, ErrOffset'Access, Table); Free (Pat); if Matcher = Null_Pcre then if Error_Ptr /= Null_Ptr then -- copy C error message to an Ada string. Last_Msg := Natural (Strlen (Error_Ptr)); Error_Msg (1 .. Last_Msg) := Value (Error_Ptr); else -- oops ! no error message is available. Last_Msg := Unknown'Last; Error_Msg (1 .. Last_Msg) := Unknown; end if; if ErrOffset > 0 then Error_Offset := ErrOffset; else Error_Offset := 0; end if; end if; end Compile; --------------------------------------------------------- -- Imports of GNAT alloc routines that are thread-safe -- -- -- so there are no dependency on external library -- like ms*.dll on Windows --------------------------------------------------------- function Gnat_Malloc (Size : C.size_t) return System.Address; pragma Import (C, Gnat_Malloc, "__gnat_malloc"); procedure Gnat_Free (Add : System.Address); pragma Import (C, Gnat_Free, "__gnat_free"); --------------------------------------------------------- -- Exporting the Gnat routines to pcre --------------------------------------------------------- type Access_Free is access procedure (Item : System.Address); pragma Convention (C, Access_Free); Pcre_Free : Access_Free := Gnat_Free'Access; pragma Export (C, Pcre_Free, "pcre_free"); --------------------------------------------------------- -- Free routines --------------------------------------------------------- procedure Free (T : Table_Type) is begin Pcre_Free (System.Address (T)); end Free; procedure Free (M : Pcre_Type) is begin Pcre_Free (System.Address (M)); end Free; ------------------------------------------------------------ -- If your version is > 8.20 consider using pcre_free_study ------------------------------------------------------------ procedure Free (M : Extra_type) is begin Pcre_Free (System.Address (M)); end Free; function Pcre_Exec (code : Pcre_Type; extra : Extra_type; subject : chars_ptr; length : Integer; startoffset : Integer; option : Options; ovector : System.Address; ovecsize : Integer) return Integer; pragma Import (C, Pcre_Exec, "pcre_exec"); procedure Match (Result : out Integer; Match_Vec : out Match_Array; Matcher : Pcre_Type; Extra : Extra_type := Null_Extra; Subject : String; Length : Natural; Startoffset : Natural := 0; Option : Options := 0) is Match_Size : constant Natural := Match_Vec'Length; m : array (0 .. Match_Size - 1) of C.int := (others => 0); pragma Convention (C, m); pragma Volatile (m); -- used by the C library -- Passing reference of the subject string (without nul terminator) -- pcre handle string termination using Length parameter. Start : constant chars_ptr := To_chars_ptr (Subject (Subject'First)'Address); begin Result := Pcre_Exec (Matcher, Extra, Start, Length, Startoffset, Option, m (0)'Address, Match_Size); for I in 0 .. Match_Size - 1 loop if m (I) > 0 then Match_Vec (I) := Integer (m (I)); else Match_Vec (I) := 0; end if; end loop; end Match; type Access_Malloc is access function (Size : C.size_t) return System.Address; pragma Convention (C, Access_Malloc); Pcre_Malloc : Access_Malloc := Gnat_Malloc'Access; pragma Export (C, Pcre_Malloc, "pcre_malloc"); function Pcre_Version return String is function Pcre_Version return chars_ptr; pragma Import (C, Pcre_Version, "pcre_version"); begin return Value (Pcre_Version); end Pcre_Version; function Pcre_Study (code : Pcre_Type; option : Options; errptr : access chars_ptr) return Extra_type; pragma Import (C, Pcre_Study, "pcre_study"); procedure Study (Matcher_Extra : out Extra_type; Code : Pcre_Type; Error_Msg : out Message; Last_Msg : out Natural; Option : Options := 0) is Error_Ptr : aliased chars_ptr; begin Last_Msg := 0; Matcher_Extra := Pcre_Study (Code, Option, Error_Ptr'Access); if Matcher_Extra = Null_Extra and then Error_Ptr /= Null_Ptr then -- an error occured Last_Msg := Natural (Strlen (Error_Ptr)); Error_Msg (1 .. Last_Msg) := Value (Error_Ptr); end if; end Study; begin -- Assignement of Global data Version declare Version_Str : constant String := Pcre_Version; P : Natural; begin P := Fixed.Index (Version_Str (1 .. 5), "."); Version := Version_Number'Value (Version_Str (1 .. P + 2)); end; end AdaPcre;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- R T S F I N D -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT 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 GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Types; use Types; package Rtsfind is -- This package contains the routine that is used to obtain runtime library -- entities, loading in the required runtime library packages on demand. It -- is also used for such purposes as finding System.Address when System has -- not been explicitly With'ed. ------------------------ -- Runtime Unit Table -- ------------------------ -- The following type includes an enumeration entry for each runtime -- unit. The enumeration literal represents the fully qualified -- name of the unit, as follows: -- Names of the form Ada_xxx are first level children of Ada, whose -- name is Ada.xxx. For example, the name Ada_Tags refers to package -- Ada.Tags. -- Names of the form Ada_Calendar_xxx are second level children -- of Ada.Calendar. This is part of a temporary implementation of -- delays; eventually, packages implementing delays will be found -- relative to the package that declares the time type. -- Names of the form Ada_Finalization_xxx are second level children -- of Ada.Finalization. -- Names of the form Ada_Interrupts_xxx are second level children -- of Ada.Interrupts. This is needed for Ada.Interrupts.Names which -- is used by pragma Interrupt_State. -- Names of the form Ada_Real_Time_xxx are second level children -- of Ada.Real_Time. -- Names of the form Ada_Streams_xxx are second level children -- of Ada.Streams. -- Names of the form Ada_Text_IO_xxx are second level children -- of Ada.Text_IO. -- Names of the form Ada_Wide_Text_IO_xxx are second level children -- of Ada.Wide_Text_IO. -- Names of the form Ada_Wide_Wide_Text_IO_xxx are second level children -- of Ada.Wide_Wide_Text_IO. -- Names of the form Interfaces_xxx are first level children of -- Interfaces_CPP refers to package Interfaces.CPP -- Names of the form System_xxx are first level children of System, whose -- name is System.xxx. For example, the name System_Str_Concat refers to -- package System.Str_Concat. -- Names of the form System_Tasking_xxx are second level children of the -- package System.Tasking. For example, System_Tasking_Stages refers to -- refers to the package System.Tasking.Stages. -- Other names stand for themselves (e.g. System for package System) -- This list can contain both subprogram and package unit names. For -- packages, the accessible entities in the package are separately -- listed in the package entity table. The units must be either library -- level package declarations, or library level subprogram declarations. -- Generic units, library level instantiations and subprogram bodies -- acting as specs may not be referenced (all these cases could be added -- at the expense of additional complexity in the body of Rtsfind, but -- it doesn't seem worth while, since the implementation controls the -- set of units that are referenced, and this restrictions is easily met. -- IMPORTANT NOTE: the specs of packages and procedures with'ed using -- this mechanism may not contain use clauses. This is because these -- subprograms are compiled in the current visibility environment, and -- it would be too much trouble to establish a clean environment for the -- compilation. The presence of extraneous visible stuff has no effect -- on the compilation except in the presence of use clauses (which might -- result in unexpected ambiguities). type RTU_Id is ( -- Runtime packages, for list of accessible entities in each -- package see declarations in the runtime entity table below. RTU_Null, -- Used as a null entry. Will cause an error if referenced -- Children of Ada Ada_Calendar, Ada_Exceptions, Ada_Finalization, Ada_Interrupts, Ada_Real_Time, Ada_Streams, Ada_Tags, Ada_Task_Identification, Ada_Task_Termination, -- Children of Ada.Calendar Ada_Calendar_Delays, -- Children of Ada.Finalization Ada_Finalization_List_Controller, -- Children of Ada.Interrupts Ada_Interrupts_Names, -- Children of Ada.Real_Time Ada_Real_Time_Delays, -- Children of Ada.Streams Ada_Streams_Stream_IO, -- Children of Ada.Text_IO (for Text_IO_Kludge) Ada_Text_IO_Decimal_IO, Ada_Text_IO_Enumeration_IO, Ada_Text_IO_Fixed_IO, Ada_Text_IO_Float_IO, Ada_Text_IO_Integer_IO, Ada_Text_IO_Modular_IO, -- Children of Ada.Wide_Text_IO (for Text_IO_Kludge) Ada_Wide_Text_IO_Decimal_IO, Ada_Wide_Text_IO_Enumeration_IO, Ada_Wide_Text_IO_Fixed_IO, Ada_Wide_Text_IO_Float_IO, Ada_Wide_Text_IO_Integer_IO, Ada_Wide_Text_IO_Modular_IO, -- Children of Ada.Wide_Wide_Text_IO (for Text_IO_Kludge) Ada_Wide_Wide_Text_IO_Decimal_IO, Ada_Wide_Wide_Text_IO_Enumeration_IO, Ada_Wide_Wide_Text_IO_Fixed_IO, Ada_Wide_Wide_Text_IO_Float_IO, Ada_Wide_Wide_Text_IO_Integer_IO, Ada_Wide_Wide_Text_IO_Modular_IO, -- Interfaces Interfaces, -- Children of Interfaces Interfaces_CPP, Interfaces_Packed_Decimal, -- Package System System, -- Children of System System_Arith_64, System_AST_Handling, System_Assertions, System_Aux_DEC, System_Bit_Ops, System_Boolean_Array_Operations, System_Checked_Pools, System_Compare_Array_Signed_16, System_Compare_Array_Signed_32, System_Compare_Array_Signed_64, System_Compare_Array_Signed_8, System_Compare_Array_Unsigned_16, System_Compare_Array_Unsigned_32, System_Compare_Array_Unsigned_64, System_Compare_Array_Unsigned_8, System_Exception_Table, System_Exn_Int, System_Exn_LLF, System_Exn_LLI, System_Exp_Int, System_Exp_LInt, System_Exp_LLI, System_Exp_LLU, System_Exp_Mod, System_Exp_Uns, System_Fat_Flt, System_Fat_IEEE_Long_Float, System_Fat_IEEE_Short_Float, System_Fat_LFlt, System_Fat_LLF, System_Fat_SFlt, System_Fat_VAX_D_Float, System_Fat_VAX_F_Float, System_Fat_VAX_G_Float, System_Finalization_Implementation, System_Finalization_Root, System_Fore, System_Img_Bool, System_Img_Char, System_Img_Dec, System_Img_Enum, System_Img_Int, System_Img_LLD, System_Img_LLI, System_Img_LLU, System_Img_Name, System_Img_Real, System_Img_Uns, System_Img_WChar, System_Interrupts, System_Machine_Code, System_Mantissa, System_Memcop, System_Pack_03, System_Pack_05, System_Pack_06, System_Pack_07, System_Pack_09, System_Pack_10, System_Pack_11, System_Pack_12, System_Pack_13, System_Pack_14, System_Pack_15, System_Pack_17, System_Pack_18, System_Pack_19, System_Pack_20, System_Pack_21, System_Pack_22, System_Pack_23, System_Pack_24, System_Pack_25, System_Pack_26, System_Pack_27, System_Pack_28, System_Pack_29, System_Pack_30, System_Pack_31, System_Pack_33, System_Pack_34, System_Pack_35, System_Pack_36, System_Pack_37, System_Pack_38, System_Pack_39, System_Pack_40, System_Pack_41, System_Pack_42, System_Pack_43, System_Pack_44, System_Pack_45, System_Pack_46, System_Pack_47, System_Pack_48, System_Pack_49, System_Pack_50, System_Pack_51, System_Pack_52, System_Pack_53, System_Pack_54, System_Pack_55, System_Pack_56, System_Pack_57, System_Pack_58, System_Pack_59, System_Pack_60, System_Pack_61, System_Pack_62, System_Pack_63, System_Parameters, System_Partition_Interface, System_PolyORB_Interface, System_Pool_Global, System_Pool_Empty, System_Pool_Local, System_Pool_Size, System_RPC, System_Scalar_Values, System_Secondary_Stack, System_Shared_Storage, System_Soft_Links, System_Standard_Library, System_Storage_Elements, System_Storage_Pools, System_Stream_Attributes, System_String_Ops, System_String_Ops_Concat_3, System_String_Ops_Concat_4, System_String_Ops_Concat_5, System_Task_Info, System_Tasking, System_Threads, System_Unsigned_Types, System_Val_Bool, System_Val_Char, System_Val_Dec, System_Val_Enum, System_Val_Int, System_Val_LLD, System_Val_LLI, System_Val_LLU, System_Val_Name, System_Val_Real, System_Val_Uns, System_Val_WChar, System_Vax_Float_Operations, System_Version_Control, System_VMS_Exception_Table, System_WCh_StW, System_WCh_WtS, System_Wid_Bool, System_Wid_Char, System_Wid_Enum, System_Wid_LLI, System_Wid_LLU, System_Wid_Name, System_Wid_WChar, System_WWd_Char, System_WWd_Enum, System_WWd_Wchar, -- Children of System.Tasking System_Tasking_Async_Delays, System_Tasking_Async_Delays_Enqueue_Calendar, System_Tasking_Async_Delays_Enqueue_RT, System_Tasking_Protected_Objects, System_Tasking_Protected_Objects_Entries, System_Tasking_Protected_Objects_Operations, System_Tasking_Protected_Objects_Single_Entry, System_Tasking_Restricted_Stages, System_Tasking_Rendezvous, System_Tasking_Stages); subtype Ada_Child is RTU_Id range Ada_Calendar .. Ada_Wide_Wide_Text_IO_Modular_IO; -- Range of values for children or grand-children of Ada subtype Ada_Calendar_Child is Ada_Child range Ada_Calendar_Delays .. Ada_Calendar_Delays; -- Range of values for children of Ada.Calendar subtype Ada_Finalization_Child is Ada_Child range Ada_Finalization_List_Controller .. Ada_Finalization_List_Controller; -- Range of values for children of Ada.Finalization subtype Ada_Interrupts_Child is Ada_Child range Ada_Interrupts_Names .. Ada_Interrupts_Names; -- Range of values for children of Ada.Interrupts subtype Ada_Real_Time_Child is Ada_Child range Ada_Real_Time_Delays .. Ada_Real_Time_Delays; -- Range of values for children of Ada.Real_Time subtype Ada_Streams_Child is Ada_Child range Ada_Streams_Stream_IO .. Ada_Streams_Stream_IO; subtype Ada_Text_IO_Child is Ada_Child range Ada_Text_IO_Decimal_IO .. Ada_Text_IO_Modular_IO; -- Range of values for children of Ada.Text_IO subtype Ada_Wide_Text_IO_Child is Ada_Child range Ada_Wide_Text_IO_Decimal_IO .. Ada_Wide_Text_IO_Modular_IO; -- Range of values for children of Ada.Text_IO subtype Ada_Wide_Wide_Text_IO_Child is Ada_Child range Ada_Wide_Wide_Text_IO_Decimal_IO .. Ada_Wide_Wide_Text_IO_Modular_IO; subtype Interfaces_Child is RTU_Id range Interfaces_CPP .. Interfaces_Packed_Decimal; -- Range of values for children of Interfaces subtype System_Child is RTU_Id range System_Arith_64 .. System_Tasking_Stages; -- Range of values for children or grandchildren of System subtype System_Tasking_Child is System_Child range System_Tasking_Async_Delays .. System_Tasking_Stages; -- Range of values for children of System.Tasking subtype System_Tasking_Protected_Objects_Child is System_Tasking_Child range System_Tasking_Protected_Objects_Entries .. System_Tasking_Protected_Objects_Single_Entry; -- Range of values for children of System.Tasking.Protected_Objects subtype System_Tasking_Restricted_Child is System_Tasking_Child range System_Tasking_Restricted_Stages .. System_Tasking_Restricted_Stages; -- Range of values for children of System.Tasking.Restricted subtype System_Tasking_Async_Delays_Child is System_Tasking_Child range System_Tasking_Async_Delays_Enqueue_Calendar .. System_Tasking_Async_Delays_Enqueue_RT; -- Range of values for children of System.Tasking.Async_Delays -------------------------- -- Runtime Entity Table -- -------------------------- -- This is the enumeration type used to define the argument passed to -- the RTE function. The name must exactly match the name of the entity -- involved, and in the case of a package entity, this name must uniquely -- imply the package containing the entity. -- As far as possible, we avoid duplicate names in runtime packages, so -- that the name RE_nnn uniquely identifies the entity nnn. In some cases, -- it is impossible to avoid such duplication because the names come from -- RM defined packages. In such cases, the name is of the form RO_XX_nnn -- where XX is two letters used to differentiate the multiple occurrences -- of the name xx, and nnn is the entity name. -- Note that not all entities in the units contained in the run-time unit -- table are included in the following table, only those that actually -- have to be referenced from generated code. -- Note on RE_Null. This value is used as a null entry where an RE_Id -- value is required syntactically, but no real entry is required or -- needed. Use of this value will cause a fatal error in an RTE call. type RE_Id is ( RE_Null, RE_Exceptions_Available_In_HIE, -- Ada.Exceptions RE_Code_Loc, -- Ada.Exceptions RE_Current_Target_Exception, -- Ada.Exceptions (JGNAT use only) RE_Exception_Id, -- Ada.Exceptions RE_Exception_Information, -- Ada.Exceptions RE_Exception_Message, -- Ada.Exceptions RE_Exception_Name_Simple, -- Ada.Exceptions RE_Exception_Occurrence, -- Ada.Exceptions RE_Null_Id, -- Ada.Exceptions RE_Null_Occurrence, -- Ada.Exceptions RE_Poll, -- Ada.Exceptions RE_Raise_Exception, -- Ada.Exceptions RE_Raise_Exception_Always, -- Ada.Exceptions RE_Reraise_Occurrence, -- Ada.Exceptions RE_Reraise_Occurrence_Always, -- Ada.Exceptions RE_Reraise_Occurrence_No_Defer, -- Ada.Exceptions RE_Save_Occurrence, -- Ada.Exceptions RE_Simple_List_Controller, -- Ada.Finalization.List_Controller RE_List_Controller, -- Ada.Finalization.List_Controller RE_Interrupt_ID, -- Ada.Interrupts RE_Is_Reserved, -- Ada.Interrupts RE_Is_Attached, -- Ada.Interrupts RE_Current_Handler, -- Ada.Interrupts RE_Attach_Handler, -- Ada.Interrupts RE_Exchange_Handler, -- Ada.Interrupts RE_Detach_Handler, -- Ada.Interrupts RE_Reference, -- Ada.Interrupts RE_Names, -- Ada.Interupts.Names RE_Root_Stream_Type, -- Ada.Streams RE_Stream_Element, -- Ada.Streams RE_Stream_Element_Count, -- Ada.Streams RE_Stream_Element_Offset, -- Ada.Streams RE_Stream_Element_Array, -- Ada.Streams RE_Stream_Access, -- Ada.Streams.Stream_IO RE_Abstract_Interface, -- Ada.Tags RE_Addr_Ptr, -- Ada.Tags RE_Address_Array, -- Ada.Tags RE_CW_Membership, -- Ada.Tags RE_Descendant_Tag, -- Ada.Tags RE_Displace, -- Ada.Tags RE_DT_Entry_Size, -- Ada.Tags RE_DT_Prologue_Size, -- Ada.Tags RE_External_Tag, -- Ada.Tags RE_Get_Access_Level, -- Ada.Tags RE_Get_Entry_Index, -- Ada.Tags RE_Get_External_Tag, -- Ada.Tags RE_Get_Offset_Index, -- Ada.Tags RE_Get_Predefined_Prim_Op_Address, -- Ada.Tags RE_Get_Prim_Op_Address, -- Ada.Tags RE_Get_Prim_Op_Kind, -- Ada.Tags RE_Get_RC_Offset, -- Ada.Tags RE_Get_Remotely_Callable, -- Ada.Tags RE_Get_Tagged_Kind, -- Ada.Tags RE_Inherit_DT, -- Ada.Tags RE_Inherit_TSD, -- Ada.Tags RE_Interface_Data, -- Ada.Tags RE_Interface_Tag, -- Ada.Tags RE_Internal_Tag, -- Ada.Tags RE_Is_Descendant_At_Same_Level, -- Ada.Tags RE_IW_Membership, -- Ada.Tags RE_Object_Specific_Data, -- Ada.Tags RE_Offset_To_Top, -- Ada.Tags RE_POK_Function, -- Ada.Tags RE_POK_Procedure, -- Ada.Tags RE_POK_Protected_Entry, -- Ada.Tags RE_POK_Protected_Function, -- Ada.Tags RE_POK_Protected_Procedure, -- Ada.Tags RE_POK_Task_Entry, -- Ada.Tags RE_POK_Task_Function, -- Ada.Tags RE_POK_Task_Procedure, -- Ada.Tags RE_Prim_Op_Kind, -- Ada.Tags RE_Primary_DT, -- Ada.Tags RE_Register_Interface_Tag, -- Ada.Tags RE_Register_Tag, -- Ada.Tags RE_Secondary_DT, -- Ada.Tags RE_Select_Specific_Data, -- Ada.Tags RE_Set_Access_Level, -- Ada.Tags RE_Set_Entry_Index, -- Ada.Tags RE_Set_Expanded_Name, -- Ada.Tags RE_Set_External_Tag, -- Ada.Tags RE_Set_Interface_Table, -- Ada.Tags RE_Set_Num_Prim_Ops, -- Ada.Tags RE_Set_Offset_Index, -- Ada.Tags RE_Set_Offset_To_Top, -- Ada.Tags RE_Set_OSD, -- Ada.Tags RE_Set_Predefined_Prim_Op_Address, -- Ada.Tags RE_Set_Prim_Op_Address, -- Ada.Tags RE_Set_Prim_Op_Kind, -- Ada.Tags RE_Set_RC_Offset, -- Ada.Tags RE_Set_Remotely_Callable, -- Ada.Tags RE_Set_SSD, -- Ada.Tags RE_Set_Signature, -- Ada.Tags RE_Set_Tagged_Kind, -- Ada.Tags RE_Set_TSD, -- Ada.Tags RE_Tag, -- Ada.Tags RE_Tag_Error, -- Ada.Tags RE_Tagged_Kind, -- Ada.Tags RE_TSD_Entry_Size, -- Ada.Tags RE_TSD_Prologue_Size, -- Ada.Tags RE_TK_Abstract_Limited_Tagged, -- Ada.Tags RE_TK_Abstract_Tagged, -- Ada.Tags RE_TK_Limited_Tagged, -- Ada.Tags RE_TK_Protected, -- Ada.Tags RE_TK_Tagged, -- Ada.Tags RE_TK_Task, -- Ada.Tags RE_Valid_Signature, -- Ada.Tags RE_Abort_Task, -- Ada.Task_Identification RE_Current_Task, -- Ada.Task_Identification RO_AT_Task_Id, -- Ada.Task_Identification RO_CA_Time, -- Ada.Calendar RO_CA_Delay_For, -- Ada.Calendar.Delays RO_CA_Delay_Until, -- Ada.Calendar.Delays RO_CA_To_Duration, -- Ada.Calendar.Delays RO_RT_Time, -- Ada.Real_Time RO_RT_Delay_Until, -- Ada.Real_Time.Delays RO_RT_To_Duration, -- Ada.Real_Time.Delays RE_Integer_64, -- Interfaces RE_Unsigned_8, -- Interfaces RE_Unsigned_16, -- Interfaces RE_Unsigned_32, -- Interfaces RE_Unsigned_64, -- Interfaces RE_Vtable_Ptr, -- Interfaces.CPP RE_Displaced_This, -- Interfaces.CPP RE_CPP_CW_Membership, -- Interfaces.CPP RE_CPP_DT_Entry_Size, -- Interfaces.CPP RE_CPP_DT_Prologue_Size, -- Interfaces.CPP RE_CPP_Get_External_Tag, -- Interfaces.CPP RE_CPP_Get_Prim_Op_Address, -- Interfaces.CPP RE_CPP_Get_RC_Offset, -- Interfaces.CPP RE_CPP_Get_Remotely_Callable, -- Interfaces.CPP RE_CPP_Inherit_DT, -- Interfaces.CPP RE_CPP_Inherit_TSD, -- Interfaces.CPP RE_CPP_Register_Tag, -- Interfaces.CPP RE_CPP_Set_Expanded_Name, -- Interfaces.CPP RE_CPP_Set_External_Tag, -- Interfaces.CPP RE_CPP_Set_Prim_Op_Address, -- Interfaces.CPP RE_CPP_Set_RC_Offset, -- Interfaces.CPP RE_CPP_Set_Remotely_Callable, -- Interfaces.CPP RE_CPP_Set_TSD, -- Interfaces.CPP RE_CPP_TSD_Entry_Size, -- Interfaces.CPP RE_CPP_TSD_Prologue_Size, -- Interfaces.CPP RE_Packed_Size, -- Interfaces.Packed_Decimal RE_Packed_To_Int32, -- Interfaces.Packed_Decimal RE_Packed_To_Int64, -- Interfaces.Packed_Decimal RE_Int32_To_Packed, -- Interfaces.Packed_Decimal RE_Int64_To_Packed, -- Interfaces.Packed_Decimal RE_Address, -- System RE_Any_Priority, -- System RE_Bit_Order, -- System RE_Default_Priority, -- System RE_High_Order_First, -- System RE_Interrupt_Priority, -- System RE_Lib_Stop, -- System RE_Low_Order_First, -- System RE_Max_Interrupt_Priority, -- System RE_Max_Priority, -- System RE_Null_Address, -- System RE_Priority, -- System RE_Add_With_Ovflo_Check, -- System.Arith_64 RE_Double_Divide, -- System.Arith_64 RE_Multiply_With_Ovflo_Check, -- System.Arith_64 RE_Scaled_Divide, -- System.Arith_64 RE_Subtract_With_Ovflo_Check, -- System.Arith_64 RE_Create_AST_Handler, -- System.AST_Handling RE_Raise_Assert_Failure, -- System.Assertions RE_AST_Handler, -- System.Aux_DEC RE_Import_Value, -- System.Aux_DEC RE_No_AST_Handler, -- System.Aux_DEC RE_Type_Class, -- System.Aux_DEC RE_Type_Class_Enumeration, -- System.Aux_DEC RE_Type_Class_Integer, -- System.Aux_DEC RE_Type_Class_Fixed_Point, -- System.Aux_DEC RE_Type_Class_Floating_Point, -- System.Aux_DEC RE_Type_Class_Array, -- System.Aux_DEC RE_Type_Class_Record, -- System.Aux_DEC RE_Type_Class_Access, -- System.Aux_DEC RE_Type_Class_Task, -- System.Aux_DEC RE_Type_Class_Address, -- System.Aux_DEC RE_Bit_And, -- System.Bit_Ops RE_Bit_Eq, -- System.Bit_Ops RE_Bit_Not, -- System.Bit_Ops RE_Bit_Or, -- System.Bit_Ops RE_Bit_Xor, -- System.Bit_Ops RE_Boolean_Array, -- System_Boolean_Array_Operations, RE_Vector_Not, -- System_Boolean_Array_Operations, RE_Vector_And, -- System_Boolean_Array_Operations, RE_Vector_Or, -- System_Boolean_Array_Operations, RE_Vector_Nand, -- System_Boolean_Array_Operations, RE_Vector_Nor, -- System_Boolean_Array_Operations, RE_Vector_Nxor, -- System_Boolean_Array_Operations, RE_Vector_Xor, -- System_Boolean_Array_Operations, RE_Checked_Pool, -- System.Checked_Pools RE_Compare_Array_S8, -- System.Compare_Array_Signed_8 RE_Compare_Array_S8_Unaligned, -- System.Compare_Array_Signed_8 RE_Compare_Array_S16, -- System.Compare_Array_Signed_16 RE_Compare_Array_S32, -- System.Compare_Array_Signed_16 RE_Compare_Array_S64, -- System.Compare_Array_Signed_16 RE_Compare_Array_U8, -- System.Compare_Array_Unsigned_8 RE_Compare_Array_U8_Unaligned, -- System.Compare_Array_Unsigned_8 RE_Compare_Array_U16, -- System.Compare_Array_Unsigned_16 RE_Compare_Array_U32, -- System.Compare_Array_Unsigned_16 RE_Compare_Array_U64, -- System.Compare_Array_Unsigned_16 RE_Register_Exception, -- System.Exception_Table RE_Exn_Integer, -- System.Exn_Int RE_Exn_Long_Long_Float, -- System.Exn_LLF RE_Exn_Long_Long_Integer, -- System.Exn_LLI RE_Exp_Integer, -- System.Exp_Int RE_Exp_Long_Long_Integer, -- System.Exp_LLI RE_Exp_Long_Long_Unsigned, -- System.Exp_LLU RE_Exp_Modular, -- System.Exp_Mod RE_Exp_Unsigned, -- System.Exp_Uns RE_Attr_Float, -- System.Fat_Flt RE_Attr_IEEE_Long, -- System.Fat_IEEE_Long_Float RE_Fat_IEEE_Long, -- System.Fat_IEEE_Long_Float RE_Attr_IEEE_Short, -- System.Fat_IEEE_Short_Float RE_Fat_IEEE_Short, -- System.Fat_IEEE_Short_Float RE_Attr_Long_Float, -- System.Fat_LFlt RE_Attr_Long_Long_Float, -- System.Fat_LLF RE_Attr_Short_Float, -- System.Fat_SFlt RE_Attr_VAX_D_Float, -- System.Fat_VAX_D_Float RE_Fat_VAX_D, -- System.Fat_VAX_D_Float RE_Attr_VAX_F_Float, -- System.Fat_VAX_F_Float RE_Fat_VAX_F, -- System.Fat_VAX_F_Float RE_Attr_VAX_G_Float, -- System.Fat_VAX_G_Float RE_Fat_VAX_G, -- System.Fat_VAX_G_Float RE_Attach_To_Final_List, -- System.Finalization_Implementation RE_Finalize_List, -- System.Finalization_Implementation RE_Finalize_One, -- System.Finalization_Implementation RE_Global_Final_List, -- System.Finalization_Implementation RE_Record_Controller, -- System.Finalization_Implementation RE_Limited_Record_Controller, -- System.Finalization_Implementation RE_Deep_Tag_Initialize, -- System.Finalization_Implementation RE_Deep_Tag_Adjust, -- System.Finalization_Implementation RE_Deep_Tag_Finalize, -- System.Finalization_Implementation RE_Deep_Tag_Attach, -- System.Finalization_Implementation RE_Deep_Rec_Initialize, -- System.Finalization_Implementation RE_Deep_Rec_Adjust, -- System.Finalization_Implementation RE_Deep_Rec_Finalize, -- System.Finalization_Implementation RE_Root_Controlled, -- System.Finalization_Root RE_Finalizable, -- System.Finalization_Root RE_Finalizable_Ptr, -- System.Finalization_Root RE_Fore, -- System.Fore RE_Image_Boolean, -- System.Img_Bool RE_Image_Character, -- System.Img_Char RE_Image_Decimal, -- System.Img_Dec RE_Image_Enumeration_8, -- System.Img_Enum RE_Image_Enumeration_16, -- System.Img_Enum RE_Image_Enumeration_32, -- System.Img_Enum RE_Image_Integer, -- System.Img_Int RE_Image_Long_Long_Decimal, -- System.Img_LLD RE_Image_Long_Long_Integer, -- System.Img_LLI RE_Image_Long_Long_Unsigned, -- System.Img_LLU RE_Image_Ordinary_Fixed_Point, -- System.Img_Real RE_Image_Floating_Point, -- System.Img_Real RE_Image_Unsigned, -- System.Img_Uns RE_Image_Wide_Character, -- System.Img_WChar RE_Image_Wide_Wide_Character, -- System.Img_WChar RE_Bind_Interrupt_To_Entry, -- System.Interrupts RE_Default_Interrupt_Priority, -- System.Interrupts RE_Dynamic_Interrupt_Protection, -- System.Interrupts RE_Install_Handlers, -- System.Interrupts RE_Register_Interrupt_Handler, -- System.Interrupts RE_Static_Interrupt_Protection, -- System.Interrupts RE_System_Interrupt_Id, -- System.Interrupts RE_Asm_Insn, -- System.Machine_Code RE_Asm_Input_Operand, -- System.Machine_Code RE_Asm_Output_Operand, -- System.Machine_Code RE_Mantissa_Value, -- System_Mantissa RE_memcpy, -- System_Memcop RE_memmove, -- System_Memcop RE_Bits_03, -- System.Pack_03 RE_Get_03, -- System.Pack_03 RE_Set_03, -- System.Pack_03 RE_Bits_05, -- System.Pack_05 RE_Get_05, -- System.Pack_05 RE_Set_05, -- System.Pack_05 RE_Bits_06, -- System.Pack_06 RE_Get_06, -- System.Pack_06 RE_GetU_06, -- System.Pack_06 RE_Set_06, -- System.Pack_06 RE_SetU_06, -- System.Pack_06 RE_Bits_07, -- System.Pack_07 RE_Get_07, -- System.Pack_07 RE_Set_07, -- System.Pack_07 RE_Bits_09, -- System.Pack_09 RE_Get_09, -- System.Pack_09 RE_Set_09, -- System.Pack_09 RE_Bits_10, -- System.Pack_10 RE_Get_10, -- System.Pack_10 RE_GetU_10, -- System.Pack_10 RE_Set_10, -- System.Pack_10 RE_SetU_10, -- System.Pack_10 RE_Bits_11, -- System.Pack_11 RE_Get_11, -- System.Pack_11 RE_Set_11, -- System.Pack_11 RE_Bits_12, -- System.Pack_12 RE_Get_12, -- System.Pack_12 RE_GetU_12, -- System.Pack_12 RE_Set_12, -- System.Pack_12 RE_SetU_12, -- System.Pack_12 RE_Bits_13, -- System.Pack_13 RE_Get_13, -- System.Pack_13 RE_Set_13, -- System.Pack_13 RE_Bits_14, -- System.Pack_14 RE_Get_14, -- System.Pack_14 RE_GetU_14, -- System.Pack_14 RE_Set_14, -- System.Pack_14 RE_SetU_14, -- System.Pack_14 RE_Bits_15, -- System.Pack_15 RE_Get_15, -- System.Pack_15 RE_Set_15, -- System.Pack_15 RE_Bits_17, -- System.Pack_17 RE_Get_17, -- System.Pack_17 RE_Set_17, -- System.Pack_17 RE_Bits_18, -- System.Pack_18 RE_Get_18, -- System.Pack_18 RE_GetU_18, -- System.Pack_18 RE_Set_18, -- System.Pack_18 RE_SetU_18, -- System.Pack_18 RE_Bits_19, -- System.Pack_19 RE_Get_19, -- System.Pack_19 RE_Set_19, -- System.Pack_19 RE_Bits_20, -- System.Pack_20 RE_Get_20, -- System.Pack_20 RE_GetU_20, -- System.Pack_20 RE_Set_20, -- System.Pack_20 RE_SetU_20, -- System.Pack_20 RE_Bits_21, -- System.Pack_21 RE_Get_21, -- System.Pack_21 RE_Set_21, -- System.Pack_21 RE_Bits_22, -- System.Pack_22 RE_Get_22, -- System.Pack_22 RE_GetU_22, -- System.Pack_22 RE_Set_22, -- System.Pack_22 RE_SetU_22, -- System.Pack_22 RE_Bits_23, -- System.Pack_23 RE_Get_23, -- System.Pack_23 RE_Set_23, -- System.Pack_23 RE_Bits_24, -- System.Pack_24 RE_Get_24, -- System.Pack_24 RE_GetU_24, -- System.Pack_24 RE_Set_24, -- System.Pack_24 RE_SetU_24, -- System.Pack_24 RE_Bits_25, -- System.Pack_25 RE_Get_25, -- System.Pack_25 RE_Set_25, -- System.Pack_25 RE_Bits_26, -- System.Pack_26 RE_Get_26, -- System.Pack_26 RE_GetU_26, -- System.Pack_26 RE_Set_26, -- System.Pack_26 RE_SetU_26, -- System.Pack_26 RE_Bits_27, -- System.Pack_27 RE_Get_27, -- System.Pack_27 RE_Set_27, -- System.Pack_27 RE_Bits_28, -- System.Pack_28 RE_Get_28, -- System.Pack_28 RE_GetU_28, -- System.Pack_28 RE_Set_28, -- System.Pack_28 RE_SetU_28, -- System.Pack_28 RE_Bits_29, -- System.Pack_29 RE_Get_29, -- System.Pack_29 RE_Set_29, -- System.Pack_29 RE_Bits_30, -- System.Pack_30 RE_Get_30, -- System.Pack_30 RE_GetU_30, -- System.Pack_30 RE_Set_30, -- System.Pack_30 RE_SetU_30, -- System.Pack_30 RE_Bits_31, -- System.Pack_31 RE_Get_31, -- System.Pack_31 RE_Set_31, -- System.Pack_31 RE_Bits_33, -- System.Pack_33 RE_Get_33, -- System.Pack_33 RE_Set_33, -- System.Pack_33 RE_Bits_34, -- System.Pack_34 RE_Get_34, -- System.Pack_34 RE_GetU_34, -- System.Pack_34 RE_Set_34, -- System.Pack_34 RE_SetU_34, -- System.Pack_34 RE_Bits_35, -- System.Pack_35 RE_Get_35, -- System.Pack_35 RE_Set_35, -- System.Pack_35 RE_Bits_36, -- System.Pack_36 RE_Get_36, -- System.Pack_36 RE_GetU_36, -- System.Pack_36 RE_Set_36, -- System.Pack_36 RE_SetU_36, -- System.Pack_36 RE_Bits_37, -- System.Pack_37 RE_Get_37, -- System.Pack_37 RE_Set_37, -- System.Pack_37 RE_Bits_38, -- System.Pack_38 RE_Get_38, -- System.Pack_38 RE_GetU_38, -- System.Pack_38 RE_Set_38, -- System.Pack_38 RE_SetU_38, -- System.Pack_38 RE_Bits_39, -- System.Pack_39 RE_Get_39, -- System.Pack_39 RE_Set_39, -- System.Pack_39 RE_Bits_40, -- System.Pack_40 RE_Get_40, -- System.Pack_40 RE_GetU_40, -- System.Pack_40 RE_Set_40, -- System.Pack_40 RE_SetU_40, -- System.Pack_40 RE_Bits_41, -- System.Pack_41 RE_Get_41, -- System.Pack_41 RE_Set_41, -- System.Pack_41 RE_Bits_42, -- System.Pack_42 RE_Get_42, -- System.Pack_42 RE_GetU_42, -- System.Pack_42 RE_Set_42, -- System.Pack_42 RE_SetU_42, -- System.Pack_42 RE_Bits_43, -- System.Pack_43 RE_Get_43, -- System.Pack_43 RE_Set_43, -- System.Pack_43 RE_Bits_44, -- System.Pack_44 RE_Get_44, -- System.Pack_44 RE_GetU_44, -- System.Pack_44 RE_Set_44, -- System.Pack_44 RE_SetU_44, -- System.Pack_44 RE_Bits_45, -- System.Pack_45 RE_Get_45, -- System.Pack_45 RE_Set_45, -- System.Pack_45 RE_Bits_46, -- System.Pack_46 RE_Get_46, -- System.Pack_46 RE_GetU_46, -- System.Pack_46 RE_Set_46, -- System.Pack_46 RE_SetU_46, -- System.Pack_46 RE_Bits_47, -- System.Pack_47 RE_Get_47, -- System.Pack_47 RE_Set_47, -- System.Pack_47 RE_Bits_48, -- System.Pack_48 RE_Get_48, -- System.Pack_48 RE_GetU_48, -- System.Pack_48 RE_Set_48, -- System.Pack_48 RE_SetU_48, -- System.Pack_48 RE_Bits_49, -- System.Pack_49 RE_Get_49, -- System.Pack_49 RE_Set_49, -- System.Pack_49 RE_Bits_50, -- System.Pack_50 RE_Get_50, -- System.Pack_50 RE_GetU_50, -- System.Pack_50 RE_Set_50, -- System.Pack_50 RE_SetU_50, -- System.Pack_50 RE_Bits_51, -- System.Pack_51 RE_Get_51, -- System.Pack_51 RE_Set_51, -- System.Pack_51 RE_Bits_52, -- System.Pack_52 RE_Get_52, -- System.Pack_52 RE_GetU_52, -- System.Pack_52 RE_Set_52, -- System.Pack_52 RE_SetU_52, -- System.Pack_52 RE_Bits_53, -- System.Pack_53 RE_Get_53, -- System.Pack_53 RE_Set_53, -- System.Pack_53 RE_Bits_54, -- System.Pack_54 RE_Get_54, -- System.Pack_54 RE_GetU_54, -- System.Pack_54 RE_Set_54, -- System.Pack_54 RE_SetU_54, -- System.Pack_54 RE_Bits_55, -- System.Pack_55 RE_Get_55, -- System.Pack_55 RE_Set_55, -- System.Pack_55 RE_Bits_56, -- System.Pack_56 RE_Get_56, -- System.Pack_56 RE_GetU_56, -- System.Pack_56 RE_Set_56, -- System.Pack_56 RE_SetU_56, -- System.Pack_56 RE_Bits_57, -- System.Pack_57 RE_Get_57, -- System.Pack_57 RE_Set_57, -- System.Pack_57 RE_Bits_58, -- System.Pack_58 RE_Get_58, -- System.Pack_58 RE_GetU_58, -- System.Pack_58 RE_Set_58, -- System.Pack_58 RE_SetU_58, -- System.Pack_58 RE_Bits_59, -- System.Pack_59 RE_Get_59, -- System.Pack_59 RE_Set_59, -- System.Pack_59 RE_Bits_60, -- System.Pack_60 RE_Get_60, -- System.Pack_60 RE_GetU_60, -- System.Pack_60 RE_Set_60, -- System.Pack_60 RE_SetU_60, -- System.Pack_60 RE_Bits_61, -- System.Pack_61 RE_Get_61, -- System.Pack_61 RE_Set_61, -- System.Pack_61 RE_Bits_62, -- System.Pack_62 RE_Get_62, -- System.Pack_62 RE_GetU_62, -- System.Pack_62 RE_Set_62, -- System.Pack_62 RE_SetU_62, -- System.Pack_62 RE_Bits_63, -- System.Pack_63 RE_Get_63, -- System.Pack_63 RE_Set_63, -- System.Pack_63 RE_Adjust_Storage_Size, -- System_Parameters RE_Default_Stack_Size, -- System.Parameters RE_Garbage_Collected, -- System.Parameters RE_Size_Type, -- System.Parameters RE_Unspecified_Size, -- System.Parameters RE_DSA_Implementation, -- System.Partition_Interface RE_Get_Active_Partition_Id, -- System.Partition_Interface RE_Get_Passive_Partition_Id, -- System.Partition_Interface RE_Get_Local_Partition_Id, -- System.Partition_Interface RE_Get_RCI_Package_Receiver, -- System.Partition_Interface RE_Get_Unique_Remote_Pointer, -- System.Partition_Interface RE_RACW_Stub_Type, -- System.Partition_Interface RE_RACW_Stub_Type_Access, -- System.Partition_Interface RE_RAS_Proxy_Type, -- System.Partition_Interface RE_RAS_Proxy_Type_Access, -- System.Partition_Interface RE_Raise_Program_Error_Unknown_Tag, -- System.Partition_Interface RE_Register_Passive_Package, -- System.Partition_Interface RE_Register_Receiving_Stub, -- System.Partition_Interface RE_Request_Access, -- System.Partition_Interface RE_RCI_Locator, -- System.Partition_Interface RE_RCI_Subp_Info, -- System.Partition_Interface RE_RCI_Subp_Info_Array, -- System.Partition_Interface RE_Same_Partition, -- System.Partition_Interface RE_Subprogram_Id, -- System.Partition_Interface RE_Get_RAS_Info, -- System.Partition_Interface RE_Global_Pool_Object, -- System.Pool_Global RE_Stack_Bounded_Pool, -- System.Pool_Size RE_Do_Apc, -- System.RPC RE_Do_Rpc, -- System.RPC RE_Params_Stream_Type, -- System.RPC RE_Partition_ID, -- System.RPC RE_To_PolyORB_String, -- System.PolyORB_Interface RE_To_Standard_String, -- System.PolyORB_Interface RE_Caseless_String_Eq, -- System.PolyORB_Interface RE_TypeCode, -- System.PolyORB_Interface RE_Any, -- System.PolyORB_Interface RE_Mode_In, -- System.PolyORB_Interface RE_Mode_Out, -- System.PolyORB_Interface RE_Mode_Inout, -- System.PolyORB_Interface RE_NamedValue, -- System.PolyORB_Interface RE_Result_Name, -- System.PolyORB_Interface RE_Object_Ref, -- System.PolyORB_Interface RE_Create_Any, -- System.PolyORB_Interface RE_Any_Aggregate_Build, -- System.PolyORB_Interface RE_Add_Aggregate_Element, -- System.PolyORB_Interface RE_Get_Aggregate_Element, -- System.PolyORB_Interface RE_Content_Type, -- System.PolyORB_Interface RE_Any_Member_Type, -- System.PolyORB_Interface RE_Get_Nested_Sequence_Length, -- System.PolyORB_Interface RE_Extract_Union_Value, -- System.PolyORB_Interface RE_NVList_Ref, -- System.PolyORB_Interface RE_NVList_Create, -- System.PolyORB_Interface RE_NVList_Add_Item, -- System.PolyORB_Interface RE_Request_Create, -- System.PolyORB_Interface RE_Request_Invoke, -- System.PolyORB_Interface RE_Request_Arguments, -- System.PolyORB_Interface RE_Request_Set_Out, -- System.PolyORB_Interface RE_Request_Raise_Occurrence, -- System.PolyORB_Interface RE_Nil_Exc_List, -- System.PolyORB_Interface RE_Servant, -- System.PolyORB_Interface RE_Copy_Any_Value, -- System.PolyORB_Interface RE_Set_Result, -- System.PolyORB_Interface RE_Register_Obj_Receiving_Stub, -- System.PolyORB_Interface RE_Register_Pkg_Receiving_Stub, -- System.PolyORB_Interface RE_Is_Nil, -- System.PolyORB_Interface RE_Entity_Ptr, -- System.PolyORB_Interface RE_Entity_Of, -- System.PolyORB_Interface RE_Inc_Usage, -- System.PolyORB_Interface RE_Set_Ref, -- System.PolyORB_Interface RE_Make_Ref, -- System.PolyORB_Interface RE_Get_Local_Address, -- System.PolyORB_Interface RE_Get_Reference, -- System.PolyORB_Interface RE_Local_Oid_To_Address, -- System.PolyORB_Interface RE_Asynchronous_P_To_Sync_Scope, -- System.PolyORB_Interface RE_Buffer_Stream_Type, -- System.PolyORB_Interface RE_Allocate_Buffer, -- System.PolyORB_Interface RE_Release_Buffer, -- System.PolyORB_Interface RE_BS_To_Any, -- System.PolyORB_Interface RE_Any_To_BS, -- System.PolyORB_Interface RE_FA_AD, -- System.PolyORB_Interface RE_FA_AS, -- System.PolyORB_Interface RE_FA_B, -- System.PolyORB_Interface RE_FA_C, -- System.PolyORB_Interface RE_FA_F, -- System.PolyORB_Interface RE_FA_I, -- System.PolyORB_Interface RE_FA_LF, -- System.PolyORB_Interface RE_FA_LI, -- System.PolyORB_Interface RE_FA_LLF, -- System.PolyORB_Interface RE_FA_LLI, -- System.PolyORB_Interface RE_FA_LLU, -- System.PolyORB_Interface RE_FA_LU, -- System.PolyORB_Interface RE_FA_SF, -- System.PolyORB_Interface RE_FA_SI, -- System.PolyORB_Interface RE_FA_SSI, -- System.PolyORB_Interface RE_FA_SSU, -- System.PolyORB_Interface RE_FA_SU, -- System.PolyORB_Interface RE_FA_U, -- System.PolyORB_Interface RE_FA_WC, -- System.PolyORB_Interface RE_FA_WWC, -- System.PolyORB_Interface RE_FA_String, -- System.PolyORB_Interface RE_FA_ObjRef, -- System.PolyORB_Interface RE_TA_AD, -- System.PolyORB_Interface RE_TA_AS, -- System.PolyORB_Interface RE_TA_B, -- System.PolyORB_Interface RE_TA_C, -- System.PolyORB_Interface RE_TA_F, -- System.PolyORB_Interface RE_TA_I, -- System.PolyORB_Interface RE_TA_LF, -- System.PolyORB_Interface RE_TA_LI, -- System.PolyORB_Interface RE_TA_LLF, -- System.PolyORB_Interface RE_TA_LLI, -- System.PolyORB_Interface RE_TA_LLU, -- System.PolyORB_Interface RE_TA_LU, -- System.PolyORB_Interface RE_TA_SF, -- System.PolyORB_Interface RE_TA_SI, -- System.PolyORB_Interface RE_TA_SSI, -- System.PolyORB_Interface RE_TA_SSU, -- System.PolyORB_Interface RE_TA_SU, -- System.PolyORB_Interface RE_TA_U, -- System.PolyORB_Interface RE_TA_WC, -- System.PolyORB_Interface RE_TA_WWC, -- System.PolyORB_Interface RE_TA_String, -- System.PolyORB_Interface RE_TA_ObjRef, -- System.PolyORB_Interface RE_TA_TC, -- System.PolyORB_Interface RE_TC_Alias, -- System.PolyORB_Interface RE_TC_Build, -- System.PolyORB_Interface RE_Get_TC, -- System.PolyORB_Interface RE_Set_TC, -- System.PolyORB_Interface RE_TC_Any, -- System.PolyORB_Interface RE_TC_AD, -- System.PolyORB_Interface RE_TC_AS, -- System.PolyORB_Interface RE_TC_B, -- System.PolyORB_Interface RE_TC_C, -- System.PolyORB_Interface RE_TC_F, -- System.PolyORB_Interface RE_TC_I, -- System.PolyORB_Interface RE_TC_LF, -- System.PolyORB_Interface RE_TC_LI, -- System.PolyORB_Interface RE_TC_LLF, -- System.PolyORB_Interface RE_TC_LLI, -- System.PolyORB_Interface RE_TC_LLU, -- System.PolyORB_Interface RE_TC_LU, -- System.PolyORB_Interface RE_TC_SF, -- System.PolyORB_Interface RE_TC_SI, -- System.PolyORB_Interface RE_TC_SSI, -- System.PolyORB_Interface RE_TC_SSU, -- System.PolyORB_Interface RE_TC_SU, -- System.PolyORB_Interface RE_TC_U, -- System.PolyORB_Interface RE_TC_Void, -- System.PolyORB_Interface RE_TC_Opaque, -- System.PolyORB_Interface, RE_TC_WC, -- System.PolyORB_Interface RE_TC_WWC, -- System.PolyORB_Interface RE_TC_Array, -- System.PolyORB_Interface, RE_TC_Sequence, -- System.PolyORB_Interface, RE_TC_String, -- System.PolyORB_Interface, RE_TC_Struct, -- System.PolyORB_Interface, RE_TC_Union, -- System.PolyORB_Interface, RE_TC_Object, -- System.PolyORB_Interface, RE_IS_Is1, -- System.Scalar_Values RE_IS_Is2, -- System.Scalar_Values RE_IS_Is4, -- System.Scalar_Values RE_IS_Is8, -- System.Scalar_Values RE_IS_Iu1, -- System.Scalar_Values RE_IS_Iu2, -- System.Scalar_Values RE_IS_Iu4, -- System.Scalar_Values RE_IS_Iu8, -- System.Scalar_Values RE_IS_Iz1, -- System.Scalar_Values RE_IS_Iz2, -- System.Scalar_Values RE_IS_Iz4, -- System.Scalar_Values RE_IS_Iz8, -- System.Scalar_Values RE_IS_Isf, -- System.Scalar_Values RE_IS_Ifl, -- System.Scalar_Values RE_IS_Ilf, -- System.Scalar_Values RE_IS_Ill, -- System.Scalar_Values RE_Default_Secondary_Stack_Size, -- System.Secondary_Stack RE_Mark_Id, -- System.Secondary_Stack RE_SS_Allocate, -- System.Secondary_Stack RE_SS_Pool, -- System.Secondary_Stack RE_SS_Mark, -- System.Secondary_Stack RE_SS_Release, -- System.Secondary_Stack RE_Shared_Var_Close, -- System.Shared_Storage RE_Shared_Var_Lock, -- System.Shared_Storage RE_Shared_Var_ROpen, -- System.Shared_Storage RE_Shared_Var_Unlock, -- System.Shared_Storage RE_Shared_Var_WOpen, -- System.Shared_Storage RE_Abort_Undefer_Direct, -- System.Standard_Library RE_Exception_Code, -- System.Standard_Library RE_Exception_Data_Ptr, -- System.Standard_Library RE_Integer_Address, -- System.Storage_Elements RE_Storage_Offset, -- System.Storage_Elements RE_Storage_Array, -- System.Storage_Elements RE_Storage_Element, -- System.Storage_Elements RE_To_Address, -- System.Storage_Elements RE_Root_Storage_Pool, -- System.Storage_Pools RE_Allocate_Any, -- System_Storage_Pools, RE_Deallocate_Any, -- System_Storage_Pools, RE_Thin_Pointer, -- System.Stream_Attributes RE_Fat_Pointer, -- System.Stream_Attributes RE_I_AD, -- System.Stream_Attributes RE_I_AS, -- System.Stream_Attributes RE_I_B, -- System.Stream_Attributes RE_I_C, -- System.Stream_Attributes RE_I_F, -- System.Stream_Attributes RE_I_I, -- System.Stream_Attributes RE_I_LF, -- System.Stream_Attributes RE_I_LI, -- System.Stream_Attributes RE_I_LLF, -- System.Stream_Attributes RE_I_LLI, -- System.Stream_Attributes RE_I_LLU, -- System.Stream_Attributes RE_I_LU, -- System.Stream_Attributes RE_I_SF, -- System.Stream_Attributes RE_I_SI, -- System.Stream_Attributes RE_I_SSI, -- System.Stream_Attributes RE_I_SSU, -- System.Stream_Attributes RE_I_SU, -- System.Stream_Attributes RE_I_U, -- System.Stream_Attributes RE_I_WC, -- System.Stream_Attributes RE_I_WWC, -- System.Stream_Attributes RE_W_AD, -- System.Stream_Attributes RE_W_AS, -- System.Stream_Attributes RE_W_B, -- System.Stream_Attributes RE_W_C, -- System.Stream_Attributes RE_W_F, -- System.Stream_Attributes RE_W_I, -- System.Stream_Attributes RE_W_LF, -- System.Stream_Attributes RE_W_LI, -- System.Stream_Attributes RE_W_LLF, -- System.Stream_Attributes RE_W_LLI, -- System.Stream_Attributes RE_W_LLU, -- System.Stream_Attributes RE_W_LU, -- System.Stream_Attributes RE_W_SF, -- System.Stream_Attributes RE_W_SI, -- System.Stream_Attributes RE_W_SSI, -- System.Stream_Attributes RE_W_SSU, -- System.Stream_Attributes RE_W_SU, -- System.Stream_Attributes RE_W_U, -- System.Stream_Attributes RE_W_WC, -- System.Stream_Attributes RE_W_WWC, -- System.Stream_Attributes RE_Block_Stream_Ops_OK, -- System.Stream_Attributes RE_Str_Concat, -- System.String_Ops RE_Str_Concat_CC, -- System.String_Ops RE_Str_Concat_CS, -- System.String_Ops RE_Str_Concat_SC, -- System.String_Ops RE_Str_Concat_3, -- System.String_Ops_Concat_3 RE_Str_Concat_4, -- System.String_Ops_Concat_4 RE_Str_Concat_5, -- System.String_Ops_Concat_5 RE_Task_Info_Type, -- System.Task_Info RE_Unspecified_Task_Info, -- System.Task_Info RE_Library_Task_Level, -- System.Tasking RE_Task_Procedure_Access, -- System.Tasking RO_ST_Task_Id, -- System.Tasking RO_ST_Null_Task, -- System.Tasking RE_Call_Modes, -- System.Tasking RE_Simple_Call, -- System.Tasking RE_Conditional_Call, -- System.Tasking RE_Asynchronous_Call, -- System.Tasking RE_Timed_Call, -- System.Tasking RE_Ada_Task_Control_Block, -- System.Tasking RE_Task_List, -- System.Tasking RE_Accept_Alternative, -- System.Tasking RE_Accept_List, -- System.Tasking RE_Accept_List_Access, -- System.Tasking RE_Max_Select, -- System.Tasking RE_Max_Task_Entry, -- System.Tasking RE_No_Rendezvous, -- System.Tasking RE_Null_Task_Entry, -- System.Tasking RE_Positive_Select_Index, -- System.Tasking RE_Select_Index, -- System.Tasking RE_Select_Modes, -- System.Tasking RE_Else_Mode, -- System.Tasking RE_Simple_Mode, -- System.Tasking RE_Terminate_Mode, -- System.Tasking RE_Delay_Mode, -- System.Tasking RE_Task_Entry_Index, -- System.Tasking RE_Self, -- System.Tasking RE_Master_Id, -- System.Tasking RE_Unspecified_Priority, -- System.Tasking RE_Activation_Chain, -- System.Tasking RE_Abort_Defer, -- System.Soft_Links RE_Abort_Undefer, -- System.Soft_Links RE_Complete_Master, -- System.Soft_Links RE_Current_Master, -- System.Soft_Links RE_Enter_Master, -- System.Soft_Links RE_Get_Current_Excep, -- System.Soft_Links RE_Get_GNAT_Exception, -- System.Soft_Links RE_Update_Exception, -- System.Soft_Links RE_ATSD, -- System.Threads RE_Thread_Body_Enter, -- System.Threads RE_Thread_Body_Exceptional_Exit, -- System.Threads RE_Thread_Body_Leave, -- System.Threads RE_Bits_1, -- System.Unsigned_Types RE_Bits_2, -- System.Unsigned_Types RE_Bits_4, -- System.Unsigned_Types RE_Float_Unsigned, -- System.Unsigned_Types RE_Long_Unsigned, -- System.Unsigned_Types RE_Long_Long_Unsigned, -- System.Unsigned_Types RE_Packed_Byte, -- System.Unsigned_Types RE_Packed_Bytes1, -- System.Unsigned_Types RE_Packed_Bytes2, -- System.Unsigned_Types RE_Packed_Bytes4, -- System.Unsigned_Types RE_Short_Unsigned, -- System.Unsigned_Types RE_Short_Short_Unsigned, -- System.Unsigned_Types RE_Unsigned, -- System.Unsigned_Types RE_Value_Boolean, -- System.Val_Bool RE_Value_Character, -- System.Val_Char RE_Value_Decimal, -- System.Val_Dec RE_Value_Enumeration_8, -- System.Val_Enum RE_Value_Enumeration_16, -- System.Val_Enum RE_Value_Enumeration_32, -- System.Val_Enum RE_Value_Integer, -- System.Val_Int RE_Value_Long_Long_Decimal, -- System.Val_LLD RE_Value_Long_Long_Integer, -- System.Val_LLI RE_Value_Long_Long_Unsigned, -- System.Val_LLU RE_Value_Real, -- System.Val_Real RE_Value_Unsigned, -- System.Val_Uns RE_Value_Wide_Character, -- System.Val_WChar RE_Value_Wide_Wide_Character, -- System.Val_WChar RE_D, -- System.Vax_Float_Operations RE_F, -- System.Vax_Float_Operations RE_G, -- System.Vax_Float_Operations RE_Q, -- System.Vax_Float_Operations RE_S, -- System.Vax_Float_Operations RE_T, -- System.Vax_Float_Operations RE_D_To_G, -- System.Vax_Float_Operations RE_F_To_G, -- System.Vax_Float_Operations RE_F_To_Q, -- System.Vax_Float_Operations RE_F_To_S, -- System.Vax_Float_Operations RE_G_To_D, -- System.Vax_Float_Operations RE_G_To_F, -- System.Vax_Float_Operations RE_G_To_Q, -- System.Vax_Float_Operations RE_G_To_T, -- System.Vax_Float_Operations RE_Q_To_F, -- System.Vax_Float_Operations RE_Q_To_G, -- System.Vax_Float_Operations RE_S_To_F, -- System.Vax_Float_Operations RE_T_To_D, -- System.Vax_Float_Operations RE_T_To_G, -- System.Vax_Float_Operations RE_Abs_F, -- System.Vax_Float_Operations RE_Abs_G, -- System.Vax_Float_Operations RE_Add_F, -- System.Vax_Float_Operations RE_Add_G, -- System.Vax_Float_Operations RE_Div_F, -- System.Vax_Float_Operations RE_Div_G, -- System.Vax_Float_Operations RE_Mul_F, -- System.Vax_Float_Operations RE_Mul_G, -- System.Vax_Float_Operations RE_Neg_F, -- System.Vax_Float_Operations RE_Neg_G, -- System.Vax_Float_Operations RE_Sub_F, -- System.Vax_Float_Operations RE_Sub_G, -- System.Vax_Float_Operations RE_Eq_F, -- System.Vax_Float_Operations RE_Eq_G, -- System.Vax_Float_Operations RE_Le_F, -- System.Vax_Float_Operations RE_Le_G, -- System.Vax_Float_Operations RE_Lt_F, -- System.Vax_Float_Operations RE_Lt_G, -- System.Vax_Float_Operations RE_Ne_F, -- System.Vax_Float_Operations RE_Ne_G, -- System.Vax_Float_Operations RE_Valid_D, -- System.Vax_Float_Operations RE_Valid_F, -- System.Vax_Float_Operations RE_Valid_G, -- System.Vax_Float_Operations RE_Version_String, -- System.Version_Control RE_Get_Version_String, -- System.Version_Control RE_Register_VMS_Exception, -- System.VMS_Exception_Table RE_String_To_Wide_String, -- System.WCh_StW RE_String_To_Wide_Wide_String, -- System.WCh_StW RE_Wide_String_To_String, -- System.WCh_WtS RE_Wide_Wide_String_To_String, -- System.WCh_WtS RE_Wide_Width_Character, -- System.WWd_Char RE_Wide_Wide_Width_Character, -- System.WWd_Char RE_Wide_Wide_Width_Enumeration_8, -- System.WWd_Enum RE_Wide_Wide_Width_Enumeration_16, -- System.WWd_Enum RE_Wide_Wide_Width_Enumeration_32, -- System.WWd_Enum RE_Wide_Width_Enumeration_8, -- System.WWd_Enum RE_Wide_Width_Enumeration_16, -- System.WWd_Enum RE_Wide_Width_Enumeration_32, -- System.WWd_Enum RE_Wide_Wide_Width_Wide_Character, -- System.WWd_Wchar RE_Wide_Wide_Width_Wide_Wide_Char, -- System.WWd_Wchar RE_Wide_Width_Wide_Character, -- System.WWd_Wchar RE_Wide_Width_Wide_Wide_Character, -- System.WWd_Wchar RE_Width_Boolean, -- System.Wid_Bool RE_Width_Character, -- System.Wid_Char RE_Width_Enumeration_8, -- System.Wid_Enum RE_Width_Enumeration_16, -- System.Wid_Enum RE_Width_Enumeration_32, -- System.Wid_Enum RE_Width_Long_Long_Integer, -- System.Wid_LLI RE_Width_Long_Long_Unsigned, -- System.Wid_LLU RE_Width_Wide_Character, -- System.Wid_WChar RE_Width_Wide_Wide_Character, -- System.Wid_WChar RE_Protected_Entry_Body_Array, -- Tasking.Protected_Objects.Entries RE_Protection_Entries, -- Tasking.Protected_Objects.Entries RE_Initialize_Protection_Entries, -- Tasking.Protected_Objects.Entries RE_Lock_Entries, -- Tasking.Protected_Objects.Entries RE_Lock_Read_Only_Entries, -- Tasking.Protected_Objects.Entries RE_Unlock_Entries, -- Tasking.Protected_Objects.Entries RE_Communication_Block, -- Protected_Objects.Operations RE_Protected_Entry_Call, -- Protected_Objects.Operations RE_Service_Entries, -- Protected_Objects.Operations RE_Cancel_Protected_Entry_Call, -- Protected_Objects.Operations RE_Enqueued, -- Protected_Objects.Operations RE_Cancelled, -- Protected_Objects.Operations RE_Complete_Entry_Body, -- Protected_Objects.Operations RE_Exceptional_Complete_Entry_Body, -- Protected_Objects.Operations RE_Requeue_Protected_Entry, -- Protected_Objects.Operations RE_Requeue_Task_To_Protected_Entry, -- Protected_Objects.Operations RE_Protected_Count, -- Protected_Objects.Operations RE_Protected_Entry_Caller, -- Protected_Objects.Operations RE_Timed_Protected_Entry_Call, -- Protected_Objects.Operations RE_Protection_Entry, -- Protected_Objects.Single_Entry RE_Initialize_Protection_Entry, -- Protected_Objects.Single_Entry RE_Lock_Entry, -- Protected_Objects.Single_Entry RE_Lock_Read_Only_Entry, -- Protected_Objects.Single_Entry RE_Unlock_Entry, -- Protected_Objects.Single_Entry RE_Protected_Single_Entry_Call, -- Protected_Objects.Single_Entry RE_Service_Entry, -- Protected_Objects.Single_Entry RE_Complete_Single_Entry_Body, -- Protected_Objects.Single_Entry RE_Exceptional_Complete_Single_Entry_Body, RE_Protected_Count_Entry, -- Protected_Objects.Single_Entry RE_Protected_Single_Entry_Caller, -- Protected_Objects.Single_Entry RE_Timed_Protected_Single_Entry_Call, RE_Protected_Entry_Index, -- System.Tasking.Protected_Objects RE_Entry_Body, -- System.Tasking.Protected_Objects RE_Protection, -- System.Tasking.Protected_Objects RE_Initialize_Protection, -- System.Tasking.Protected_Objects RE_Finalize_Protection, -- System.Tasking.Protected_Objects RE_Lock, -- System.Tasking.Protected_Objects RE_Lock_Read_Only, -- System.Tasking.Protected_Objects RE_Unlock, -- System.Tasking.Protected_Objects RE_Delay_Block, -- System.Tasking.Async_Delays RE_Timed_Out, -- System.Tasking.Async_Delays RE_Cancel_Async_Delay, -- System.Tasking.Async_Delays RE_Enqueue_Duration, -- System.Tasking.Async_Delays RE_Enqueue_Calendar, -- System.Tasking.Async_Delays RE_Enqueue_RT, -- System.Tasking.Async_Delays RE_Accept_Call, -- System.Tasking.Rendezvous RE_Accept_Trivial, -- System.Tasking.Rendezvous RE_Callable, -- System.Tasking.Rendezvous RE_Call_Simple, -- System.Tasking.Rendezvous RE_Requeue_Task_Entry, -- System.Tasking.Rendezvous RE_Requeue_Protected_To_Task_Entry, -- System.Tasking.Rendezvous RE_Cancel_Task_Entry_Call, -- System.Tasking.Rendezvous RE_Complete_Rendezvous, -- System.Tasking.Rendezvous RE_Task_Count, -- System.Tasking.Rendezvous RE_Exceptional_Complete_Rendezvous, -- System.Tasking.Rendezvous RE_Selective_Wait, -- System.Tasking.Rendezvous RE_Task_Entry_Call, -- System.Tasking.Rendezvous RE_Task_Entry_Caller, -- System.Tasking.Rendezvous RE_Timed_Task_Entry_Call, -- System.Tasking.Rendezvous RE_Timed_Selective_Wait, -- System.Tasking.Rendezvous RE_Activate_Restricted_Tasks, -- System.Tasking.Restricted.Stages RE_Complete_Restricted_Activation, -- System.Tasking.Restricted.Stages RE_Create_Restricted_Task, -- System.Tasking.Restricted.Stages RE_Complete_Restricted_Task, -- System.Tasking.Restricted.Stages RE_Restricted_Terminated, -- System.Tasking.Restricted.Stages RE_Abort_Tasks, -- System.Tasking.Stages RE_Activate_Tasks, -- System.Tasking.Stages RE_Complete_Activation, -- System.Tasking.Stages RE_Create_Task, -- System.Tasking.Stages RE_Complete_Task, -- System.Tasking.Stages RE_Free_Task, -- System.Tasking.Stages RE_Expunge_Unactivated_Tasks, -- System.Tasking.Stages RE_Terminated); -- System.Tasking.Stages -- The following declarations build a table that is indexed by the -- RTE function to determine the unit containing the given entity. -- This table is sorted in order of package names. RE_Unit_Table : array (RE_Id) of RTU_Id := ( RE_Null => RTU_Null, RE_Exceptions_Available_In_HIE => Ada_Exceptions, RE_Code_Loc => Ada_Exceptions, RE_Current_Target_Exception => Ada_Exceptions, -- of JGNAT RE_Exception_Id => Ada_Exceptions, RE_Exception_Information => Ada_Exceptions, RE_Exception_Message => Ada_Exceptions, RE_Exception_Name_Simple => Ada_Exceptions, RE_Exception_Occurrence => Ada_Exceptions, RE_Null_Id => Ada_Exceptions, RE_Null_Occurrence => Ada_Exceptions, RE_Poll => Ada_Exceptions, RE_Raise_Exception => Ada_Exceptions, RE_Raise_Exception_Always => Ada_Exceptions, RE_Reraise_Occurrence => Ada_Exceptions, RE_Reraise_Occurrence_Always => Ada_Exceptions, RE_Reraise_Occurrence_No_Defer => Ada_Exceptions, RE_Save_Occurrence => Ada_Exceptions, RE_Simple_List_Controller => Ada_Finalization_List_Controller, RE_List_Controller => Ada_Finalization_List_Controller, RE_Interrupt_ID => Ada_Interrupts, RE_Is_Reserved => Ada_Interrupts, RE_Is_Attached => Ada_Interrupts, RE_Current_Handler => Ada_Interrupts, RE_Attach_Handler => Ada_Interrupts, RE_Exchange_Handler => Ada_Interrupts, RE_Detach_Handler => Ada_Interrupts, RE_Reference => Ada_Interrupts, RE_Names => Ada_Interrupts_Names, RE_Root_Stream_Type => Ada_Streams, RE_Stream_Element => Ada_Streams, RE_Stream_Element_Count => Ada_Streams, RE_Stream_Element_Offset => Ada_Streams, RE_Stream_Element_Array => Ada_Streams, RE_Stream_Access => Ada_Streams_Stream_IO, RE_Abstract_Interface => Ada_Tags, RE_Addr_Ptr => Ada_Tags, RE_Address_Array => Ada_Tags, RE_CW_Membership => Ada_Tags, RE_Descendant_Tag => Ada_Tags, RE_Displace => Ada_Tags, RE_DT_Entry_Size => Ada_Tags, RE_DT_Prologue_Size => Ada_Tags, RE_External_Tag => Ada_Tags, RE_Get_Access_Level => Ada_Tags, RE_Get_Entry_Index => Ada_Tags, RE_Get_External_Tag => Ada_Tags, RE_Get_Offset_Index => Ada_Tags, RE_Get_Predefined_Prim_Op_Address => Ada_Tags, RE_Get_Prim_Op_Address => Ada_Tags, RE_Get_Prim_Op_Kind => Ada_Tags, RE_Get_RC_Offset => Ada_Tags, RE_Get_Remotely_Callable => Ada_Tags, RE_Get_Tagged_Kind => Ada_Tags, RE_Inherit_DT => Ada_Tags, RE_Inherit_TSD => Ada_Tags, RE_Interface_Data => Ada_Tags, RE_Interface_Tag => Ada_Tags, RE_Internal_Tag => Ada_Tags, RE_Is_Descendant_At_Same_Level => Ada_Tags, RE_IW_Membership => Ada_Tags, RE_Object_Specific_Data => Ada_Tags, RE_Offset_To_Top => Ada_Tags, RE_POK_Function => Ada_Tags, RE_POK_Procedure => Ada_Tags, RE_POK_Protected_Entry => Ada_Tags, RE_POK_Protected_Function => Ada_Tags, RE_POK_Protected_Procedure => Ada_Tags, RE_POK_Task_Entry => Ada_Tags, RE_POK_Task_Function => Ada_Tags, RE_POK_Task_Procedure => Ada_Tags, RE_Prim_Op_Kind => Ada_Tags, RE_Primary_DT => Ada_Tags, RE_Register_Interface_Tag => Ada_Tags, RE_Register_Tag => Ada_Tags, RE_Secondary_DT => Ada_Tags, RE_Select_Specific_Data => Ada_Tags, RE_Set_Access_Level => Ada_Tags, RE_Set_Entry_Index => Ada_Tags, RE_Set_Expanded_Name => Ada_Tags, RE_Set_External_Tag => Ada_Tags, RE_Set_Interface_Table => Ada_Tags, RE_Set_Num_Prim_Ops => Ada_Tags, RE_Set_Offset_Index => Ada_Tags, RE_Set_Offset_To_Top => Ada_Tags, RE_Set_OSD => Ada_Tags, RE_Set_Predefined_Prim_Op_Address => Ada_Tags, RE_Set_Prim_Op_Address => Ada_Tags, RE_Set_Prim_Op_Kind => Ada_Tags, RE_Set_RC_Offset => Ada_Tags, RE_Set_Remotely_Callable => Ada_Tags, RE_Set_SSD => Ada_Tags, RE_Set_Signature => Ada_Tags, RE_Set_Tagged_Kind => Ada_Tags, RE_Set_TSD => Ada_Tags, RE_Tag => Ada_Tags, RE_Tag_Error => Ada_Tags, RE_Tagged_Kind => Ada_Tags, RE_TSD_Entry_Size => Ada_Tags, RE_TSD_Prologue_Size => Ada_Tags, RE_TK_Abstract_Limited_Tagged => Ada_Tags, RE_TK_Abstract_Tagged => Ada_Tags, RE_TK_Limited_Tagged => Ada_Tags, RE_TK_Protected => Ada_Tags, RE_TK_Tagged => Ada_Tags, RE_TK_Task => Ada_Tags, RE_Valid_Signature => Ada_Tags, RE_Abort_Task => Ada_Task_Identification, RE_Current_Task => Ada_Task_Identification, RO_AT_Task_Id => Ada_Task_Identification, RO_CA_Time => Ada_Calendar, RO_CA_Delay_For => Ada_Calendar_Delays, RO_CA_Delay_Until => Ada_Calendar_Delays, RO_CA_To_Duration => Ada_Calendar_Delays, RO_RT_Time => Ada_Real_Time, RO_RT_Delay_Until => Ada_Real_Time_Delays, RO_RT_To_Duration => Ada_Real_Time_Delays, RE_Integer_64 => Interfaces, RE_Unsigned_8 => Interfaces, RE_Unsigned_16 => Interfaces, RE_Unsigned_32 => Interfaces, RE_Unsigned_64 => Interfaces, RE_Vtable_Ptr => Interfaces_CPP, RE_Displaced_This => Interfaces_CPP, RE_CPP_CW_Membership => Interfaces_CPP, RE_CPP_DT_Entry_Size => Interfaces_CPP, RE_CPP_DT_Prologue_Size => Interfaces_CPP, RE_CPP_Get_External_Tag => Interfaces_CPP, RE_CPP_Get_Prim_Op_Address => Interfaces_CPP, RE_CPP_Get_RC_Offset => Interfaces_CPP, RE_CPP_Get_Remotely_Callable => Interfaces_CPP, RE_CPP_Inherit_DT => Interfaces_CPP, RE_CPP_Inherit_TSD => Interfaces_CPP, RE_CPP_Register_Tag => Interfaces_CPP, RE_CPP_Set_Expanded_Name => Interfaces_CPP, RE_CPP_Set_External_Tag => Interfaces_CPP, RE_CPP_Set_Prim_Op_Address => Interfaces_CPP, RE_CPP_Set_RC_Offset => Interfaces_CPP, RE_CPP_Set_Remotely_Callable => Interfaces_CPP, RE_CPP_Set_TSD => Interfaces_CPP, RE_CPP_TSD_Entry_Size => Interfaces_CPP, RE_CPP_TSD_Prologue_Size => Interfaces_CPP, RE_Packed_Size => Interfaces_Packed_Decimal, RE_Packed_To_Int32 => Interfaces_Packed_Decimal, RE_Packed_To_Int64 => Interfaces_Packed_Decimal, RE_Int32_To_Packed => Interfaces_Packed_Decimal, RE_Int64_To_Packed => Interfaces_Packed_Decimal, RE_Address => System, RE_Any_Priority => System, RE_Bit_Order => System, RE_Default_Priority => System, RE_High_Order_First => System, RE_Interrupt_Priority => System, RE_Lib_Stop => System, RE_Low_Order_First => System, RE_Max_Interrupt_Priority => System, RE_Max_Priority => System, RE_Null_Address => System, RE_Priority => System, RE_Add_With_Ovflo_Check => System_Arith_64, RE_Double_Divide => System_Arith_64, RE_Multiply_With_Ovflo_Check => System_Arith_64, RE_Scaled_Divide => System_Arith_64, RE_Subtract_With_Ovflo_Check => System_Arith_64, RE_Create_AST_Handler => System_AST_Handling, RE_Raise_Assert_Failure => System_Assertions, RE_AST_Handler => System_Aux_DEC, RE_Import_Value => System_Aux_DEC, RE_No_AST_Handler => System_Aux_DEC, RE_Type_Class => System_Aux_DEC, RE_Type_Class_Enumeration => System_Aux_DEC, RE_Type_Class_Integer => System_Aux_DEC, RE_Type_Class_Fixed_Point => System_Aux_DEC, RE_Type_Class_Floating_Point => System_Aux_DEC, RE_Type_Class_Array => System_Aux_DEC, RE_Type_Class_Record => System_Aux_DEC, RE_Type_Class_Access => System_Aux_DEC, RE_Type_Class_Task => System_Aux_DEC, RE_Type_Class_Address => System_Aux_DEC, RE_Bit_And => System_Bit_Ops, RE_Bit_Eq => System_Bit_Ops, RE_Bit_Not => System_Bit_Ops, RE_Bit_Or => System_Bit_Ops, RE_Bit_Xor => System_Bit_Ops, RE_Checked_Pool => System_Checked_Pools, RE_Boolean_Array => System_Boolean_Array_Operations, RE_Vector_Not => System_Boolean_Array_Operations, RE_Vector_And => System_Boolean_Array_Operations, RE_Vector_Or => System_Boolean_Array_Operations, RE_Vector_Nand => System_Boolean_Array_Operations, RE_Vector_Nor => System_Boolean_Array_Operations, RE_Vector_Nxor => System_Boolean_Array_Operations, RE_Vector_Xor => System_Boolean_Array_Operations, RE_Compare_Array_S8 => System_Compare_Array_Signed_8, RE_Compare_Array_S8_Unaligned => System_Compare_Array_Signed_8, RE_Compare_Array_S16 => System_Compare_Array_Signed_16, RE_Compare_Array_S32 => System_Compare_Array_Signed_32, RE_Compare_Array_S64 => System_Compare_Array_Signed_64, RE_Compare_Array_U8 => System_Compare_Array_Unsigned_8, RE_Compare_Array_U8_Unaligned => System_Compare_Array_Unsigned_8, RE_Compare_Array_U16 => System_Compare_Array_Unsigned_16, RE_Compare_Array_U32 => System_Compare_Array_Unsigned_32, RE_Compare_Array_U64 => System_Compare_Array_Unsigned_64, RE_Register_Exception => System_Exception_Table, RE_Exn_Integer => System_Exn_Int, RE_Exn_Long_Long_Float => System_Exn_LLF, RE_Exn_Long_Long_Integer => System_Exn_LLI, RE_Exp_Integer => System_Exp_Int, RE_Exp_Long_Long_Integer => System_Exp_LLI, RE_Exp_Long_Long_Unsigned => System_Exp_LLU, RE_Exp_Modular => System_Exp_Mod, RE_Exp_Unsigned => System_Exp_Uns, RE_Attr_Float => System_Fat_Flt, RE_Attr_IEEE_Long => System_Fat_IEEE_Long_Float, RE_Fat_IEEE_Long => System_Fat_IEEE_Long_Float, RE_Attr_IEEE_Short => System_Fat_IEEE_Short_Float, RE_Fat_IEEE_Short => System_Fat_IEEE_Short_Float, RE_Attr_Long_Float => System_Fat_LFlt, RE_Attr_Long_Long_Float => System_Fat_LLF, RE_Attr_Short_Float => System_Fat_SFlt, RE_Attr_VAX_D_Float => System_Fat_VAX_D_Float, RE_Fat_VAX_D => System_Fat_VAX_D_Float, RE_Attr_VAX_F_Float => System_Fat_VAX_F_Float, RE_Fat_VAX_F => System_Fat_VAX_F_Float, RE_Attr_VAX_G_Float => System_Fat_VAX_G_Float, RE_Fat_VAX_G => System_Fat_VAX_G_Float, RE_Attach_To_Final_List => System_Finalization_Implementation, RE_Finalize_List => System_Finalization_Implementation, RE_Finalize_One => System_Finalization_Implementation, RE_Global_Final_List => System_Finalization_Implementation, RE_Record_Controller => System_Finalization_Implementation, RE_Limited_Record_Controller => System_Finalization_Implementation, RE_Deep_Tag_Initialize => System_Finalization_Implementation, RE_Deep_Tag_Adjust => System_Finalization_Implementation, RE_Deep_Tag_Finalize => System_Finalization_Implementation, RE_Deep_Tag_Attach => System_Finalization_Implementation, RE_Deep_Rec_Initialize => System_Finalization_Implementation, RE_Deep_Rec_Adjust => System_Finalization_Implementation, RE_Deep_Rec_Finalize => System_Finalization_Implementation, RE_Root_Controlled => System_Finalization_Root, RE_Finalizable => System_Finalization_Root, RE_Finalizable_Ptr => System_Finalization_Root, RE_Fore => System_Fore, RE_Image_Boolean => System_Img_Bool, RE_Image_Character => System_Img_Char, RE_Image_Decimal => System_Img_Dec, RE_Image_Enumeration_8 => System_Img_Enum, RE_Image_Enumeration_16 => System_Img_Enum, RE_Image_Enumeration_32 => System_Img_Enum, RE_Image_Integer => System_Img_Int, RE_Image_Long_Long_Decimal => System_Img_LLD, RE_Image_Long_Long_Integer => System_Img_LLI, RE_Image_Long_Long_Unsigned => System_Img_LLU, RE_Image_Ordinary_Fixed_Point => System_Img_Real, RE_Image_Floating_Point => System_Img_Real, RE_Image_Unsigned => System_Img_Uns, RE_Image_Wide_Character => System_Img_WChar, RE_Image_Wide_Wide_Character => System_Img_WChar, RE_Bind_Interrupt_To_Entry => System_Interrupts, RE_Default_Interrupt_Priority => System_Interrupts, RE_Dynamic_Interrupt_Protection => System_Interrupts, RE_Install_Handlers => System_Interrupts, RE_Register_Interrupt_Handler => System_Interrupts, RE_Static_Interrupt_Protection => System_Interrupts, RE_System_Interrupt_Id => System_Interrupts, RE_Asm_Insn => System_Machine_Code, RE_Asm_Input_Operand => System_Machine_Code, RE_Asm_Output_Operand => System_Machine_Code, RE_Mantissa_Value => System_Mantissa, RE_memcpy => System_Memcop, RE_memmove => System_Memcop, RE_Bits_03 => System_Pack_03, RE_Get_03 => System_Pack_03, RE_Set_03 => System_Pack_03, RE_Bits_05 => System_Pack_05, RE_Get_05 => System_Pack_05, RE_Set_05 => System_Pack_05, RE_Bits_06 => System_Pack_06, RE_Get_06 => System_Pack_06, RE_GetU_06 => System_Pack_06, RE_Set_06 => System_Pack_06, RE_SetU_06 => System_Pack_06, RE_Bits_07 => System_Pack_07, RE_Get_07 => System_Pack_07, RE_Set_07 => System_Pack_07, RE_Bits_09 => System_Pack_09, RE_Get_09 => System_Pack_09, RE_Set_09 => System_Pack_09, RE_Bits_10 => System_Pack_10, RE_Get_10 => System_Pack_10, RE_GetU_10 => System_Pack_10, RE_Set_10 => System_Pack_10, RE_SetU_10 => System_Pack_10, RE_Bits_11 => System_Pack_11, RE_Get_11 => System_Pack_11, RE_Set_11 => System_Pack_11, RE_Bits_12 => System_Pack_12, RE_Get_12 => System_Pack_12, RE_GetU_12 => System_Pack_12, RE_Set_12 => System_Pack_12, RE_SetU_12 => System_Pack_12, RE_Bits_13 => System_Pack_13, RE_Get_13 => System_Pack_13, RE_Set_13 => System_Pack_13, RE_Bits_14 => System_Pack_14, RE_Get_14 => System_Pack_14, RE_GetU_14 => System_Pack_14, RE_Set_14 => System_Pack_14, RE_SetU_14 => System_Pack_14, RE_Bits_15 => System_Pack_15, RE_Get_15 => System_Pack_15, RE_Set_15 => System_Pack_15, RE_Bits_17 => System_Pack_17, RE_Get_17 => System_Pack_17, RE_Set_17 => System_Pack_17, RE_Bits_18 => System_Pack_18, RE_Get_18 => System_Pack_18, RE_GetU_18 => System_Pack_18, RE_Set_18 => System_Pack_18, RE_SetU_18 => System_Pack_18, RE_Bits_19 => System_Pack_19, RE_Get_19 => System_Pack_19, RE_Set_19 => System_Pack_19, RE_Bits_20 => System_Pack_20, RE_Get_20 => System_Pack_20, RE_GetU_20 => System_Pack_20, RE_Set_20 => System_Pack_20, RE_SetU_20 => System_Pack_20, RE_Bits_21 => System_Pack_21, RE_Get_21 => System_Pack_21, RE_Set_21 => System_Pack_21, RE_Bits_22 => System_Pack_22, RE_Get_22 => System_Pack_22, RE_GetU_22 => System_Pack_22, RE_Set_22 => System_Pack_22, RE_SetU_22 => System_Pack_22, RE_Bits_23 => System_Pack_23, RE_Get_23 => System_Pack_23, RE_Set_23 => System_Pack_23, RE_Bits_24 => System_Pack_24, RE_Get_24 => System_Pack_24, RE_GetU_24 => System_Pack_24, RE_Set_24 => System_Pack_24, RE_SetU_24 => System_Pack_24, RE_Bits_25 => System_Pack_25, RE_Get_25 => System_Pack_25, RE_Set_25 => System_Pack_25, RE_Bits_26 => System_Pack_26, RE_Get_26 => System_Pack_26, RE_GetU_26 => System_Pack_26, RE_Set_26 => System_Pack_26, RE_SetU_26 => System_Pack_26, RE_Bits_27 => System_Pack_27, RE_Get_27 => System_Pack_27, RE_Set_27 => System_Pack_27, RE_Bits_28 => System_Pack_28, RE_Get_28 => System_Pack_28, RE_GetU_28 => System_Pack_28, RE_Set_28 => System_Pack_28, RE_SetU_28 => System_Pack_28, RE_Bits_29 => System_Pack_29, RE_Get_29 => System_Pack_29, RE_Set_29 => System_Pack_29, RE_Bits_30 => System_Pack_30, RE_Get_30 => System_Pack_30, RE_GetU_30 => System_Pack_30, RE_Set_30 => System_Pack_30, RE_SetU_30 => System_Pack_30, RE_Bits_31 => System_Pack_31, RE_Get_31 => System_Pack_31, RE_Set_31 => System_Pack_31, RE_Bits_33 => System_Pack_33, RE_Get_33 => System_Pack_33, RE_Set_33 => System_Pack_33, RE_Bits_34 => System_Pack_34, RE_Get_34 => System_Pack_34, RE_GetU_34 => System_Pack_34, RE_Set_34 => System_Pack_34, RE_SetU_34 => System_Pack_34, RE_Bits_35 => System_Pack_35, RE_Get_35 => System_Pack_35, RE_Set_35 => System_Pack_35, RE_Bits_36 => System_Pack_36, RE_Get_36 => System_Pack_36, RE_GetU_36 => System_Pack_36, RE_Set_36 => System_Pack_36, RE_SetU_36 => System_Pack_36, RE_Bits_37 => System_Pack_37, RE_Get_37 => System_Pack_37, RE_Set_37 => System_Pack_37, RE_Bits_38 => System_Pack_38, RE_Get_38 => System_Pack_38, RE_GetU_38 => System_Pack_38, RE_Set_38 => System_Pack_38, RE_SetU_38 => System_Pack_38, RE_Bits_39 => System_Pack_39, RE_Get_39 => System_Pack_39, RE_Set_39 => System_Pack_39, RE_Bits_40 => System_Pack_40, RE_Get_40 => System_Pack_40, RE_GetU_40 => System_Pack_40, RE_Set_40 => System_Pack_40, RE_SetU_40 => System_Pack_40, RE_Bits_41 => System_Pack_41, RE_Get_41 => System_Pack_41, RE_Set_41 => System_Pack_41, RE_Bits_42 => System_Pack_42, RE_Get_42 => System_Pack_42, RE_GetU_42 => System_Pack_42, RE_Set_42 => System_Pack_42, RE_SetU_42 => System_Pack_42, RE_Bits_43 => System_Pack_43, RE_Get_43 => System_Pack_43, RE_Set_43 => System_Pack_43, RE_Bits_44 => System_Pack_44, RE_Get_44 => System_Pack_44, RE_GetU_44 => System_Pack_44, RE_Set_44 => System_Pack_44, RE_SetU_44 => System_Pack_44, RE_Bits_45 => System_Pack_45, RE_Get_45 => System_Pack_45, RE_Set_45 => System_Pack_45, RE_Bits_46 => System_Pack_46, RE_Get_46 => System_Pack_46, RE_GetU_46 => System_Pack_46, RE_Set_46 => System_Pack_46, RE_SetU_46 => System_Pack_46, RE_Bits_47 => System_Pack_47, RE_Get_47 => System_Pack_47, RE_Set_47 => System_Pack_47, RE_Bits_48 => System_Pack_48, RE_Get_48 => System_Pack_48, RE_GetU_48 => System_Pack_48, RE_Set_48 => System_Pack_48, RE_SetU_48 => System_Pack_48, RE_Bits_49 => System_Pack_49, RE_Get_49 => System_Pack_49, RE_Set_49 => System_Pack_49, RE_Bits_50 => System_Pack_50, RE_Get_50 => System_Pack_50, RE_GetU_50 => System_Pack_50, RE_Set_50 => System_Pack_50, RE_SetU_50 => System_Pack_50, RE_Bits_51 => System_Pack_51, RE_Get_51 => System_Pack_51, RE_Set_51 => System_Pack_51, RE_Bits_52 => System_Pack_52, RE_Get_52 => System_Pack_52, RE_GetU_52 => System_Pack_52, RE_Set_52 => System_Pack_52, RE_SetU_52 => System_Pack_52, RE_Bits_53 => System_Pack_53, RE_Get_53 => System_Pack_53, RE_Set_53 => System_Pack_53, RE_Bits_54 => System_Pack_54, RE_Get_54 => System_Pack_54, RE_GetU_54 => System_Pack_54, RE_Set_54 => System_Pack_54, RE_SetU_54 => System_Pack_54, RE_Bits_55 => System_Pack_55, RE_Get_55 => System_Pack_55, RE_Set_55 => System_Pack_55, RE_Bits_56 => System_Pack_56, RE_Get_56 => System_Pack_56, RE_GetU_56 => System_Pack_56, RE_Set_56 => System_Pack_56, RE_SetU_56 => System_Pack_56, RE_Bits_57 => System_Pack_57, RE_Get_57 => System_Pack_57, RE_Set_57 => System_Pack_57, RE_Bits_58 => System_Pack_58, RE_Get_58 => System_Pack_58, RE_GetU_58 => System_Pack_58, RE_Set_58 => System_Pack_58, RE_SetU_58 => System_Pack_58, RE_Bits_59 => System_Pack_59, RE_Get_59 => System_Pack_59, RE_Set_59 => System_Pack_59, RE_Bits_60 => System_Pack_60, RE_Get_60 => System_Pack_60, RE_GetU_60 => System_Pack_60, RE_Set_60 => System_Pack_60, RE_SetU_60 => System_Pack_60, RE_Bits_61 => System_Pack_61, RE_Get_61 => System_Pack_61, RE_Set_61 => System_Pack_61, RE_Bits_62 => System_Pack_62, RE_Get_62 => System_Pack_62, RE_GetU_62 => System_Pack_62, RE_Set_62 => System_Pack_62, RE_SetU_62 => System_Pack_62, RE_Bits_63 => System_Pack_63, RE_Get_63 => System_Pack_63, RE_Set_63 => System_Pack_63, RE_Adjust_Storage_Size => System_Parameters, RE_Default_Stack_Size => System_Parameters, RE_Garbage_Collected => System_Parameters, RE_Size_Type => System_Parameters, RE_Unspecified_Size => System_Parameters, RE_DSA_Implementation => System_Partition_Interface, RE_Get_Active_Partition_Id => System_Partition_Interface, RE_Get_Passive_Partition_Id => System_Partition_Interface, RE_Get_Local_Partition_Id => System_Partition_Interface, RE_Get_RCI_Package_Receiver => System_Partition_Interface, RE_Get_Unique_Remote_Pointer => System_Partition_Interface, RE_RACW_Stub_Type => System_Partition_Interface, RE_RACW_Stub_Type_Access => System_Partition_Interface, RE_RAS_Proxy_Type => System_Partition_Interface, RE_RAS_Proxy_Type_Access => System_Partition_Interface, RE_Raise_Program_Error_Unknown_Tag => System_Partition_Interface, RE_Register_Passive_Package => System_Partition_Interface, RE_Register_Receiving_Stub => System_Partition_Interface, RE_Request_Access => System_Partition_Interface, RE_RCI_Locator => System_Partition_Interface, RE_RCI_Subp_Info => System_Partition_Interface, RE_RCI_Subp_Info_Array => System_Partition_Interface, RE_Same_Partition => System_Partition_Interface, RE_Subprogram_Id => System_Partition_Interface, RE_Get_RAS_Info => System_Partition_Interface, RE_To_PolyORB_String => System_PolyORB_Interface, RE_To_Standard_String => System_PolyORB_Interface, RE_Caseless_String_Eq => System_PolyORB_Interface, RE_TypeCode => System_PolyORB_Interface, RE_Any => System_PolyORB_Interface, RE_Mode_In => System_PolyORB_Interface, RE_Mode_Out => System_PolyORB_Interface, RE_Mode_Inout => System_PolyORB_Interface, RE_NamedValue => System_PolyORB_Interface, RE_Result_Name => System_PolyORB_Interface, RE_Object_Ref => System_PolyORB_Interface, RE_Create_Any => System_PolyORB_Interface, RE_Any_Aggregate_Build => System_PolyORB_Interface, RE_Add_Aggregate_Element => System_PolyORB_Interface, RE_Get_Aggregate_Element => System_PolyORB_Interface, RE_Content_Type => System_PolyORB_Interface, RE_Any_Member_Type => System_PolyORB_Interface, RE_Get_Nested_Sequence_Length => System_PolyORB_Interface, RE_Extract_Union_Value => System_PolyORB_Interface, RE_NVList_Ref => System_PolyORB_Interface, RE_NVList_Create => System_PolyORB_Interface, RE_NVList_Add_Item => System_PolyORB_Interface, RE_Request_Create => System_PolyORB_Interface, RE_Request_Invoke => System_PolyORB_Interface, RE_Request_Arguments => System_PolyORB_Interface, RE_Request_Set_Out => System_PolyORB_Interface, RE_Request_Raise_Occurrence => System_PolyORB_Interface, RE_Nil_Exc_List => System_PolyORB_Interface, RE_Servant => System_PolyORB_Interface, RE_Copy_Any_Value => System_PolyORB_Interface, RE_Set_Result => System_PolyORB_Interface, RE_Register_Obj_Receiving_Stub => System_PolyORB_Interface, RE_Register_Pkg_Receiving_Stub => System_PolyORB_Interface, RE_Is_Nil => System_PolyORB_Interface, RE_Entity_Ptr => System_PolyORB_Interface, RE_Entity_Of => System_PolyORB_Interface, RE_Inc_Usage => System_PolyORB_Interface, RE_Set_Ref => System_PolyORB_Interface, RE_Make_Ref => System_PolyORB_Interface, RE_Get_Local_Address => System_PolyORB_Interface, RE_Get_Reference => System_PolyORB_Interface, RE_Local_Oid_To_Address => System_PolyORB_Interface, RE_Asynchronous_P_To_Sync_Scope => System_PolyORB_Interface, RE_Buffer_Stream_Type => System_PolyORB_Interface, RE_Allocate_Buffer => System_PolyORB_Interface, RE_Release_Buffer => System_PolyORB_Interface, RE_BS_To_Any => System_PolyORB_Interface, RE_Any_To_BS => System_PolyORB_Interface, RE_FA_AD => System_PolyORB_Interface, RE_FA_AS => System_PolyORB_Interface, RE_FA_B => System_PolyORB_Interface, RE_FA_C => System_PolyORB_Interface, RE_FA_F => System_PolyORB_Interface, RE_FA_I => System_PolyORB_Interface, RE_FA_LF => System_PolyORB_Interface, RE_FA_LI => System_PolyORB_Interface, RE_FA_LLF => System_PolyORB_Interface, RE_FA_LLI => System_PolyORB_Interface, RE_FA_LLU => System_PolyORB_Interface, RE_FA_LU => System_PolyORB_Interface, RE_FA_SF => System_PolyORB_Interface, RE_FA_SI => System_PolyORB_Interface, RE_FA_SSI => System_PolyORB_Interface, RE_FA_SSU => System_PolyORB_Interface, RE_FA_SU => System_PolyORB_Interface, RE_FA_U => System_PolyORB_Interface, RE_FA_WC => System_PolyORB_Interface, RE_FA_WWC => System_PolyORB_Interface, RE_FA_String => System_PolyORB_Interface, RE_FA_ObjRef => System_PolyORB_Interface, RE_TA_AD => System_PolyORB_Interface, RE_TA_AS => System_PolyORB_Interface, RE_TA_B => System_PolyORB_Interface, RE_TA_C => System_PolyORB_Interface, RE_TA_F => System_PolyORB_Interface, RE_TA_I => System_PolyORB_Interface, RE_TA_LF => System_PolyORB_Interface, RE_TA_LI => System_PolyORB_Interface, RE_TA_LLF => System_PolyORB_Interface, RE_TA_LLI => System_PolyORB_Interface, RE_TA_LLU => System_PolyORB_Interface, RE_TA_LU => System_PolyORB_Interface, RE_TA_SF => System_PolyORB_Interface, RE_TA_SI => System_PolyORB_Interface, RE_TA_SSI => System_PolyORB_Interface, RE_TA_SSU => System_PolyORB_Interface, RE_TA_SU => System_PolyORB_Interface, RE_TA_U => System_PolyORB_Interface, RE_TA_WC => System_PolyORB_Interface, RE_TA_WWC => System_PolyORB_Interface, RE_TA_String => System_PolyORB_Interface, RE_TA_ObjRef => System_PolyORB_Interface, RE_TA_TC => System_PolyORB_Interface, RE_TC_Alias => System_PolyORB_Interface, RE_TC_Build => System_PolyORB_Interface, RE_Get_TC => System_PolyORB_Interface, RE_Set_TC => System_PolyORB_Interface, RE_TC_Any => System_PolyORB_Interface, RE_TC_AD => System_PolyORB_Interface, RE_TC_AS => System_PolyORB_Interface, RE_TC_B => System_PolyORB_Interface, RE_TC_C => System_PolyORB_Interface, RE_TC_F => System_PolyORB_Interface, RE_TC_I => System_PolyORB_Interface, RE_TC_LF => System_PolyORB_Interface, RE_TC_LI => System_PolyORB_Interface, RE_TC_LLF => System_PolyORB_Interface, RE_TC_LLI => System_PolyORB_Interface, RE_TC_LLU => System_PolyORB_Interface, RE_TC_LU => System_PolyORB_Interface, RE_TC_SF => System_PolyORB_Interface, RE_TC_SI => System_PolyORB_Interface, RE_TC_SSI => System_PolyORB_Interface, RE_TC_SSU => System_PolyORB_Interface, RE_TC_SU => System_PolyORB_Interface, RE_TC_U => System_PolyORB_Interface, RE_TC_Void => System_PolyORB_Interface, RE_TC_Opaque => System_PolyORB_Interface, RE_TC_WC => System_PolyORB_Interface, RE_TC_WWC => System_PolyORB_Interface, RE_TC_Array => System_PolyORB_Interface, RE_TC_Sequence => System_PolyORB_Interface, RE_TC_String => System_PolyORB_Interface, RE_TC_Struct => System_PolyORB_Interface, RE_TC_Union => System_PolyORB_Interface, RE_TC_Object => System_PolyORB_Interface, RE_Global_Pool_Object => System_Pool_Global, RE_Stack_Bounded_Pool => System_Pool_Size, RE_Do_Apc => System_RPC, RE_Do_Rpc => System_RPC, RE_Params_Stream_Type => System_RPC, RE_Partition_ID => System_RPC, RE_IS_Is1 => System_Scalar_Values, RE_IS_Is2 => System_Scalar_Values, RE_IS_Is4 => System_Scalar_Values, RE_IS_Is8 => System_Scalar_Values, RE_IS_Iu1 => System_Scalar_Values, RE_IS_Iu2 => System_Scalar_Values, RE_IS_Iu4 => System_Scalar_Values, RE_IS_Iu8 => System_Scalar_Values, RE_IS_Iz1 => System_Scalar_Values, RE_IS_Iz2 => System_Scalar_Values, RE_IS_Iz4 => System_Scalar_Values, RE_IS_Iz8 => System_Scalar_Values, RE_IS_Isf => System_Scalar_Values, RE_IS_Ifl => System_Scalar_Values, RE_IS_Ilf => System_Scalar_Values, RE_IS_Ill => System_Scalar_Values, RE_Default_Secondary_Stack_Size => System_Secondary_Stack, RE_Mark_Id => System_Secondary_Stack, RE_SS_Allocate => System_Secondary_Stack, RE_SS_Mark => System_Secondary_Stack, RE_SS_Pool => System_Secondary_Stack, RE_SS_Release => System_Secondary_Stack, RE_Shared_Var_Close => System_Shared_Storage, RE_Shared_Var_Lock => System_Shared_Storage, RE_Shared_Var_ROpen => System_Shared_Storage, RE_Shared_Var_Unlock => System_Shared_Storage, RE_Shared_Var_WOpen => System_Shared_Storage, RE_Abort_Undefer_Direct => System_Standard_Library, RE_Exception_Code => System_Standard_Library, RE_Exception_Data_Ptr => System_Standard_Library, RE_Integer_Address => System_Storage_Elements, RE_Storage_Offset => System_Storage_Elements, RE_Storage_Array => System_Storage_Elements, RE_Storage_Element => System_Storage_Elements, RE_To_Address => System_Storage_Elements, RE_Root_Storage_Pool => System_Storage_Pools, RE_Allocate_Any => System_Storage_Pools, RE_Deallocate_Any => System_Storage_Pools, RE_Thin_Pointer => System_Stream_Attributes, RE_Fat_Pointer => System_Stream_Attributes, RE_I_AD => System_Stream_Attributes, RE_I_AS => System_Stream_Attributes, RE_I_B => System_Stream_Attributes, RE_I_C => System_Stream_Attributes, RE_I_F => System_Stream_Attributes, RE_I_I => System_Stream_Attributes, RE_I_LF => System_Stream_Attributes, RE_I_LI => System_Stream_Attributes, RE_I_LLF => System_Stream_Attributes, RE_I_LLI => System_Stream_Attributes, RE_I_LLU => System_Stream_Attributes, RE_I_LU => System_Stream_Attributes, RE_I_SF => System_Stream_Attributes, RE_I_SI => System_Stream_Attributes, RE_I_SSI => System_Stream_Attributes, RE_I_SSU => System_Stream_Attributes, RE_I_SU => System_Stream_Attributes, RE_I_U => System_Stream_Attributes, RE_I_WC => System_Stream_Attributes, RE_I_WWC => System_Stream_Attributes, RE_W_AD => System_Stream_Attributes, RE_W_AS => System_Stream_Attributes, RE_W_B => System_Stream_Attributes, RE_W_C => System_Stream_Attributes, RE_W_F => System_Stream_Attributes, RE_W_I => System_Stream_Attributes, RE_W_LF => System_Stream_Attributes, RE_W_LI => System_Stream_Attributes, RE_W_LLF => System_Stream_Attributes, RE_W_LLI => System_Stream_Attributes, RE_W_LLU => System_Stream_Attributes, RE_W_LU => System_Stream_Attributes, RE_W_SF => System_Stream_Attributes, RE_W_SI => System_Stream_Attributes, RE_W_SSI => System_Stream_Attributes, RE_W_SSU => System_Stream_Attributes, RE_W_SU => System_Stream_Attributes, RE_W_U => System_Stream_Attributes, RE_W_WC => System_Stream_Attributes, RE_W_WWC => System_Stream_Attributes, RE_Block_Stream_Ops_OK => System_Stream_Attributes, RE_Str_Concat => System_String_Ops, RE_Str_Concat_CC => System_String_Ops, RE_Str_Concat_CS => System_String_Ops, RE_Str_Concat_SC => System_String_Ops, RE_Str_Concat_3 => System_String_Ops_Concat_3, RE_Str_Concat_4 => System_String_Ops_Concat_4, RE_Str_Concat_5 => System_String_Ops_Concat_5, RE_Task_Info_Type => System_Task_Info, RE_Unspecified_Task_Info => System_Task_Info, RE_Library_Task_Level => System_Tasking, RE_Task_Procedure_Access => System_Tasking, RO_ST_Task_Id => System_Tasking, RO_ST_Null_Task => System_Tasking, RE_Call_Modes => System_Tasking, RE_Simple_Call => System_Tasking, RE_Conditional_Call => System_Tasking, RE_Asynchronous_Call => System_Tasking, RE_Timed_Call => System_Tasking, RE_Ada_Task_Control_Block => System_Tasking, RE_Task_List => System_Tasking, RE_Accept_Alternative => System_Tasking, RE_Accept_List => System_Tasking, RE_Accept_List_Access => System_Tasking, RE_Max_Select => System_Tasking, RE_Max_Task_Entry => System_Tasking, RE_No_Rendezvous => System_Tasking, RE_Null_Task_Entry => System_Tasking, RE_Positive_Select_Index => System_Tasking, RE_Select_Index => System_Tasking, RE_Select_Modes => System_Tasking, RE_Else_Mode => System_Tasking, RE_Simple_Mode => System_Tasking, RE_Terminate_Mode => System_Tasking, RE_Delay_Mode => System_Tasking, RE_Task_Entry_Index => System_Tasking, RE_Self => System_Tasking, RE_Master_Id => System_Tasking, RE_Unspecified_Priority => System_Tasking, RE_Activation_Chain => System_Tasking, RE_Abort_Defer => System_Soft_Links, RE_Abort_Undefer => System_Soft_Links, RE_Complete_Master => System_Soft_Links, RE_Current_Master => System_Soft_Links, RE_Enter_Master => System_Soft_Links, RE_Get_Current_Excep => System_Soft_Links, RE_Get_GNAT_Exception => System_Soft_Links, RE_Update_Exception => System_Soft_Links, RE_ATSD => System_Threads, RE_Thread_Body_Enter => System_Threads, RE_Thread_Body_Exceptional_Exit => System_Threads, RE_Thread_Body_Leave => System_Threads, RE_Bits_1 => System_Unsigned_Types, RE_Bits_2 => System_Unsigned_Types, RE_Bits_4 => System_Unsigned_Types, RE_Float_Unsigned => System_Unsigned_Types, RE_Long_Unsigned => System_Unsigned_Types, RE_Long_Long_Unsigned => System_Unsigned_Types, RE_Packed_Byte => System_Unsigned_Types, RE_Packed_Bytes1 => System_Unsigned_Types, RE_Packed_Bytes2 => System_Unsigned_Types, RE_Packed_Bytes4 => System_Unsigned_Types, RE_Short_Unsigned => System_Unsigned_Types, RE_Short_Short_Unsigned => System_Unsigned_Types, RE_Unsigned => System_Unsigned_Types, RE_Value_Boolean => System_Val_Bool, RE_Value_Character => System_Val_Char, RE_Value_Decimal => System_Val_Dec, RE_Value_Enumeration_8 => System_Val_Enum, RE_Value_Enumeration_16 => System_Val_Enum, RE_Value_Enumeration_32 => System_Val_Enum, RE_Value_Integer => System_Val_Int, RE_Value_Long_Long_Decimal => System_Val_LLD, RE_Value_Long_Long_Integer => System_Val_LLI, RE_Value_Long_Long_Unsigned => System_Val_LLU, RE_Value_Real => System_Val_Real, RE_Value_Unsigned => System_Val_Uns, RE_Value_Wide_Character => System_Val_WChar, RE_Value_Wide_Wide_Character => System_Val_WChar, RE_D => System_Vax_Float_Operations, RE_F => System_Vax_Float_Operations, RE_G => System_Vax_Float_Operations, RE_Q => System_Vax_Float_Operations, RE_S => System_Vax_Float_Operations, RE_T => System_Vax_Float_Operations, RE_D_To_G => System_Vax_Float_Operations, RE_F_To_G => System_Vax_Float_Operations, RE_F_To_Q => System_Vax_Float_Operations, RE_F_To_S => System_Vax_Float_Operations, RE_G_To_D => System_Vax_Float_Operations, RE_G_To_F => System_Vax_Float_Operations, RE_G_To_Q => System_Vax_Float_Operations, RE_G_To_T => System_Vax_Float_Operations, RE_Q_To_F => System_Vax_Float_Operations, RE_Q_To_G => System_Vax_Float_Operations, RE_S_To_F => System_Vax_Float_Operations, RE_T_To_D => System_Vax_Float_Operations, RE_T_To_G => System_Vax_Float_Operations, RE_Abs_F => System_Vax_Float_Operations, RE_Abs_G => System_Vax_Float_Operations, RE_Add_F => System_Vax_Float_Operations, RE_Add_G => System_Vax_Float_Operations, RE_Div_F => System_Vax_Float_Operations, RE_Div_G => System_Vax_Float_Operations, RE_Mul_F => System_Vax_Float_Operations, RE_Mul_G => System_Vax_Float_Operations, RE_Neg_F => System_Vax_Float_Operations, RE_Neg_G => System_Vax_Float_Operations, RE_Sub_F => System_Vax_Float_Operations, RE_Sub_G => System_Vax_Float_Operations, RE_Eq_F => System_Vax_Float_Operations, RE_Eq_G => System_Vax_Float_Operations, RE_Le_F => System_Vax_Float_Operations, RE_Le_G => System_Vax_Float_Operations, RE_Lt_F => System_Vax_Float_Operations, RE_Lt_G => System_Vax_Float_Operations, RE_Ne_F => System_Vax_Float_Operations, RE_Ne_G => System_Vax_Float_Operations, RE_Valid_D => System_Vax_Float_Operations, RE_Valid_F => System_Vax_Float_Operations, RE_Valid_G => System_Vax_Float_Operations, RE_Version_String => System_Version_Control, RE_Get_Version_String => System_Version_Control, RE_Register_VMS_Exception => System_VMS_Exception_Table, RE_String_To_Wide_String => System_WCh_StW, RE_String_To_Wide_Wide_String => System_WCh_StW, RE_Wide_String_To_String => System_WCh_WtS, RE_Wide_Wide_String_To_String => System_WCh_WtS, RE_Wide_Wide_Width_Character => System_WWd_Char, RE_Wide_Width_Character => System_WWd_Char, RE_Wide_Wide_Width_Enumeration_8 => System_WWd_Enum, RE_Wide_Wide_Width_Enumeration_16 => System_WWd_Enum, RE_Wide_Wide_Width_Enumeration_32 => System_WWd_Enum, RE_Wide_Width_Enumeration_8 => System_WWd_Enum, RE_Wide_Width_Enumeration_16 => System_WWd_Enum, RE_Wide_Width_Enumeration_32 => System_WWd_Enum, RE_Wide_Wide_Width_Wide_Character => System_WWd_Wchar, RE_Wide_Wide_Width_Wide_Wide_Char => System_WWd_Wchar, RE_Wide_Width_Wide_Character => System_WWd_Wchar, RE_Wide_Width_Wide_Wide_Character => System_WWd_Wchar, RE_Width_Boolean => System_Wid_Bool, RE_Width_Character => System_Wid_Char, RE_Width_Enumeration_8 => System_Wid_Enum, RE_Width_Enumeration_16 => System_Wid_Enum, RE_Width_Enumeration_32 => System_Wid_Enum, RE_Width_Long_Long_Integer => System_Wid_LLI, RE_Width_Long_Long_Unsigned => System_Wid_LLU, RE_Width_Wide_Character => System_Wid_WChar, RE_Width_Wide_Wide_Character => System_Wid_WChar, RE_Protected_Entry_Body_Array => System_Tasking_Protected_Objects_Entries, RE_Protection_Entries => System_Tasking_Protected_Objects_Entries, RE_Initialize_Protection_Entries => System_Tasking_Protected_Objects_Entries, RE_Lock_Entries => System_Tasking_Protected_Objects_Entries, RE_Lock_Read_Only_Entries => System_Tasking_Protected_Objects_Entries, RE_Unlock_Entries => System_Tasking_Protected_Objects_Entries, RE_Communication_Block => System_Tasking_Protected_Objects_Operations, RE_Protected_Entry_Call => System_Tasking_Protected_Objects_Operations, RE_Service_Entries => System_Tasking_Protected_Objects_Operations, RE_Cancel_Protected_Entry_Call => System_Tasking_Protected_Objects_Operations, RE_Enqueued => System_Tasking_Protected_Objects_Operations, RE_Cancelled => System_Tasking_Protected_Objects_Operations, RE_Complete_Entry_Body => System_Tasking_Protected_Objects_Operations, RE_Exceptional_Complete_Entry_Body => System_Tasking_Protected_Objects_Operations, RE_Requeue_Protected_Entry => System_Tasking_Protected_Objects_Operations, RE_Requeue_Task_To_Protected_Entry => System_Tasking_Protected_Objects_Operations, RE_Protected_Count => System_Tasking_Protected_Objects_Operations, RE_Protected_Entry_Caller => System_Tasking_Protected_Objects_Operations, RE_Timed_Protected_Entry_Call => System_Tasking_Protected_Objects_Operations, RE_Protection_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Initialize_Protection_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Lock_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Lock_Read_Only_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Unlock_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Protected_Single_Entry_Call => System_Tasking_Protected_Objects_Single_Entry, RE_Service_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Complete_Single_Entry_Body => System_Tasking_Protected_Objects_Single_Entry, RE_Exceptional_Complete_Single_Entry_Body => System_Tasking_Protected_Objects_Single_Entry, RE_Protected_Count_Entry => System_Tasking_Protected_Objects_Single_Entry, RE_Protected_Single_Entry_Caller => System_Tasking_Protected_Objects_Single_Entry, RE_Timed_Protected_Single_Entry_Call => System_Tasking_Protected_Objects_Single_Entry, RE_Protected_Entry_Index => System_Tasking_Protected_Objects, RE_Entry_Body => System_Tasking_Protected_Objects, RE_Protection => System_Tasking_Protected_Objects, RE_Initialize_Protection => System_Tasking_Protected_Objects, RE_Finalize_Protection => System_Tasking_Protected_Objects, RE_Lock => System_Tasking_Protected_Objects, RE_Lock_Read_Only => System_Tasking_Protected_Objects, RE_Unlock => System_Tasking_Protected_Objects, RE_Delay_Block => System_Tasking_Async_Delays, RE_Timed_Out => System_Tasking_Async_Delays, RE_Cancel_Async_Delay => System_Tasking_Async_Delays, RE_Enqueue_Duration => System_Tasking_Async_Delays, RE_Enqueue_Calendar => System_Tasking_Async_Delays_Enqueue_Calendar, RE_Enqueue_RT => System_Tasking_Async_Delays_Enqueue_RT, RE_Accept_Call => System_Tasking_Rendezvous, RE_Accept_Trivial => System_Tasking_Rendezvous, RE_Callable => System_Tasking_Rendezvous, RE_Call_Simple => System_Tasking_Rendezvous, RE_Cancel_Task_Entry_Call => System_Tasking_Rendezvous, RE_Requeue_Task_Entry => System_Tasking_Rendezvous, RE_Requeue_Protected_To_Task_Entry => System_Tasking_Rendezvous, RE_Complete_Rendezvous => System_Tasking_Rendezvous, RE_Task_Count => System_Tasking_Rendezvous, RE_Exceptional_Complete_Rendezvous => System_Tasking_Rendezvous, RE_Selective_Wait => System_Tasking_Rendezvous, RE_Task_Entry_Call => System_Tasking_Rendezvous, RE_Task_Entry_Caller => System_Tasking_Rendezvous, RE_Timed_Task_Entry_Call => System_Tasking_Rendezvous, RE_Timed_Selective_Wait => System_Tasking_Rendezvous, RE_Activate_Restricted_Tasks => System_Tasking_Restricted_Stages, RE_Complete_Restricted_Activation => System_Tasking_Restricted_Stages, RE_Create_Restricted_Task => System_Tasking_Restricted_Stages, RE_Complete_Restricted_Task => System_Tasking_Restricted_Stages, RE_Restricted_Terminated => System_Tasking_Restricted_Stages, RE_Abort_Tasks => System_Tasking_Stages, RE_Activate_Tasks => System_Tasking_Stages, RE_Complete_Activation => System_Tasking_Stages, RE_Create_Task => System_Tasking_Stages, RE_Complete_Task => System_Tasking_Stages, RE_Free_Task => System_Tasking_Stages, RE_Expunge_Unactivated_Tasks => System_Tasking_Stages, RE_Terminated => System_Tasking_Stages); -------------------------------- -- Configurable Run-Time Mode -- -------------------------------- -- Part of the job of Rtsfind is to enforce run-time restrictions in -- configurable run-time mode. This is done by monitoring implicit access -- to the run time library requested by calls to the RTE function. A call -- may be invalid in configurable run-time mode for either of the -- following two reasons: -- 1. File in which entity lives is not present in run-time library -- 2. File is present, but entity is not defined in the file -- In normal mode, either or these two situations is a fatal error -- that indicates that the run-time library is incorrectly configured, -- and a fatal error message is issued to signal this error. -- In configurable run-time mode, either of these two situations indicates -- simply that the corresponding operation is not available in the current -- run-time that is use. This is not a configuration error, but rather a -- natural result of a limited run-time. This situation is signalled by -- raising the exception RE_Not_Available. The caller must respond to -- this exception by posting an appropriate error message. ---------------------- -- No_Run_Time_Mode -- ---------------------- -- For backwards compatibility with previous versions of GNAT, the -- compiler recognizes the pragma No_Run_Time. This provides a special -- version of configurable run-time mode that operates with the standard -- run-time library, but allows only a subset of entities to be -- accessed. If any other entity is accessed, then it is treated -- as a configurable run-time violation, and the exception -- RE_Not_Availble is raised. -- The following array defines the set of units that contain entities -- that can be referenced in No_Run_Time mode. For each of these units, -- all entities defined in the unit can be used in this mode. OK_No_Run_Time_Unit : constant array (RTU_Id) of Boolean := (Ada_Exceptions => True, Ada_Tags => True, Interfaces => True, System => True, System_Parameters => True, System_Fat_Flt => True, System_Fat_LFlt => True, System_Fat_LLF => True, System_Fat_SFlt => True, System_Machine_Code => True, System_Secondary_Stack => True, System_Storage_Elements => True, System_Task_Info => True, System_Unsigned_Types => True, others => False); ----------------- -- Subprograms -- ----------------- procedure Initialize; -- Procedure to initialize data structures used by RTE. Called at the -- start of processing a new main source file. Must be called after -- Initialize_Snames (since names it enters into name table must come -- after names entered by Snames). RE_Not_Available : exception; -- Raised by RTE if the requested entity is not available. This can -- occur either because the file in which the entity should be found -- does not exist, or because the entity is not present in the file. function RTE (E : RE_Id) return Entity_Id; -- Given the entity defined in the above tables, as identified by the -- corresponding value in the RE_Id enumeration type, returns the Id -- of the corresponding entity, first loading in (parsing, analyzing and -- expanding) its spec if the unit has not already been loaded. -- -- Note: In the case of a package, RTE can return either an entity that -- is declared at the top level of the package, or the package entity -- itself. If an entity within the package has the same simple name as -- the package, then the entity within the package is returned rather -- -- If RTE returns, the returned value is the required entity -- -- If the entity is not available, then an error message is given. The -- form of the message depends on whether we are in configurable run time -- mode or not. In configurable run time mode, a missing entity is not -- that surprising and merely says that the particular construct is not -- supported by the run-time in use. If we are not in configurable run -- time mode, a missing entity is some kind of run-time configuration -- error. In either case, the result of the call is to raise the exception -- RE_Not_Available, which should terminate the expansion of the current -- construct. function Is_RTE (Ent : Entity_Id; E : RE_Id) return Boolean; -- This function determines if the given entity corresponds to the entity -- referenced by RE_Id. It is similar in effect to (Ent = RTE (E)) except -- that the latter would unconditionally load the unit containing E. For -- this call, if the unit is not loaded, then a result of False is returned -- immediately, since obviously Ent cannot be the entity in question if the -- corresponding unit has not been loaded. function Is_RTU (Ent : Entity_Id; U : RTU_Id) return Boolean; pragma Inline (Is_RTU); -- This function determines if the given entity corresponds to the entity -- for the unit referenced by U. If this unit has not been loaded, the -- answer will always be False. If the unit has been loaded, then the -- entity id values are compared and True is returned if Ent is the -- entity for this unit. function RTE_Available (E : RE_Id) return Boolean; -- Returns true if a call to RTE will succeed without raising an -- exception and without generating an error message, i.e. if the -- call will obtain the desired entity without any problems. function RTU_Loaded (U : RTU_Id) return Boolean; pragma Inline (RTU_Loaded); -- Returns true if indicated unit has already been successfully loaded. -- If the unit has not been loaded, returns False. Note that this does -- not mean that an attempt to load it subsequently would fail. procedure Set_RTU_Loaded (N : Node_Id); -- Register the predefined unit N as already loaded procedure Text_IO_Kludge (Nam : Node_Id); -- In Ada 83, and hence for compatibility in Ada 9X, package Text_IO has -- generic subpackages (e.g. Integer_IO). They really should be child -- packages, and in GNAT, they *are* child packages. To maintain the -- required compatibility, this routine is called for package renamings -- and generic instantiations, with the simple name of the referenced -- package. If Text_IO has been with'ed and if the simple name of Nam -- matches one of the subpackages of Text_IO, then this subpackage is -- with'ed automatically. The important result of this approach is that -- Text_IO does not drag in all the code for the subpackages unless they -- are used. Our test is a little crude, and could drag in stuff when it -- is not necessary, but that doesn't matter. Wide_[Wide_]Text_IO is -- handled in a similar manner. function Is_Text_IO_Kludge_Unit (Nam : Node_Id) return Boolean; -- Returns True if the given Nam is an Expanded Name, whose Prefix is Ada, -- and whose selector is either Text_IO.xxx or Wide_Text_IO.xxx or -- Wide_Wide_Text_IO.xxx, where xxx is one of the subpackages of Text_IO -- that is specially handled as described above for Text_IO_Kludge. end Rtsfind;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2006,2009 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000 -- Version Control -- $Revision: 1.3 $ -- $Date: 2009/12/26 17:38:58 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Bounded; use Ada.Strings.Bounded; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Terminal_Interface.Curses; generic Max : Natural; -- type mystring is private; -- type myint is package ncurses2.genericPuts is package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (Max); use BS; procedure myGet (Win : Terminal_Interface.Curses.Window := Terminal_Interface.Curses.Standard_Window; Str : out BS.Bounded_String; Len : Integer := -1); procedure myPut (Str : out BS.Bounded_String; i : Integer; Base : Number_Base := 10); -- the default should be Ada.Text_IO.Integer_IO.Default_Base -- but Default_Base is hidden in the generic so doesn't exist! procedure myAdd (Str : BS.Bounded_String); procedure Fill_String (Cp : chars_ptr; Str : out BS.Bounded_String); end ncurses2.genericPuts;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2021 onox <denkpadje@gmail.com> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Orka.SIMD.SSE2.Integers; package Orka.SIMD.SSE4_1.Integers.Math is pragma Pure; use SIMD.SSE2.Integers; function Min (Left, Right : m128i) return m128i with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pminsd128"; -- Compare each 32-bit integer in Left and Right and take the minimum values. -- -- Result (I) := Integer_32'Min (Left (I), Right (I)) for I in 1 ..4 function Max (Left, Right : m128i) return m128i with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pmaxsd128"; -- Compare each 32-bit integer in Left and Right and take the maximum values. -- -- Result (I) := Integer_32'Max (Left (I), Right (I)) for I in 1 ..4 end Orka.SIMD.SSE4_1.Integers.Math;
-- C47009B.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- WHEN THE TYPE MARK IN A QUALIFIED EXPRESSION DENOTES AN ACCESS -- TYPE, CHECK THAT CONSTRAINT_ERROR IS NOT RAISED WHEN THE VALUE -- OF THE OPERAND IS NULL. -- HISTORY: -- RJW 07/23/86 CREATED ORIGINAL TEST. -- BCB 08/18/87 CHANGED HEADER TO STANDARD HEADER FORMAT. CHANGED -- CONSTRAINTS OF B SUBTYPES TO VALUES WHICH ARE -- CLOSER TO THE VALUES OF THE A SUBTYPES. INDENTED -- THE EXCEPTION STATEMENTS IN SUBTEST 11. WITH REPORT; USE REPORT; PROCEDURE C47009B IS BEGIN TEST( "C47009B", "WHEN THE TYPE MARK IN A QUALIFIED " & "EXPRESSION DENOTES AN ACCESS TYPE, " & "CHECK THAT CONSTRAINT_ERROR IS NOT " & "RAISED WHEN THE VALUE OF THE OPERAND IS NULL" ); DECLARE TYPE ACC1 IS ACCESS BOOLEAN; A : ACC1; BEGIN A := ACC1'(NULL); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE ACC1" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR TYPE ACC1" ); END; DECLARE TYPE ACC2 IS ACCESS INTEGER; A : ACC2; BEGIN A := ACC2'(NULL); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE ACC2" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR TYPE ACC2" ); END; DECLARE TYPE CHAR IS ('A', 'B'); TYPE ACC3 IS ACCESS CHAR; A : ACC3; BEGIN A := ACC3'(NULL); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE ACC3" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR TYPE ACC3" ); END; DECLARE TYPE FLOAT1 IS DIGITS 5 RANGE -1.0 .. 1.0; TYPE ACC4 IS ACCESS FLOAT1; A : ACC4; BEGIN A := ACC4'(NULL); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE ACC4" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR TYPE ACC4" ); END; DECLARE TYPE FIXED IS DELTA 0.5 RANGE -1.0 .. 1.0; TYPE ACC5 IS ACCESS FIXED; A : ACC5; BEGIN A := ACC5'(NULL); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE ACC5" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR TYPE ACC5" ); END; DECLARE TYPE ARR IS ARRAY (NATURAL RANGE <>) OF INTEGER; TYPE ACC6 IS ACCESS ARR; SUBTYPE ACC6A IS ACC6 (IDENT_INT (1) .. IDENT_INT (5)); SUBTYPE ACC6B IS ACC6 (IDENT_INT (2) .. IDENT_INT (10)); A : ACC6A; B : ACC6B; BEGIN A := ACC6A'(B); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR SUBTYPES OF " & "TYPE ACC6" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR SUBTYPES OF " & "TYPE ACC6" ); END; DECLARE TYPE ARR IS ARRAY (NATURAL RANGE <>, NATURAL RANGE <>) OF INTEGER; TYPE ACC7 IS ACCESS ARR; SUBTYPE ACC7A IS ACC7 (IDENT_INT (1) .. IDENT_INT (5), IDENT_INT (1) .. IDENT_INT (1)); SUBTYPE ACC7B IS ACC7 (IDENT_INT (1) .. IDENT_INT (15), IDENT_INT (1) .. IDENT_INT (10)); A : ACC7A; B : ACC7B; BEGIN A := ACC7A'(B); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR SUBTYPES OF " & "TYPE ACC7" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR SUBTYPES OF " & "TYPE ACC7" ); END; DECLARE TYPE REC (D : INTEGER) IS RECORD NULL; END RECORD; TYPE ACC8 IS ACCESS REC; SUBTYPE ACC8A IS ACC8 (IDENT_INT (5)); SUBTYPE ACC8B IS ACC8 (IDENT_INT (6)); A : ACC8A; B : ACC8B; BEGIN A := ACC8A'(B); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR SUBTYPES OF " & "TYPE ACC8" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR SUBTYPES OF " & "TYPE ACC8" ); END; DECLARE TYPE REC (D1,D2 : INTEGER) IS RECORD NULL; END RECORD; TYPE ACC9 IS ACCESS REC; SUBTYPE ACC9A IS ACC9 (IDENT_INT (4), IDENT_INT (5)); SUBTYPE ACC9B IS ACC9 (IDENT_INT (5), IDENT_INT (4)); A : ACC9A; B : ACC9B; BEGIN A := ACC9A'(B); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR SUBTYPES OF " & "TYPE ACC9" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR SUBTYPES OF " & "TYPE ACC9" ); END; DECLARE PACKAGE PKG IS TYPE REC (D : INTEGER) IS PRIVATE; PRIVATE TYPE REC (D : INTEGER) IS RECORD NULL; END RECORD; END PKG; USE PKG; TYPE ACC10 IS ACCESS REC; SUBTYPE ACC10A IS ACC10 (IDENT_INT (10)); SUBTYPE ACC10B IS ACC10 (IDENT_INT (9)); A : ACC10A; B : ACC10B; BEGIN A := ACC10A'(B); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR SUBTYPES OF " & "TYPE ACC10" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR SUBTYPES OF " & "TYPE ACC10" ); END; DECLARE PACKAGE PKG1 IS TYPE REC (D : INTEGER) IS LIMITED PRIVATE; PRIVATE TYPE REC (D : INTEGER) IS RECORD NULL; END RECORD; END PKG1; PACKAGE PKG2 IS END PKG2; PACKAGE BODY PKG2 IS USE PKG1; TYPE ACC11 IS ACCESS REC; SUBTYPE ACC11A IS ACC11 (IDENT_INT (11)); SUBTYPE ACC11B IS ACC11 (IDENT_INT (12)); A : ACC11A; B : ACC11B; BEGIN A := ACC11A'(B); EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ( "CONSTRAINT_ERROR RAISED FOR SUBTYPES OF" & " TYPE ACC11" ); WHEN OTHERS => FAILED ( "OTHER EXCEPTION RAISED FOR SUBTYPES OF " & "TYPE ACC11" ); END PKG2; BEGIN NULL; END; RESULT; END C47009B;
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired) -- -- Copyright William A. Whitaker (1936–2010) -- -- This is a free program, which means it is proper to copy it and pass -- it on to your friends. Consider it a developmental item for which -- there is no charge. However, just for form, it is Copyrighted -- (c). Permission is hereby freely given for any and all use of program -- and data. You can sell it as your own, but at least tell me. -- -- This version is distributed without obligation, but the developer -- would appreciate comments and suggestions. -- -- All parts of the WORDS system, source code and data files, are made freely -- available to anyone who wishes to use them, for whatever purpose. with Ada.Text_IO; package Latin_Utils.Preface is --------------------------------------------------------------------------- procedure Put (Item : String); procedure Set_Col (To : Ada.Text_IO.Positive_Count); procedure Put_Line (Item : String); procedure New_Line (Spacing : Ada.Text_IO.Positive_Count := 1); procedure Put (Item : Integer; Width : Ada.Text_IO.Field := Integer'Width); --------------------------------------------------------------------------- end Latin_Utils.Preface;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . S T R I N G S . W I D E _ W I D E _ S U P E R B O U N D E D -- -- -- -- B o d y -- -- -- -- Copyright (C) 2003-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Wide_Wide_Maps; use Ada.Strings.Wide_Wide_Maps; with Ada.Strings.Wide_Wide_Search; package body Ada.Strings.Wide_Wide_Superbounded is ------------ -- Concat -- ------------ function Concat (Left : Super_String; Right : Super_String) return Super_String is begin return Result : Super_String (Left.Max_Length) do declare Llen : constant Natural := Left.Current_Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen > Left.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right.Data (1 .. Rlen); end if; end; end return; end Concat; function Concat (Left : Super_String; Right : Wide_Wide_String) return Super_String is begin return Result : Super_String (Left.Max_Length) do declare Llen : constant Natural := Left.Current_Length; Nlen : constant Natural := Llen + Right'Length; begin if Nlen > Left.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right; end if; end; end return; end Concat; function Concat (Left : Wide_Wide_String; Right : Super_String) return Super_String is begin return Result : Super_String (Right.Max_Length) do declare Llen : constant Natural := Left'Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen > Right.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left; Result.Data (Llen + 1 .. Nlen) := Right.Data (1 .. Rlen); end if; end; end return; end Concat; function Concat (Left : Super_String; Right : Wide_Wide_Character) return Super_String is begin return Result : Super_String (Left.Max_Length) do declare Llen : constant Natural := Left.Current_Length; begin if Llen = Left.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Llen + 1; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Result.Current_Length) := Right; end if; end; end return; end Concat; function Concat (Left : Wide_Wide_Character; Right : Super_String) return Super_String is begin return Result : Super_String (Right.Max_Length) do declare Rlen : constant Natural := Right.Current_Length; begin if Rlen = Right.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Rlen + 1; Result.Data (1) := Left; Result.Data (2 .. Result.Current_Length) := Right.Data (1 .. Rlen); end if; end; end return; end Concat; ----------- -- Equal -- ----------- function "=" (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Current_Length = Right.Current_Length and then Left.Data (1 .. Left.Current_Length) = Right.Data (1 .. Right.Current_Length); end "="; function Equal (Left : Super_String; Right : Wide_Wide_String) return Boolean is begin return Left.Current_Length = Right'Length and then Left.Data (1 .. Left.Current_Length) = Right; end Equal; function Equal (Left : Wide_Wide_String; Right : Super_String) return Boolean is begin return Left'Length = Right.Current_Length and then Left = Right.Data (1 .. Right.Current_Length); end Equal; ------------- -- Greater -- ------------- function Greater (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) > Right.Data (1 .. Right.Current_Length); end Greater; function Greater (Left : Super_String; Right : Wide_Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) > Right; end Greater; function Greater (Left : Wide_Wide_String; Right : Super_String) return Boolean is begin return Left > Right.Data (1 .. Right.Current_Length); end Greater; ---------------------- -- Greater_Or_Equal -- ---------------------- function Greater_Or_Equal (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) >= Right.Data (1 .. Right.Current_Length); end Greater_Or_Equal; function Greater_Or_Equal (Left : Super_String; Right : Wide_Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) >= Right; end Greater_Or_Equal; function Greater_Or_Equal (Left : Wide_Wide_String; Right : Super_String) return Boolean is begin return Left >= Right.Data (1 .. Right.Current_Length); end Greater_Or_Equal; ---------- -- Less -- ---------- function Less (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) < Right.Data (1 .. Right.Current_Length); end Less; function Less (Left : Super_String; Right : Wide_Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) < Right; end Less; function Less (Left : Wide_Wide_String; Right : Super_String) return Boolean is begin return Left < Right.Data (1 .. Right.Current_Length); end Less; ------------------- -- Less_Or_Equal -- ------------------- function Less_Or_Equal (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) <= Right.Data (1 .. Right.Current_Length); end Less_Or_Equal; function Less_Or_Equal (Left : Super_String; Right : Wide_Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) <= Right; end Less_Or_Equal; function Less_Or_Equal (Left : Wide_Wide_String; Right : Super_String) return Boolean is begin return Left <= Right.Data (1 .. Right.Current_Length); end Less_Or_Equal; ---------------------- -- Set_Super_String -- ---------------------- procedure Set_Super_String (Target : out Super_String; Source : Wide_Wide_String; Drop : Truncation := Error) is Slen : constant Natural := Source'Length; Max_Length : constant Positive := Target.Max_Length; begin if Slen <= Max_Length then Target.Current_Length := Slen; Target.Data (1 .. Slen) := Source; else case Drop is when Strings.Right => Target.Current_Length := Max_Length; Target.Data (1 .. Max_Length) := Source (Source'First .. Source'First - 1 + Max_Length); when Strings.Left => Target.Current_Length := Max_Length; Target.Data (1 .. Max_Length) := Source (Source'Last - (Max_Length - 1) .. Source'Last); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Set_Super_String; ------------------ -- Super_Append -- ------------------ -- Case of Super_String and Super_String function Super_Append (Left : Super_String; Right : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Left.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left.Current_Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right.Data (1 .. Rlen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen >= Max_Length then -- only case is Llen = Max_Length Result.Data := Left.Data; else Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Max_Length) := Right.Data (1 .. Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then -- only case is Rlen = Max_Length Result.Data := Right.Data; else Result.Data (1 .. Max_Length - Rlen) := Left.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Result.Data (Max_Length - Rlen + 1 .. Max_Length) := Right.Data (1 .. Rlen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Append; procedure Super_Append (Source : in out Super_String; New_Item : Super_String; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Llen : constant Natural := Source.Current_Length; Rlen : constant Natural := New_Item.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Source.Current_Length := Nlen; Source.Data (Llen + 1 .. Nlen) := New_Item.Data (1 .. Rlen); else Source.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen < Max_Length then Source.Data (Llen + 1 .. Max_Length) := New_Item.Data (1 .. Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then -- only case is Rlen = Max_Length Source.Data := New_Item.Data; else Source.Data (1 .. Max_Length - Rlen) := Source.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Source.Data (Max_Length - Rlen + 1 .. Max_Length) := New_Item.Data (1 .. Rlen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; -- Case of Super_String and Wide_Wide_String function Super_Append (Left : Super_String; Right : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Left.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left.Current_Length; Rlen : constant Natural := Right'Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right; else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen >= Max_Length then -- only case is Llen = Max_Length Result.Data := Left.Data; else Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Max_Length) := Right (Right'First .. Right'First - 1 + Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then Result.Data (1 .. Max_Length) := Right (Right'Last - (Max_Length - 1) .. Right'Last); else Result.Data (1 .. Max_Length - Rlen) := Left.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Result.Data (Max_Length - Rlen + 1 .. Max_Length) := Right; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Append; procedure Super_Append (Source : in out Super_String; New_Item : Wide_Wide_String; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Llen : constant Natural := Source.Current_Length; Rlen : constant Natural := New_Item'Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Source.Current_Length := Nlen; Source.Data (Llen + 1 .. Nlen) := New_Item; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen < Max_Length then Source.Data (Llen + 1 .. Max_Length) := New_Item (New_Item'First .. New_Item'First - 1 + Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then Source.Data (1 .. Max_Length) := New_Item (New_Item'Last - (Max_Length - 1) .. New_Item'Last); else Source.Data (1 .. Max_Length - Rlen) := Source.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Source.Data (Max_Length - Rlen + 1 .. Max_Length) := New_Item; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; -- Case of Wide_Wide_String and Super_String function Super_Append (Left : Wide_Wide_String; Right : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Right.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left'Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left; Result.Data (Llen + 1 .. Llen + Rlen) := Right.Data (1 .. Rlen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen >= Max_Length then Result.Data (1 .. Max_Length) := Left (Left'First .. Left'First + (Max_Length - 1)); else Result.Data (1 .. Llen) := Left; Result.Data (Llen + 1 .. Max_Length) := Right.Data (1 .. Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then Result.Data (1 .. Max_Length) := Right.Data (Rlen - (Max_Length - 1) .. Rlen); else Result.Data (1 .. Max_Length - Rlen) := Left (Left'Last - (Max_Length - Rlen - 1) .. Left'Last); Result.Data (Max_Length - Rlen + 1 .. Max_Length) := Right.Data (1 .. Rlen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Append; -- Case of Super_String and Wide_Wide_Character function Super_Append (Left : Super_String; Right : Wide_Wide_Character; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Left.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left.Current_Length; begin if Llen < Max_Length then Result.Current_Length := Llen + 1; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1) := Right; return Result; else case Drop is when Strings.Right => return Left; when Strings.Left => Result.Current_Length := Max_Length; Result.Data (1 .. Max_Length - 1) := Left.Data (2 .. Max_Length); Result.Data (Max_Length) := Right; return Result; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; procedure Super_Append (Source : in out Super_String; New_Item : Wide_Wide_Character; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Llen : constant Natural := Source.Current_Length; begin if Llen < Max_Length then Source.Current_Length := Llen + 1; Source.Data (Llen + 1) := New_Item; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => null; when Strings.Left => Source.Data (1 .. Max_Length - 1) := Source.Data (2 .. Max_Length); Source.Data (Max_Length) := New_Item; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; -- Case of Wide_Wide_Character and Super_String function Super_Append (Left : Wide_Wide_Character; Right : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Right.Max_Length; Result : Super_String (Max_Length); Rlen : constant Natural := Right.Current_Length; begin if Rlen < Max_Length then Result.Current_Length := Rlen + 1; Result.Data (1) := Left; Result.Data (2 .. Rlen + 1) := Right.Data (1 .. Rlen); return Result; else case Drop is when Strings.Right => Result.Current_Length := Max_Length; Result.Data (1) := Left; Result.Data (2 .. Max_Length) := Right.Data (1 .. Max_Length - 1); return Result; when Strings.Left => return Right; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; ----------------- -- Super_Count -- ----------------- function Super_Count (Source : Super_String; Pattern : Wide_Wide_String; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping := Wide_Wide_Maps.Identity) return Natural is begin return Wide_Wide_Search.Count (Source.Data (1 .. Source.Current_Length), Pattern, Mapping); end Super_Count; function Super_Count (Source : Super_String; Pattern : Wide_Wide_String; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function) return Natural is begin return Wide_Wide_Search.Count (Source.Data (1 .. Source.Current_Length), Pattern, Mapping); end Super_Count; function Super_Count (Source : Super_String; Set : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural is begin return Wide_Wide_Search.Count (Source.Data (1 .. Source.Current_Length), Set); end Super_Count; ------------------ -- Super_Delete -- ------------------ function Super_Delete (Source : Super_String; From : Positive; Through : Natural) return Super_String is Result : Super_String (Source.Max_Length); Slen : constant Natural := Source.Current_Length; Num_Delete : constant Integer := Through - From + 1; begin if Num_Delete <= 0 then return Source; elsif From > Slen + 1 then raise Ada.Strings.Index_Error; elsif Through >= Slen then Result.Current_Length := From - 1; Result.Data (1 .. From - 1) := Source.Data (1 .. From - 1); return Result; else Result.Current_Length := Slen - Num_Delete; Result.Data (1 .. From - 1) := Source.Data (1 .. From - 1); Result.Data (From .. Result.Current_Length) := Source.Data (Through + 1 .. Slen); return Result; end if; end Super_Delete; procedure Super_Delete (Source : in out Super_String; From : Positive; Through : Natural) is Slen : constant Natural := Source.Current_Length; Num_Delete : constant Integer := Through - From + 1; begin if Num_Delete <= 0 then return; elsif From > Slen + 1 then raise Ada.Strings.Index_Error; elsif Through >= Slen then Source.Current_Length := From - 1; else Source.Current_Length := Slen - Num_Delete; Source.Data (From .. Source.Current_Length) := Source.Data (Through + 1 .. Slen); end if; end Super_Delete; ------------------- -- Super_Element -- ------------------- function Super_Element (Source : Super_String; Index : Positive) return Wide_Wide_Character is begin if Index <= Source.Current_Length then return Source.Data (Index); else raise Strings.Index_Error; end if; end Super_Element; ---------------------- -- Super_Find_Token -- ---------------------- procedure Super_Find_Token (Source : Super_String; Set : Wide_Wide_Maps.Wide_Wide_Character_Set; From : Positive; Test : Strings.Membership; First : out Positive; Last : out Natural) is begin Wide_Wide_Search.Find_Token (Source.Data (From .. Source.Current_Length), Set, Test, First, Last); end Super_Find_Token; procedure Super_Find_Token (Source : Super_String; Set : Wide_Wide_Maps.Wide_Wide_Character_Set; Test : Strings.Membership; First : out Positive; Last : out Natural) is begin Wide_Wide_Search.Find_Token (Source.Data (1 .. Source.Current_Length), Set, Test, First, Last); end Super_Find_Token; ---------------- -- Super_Head -- ---------------- function Super_Head (Source : Super_String; Count : Natural; Pad : Wide_Wide_Character := Wide_Wide_Space; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; begin if Npad <= 0 then Result.Current_Length := Count; Result.Data (1 .. Count) := Source.Data (1 .. Count); elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); Result.Data (Slen + 1 .. Count) := (others => Pad); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Slen) := Source.Data (1 .. Slen); Result.Data (Slen + 1 .. Max_Length) := (others => Pad); when Strings.Left => if Npad >= Max_Length then Result.Data := (others => Pad); else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := (others => Pad); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Head; procedure Super_Head (Source : in out Super_String; Count : Natural; Pad : Wide_Wide_Character := Wide_Wide_Space; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; Temp : Wide_Wide_String (1 .. Max_Length); begin if Npad <= 0 then Source.Current_Length := Count; elsif Count <= Max_Length then Source.Current_Length := Count; Source.Data (Slen + 1 .. Count) := (others => Pad); else Source.Current_Length := Max_Length; case Drop is when Strings.Right => Source.Data (Slen + 1 .. Max_Length) := (others => Pad); when Strings.Left => if Npad > Max_Length then Source.Data := (others => Pad); else Temp := Source.Data; Source.Data (1 .. Max_Length - Npad) := Temp (Count - Max_Length + 1 .. Slen); for J in Max_Length - Npad + 1 .. Max_Length loop Source.Data (J) := Pad; end loop; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Head; ----------------- -- Super_Index -- ----------------- function Super_Index (Source : Super_String; Pattern : Wide_Wide_String; Going : Strings.Direction := Strings.Forward; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping := Wide_Wide_Maps.Identity) return Natural is begin return Wide_Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Pattern : Wide_Wide_String; Going : Direction := Forward; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function) return Natural is begin return Wide_Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Set : Wide_Wide_Maps.Wide_Wide_Character_Set; Test : Strings.Membership := Strings.Inside; Going : Strings.Direction := Strings.Forward) return Natural is begin return Wide_Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Set, Test, Going); end Super_Index; function Super_Index (Source : Super_String; Pattern : Wide_Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping := Wide_Wide_Maps.Identity) return Natural is begin return Wide_Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, From, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Pattern : Wide_Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function) return Natural is begin return Wide_Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, From, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Set : Wide_Wide_Maps.Wide_Wide_Character_Set; From : Positive; Test : Membership := Inside; Going : Direction := Forward) return Natural is begin return Wide_Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Set, From, Test, Going); end Super_Index; --------------------------- -- Super_Index_Non_Blank -- --------------------------- function Super_Index_Non_Blank (Source : Super_String; Going : Strings.Direction := Strings.Forward) return Natural is begin return Wide_Wide_Search.Index_Non_Blank (Source.Data (1 .. Source.Current_Length), Going); end Super_Index_Non_Blank; function Super_Index_Non_Blank (Source : Super_String; From : Positive; Going : Direction := Forward) return Natural is begin return Wide_Wide_Search.Index_Non_Blank (Source.Data (1 .. Source.Current_Length), From, Going); end Super_Index_Non_Blank; ------------------ -- Super_Insert -- ------------------ function Super_Insert (Source : Super_String; Before : Positive; New_Item : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Slen : constant Natural := Source.Current_Length; Nlen : constant Natural := New_Item'Length; Tlen : constant Natural := Slen + Nlen; Blen : constant Natural := Before - 1; Alen : constant Integer := Slen - Blen; Droplen : constant Integer := Tlen - Max_Length; -- Tlen is the length of the total string before possible truncation. -- Blen, Alen are the lengths of the before and after pieces of the -- source string. begin if Alen < 0 then raise Ada.Strings.Index_Error; elsif Droplen <= 0 then Result.Current_Length := Tlen; Result.Data (1 .. Blen) := Source.Data (1 .. Blen); Result.Data (Before .. Before + Nlen - 1) := New_Item; Result.Data (Before + Nlen .. Tlen) := Source.Data (Before .. Slen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Blen) := Source.Data (1 .. Blen); if Droplen > Alen then Result.Data (Before .. Max_Length) := New_Item (New_Item'First .. New_Item'First + Max_Length - Before); else Result.Data (Before .. Before + Nlen - 1) := New_Item; Result.Data (Before + Nlen .. Max_Length) := Source.Data (Before .. Slen - Droplen); end if; when Strings.Left => Result.Data (Max_Length - (Alen - 1) .. Max_Length) := Source.Data (Before .. Slen); if Droplen >= Blen then Result.Data (1 .. Max_Length - Alen) := New_Item (New_Item'Last - (Max_Length - Alen) + 1 .. New_Item'Last); else Result.Data (Blen - Droplen + 1 .. Max_Length - Alen) := New_Item; Result.Data (1 .. Blen - Droplen) := Source.Data (Droplen + 1 .. Blen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Insert; procedure Super_Insert (Source : in out Super_String; Before : Positive; New_Item : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) is begin -- We do a double copy here because this is one of the situations -- in which we move data to the right, and at least at the moment, -- GNAT is not handling such cases correctly ??? Source := Super_Insert (Source, Before, New_Item, Drop); end Super_Insert; ------------------ -- Super_Length -- ------------------ function Super_Length (Source : Super_String) return Natural is begin return Source.Current_Length; end Super_Length; --------------------- -- Super_Overwrite -- --------------------- function Super_Overwrite (Source : Super_String; Position : Positive; New_Item : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Endpos : constant Natural := Position + New_Item'Length - 1; Slen : constant Natural := Source.Current_Length; Droplen : Natural; begin if Position > Slen + 1 then raise Ada.Strings.Index_Error; elsif New_Item'Length = 0 then return Source; elsif Endpos <= Slen then Result.Current_Length := Source.Current_Length; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); Result.Data (Position .. Endpos) := New_Item; return Result; elsif Endpos <= Max_Length then Result.Current_Length := Endpos; Result.Data (1 .. Position - 1) := Source.Data (1 .. Position - 1); Result.Data (Position .. Endpos) := New_Item; return Result; else Result.Current_Length := Max_Length; Droplen := Endpos - Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Position - 1) := Source.Data (1 .. Position - 1); Result.Data (Position .. Max_Length) := New_Item (New_Item'First .. New_Item'Last - Droplen); return Result; when Strings.Left => if New_Item'Length >= Max_Length then Result.Data (1 .. Max_Length) := New_Item (New_Item'Last - Max_Length + 1 .. New_Item'Last); return Result; else Result.Data (1 .. Max_Length - New_Item'Length) := Source.Data (Droplen + 1 .. Position - 1); Result.Data (Max_Length - New_Item'Length + 1 .. Max_Length) := New_Item; return Result; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Overwrite; procedure Super_Overwrite (Source : in out Super_String; Position : Positive; New_Item : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) is Max_Length : constant Positive := Source.Max_Length; Endpos : constant Positive := Position + New_Item'Length - 1; Slen : constant Natural := Source.Current_Length; Droplen : Natural; begin if Position > Slen + 1 then raise Ada.Strings.Index_Error; elsif Endpos <= Slen then Source.Data (Position .. Endpos) := New_Item; elsif Endpos <= Max_Length then Source.Data (Position .. Endpos) := New_Item; Source.Current_Length := Endpos; else Source.Current_Length := Max_Length; Droplen := Endpos - Max_Length; case Drop is when Strings.Right => Source.Data (Position .. Max_Length) := New_Item (New_Item'First .. New_Item'Last - Droplen); when Strings.Left => if New_Item'Length > Max_Length then Source.Data (1 .. Max_Length) := New_Item (New_Item'Last - Max_Length + 1 .. New_Item'Last); else Source.Data (1 .. Max_Length - New_Item'Length) := Source.Data (Droplen + 1 .. Position - 1); Source.Data (Max_Length - New_Item'Length + 1 .. Max_Length) := New_Item; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Overwrite; --------------------------- -- Super_Replace_Element -- --------------------------- procedure Super_Replace_Element (Source : in out Super_String; Index : Positive; By : Wide_Wide_Character) is begin if Index <= Source.Current_Length then Source.Data (Index) := By; else raise Ada.Strings.Index_Error; end if; end Super_Replace_Element; ------------------------- -- Super_Replace_Slice -- ------------------------- function Super_Replace_Slice (Source : Super_String; Low : Positive; High : Natural; By : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Slen : constant Natural := Source.Current_Length; begin if Low > Slen + 1 then raise Strings.Index_Error; elsif High < Low then return Super_Insert (Source, Low, By, Drop); else declare Blen : constant Natural := Natural'Max (0, Low - 1); Alen : constant Natural := Natural'Max (0, Slen - High); Tlen : constant Natural := Blen + By'Length + Alen; Droplen : constant Integer := Tlen - Max_Length; Result : Super_String (Max_Length); -- Tlen is the total length of the result string before any -- truncation. Blen and Alen are the lengths of the pieces -- of the original string that end up in the result string -- before and after the replaced slice. begin if Droplen <= 0 then Result.Current_Length := Tlen; Result.Data (1 .. Blen) := Source.Data (1 .. Blen); Result.Data (Low .. Low + By'Length - 1) := By; Result.Data (Low + By'Length .. Tlen) := Source.Data (High + 1 .. Slen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Blen) := Source.Data (1 .. Blen); if Droplen > Alen then Result.Data (Low .. Max_Length) := By (By'First .. By'First + Max_Length - Low); else Result.Data (Low .. Low + By'Length - 1) := By; Result.Data (Low + By'Length .. Max_Length) := Source.Data (High + 1 .. Slen - Droplen); end if; when Strings.Left => Result.Data (Max_Length - (Alen - 1) .. Max_Length) := Source.Data (High + 1 .. Slen); if Droplen >= Blen then Result.Data (1 .. Max_Length - Alen) := By (By'Last - (Max_Length - Alen) + 1 .. By'Last); else Result.Data (Blen - Droplen + 1 .. Max_Length - Alen) := By; Result.Data (1 .. Blen - Droplen) := Source.Data (Droplen + 1 .. Blen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end; end if; end Super_Replace_Slice; procedure Super_Replace_Slice (Source : in out Super_String; Low : Positive; High : Natural; By : Wide_Wide_String; Drop : Strings.Truncation := Strings.Error) is begin -- We do a double copy here because this is one of the situations -- in which we move data to the right, and at least at the moment, -- GNAT is not handling such cases correctly ??? Source := Super_Replace_Slice (Source, Low, High, By, Drop); end Super_Replace_Slice; --------------------- -- Super_Replicate -- --------------------- function Super_Replicate (Count : Natural; Item : Wide_Wide_Character; Drop : Truncation := Error; Max_Length : Positive) return Super_String is Result : Super_String (Max_Length); begin if Count <= Max_Length then Result.Current_Length := Count; elsif Drop = Strings.Error then raise Ada.Strings.Length_Error; else Result.Current_Length := Max_Length; end if; Result.Data (1 .. Result.Current_Length) := (others => Item); return Result; end Super_Replicate; function Super_Replicate (Count : Natural; Item : Wide_Wide_String; Drop : Truncation := Error; Max_Length : Positive) return Super_String is Length : constant Integer := Count * Item'Length; Result : Super_String (Max_Length); Indx : Positive; begin if Length <= Max_Length then Result.Current_Length := Length; if Length > 0 then Indx := 1; for J in 1 .. Count loop Result.Data (Indx .. Indx + Item'Length - 1) := Item; Indx := Indx + Item'Length; end loop; end if; else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Indx := 1; while Indx + Item'Length <= Max_Length + 1 loop Result.Data (Indx .. Indx + Item'Length - 1) := Item; Indx := Indx + Item'Length; end loop; Result.Data (Indx .. Max_Length) := Item (Item'First .. Item'First + Max_Length - Indx); when Strings.Left => Indx := Max_Length; while Indx - Item'Length >= 1 loop Result.Data (Indx - (Item'Length - 1) .. Indx) := Item; Indx := Indx - Item'Length; end loop; Result.Data (1 .. Indx) := Item (Item'Last - Indx + 1 .. Item'Last); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Replicate; function Super_Replicate (Count : Natural; Item : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is begin return Super_Replicate (Count, Item.Data (1 .. Item.Current_Length), Drop, Item.Max_Length); end Super_Replicate; ----------------- -- Super_Slice -- ----------------- function Super_Slice (Source : Super_String; Low : Positive; High : Natural) return Wide_Wide_String is begin -- Note: test of High > Length is in accordance with AI95-00128 return R : Wide_Wide_String (Low .. High) do if Low > Source.Current_Length + 1 or else High > Source.Current_Length then raise Index_Error; end if; R := Source.Data (Low .. High); end return; end Super_Slice; function Super_Slice (Source : Super_String; Low : Positive; High : Natural) return Super_String is begin return Result : Super_String (Source.Max_Length) do if Low > Source.Current_Length + 1 or else High > Source.Current_Length then raise Index_Error; else Result.Current_Length := High - Low + 1; Result.Data (1 .. Result.Current_Length) := Source.Data (Low .. High); end if; end return; end Super_Slice; procedure Super_Slice (Source : Super_String; Target : out Super_String; Low : Positive; High : Natural) is begin if Low > Source.Current_Length + 1 or else High > Source.Current_Length then raise Index_Error; else Target.Current_Length := High - Low + 1; Target.Data (1 .. Target.Current_Length) := Source.Data (Low .. High); end if; end Super_Slice; ---------------- -- Super_Tail -- ---------------- function Super_Tail (Source : Super_String; Count : Natural; Pad : Wide_Wide_Character := Wide_Wide_Space; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; begin if Npad <= 0 then Result.Current_Length := Count; Result.Data (1 .. Count) := Source.Data (Slen - (Count - 1) .. Slen); elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Npad) := (others => Pad); Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Npad >= Max_Length then Result.Data := (others => Pad); else Result.Data (1 .. Npad) := (others => Pad); Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => Result.Data (1 .. Max_Length - Slen) := (others => Pad); Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Tail; procedure Super_Tail (Source : in out Super_String; Count : Natural; Pad : Wide_Wide_Character := Wide_Wide_Space; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; Temp : constant Wide_Wide_String (1 .. Max_Length) := Source.Data; begin if Npad <= 0 then Source.Current_Length := Count; Source.Data (1 .. Count) := Temp (Slen - (Count - 1) .. Slen); elsif Count <= Max_Length then Source.Current_Length := Count; Source.Data (1 .. Npad) := (others => Pad); Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); else Source.Current_Length := Max_Length; case Drop is when Strings.Right => if Npad >= Max_Length then Source.Data := (others => Pad); else Source.Data (1 .. Npad) := (others => Pad); Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; when Strings.Left => for J in 1 .. Max_Length - Slen loop Source.Data (J) := Pad; end loop; Source.Data (Max_Length - Slen + 1 .. Max_Length) := Temp (1 .. Slen); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Tail; --------------------- -- Super_To_String -- --------------------- function Super_To_String (Source : Super_String) return Wide_Wide_String is begin return R : Wide_Wide_String (1 .. Source.Current_Length) do R := Source.Data (1 .. Source.Current_Length); end return; end Super_To_String; --------------------- -- Super_Translate -- --------------------- function Super_Translate (Source : Super_String; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping) return Super_String is Result : Super_String (Source.Max_Length); begin Result.Current_Length := Source.Current_Length; for J in 1 .. Source.Current_Length loop Result.Data (J) := Value (Mapping, Source.Data (J)); end loop; return Result; end Super_Translate; procedure Super_Translate (Source : in out Super_String; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping) is begin for J in 1 .. Source.Current_Length loop Source.Data (J) := Value (Mapping, Source.Data (J)); end loop; end Super_Translate; function Super_Translate (Source : Super_String; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function) return Super_String is Result : Super_String (Source.Max_Length); begin Result.Current_Length := Source.Current_Length; for J in 1 .. Source.Current_Length loop Result.Data (J) := Mapping.all (Source.Data (J)); end loop; return Result; end Super_Translate; procedure Super_Translate (Source : in out Super_String; Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function) is begin for J in 1 .. Source.Current_Length loop Source.Data (J) := Mapping.all (Source.Data (J)); end loop; end Super_Translate; ---------------- -- Super_Trim -- ---------------- function Super_Trim (Source : Super_String; Side : Trim_End) return Super_String is Result : Super_String (Source.Max_Length); Last : Natural := Source.Current_Length; First : Positive := 1; begin if Side = Left or else Side = Both then while First <= Last and then Source.Data (First) = ' ' loop First := First + 1; end loop; end if; if Side = Right or else Side = Both then while Last >= First and then Source.Data (Last) = ' ' loop Last := Last - 1; end loop; end if; Result.Current_Length := Last - First + 1; Result.Data (1 .. Result.Current_Length) := Source.Data (First .. Last); return Result; end Super_Trim; procedure Super_Trim (Source : in out Super_String; Side : Trim_End) is Max_Length : constant Positive := Source.Max_Length; Last : Natural := Source.Current_Length; First : Positive := 1; Temp : Wide_Wide_String (1 .. Max_Length); begin Temp (1 .. Last) := Source.Data (1 .. Last); if Side = Left or else Side = Both then while First <= Last and then Temp (First) = ' ' loop First := First + 1; end loop; end if; if Side = Right or else Side = Both then while Last >= First and then Temp (Last) = ' ' loop Last := Last - 1; end loop; end if; Source.Data := (others => Wide_Wide_NUL); Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Temp (First .. Last); end Super_Trim; function Super_Trim (Source : Super_String; Left : Wide_Wide_Maps.Wide_Wide_Character_Set; Right : Wide_Wide_Maps.Wide_Wide_Character_Set) return Super_String is Result : Super_String (Source.Max_Length); begin for First in 1 .. Source.Current_Length loop if not Is_In (Source.Data (First), Left) then for Last in reverse First .. Source.Current_Length loop if not Is_In (Source.Data (Last), Right) then Result.Current_Length := Last - First + 1; Result.Data (1 .. Result.Current_Length) := Source.Data (First .. Last); return Result; end if; end loop; end if; end loop; Result.Current_Length := 0; return Result; end Super_Trim; procedure Super_Trim (Source : in out Super_String; Left : Wide_Wide_Maps.Wide_Wide_Character_Set; Right : Wide_Wide_Maps.Wide_Wide_Character_Set) is begin for First in 1 .. Source.Current_Length loop if not Is_In (Source.Data (First), Left) then for Last in reverse First .. Source.Current_Length loop if not Is_In (Source.Data (Last), Right) then if First = 1 then Source.Current_Length := Last; return; else Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Source.Data (First .. Last); for J in Source.Current_Length + 1 .. Source.Max_Length loop Source.Data (J) := Wide_Wide_NUL; end loop; return; end if; end if; end loop; Source.Current_Length := 0; return; end if; end loop; Source.Current_Length := 0; end Super_Trim; ----------- -- Times -- ----------- function Times (Left : Natural; Right : Wide_Wide_Character; Max_Length : Positive) return Super_String is Result : Super_String (Max_Length); begin if Left > Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Left; for J in 1 .. Left loop Result.Data (J) := Right; end loop; end if; return Result; end Times; function Times (Left : Natural; Right : Wide_Wide_String; Max_Length : Positive) return Super_String is Result : Super_String (Max_Length); Pos : Positive := 1; Rlen : constant Natural := Right'Length; Nlen : constant Natural := Left * Rlen; begin if Nlen > Max_Length then raise Ada.Strings.Index_Error; else Result.Current_Length := Nlen; if Nlen > 0 then for J in 1 .. Left loop Result.Data (Pos .. Pos + Rlen - 1) := Right; Pos := Pos + Rlen; end loop; end if; end if; return Result; end Times; function Times (Left : Natural; Right : Super_String) return Super_String is Result : Super_String (Right.Max_Length); Pos : Positive := 1; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Left * Rlen; begin if Nlen > Right.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; if Nlen > 0 then for J in 1 .. Left loop Result.Data (Pos .. Pos + Rlen - 1) := Right.Data (1 .. Rlen); Pos := Pos + Rlen; end loop; end if; end if; return Result; end Times; --------------------- -- To_Super_String -- --------------------- function To_Super_String (Source : Wide_Wide_String; Max_Length : Natural; Drop : Truncation := Error) return Super_String is Result : Super_String (Max_Length); Slen : constant Natural := Source'Length; begin if Slen <= Max_Length then Result.Current_Length := Slen; Result.Data (1 .. Slen) := Source; else case Drop is when Strings.Right => Result.Current_Length := Max_Length; Result.Data (1 .. Max_Length) := Source (Source'First .. Source'First - 1 + Max_Length); when Strings.Left => Result.Current_Length := Max_Length; Result.Data (1 .. Max_Length) := Source (Source'Last - (Max_Length - 1) .. Source'Last); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end To_Super_String; end Ada.Strings.Wide_Wide_Superbounded;
package p1 is end p1;
-- -- Copyright (C) 2016 secunet Security Networks AG -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program 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. -- package body HW.MMIO_Regs is generic type Word_T is mod <>; procedure Read_G (Value : out Word_T; Idx : Subs_P.Index_T); procedure Read_G (Value : out Word_T; Idx : Subs_P.Index_T) is Off : constant Range_P.Index_T := Range_P.Index_T ((Byte_Offset + Regs (Idx).Byte_Offset) / (Range_P.Element_T'Size / 8)); pragma Warnings (GNAT, Off, """Mask"" is not modified, could be declared constant", Reason => "Ada RM forbids making it constant."); Mask : Word64 := Shift_Left (1, Regs (Idx).MSB + 1 - Regs (Idx).LSB) - 1; pragma Warnings (GNAT, On, """Mask"" is not modified, could be declared constant"); Temp : Range_P.Element_T; begin Range_P.Read (Temp, Off); Value := Word_T (Shift_Right (Word64 (Temp), Regs (Idx).LSB) and Mask); end Read_G; procedure Read_I is new Read_G (Word8); procedure Read (Value : out Word8; Idx : Subs_P.Index_T) renames Read_I; procedure Read_I is new Read_G (Word16); procedure Read (Value : out Word16; Idx : Subs_P.Index_T) renames Read_I; procedure Read_I is new Read_G (Word32); procedure Read (Value : out Word32; Idx : Subs_P.Index_T) renames Read_I; procedure Read_I is new Read_G (Word64); procedure Read (Value : out Word64; Idx : Subs_P.Index_T) renames Read_I; ---------------------------------------------------------------------------- generic type Word_T is mod <>; procedure Write_G (Idx : Subs_P.Index_T; Value : Word_T); procedure Write_G (Idx : Subs_P.Index_T; Value : Word_T) is Off : constant Range_P.Index_T := Range_P.Index_T ((Byte_Offset + Regs (Idx).Byte_Offset) / (Range_P.Element_T'Size / 8)); pragma Warnings (GNAT, Off, """Mask"" is not modified, could be declared constant", Reason => "Ada RM forbids making it constant."); Mask : Word64 := Shift_Left (1, Regs (Idx).MSB + 1) - Shift_Left (1, Regs (Idx).LSB); pragma Warnings (GNAT, On, """Mask"" is not modified, could be declared constant"); Temp : Range_P.Element_T; begin if Regs (Idx).MSB - Regs (Idx).LSB + 1 = Range_P.Element_T'Size then Range_P.Write (Off, Range_P.Element_T (Value)); else -- read/modify/write Range_P.Read (Temp, Off); Temp := Range_P.Element_T ((Word64 (Temp) and not Mask) or (Shift_Left (Word64 (Value), Regs (Idx).LSB))); Range_P.Write (Off, Temp); end if; end Write_G; procedure Write_I is new Write_G (Word8); procedure Write (Idx : Subs_P.Index_T; Value : Word8) renames Write_I; procedure Write_I is new Write_G (Word16); procedure Write (Idx : Subs_P.Index_T; Value : Word16) renames Write_I; procedure Write_I is new Write_G (Word32); procedure Write (Idx : Subs_P.Index_T; Value : Word32) renames Write_I; procedure Write_I is new Write_G (Word64); procedure Write (Idx : Subs_P.Index_T; Value : Word64) renames Write_I; end HW.MMIO_Regs;