text
stringlengths
4
1.04M
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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 ewok.tasks_shared; use ewok.tasks_shared; package ewok.syscalls.yield with spark_mode => off is procedure sys_yield (caller_id : in ewok.tasks_shared.t_task_id; mode : in ewok.tasks_shared.t_task_mode); end ewok.syscalls.yield;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-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 Ada.Unchecked_Deallocation; with League.Strings.Internals; package body Matreshka.Internals.XML.Entity_Tables is procedure Free is new Ada.Unchecked_Deallocation (Entity_Array, Entity_Array_Access); procedure New_Entity (Self : in out Entity_Table; Entity : out Entity_Identifier); -- Allocates new entity and returns its identifier. Reallocates internal -- memory when needed. ------------------------ -- Enclosing_Base_URI -- ------------------------ function Enclosing_Base_URI (Self : Entity_Table; Entity : Entity_Identifier) return not null Matreshka.Internals.Strings.Shared_String_Access is begin return Self.Data (Entity).Enclosing_Base_URI; end Enclosing_Base_URI; ---------------------- -- Enclosing_Entity -- ---------------------- function Enclosing_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Matreshka.Internals.XML.Entity_Identifier is begin return Self.Data (Entity).Enclosing; end Enclosing_Entity; --------------------- -- Entity_Base_URI -- --------------------- function Entity_Base_URI (Self : Entity_Table; Entity : Entity_Identifier) return not null Matreshka.Internals.Strings.Shared_String_Access is begin return Self.Data (Entity).Entity_Base_URI; end Entity_Base_URI; -------------- -- Finalize -- -------------- procedure Finalize (Self : in out Entity_Table) is begin for J in Self.Data'First .. Self.Last loop Matreshka.Internals.Strings.Dereference (Self.Data (J).Replacement_Text); Matreshka.Internals.Strings.Dereference (Self.Data (J).Public_Id); Matreshka.Internals.Strings.Dereference (Self.Data (J).System_Id); Matreshka.Internals.Strings.Dereference (Self.Data (J).Enclosing_Base_URI); Matreshka.Internals.Strings.Dereference (Self.Data (J).Entity_Base_URI); end loop; Free (Self.Data); end Finalize; ------------------ -- First_Entity -- ------------------ function First_Entity (Self : Entity_Table) return Entity_Identifier is pragma Unreferenced (Self); begin return No_Entity + 1; end First_Entity; -------------------- -- First_Position -- -------------------- function First_Position (Self : Entity_Table; Entity : Entity_Identifier) return Matreshka.Internals.Utf16.Utf16_String_Index is begin return Self.Data (Entity).First_Position; end First_Position; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : in out Entity_Table) is procedure Register_Predefined_Entity (Name : Matreshka.Internals.XML.Symbol_Identifier; Text : League.Strings.Universal_String); -- Creates predefined entity. -------------------------------- -- Register_Predefined_Entity -- -------------------------------- procedure Register_Predefined_Entity (Name : Matreshka.Internals.XML.Symbol_Identifier; Text : League.Strings.Universal_String) is T : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Text); E : Entity_Identifier; begin Matreshka.Internals.Strings.Reference (T); New_Internal_General_Entity (Self, No_Entity, Name, T, E); end Register_Predefined_Entity; begin Self.Data := new Entity_Array (1 .. 16); Self.Last := 0; Register_Predefined_Entity (Symbol_lt, League.Strings.To_Universal_String ("&#60;")); Register_Predefined_Entity (Symbol_gt, League.Strings.To_Universal_String (">")); Register_Predefined_Entity (Symbol_amp, League.Strings.To_Universal_String ("&#38;")); Register_Predefined_Entity (Symbol_apos, League.Strings.To_Universal_String ("'")); Register_Predefined_Entity (Symbol_quot, League.Strings.To_Universal_String ("""")); end Initialize; ------------------------ -- Is_Document_Entity -- ------------------------ function Is_Document_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = Document_Entity; end Is_Document_Entity; --------------------------------------- -- Is_External_Parsed_General_Entity -- --------------------------------------- function Is_External_Parsed_General_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = External_Parsed_General_Entity; end Is_External_Parsed_General_Entity; ------------------------ -- Is_External_Subset -- ------------------------ function Is_External_Subset (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = External_Subset_Entity; end Is_External_Subset; ----------------------------------------- -- Is_External_Unparsed_General_Entity -- ----------------------------------------- function Is_External_Unparsed_General_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = External_Unparsed_General_Entity; end Is_External_Unparsed_General_Entity; -------------------------------- -- Is_Internal_General_Entity -- -------------------------------- function Is_Internal_General_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = Internal_General_Entity; end Is_Internal_General_Entity; ------------------------- -- Is_Parameter_Entity -- ------------------------- function Is_Parameter_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = Internal_Parameter_Entity or Self.Data (Entity).Kind = External_Parameter_Entity; end Is_Parameter_Entity; ------------------------------ -- Is_Parsed_General_Entity -- ------------------------------ function Is_Parsed_General_Entity (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Kind = Internal_General_Entity or Self.Data (Entity).Kind = External_Parsed_General_Entity; end Is_Parsed_General_Entity; ----------------- -- Is_Resolved -- ----------------- function Is_Resolved (Self : Entity_Table; Entity : Entity_Identifier) return Boolean is begin return Self.Data (Entity).Is_Resolved; end Is_Resolved; ---------- -- Name -- ---------- function Name (Self : Entity_Table; Entity : Entity_Identifier) return Matreshka.Internals.XML.Symbol_Identifier is begin return Self.Data (Entity).Name; end Name; ------------------------- -- New_Document_Entity -- ------------------------- procedure New_Document_Entity (Self : in out Entity_Table; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Entity_Base_URI : League.Strings.Universal_String; Entity : out Entity_Identifier) is P : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Public_Id); S : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (System_Id); B : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Entity_Base_URI); begin New_Entity (Self, Entity); Matreshka.Internals.Strings.Reference (P); Matreshka.Internals.Strings.Reference (S); Matreshka.Internals.Strings.Reference (B); Self.Data (Entity) := (Kind => Document_Entity, Enclosing => No_Entity, Name => No_Symbol, Notation => No_Symbol, Public_Id => P, System_Id => S, Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Entity_Base_URI => B, Is_Resolved => False, Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access, First_Position => 0); end New_Document_Entity; ---------------- -- New_Entity -- ---------------- procedure New_Entity (Self : in out Entity_Table; Entity : out Entity_Identifier) is Aux : Entity_Array_Access := Self.Data; begin Self.Last := Self.Last + 1; Entity := Self.Last; if Self.Last > Self.Data'Last then Self.Data := new Entity_Array (Self.Data'First .. Self.Data'Last + 16); Self.Data (Aux'Range) := Aux.all; Free (Aux); end if; end New_Entity; ----------------------------------- -- New_External_Parameter_Entity -- ----------------------------------- procedure New_External_Parameter_Entity (Self : in out Entity_Table; Enclosing_Entity : Entity_Identifier; Name : Matreshka.Internals.XML.Symbol_Identifier; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Enclosing_Base_URI : League.Strings.Universal_String; Entity : out Entity_Identifier) is P : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Public_Id); S : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (System_Id); B : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Enclosing_Base_URI); begin New_Entity (Self, Entity); Matreshka.Internals.Strings.Reference (P); Matreshka.Internals.Strings.Reference (S); Matreshka.Internals.Strings.Reference (B); Self.Data (Entity) := (Kind => External_Parameter_Entity, Enclosing => Enclosing_Entity, Name => Name, Notation => No_Symbol, Public_Id => P, System_Id => S, Enclosing_Base_URI => B, Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Is_Resolved => False, Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access, First_Position => 0); end New_External_Parameter_Entity; ---------------------------------------- -- New_External_Parsed_General_Entity -- ---------------------------------------- procedure New_External_Parsed_General_Entity (Self : in out Entity_Table; Enclosing_Entity : Entity_Identifier; Name : Matreshka.Internals.XML.Symbol_Identifier; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Enclosing_Base_URI : League.Strings.Universal_String; Entity : out Entity_Identifier) is P : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Public_Id); S : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (System_Id); B : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Enclosing_Base_URI); begin New_Entity (Self, Entity); Matreshka.Internals.Strings.Reference (P); Matreshka.Internals.Strings.Reference (S); Matreshka.Internals.Strings.Reference (B); Self.Data (Entity) := (Kind => External_Parsed_General_Entity, Enclosing => Enclosing_Entity, Name => Name, Notation => No_Symbol, Public_Id => P, System_Id => S, Enclosing_Base_URI => B, Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Is_Resolved => False, Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access, First_Position => 0); end New_External_Parsed_General_Entity; -------------------------------- -- New_External_Subset_Entity -- -------------------------------- procedure New_External_Subset_Entity (Self : in out Entity_Table; Enclosing_Entity : Entity_Identifier; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Enclosing_Base_URI : League.Strings.Universal_String; Entity : out Entity_Identifier) is P : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Public_Id); S : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (System_Id); B : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Enclosing_Base_URI); begin New_Entity (Self, Entity); Matreshka.Internals.Strings.Reference (P); Matreshka.Internals.Strings.Reference (S); Matreshka.Internals.Strings.Reference (B); Self.Data (Entity) := (Kind => External_Subset_Entity, Enclosing => Enclosing_Entity, Name => No_Symbol, Notation => No_Symbol, Public_Id => P, System_Id => S, Enclosing_Base_URI => B, Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Is_Resolved => False, Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access, First_Position => 0); end New_External_Subset_Entity; ------------------------------------------ -- New_External_Unparsed_General_Entity -- ------------------------------------------ procedure New_External_Unparsed_General_Entity (Self : in out Entity_Table; Enclosing_Entity : Entity_Identifier; Name : Matreshka.Internals.XML.Symbol_Identifier; Notation : Symbol_Identifier; Entity : out Entity_Identifier) is begin New_Entity (Self, Entity); Self.Data (Entity) := (Kind => External_Unparsed_General_Entity, Enclosing => Enclosing_Entity, Name => Name, Notation => Notation, Public_Id => Matreshka.Internals.Strings.Shared_Empty'Access, System_Id => Matreshka.Internals.Strings.Shared_Empty'Access, Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Is_Resolved => False, Replacement_Text => Matreshka.Internals.Strings.Shared_Empty'Access, First_Position => 0); end New_External_Unparsed_General_Entity; --------------------------------- -- New_Internal_General_Entity -- --------------------------------- procedure New_Internal_General_Entity (Self : in out Entity_Table; Enclosing_Entity : Entity_Identifier; Name : Matreshka.Internals.XML.Symbol_Identifier; Replacement_Text : not null Matreshka.Internals.Strings.Shared_String_Access; Entity : out Entity_Identifier) is begin New_Entity (Self, Entity); Self.Data (Entity) := (Kind => Internal_General_Entity, Enclosing => Enclosing_Entity, Name => Name, Notation => No_Symbol, Public_Id => Matreshka.Internals.Strings.Shared_Empty'Access, System_Id => Matreshka.Internals.Strings.Shared_Empty'Access, Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Is_Resolved => True, Replacement_Text => Replacement_Text, First_Position => 0); end New_Internal_General_Entity; ----------------------------------- -- New_Internal_Parameter_Entity -- ----------------------------------- procedure New_Internal_Parameter_Entity (Self : in out Entity_Table; Enclosing_Entity : Entity_Identifier; Name : Matreshka.Internals.XML.Symbol_Identifier; Replacement_Text : not null Matreshka.Internals.Strings.Shared_String_Access; Entity : out Entity_Identifier) is begin New_Entity (Self, Entity); Self.Data (Entity) := (Kind => Internal_Parameter_Entity, Enclosing => Enclosing_Entity, Name => Name, Notation => No_Symbol, Public_Id => Matreshka.Internals.Strings.Shared_Empty'Access, System_Id => Matreshka.Internals.Strings.Shared_Empty'Access, Enclosing_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Entity_Base_URI => Matreshka.Internals.Strings.Shared_Empty'Access, Is_Resolved => True, Replacement_Text => Replacement_Text, First_Position => 0); end New_Internal_Parameter_Entity; ----------------- -- Next_Entity -- ----------------- procedure Next_Entity (Self : Entity_Table; Entity : in out Entity_Identifier) is begin if Entity = Self.Last then Entity := No_Entity; else Entity := Entity + 1; end if; end Next_Entity; -------------- -- Notation -- -------------- function Notation (Self : Entity_Table; Entity : Entity_Identifier) return Matreshka.Internals.XML.Symbol_Identifier is begin return Self.Data (Entity).Notation; end Notation; --------------- -- Public_Id -- --------------- function Public_Id (Self : Entity_Table; Entity : Entity_Identifier) return not null Matreshka.Internals.Strings.Shared_String_Access is begin return Self.Data (Entity).Public_Id; end Public_Id; ---------------------- -- Replacement_Text -- ---------------------- function Replacement_Text (Self : Entity_Table; Entity : Entity_Identifier) return Matreshka.Internals.Strings.Shared_String_Access is begin return Self.Data (Entity).Replacement_Text; end Replacement_Text; ----------- -- Reset -- ----------- procedure Reset (Self : in out Entity_Table) is begin Finalize (Self); Initialize (Self); end Reset; ------------------------- -- Set_Entity_Base_URI -- ------------------------- procedure Set_Entity_Base_URI (Self : in out Entity_Table; Entity : Entity_Identifier; Entity_Base_URI : League.Strings.Universal_String) is B : constant Matreshka.Internals.Strings.Shared_String_Access := League.Strings.Internals.Internal (Entity_Base_URI); begin Matreshka.Internals.Strings.Dereference (Self.Data (Entity).Entity_Base_URI); Self.Data (Entity).Entity_Base_URI := B; Matreshka.Internals.Strings.Reference (Self.Data (Entity).Entity_Base_URI); end Set_Entity_Base_URI; ------------------------ -- Set_First_Position -- ------------------------ procedure Set_First_Position (Self : in out Entity_Table; Entity : Entity_Identifier; Position : Matreshka.Internals.Utf16.Utf16_String_Index) is begin Self.Data (Entity).First_Position := Position; end Set_First_Position; --------------------- -- Set_Is_Resolved -- --------------------- procedure Set_Is_Resolved (Self : in out Entity_Table; Entity : Entity_Identifier; To : Boolean) is begin Self.Data (Entity).Is_Resolved := To; end Set_Is_Resolved; -------------------------- -- Set_Replacement_Text -- -------------------------- procedure Set_Replacement_Text (Self : in out Entity_Table; Entity : Entity_Identifier; Replacement_Text : not null Matreshka.Internals.Strings.Shared_String_Access) is begin Self.Data (Entity).Replacement_Text := Replacement_Text; end Set_Replacement_Text; --------------- -- System_Id -- --------------- function System_Id (Self : Entity_Table; Entity : Entity_Identifier) return not null Matreshka.Internals.Strings.Shared_String_Access is begin return Self.Data (Entity).System_Id; end System_Id; end Matreshka.Internals.XML.Entity_Tables;
package Vulkan.Test is end Vulkan.Test;
with impact.d2.orbs.Collision, impact.d2.Math; package impact.d2.orbs.dynamic_Tree -- -- A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt. -- is use impact.d2.Math; b2_nullNode : constant := 0; -- A node in the dynamic tree. The client does not interact with this directly. -- type b2DynamicTreeNode_Kind is (with_Parent_index, with_Next_index); type b2DynamicTreeNode (Kind : b2DynamicTreeNode_Kind := with_parent_index) is record aabb : collision.b2AABB; -- This is the fattened AABB. userData : access Any'Class; child1 : aliased int32; child2 : int32; case Kind is when with_Parent_index => parent : int32; when with_Next_index => next : int32; end case; end record; pragma Unchecked_Union (b2DynamicTreeNode); type b2DynamicTreeNodes is array (int32 range <>) of b2DynamicTreeNode; function isLeaf (Self : in b2DynamicTreeNode) return Boolean; -- A dynamic tree arranges data in a binary tree to accelerate -- queries such as volume queries and ray casts. Leafs are proxies -- with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor -- so that the proxy AABB is bigger than the client object. This allows the client -- object to move by small amounts without triggering a tree update. -- -- Nodes are pooled and relocatable, so we use node indices rather than pointers. -- type b2DynamicTree is tagged private; function to_b2DynamicTree return b2DynamicTree; -- Constructing the tree initializes the node pool. procedure destruct (Self : in out b2DynamicTree); -- Destroy the tree, freeing the node pool. -- Create a proxy. Provide a tight fitting AABB and a userData pointer. -- function createProxy (Self : access b2DynamicTree; aabb : in collision.b2AABB; userData : access Any'Class) return int32; -- Destroy a proxy. This asserts if the id is invalid. -- procedure destroyProxy (Self : in out b2DynamicTree; proxyId : int32); -- Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, -- then the proxy is removed from the tree and re-inserted. Otherwise -- the function returns immediately. -- Return True if the proxy was re-inserted. -- function MoveProxy (Self : access b2DynamicTree; proxyId : in int32; aabb : in collision.b2AABB; displacement : in b2Vec2) return Boolean; -- Perform some iterations to re-balance the tree. -- procedure Rebalance (Self : in out b2DynamicTree; iterations : in int32); -- Get proxy user data. -- Return the proxy user data or 0 if the id is invalid. -- function getUserData (Self : in b2DynamicTree; proxyId : in int32) return access Any'Class; -- Get the fat AABB for a proxy. -- function GetFatAABB (Self : in b2DynamicTree; proxyId : int32) return collision.b2AABB; -- Compute the height of the tree. -- function ComputeHeight (Self : in b2DynamicTree) return int32; -- Query an AABB for overlapping proxies. The callback class -- is called for each proxy that overlaps the supplied AABB. -- generic type callback_t is private; with function QueryCallback (the_Callback : access callback_t ; nodeId : in int32 ) return Boolean; procedure Query (Self : in b2DynamicTree; the_Callback : access callback_t; aabb : in collision.b2AABB); -- template <typename T> -- void Query(T* callback, const b2AABB& aabb) const; -- Ray-cast against the proxies in the tree. This relies on the callback -- to perform a exact ray-cast in the case were the proxy contains a shape. -- The callback also performs the any collision filtering. This has performance -- roughly equal to k * log(n), where k is the number of collisions and n is the -- number of proxies in the tree. -- -- 'input' the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). -- 'callback' a callback class that is called for each proxy that is hit by the ray. -- generic type callback_t is private; with function RayCastCallback (the_Callback : access callback_t; Input : in collision.b2RayCastInput; nodeId : in int32 ) return float32; procedure Raycast (Self : in b2DynamicTree; the_Callback : access callback_t; input : in collision.b2RayCastInput); -- template <typename T> -- void RayCast(T* callback, const b2RayCastInput& input) const; -- -- float32 value = callback->RayCastCallback(subInput, nodeId); private type b2DynamicTreeNodes_view is access all b2DynamicTreeNodes; type b2DynamicTree is tagged record m_root : int32; m_nodes : b2DynamicTreeNodes_view; m_nodeCount : int32; m_nodeCapacity : int32; m_freeList : int32; m_path : uint32; -- This is used incrementally traverse the tree for re-balancing. m_insertionCount : int32; end record; function AllocateNode (Self : access b2DynamicTree) return int32; procedure FreeNode (Self : in out b2DynamicTree; nodeId : in int32); procedure InsertLeaf (Self : in out b2DynamicTree; leafId : in int32); procedure RemoveLeaf (Self : in out b2DynamicTree; leafId : in int32); function ComputeHeight (Self : in b2DynamicTree; nodeId : in int32) return int32; end impact.d2.orbs.dynamic_Tree;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . B U B B L E _ S O R T _ G -- -- -- -- S p e c -- -- -- -- Copyright (C) 1995-2005, AdaCore -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- Bubblesort generic package using formal procedures -- This package provides a generic bubble sort routine that can be used with -- different types of data. -- See also GNAT.Bubble_Sort, a version that works with subprogram access -- parameters, allowing code sharing. The generic version is slightly more -- efficient but does not allow code sharing and has an interface that is -- more awkward to use. The generic version is also Pure, while the access -- subprograqm version can only be Preelaborate. -- There is also GNAT.Bubble_Sort_A, which is now considered obsolete, but -- was an older version working with subprogram parameters. This version -- is retained for baccwards compatibility with old versions of GNAT. generic -- The data to be sorted is assumed to be indexed by integer values from -- 1 to N, where N is the number of items to be sorted. In addition, the -- index value zero is used for a temporary location used during the sort. with procedure Move (From : Natural; To : Natural); -- A procedure that moves the data item with index value From to the data -- item with index value To (the old value in To being lost). An index -- value of zero is used for moves from and to a single temporary location -- used by the sort. with function Lt (Op1, Op2 : Natural) return Boolean; -- A function that compares two items and returns True if the item with -- index Op1 is less than the item with Index Op2, and False if the Op2 -- item is greater than or equal to the Op1 item. package GNAT.Bubble_Sort_G is pragma Pure; procedure Sort (N : Natural); -- This procedures sorts items in the range from 1 to N into ascending -- order making calls to Lt to do required comparisons, and Move to move -- items around. Note that, as described above, both Move and Lt use a -- single temporary location with index value zero. This sort is stable, -- that is the order of equal elements in the input is preserved. end GNAT.Bubble_Sort_G;
with Ada.Text_IO; use Ada.Text_IO; with Vecteurs_Creux; use Vecteurs_Creux; -- Exemple d'utilisation des vecteurs creux. procedure Exemple_Vecteurs_Creux is V : T_Vecteur_Creux; begin Put_Line ("Début du scénario"); New_Line; Initialiser (V); -- Initialiser un vecteur creux. Il est nul. Afficher (V); -- Afficher le vecteur creux à des fins de mise au point. Put_Line ("Est-ce que le vecteur V est nul : " & Boolean'Image(Est_Nul (V))); Put ("Version récursive : la composante du vecteur V à l'indice Indice 18 : "); Put_Line (Float'Image(Composante_Recursif (V, 18))); Put ("Version itérative : la composante du vecteur V à l'indice Indice 18 : "); Put_Line (Float'Image(Composante_Iteratif (V, 18))); Modifier (V, 2, 5.9); -- Modifier la composante (2, 5.9). Put_Line ("Modifier la composante (2, 5.9)"); Afficher (V); -- Afficher le vecteur creux à des fins de mise au point. Modifier (V, 3, 1.3); -- Modifier la composante (2, 1.93). Put_Line ("Modifier la composante (3, 1.3)"); Afficher (V); -- Afficher le vecteur creux à des fins de mise au point. Modifier (V, 1, 99.15); -- Modifier la composante (1, 99.15). Put_Line ("Modifier la composante (1, 99.15)"); Afficher (V); -- Afficher le vecteur creux à des fins de mise au point. Modifier (V, 1, 10.0); -- Modifier la composante (1, 99.15). Put_Line ("Modifier la composante (1, 99.15)"); Afficher (V); -- Afficher le vecteur creux à des fins de mise au point. Detruire (V); -- Détruire le vecteur V. New_Line; Put_Line ("Fin du scénario"); end Exemple_Vecteurs_Creux;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 1 3 -- -- -- -- 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. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- Handling of packed arrays with Component_Size = 13 package System.Pack_13 is pragma Preelaborate; Bits : constant := 13; type Bits_13 is mod 2 ** Bits; for Bits_13'Size use Bits; function Get_13 (Arr : System.Address; N : Natural) return Bits_13; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. procedure Set_13 (Arr : System.Address; N : Natural; E : Bits_13); -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. end System.Pack_13;
-- C95011A.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 A TASK NEED NOT CONTAIN ANY ACCEPT_STATEMENTS FOR AN -- ENTRY. -- THIS TEST CONTAINS SHARED VARIABLES. -- JRK 11/5/81 -- JWC 6/28/85 RENAMED TO -AB WITH REPORT; USE REPORT; PROCEDURE C95011A IS V : INTEGER := 0; BEGIN TEST ("C95011A", "CHECK THAT A TASK NEED NOT CONTAIN ANY " & "ACCEPT_STATEMENTS FOR AN ENTRY"); DECLARE SUBTYPE INT IS INTEGER RANGE 1..5; TASK T IS ENTRY E; ENTRY EF (INT) (I : INTEGER); END T; TASK BODY T IS BEGIN V := 1; END T; BEGIN NULL; END; IF V /= 1 THEN FAILED ("WRONG CONTROL FLOW VALUE"); END IF; RESULT; END C95011A;
pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; with glib; with glib.Values; with System; with glib; with System; -- with GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h; with Interfaces.C.Strings; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstminiobject_h is -- unsupported macro: GST_TYPE_MINI_OBJECT (gst_mini_object_get_type()) -- arg-macro: function GST_IS_MINI_OBJECT (obj) -- return G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MINI_OBJECT); -- arg-macro: function GST_IS_MINI_OBJECT_CLASS (klass) -- return G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MINI_OBJECT); -- arg-macro: function GST_MINI_OBJECT_GET_CLASS (obj) -- return G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MINI_OBJECT, GstMiniObjectClass); -- arg-macro: function GST_MINI_OBJECT (obj) -- return G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MINI_OBJECT, GstMiniObject); -- arg-macro: function GST_MINI_OBJECT_CLASS (klass) -- return G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MINI_OBJECT, GstMiniObjectClass); -- arg-macro: function GST_MINI_OBJECT_CAST (obj) -- return (GstMiniObject*)(obj); -- arg-macro: function GST_MINI_OBJECT_CONST_CAST (obj) -- return (const GstMiniObject*)(obj); -- arg-macro: function GST_MINI_OBJECT_FLAGS (obj) -- return GST_MINI_OBJECT_CAST(obj).flags; -- arg-macro: procedure GST_MINI_OBJECT_FLAG_IS_SET (obj, flag) -- notnot(GST_MINI_OBJECT_FLAGS (obj) and (flag)) -- arg-macro: function GST_MINI_OBJECT_FLAG_SET (obj, flag) -- return GST_MINI_OBJECT_FLAGS (obj) |= (flag); -- arg-macro: function GST_MINI_OBJECT_FLAG_UNSET (obj, flag) -- return GST_MINI_OBJECT_FLAGS (obj) &= ~(flag); -- arg-macro: function GST_VALUE_HOLDS_MINI_OBJECT (value) -- return G_VALUE_HOLDS(value, GST_TYPE_MINI_OBJECT); -- arg-macro: function GST_MINI_OBJECT_REFCOUNT (obj) -- return (GST_MINI_OBJECT_CAST(obj)).refcount; -- arg-macro: function GST_MINI_OBJECT_REFCOUNT_VALUE (obj) -- return g_atomic_int_get (and(GST_MINI_OBJECT_CAST(obj)).refcount); -- unsupported macro: GST_TYPE_PARAM_MINI_OBJECT (gst_param_spec_mini_object_get_type()) -- arg-macro: function GST_IS_PARAM_SPEC_MINI_OBJECT (pspec) -- return G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GST_TYPE_PARAM_MINI_OBJECT); -- arg-macro: function GST_PARAM_SPEC_MINI_OBJECT (pspec) -- return G_TYPE_CHECK_INSTANCE_CAST ((pspec), GST_TYPE_PARAM_MINI_OBJECT, GstParamSpecMiniObject); -- GStreamer -- * Copyright (C) 2005 David Schleef <ds@schleef.org> -- * -- * gstminiobject.h: Header for GstMiniObject -- * -- * 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. -- type GstMiniObject; --subtype GstMiniObject is u_GstMiniObject; -- gst/gstminiobject.h:41 type GstMiniObjectClass; --subtype GstMiniObjectClass is u_GstMiniObjectClass; -- gst/gstminiobject.h:42 --* -- * GstMiniObjectCopyFunction: -- * @obj: MiniObject to copy -- * -- * Virtual function prototype for methods to create copies of instances. -- * -- * Returns: reference to cloned instance. -- type GstMiniObjectCopyFunction is access function (arg1 : access constant GstMiniObject) return access GstMiniObject; pragma Convention (C, GstMiniObjectCopyFunction); -- gst/gstminiobject.h:52 --* -- * GstMiniObjectFinalizeFunction: -- * @obj: MiniObject to finalize -- * -- * Virtual function prototype for methods to free ressources used by -- * mini-objects. Subclasses of the mini object are allowed to revive the -- * passed object by doing a gst_mini_object_ref(). If the object is not -- * revived after the finalize function, the memory associated with the -- * object is freed. -- type GstMiniObjectFinalizeFunction is access procedure (arg1 : access GstMiniObject); pragma Convention (C, GstMiniObjectFinalizeFunction); -- gst/gstminiobject.h:63 --* -- * GST_MINI_OBJECT_FLAGS: -- * @obj: MiniObject to return flags for. -- * -- * This macro returns the entire set of flags for the mini-object. -- --* -- * GST_MINI_OBJECT_FLAG_IS_SET: -- * @obj: MiniObject to check for flags. -- * @flag: Flag to check for -- * -- * This macro checks to see if the given flag is set. -- --* -- * GST_MINI_OBJECT_FLAG_SET: -- * @obj: MiniObject to set flag in. -- * @flag: Flag to set, can by any number of bits in guint32. -- * -- * This macro sets the given bits. -- --* -- * GST_MINI_OBJECT_FLAG_UNSET: -- * @obj: MiniObject to unset flag in. -- * @flag: Flag to set, must be a single bit in guint32. -- * -- * This macro usets the given bits. -- --* -- * GST_VALUE_HOLDS_MINI_OBJECT: -- * @value: the #GValue to check -- * -- * Checks if the given #GValue contains a #GST_TYPE_MINI_OBJECT value. -- --* -- * GstMiniObjectFlags: -- * @GST_MINI_OBJECT_FLAG_READONLY: is the miniobject readonly or writable -- * @GST_MINI_OBJECT_FLAG_RESERVED1: a flag reserved for internal use e.g. as -- * GST_BUFFER_FLAG_MEDIA4. Since: 0.10.33. -- * @GST_MINI_OBJECT_FLAG_LAST: first flag that can be used by subclasses. -- * -- * Flags for the mini object -- -- padding subtype GstMiniObjectFlags is unsigned; GST_MINI_OBJECT_FLAG_READONLY : constant GstMiniObjectFlags := 1; GST_MINI_OBJECT_FLAG_RESERVED1 : constant GstMiniObjectFlags := 2; GST_MINI_OBJECT_FLAG_LAST : constant GstMiniObjectFlags := 16; -- gst/gstminiobject.h:121 --* -- * GST_MINI_OBJECT_REFCOUNT: -- * @obj: a #GstMiniObject -- * -- * Get access to the reference count field of the mini-object. -- --* -- * GST_MINI_OBJECT_REFCOUNT_VALUE: -- * @obj: a #GstMiniObject -- * -- * Get the reference count value of the mini-object. -- --* -- * GstMiniObjectWeakNotify: -- * @data: data that was provided when the weak reference was established -- * @where_the_mini_object_was: the mini object being finalized -- * -- * A #GstMiniObjectWeakNotify function can be added to a mini object as a -- * callback that gets triggered when the mini object is finalized. Since the -- * mini object is already being finalized when the #GstMiniObjectWeakNotify is -- * called, there's not much you could do with the object, apart from e.g. using -- * its adress as hash-index or the like. -- * -- * Since: 0.10.35 -- * -- type GstMiniObjectWeakNotify is access procedure (arg1 : System.Address; arg2 : access GstMiniObject); pragma Convention (C, GstMiniObjectWeakNotify); -- gst/gstminiobject.h:152 -- skipped empty struct u_GstMiniObjectPrivate -- skipped empty struct GstMiniObjectPrivate --* -- * GstMiniObject: -- * @instance: type instance -- * @refcount: atomic refcount -- * @flags: extra flags. -- * -- * Base class for refcounted lightweight objects. -- * Ref Func: gst_mini_object_ref -- * Unref Func: gst_mini_object_unref -- * Set Value Func: gst_value_set_mini_object -- * Get Value Func: gst_value_get_mini_object -- type GstMiniObject is record instance : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gtype_h.GTypeInstance; -- gst/gstminiobject.h:170 refcount : aliased GLIB.gint; -- gst/gstminiobject.h:172 flags : aliased GLIB.guint; -- gst/gstminiobject.h:173 priv : System.Address; -- gst/gstminiobject.h:176 end record; pragma Convention (C_Pass_By_Copy, GstMiniObject); -- gst/gstminiobject.h:169 --< public > -- with COW --< private > type GstMiniObjectClass is record type_class : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gtype_h.GTypeClass; -- gst/gstminiobject.h:180 copy : GstMiniObjectCopyFunction; -- gst/gstminiobject.h:182 finalize : GstMiniObjectFinalizeFunction; -- gst/gstminiobject.h:183 u_gst_reserved : System.Address; -- gst/gstminiobject.h:186 end record; pragma Convention (C_Pass_By_Copy, GstMiniObjectClass); -- gst/gstminiobject.h:179 --< private > function gst_mini_object_get_type return GLIB.GType; -- gst/gstminiobject.h:189 pragma Import (C, gst_mini_object_get_type, "gst_mini_object_get_type"); function gst_mini_object_new (c_type : GLIB.GType) return access GstMiniObject; -- gst/gstminiobject.h:191 pragma Import (C, gst_mini_object_new, "gst_mini_object_new"); function gst_mini_object_copy (mini_object : access constant GstMiniObject) return access GstMiniObject; -- gst/gstminiobject.h:192 pragma Import (C, gst_mini_object_copy, "gst_mini_object_copy"); function gst_mini_object_is_writable (mini_object : access constant GstMiniObject) return GLIB.gboolean; -- gst/gstminiobject.h:193 pragma Import (C, gst_mini_object_is_writable, "gst_mini_object_is_writable"); function gst_mini_object_make_writable (mini_object : access GstMiniObject) return access GstMiniObject; -- gst/gstminiobject.h:194 pragma Import (C, gst_mini_object_make_writable, "gst_mini_object_make_writable"); -- refcounting function gst_mini_object_ref (mini_object : access GstMiniObject) return access GstMiniObject; -- gst/gstminiobject.h:197 pragma Import (C, gst_mini_object_ref, "gst_mini_object_ref"); procedure gst_mini_object_unref (mini_object : access GstMiniObject); -- gst/gstminiobject.h:198 pragma Import (C, gst_mini_object_unref, "gst_mini_object_unref"); procedure gst_mini_object_weak_ref (object : access GstMiniObject; notify : GstMiniObjectWeakNotify; data : System.Address); -- gst/gstminiobject.h:199 pragma Import (C, gst_mini_object_weak_ref, "gst_mini_object_weak_ref"); procedure gst_mini_object_weak_unref (object : access GstMiniObject; notify : GstMiniObjectWeakNotify; data : System.Address); -- gst/gstminiobject.h:202 pragma Import (C, gst_mini_object_weak_unref, "gst_mini_object_weak_unref"); procedure gst_mini_object_replace (olddata : System.Address; newdata : access GstMiniObject); -- gst/gstminiobject.h:205 pragma Import (C, gst_mini_object_replace, "gst_mini_object_replace"); -- GParamSpec type GstParamSpecMiniObject; --subtype GstParamSpecMiniObject is u_GstParamSpecMiniObject; -- gst/gstminiobject.h:216 --* -- * GstParamSpecMiniObject: -- * @parent_instance: private %GParamSpec portion -- * -- * A %GParamSpec derived structure that contains the meta data -- * for %GstMiniObject properties. -- type GstParamSpecMiniObject is record parent_instance : aliased GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h.GParamSpec; -- gst/gstminiobject.h:227 end record; pragma Convention (C_Pass_By_Copy, GstParamSpecMiniObject); -- gst/gstminiobject.h:225 function gst_param_spec_mini_object_get_type return GLIB.GType; -- gst/gstminiobject.h:231 pragma Import (C, gst_param_spec_mini_object_get_type, "gst_param_spec_mini_object_get_type"); function gst_param_spec_mini_object (name : Interfaces.C.Strings.chars_ptr; nick : Interfaces.C.Strings.chars_ptr; blurb : Interfaces.C.Strings.chars_ptr; object_type : GLIB.GType; flags : GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h.GParamFlags) return access GStreamer.GST_Low_Level.glib_2_0_gobject_gparam_h.GParamSpec; -- gst/gstminiobject.h:233 pragma Import (C, gst_param_spec_mini_object, "gst_param_spec_mini_object"); -- GValue stuff procedure gst_value_set_mini_object (value : access Glib.Values.GValue; mini_object : access GstMiniObject); -- gst/gstminiobject.h:239 pragma Import (C, gst_value_set_mini_object, "gst_value_set_mini_object"); procedure gst_value_take_mini_object (value : access Glib.Values.GValue; mini_object : access GstMiniObject); -- gst/gstminiobject.h:240 pragma Import (C, gst_value_take_mini_object, "gst_value_take_mini_object"); function gst_value_get_mini_object (value : access constant Glib.Values.GValue) return access GstMiniObject; -- gst/gstminiobject.h:241 pragma Import (C, gst_value_get_mini_object, "gst_value_get_mini_object"); function gst_value_dup_mini_object (value : access constant Glib.Values.GValue) return access GstMiniObject; -- gst/gstminiobject.h:242 pragma Import (C, gst_value_dup_mini_object, "gst_value_dup_mini_object"); end GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstminiobject_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.Null_Literal_Exps.Collections is pragma Preelaborate; package OCL_Null_Literal_Exp_Collections is new AMF.Generic_Collections (OCL_Null_Literal_Exp, OCL_Null_Literal_Exp_Access); type Set_Of_OCL_Null_Literal_Exp is new OCL_Null_Literal_Exp_Collections.Set with null record; Empty_Set_Of_OCL_Null_Literal_Exp : constant Set_Of_OCL_Null_Literal_Exp; type Ordered_Set_Of_OCL_Null_Literal_Exp is new OCL_Null_Literal_Exp_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_OCL_Null_Literal_Exp : constant Ordered_Set_Of_OCL_Null_Literal_Exp; type Bag_Of_OCL_Null_Literal_Exp is new OCL_Null_Literal_Exp_Collections.Bag with null record; Empty_Bag_Of_OCL_Null_Literal_Exp : constant Bag_Of_OCL_Null_Literal_Exp; type Sequence_Of_OCL_Null_Literal_Exp is new OCL_Null_Literal_Exp_Collections.Sequence with null record; Empty_Sequence_Of_OCL_Null_Literal_Exp : constant Sequence_Of_OCL_Null_Literal_Exp; private Empty_Set_Of_OCL_Null_Literal_Exp : constant Set_Of_OCL_Null_Literal_Exp := (OCL_Null_Literal_Exp_Collections.Set with null record); Empty_Ordered_Set_Of_OCL_Null_Literal_Exp : constant Ordered_Set_Of_OCL_Null_Literal_Exp := (OCL_Null_Literal_Exp_Collections.Ordered_Set with null record); Empty_Bag_Of_OCL_Null_Literal_Exp : constant Bag_Of_OCL_Null_Literal_Exp := (OCL_Null_Literal_Exp_Collections.Bag with null record); Empty_Sequence_Of_OCL_Null_Literal_Exp : constant Sequence_Of_OCL_Null_Literal_Exp := (OCL_Null_Literal_Exp_Collections.Sequence with null record); end AMF.OCL.Null_Literal_Exps.Collections;
-- { dg-do run } with Init12; use Init12; with Text_IO; use Text_IO; with Dump; procedure P12 is Local_A1 : Arr1; Local_A11 : Arr11; Local_A2 : Arr2; Local_A22 : Arr22; begin Put ("My_A1 :"); Dump (My_A1'Address, Arr1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "My_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Put ("My_A11 :"); Dump (My_A11'Address, Arr11'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "My_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" } Put ("My_A2 :"); Dump (My_A2'Address, Arr2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "My_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } Put ("My_A22 :"); Dump (My_A22'Address, Arr22'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "My_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" } Local_A1 := My_A1; Put ("Local_A1 :"); Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Local_A11 := My_A11; Put ("Local_A11 :"); Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" } Local_A2 := My_A2; Put ("Local_A2 :"); Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } Local_A22 := My_A22; Put ("Local_A22 :"); Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" } Local_A1 := (16#AB0012#, 16#CD0034#, 16#EF0056#); Put ("Local_A1 :"); Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Local_A11 := (1 => (16#AB0012#, 16#CD0034#), 2 => (16#AB0012#, 16#CD0034#)); Put ("Local_A11 :"); Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" } Local_A2 := (16#AB0012#, 16#CD0034#, 16#EF0056#); Put ("Local_A2 :"); Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } Local_A22 := (1 => (16#AB0012#, 16#CD0034#), 2 => (16#AB0012#, 16#CD0034#)); Put ("Local_A22 :"); Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" } Local_A1(1) := Local_A2(1); Local_A1(2) := Local_A2(2); Local_A1(3) := Local_A2(3); Put ("Local_A1 :"); Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Local_A11(1,1) := Local_A22(1,1); Local_A11(1,2) := Local_A22(1,2); Local_A11(2,1) := Local_A22(2,1); Local_A11(2,2) := Local_A22(2,2); Put ("Local_A11 :"); Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" } Local_A2(1) := Local_A1(1); Local_A2(2) := Local_A1(2); Local_A2(3) := Local_A1(3); Put ("Local_A2 :"); Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } Local_A22(1,1) := Local_A11(1,1); Local_A22(1,2) := Local_A11(1,2); Local_A22(2,1) := Local_A11(2,1); Local_A22(2,2) := Local_A11(2,2); Put ("Local_A22 :"); Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" } end;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 4 9 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-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/>. -- -- -- -- 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; package body System.Pack_49 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); 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_49; 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; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; ------------ -- Get_49 -- ------------ function Get_49 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_49 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else 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 if; end Get_49; ------------ -- Set_49 -- ------------ procedure Set_49 (Arr : System.Address; N : Natural; E : Bits_49; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else 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 if; end Set_49; end System.Pack_49;
-- { dg-do compile } -- { dg-final { scan-assembler-not "elabs" } } package body OCONST1 is procedure check (arg : R) is begin if arg.u /= 1 or else arg.b.i1 /= 2 or else arg.b.i2 /= 3 or else arg.b.i3 /= 4 then raise Program_Error; end if; end; end;
-- This package is intended to set up and tear down the test environment. -- Once created by GNATtest, this package will never be overwritten -- automatically. Contents of this package can be modified in any way -- except for sections surrounded by a 'read only' marker. with AUnit.Test_Fixtures; package DG_Types.Test_Data is -- begin read only type Test is new AUnit.Test_Fixtures.Test_Fixture -- end read only with null record; procedure Set_Up (Gnattest_T : in out Test); procedure Tear_Down (Gnattest_T : in out Test); end DG_Types.Test_Data;
pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; with glib; with glib; with glib.Values; with System; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h; -- limited with GStreamer.GST_Low_Level.glib_2_0_glib_glist_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h; with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h; with System; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_tag_tag_h is GST_TAG_MUSICBRAINZ_TRACKID : aliased constant String := "musicbrainz-trackid" & ASCII.NUL; -- gst/tag/tag.h:36 GST_TAG_MUSICBRAINZ_ARTISTID : aliased constant String := "musicbrainz-artistid" & ASCII.NUL; -- gst/tag/tag.h:42 GST_TAG_MUSICBRAINZ_ALBUMID : aliased constant String := "musicbrainz-albumid" & ASCII.NUL; -- gst/tag/tag.h:48 GST_TAG_MUSICBRAINZ_ALBUMARTISTID : aliased constant String := "musicbrainz-albumartistid" & ASCII.NUL; -- gst/tag/tag.h:54 GST_TAG_MUSICBRAINZ_TRMID : aliased constant String := "musicbrainz-trmid" & ASCII.NUL; -- gst/tag/tag.h:60 -- unsupported macro: GST_TAG_MUSICBRAINZ_SORTNAME GST_TAG_ARTIST_SORTNAME GST_TAG_CMML_STREAM : aliased constant String := "cmml-stream" & ASCII.NUL; -- gst/tag/tag.h:79 GST_TAG_CMML_HEAD : aliased constant String := "cmml-head" & ASCII.NUL; -- gst/tag/tag.h:86 GST_TAG_CMML_CLIP : aliased constant String := "cmml-clip" & ASCII.NUL; -- gst/tag/tag.h:92 GST_TAG_CDDA_CDDB_DISCID : aliased constant String := "discid" & ASCII.NUL; -- gst/tag/tag.h:101 GST_TAG_CDDA_CDDB_DISCID_FULL : aliased constant String := "discid-full" & ASCII.NUL; -- gst/tag/tag.h:108 GST_TAG_CDDA_MUSICBRAINZ_DISCID : aliased constant String := "musicbrainz-discid" & ASCII.NUL; -- gst/tag/tag.h:115 GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL : aliased constant String := "musicbrainz-discid-full" & ASCII.NUL; -- gst/tag/tag.h:122 GST_TAG_CAPTURING_SHUTTER_SPEED : aliased constant String := "capturing-shutter-speed" & ASCII.NUL; -- gst/tag/tag.h:131 GST_TAG_CAPTURING_FOCAL_RATIO : aliased constant String := "capturing-focal-ratio" & ASCII.NUL; -- gst/tag/tag.h:143 GST_TAG_CAPTURING_FOCAL_LENGTH : aliased constant String := "capturing-focal-length" & ASCII.NUL; -- gst/tag/tag.h:152 GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO : aliased constant String := "capturing-digital-zoom-ratio" & ASCII.NUL; -- gst/tag/tag.h:161 GST_TAG_CAPTURING_ISO_SPEED : aliased constant String := "capturing-iso-speed" & ASCII.NUL; -- gst/tag/tag.h:170 GST_TAG_CAPTURING_EXPOSURE_PROGRAM : aliased constant String := "capturing-exposure-program" & ASCII.NUL; -- gst/tag/tag.h:190 GST_TAG_CAPTURING_EXPOSURE_MODE : aliased constant String := "capturing-exposure-mode" & ASCII.NUL; -- gst/tag/tag.h:204 GST_TAG_CAPTURING_EXPOSURE_COMPENSATION : aliased constant String := "capturing-exposure-compensation" & ASCII.NUL; -- gst/tag/tag.h:213 GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE : aliased constant String := "capturing-scene-capture-type" & ASCII.NUL; -- gst/tag/tag.h:228 GST_TAG_CAPTURING_GAIN_ADJUSTMENT : aliased constant String := "capturing-gain-adjustment" & ASCII.NUL; -- gst/tag/tag.h:244 GST_TAG_CAPTURING_WHITE_BALANCE : aliased constant String := "capturing-white-balance" & ASCII.NUL; -- gst/tag/tag.h:263 GST_TAG_CAPTURING_CONTRAST : aliased constant String := "capturing-contrast" & ASCII.NUL; -- gst/tag/tag.h:277 GST_TAG_CAPTURING_SATURATION : aliased constant String := "capturing-saturation" & ASCII.NUL; -- gst/tag/tag.h:291 GST_TAG_CAPTURING_SHARPNESS : aliased constant String := "capturing-sharpness" & ASCII.NUL; -- gst/tag/tag.h:305 GST_TAG_CAPTURING_FLASH_FIRED : aliased constant String := "capturing-flash-fired" & ASCII.NUL; -- gst/tag/tag.h:317 GST_TAG_CAPTURING_FLASH_MODE : aliased constant String := "capturing-flash-mode" & ASCII.NUL; -- gst/tag/tag.h:331 GST_TAG_CAPTURING_METERING_MODE : aliased constant String := "capturing-metering-mode" & ASCII.NUL; -- gst/tag/tag.h:350 GST_TAG_CAPTURING_SOURCE : aliased constant String := "capturing-source" & ASCII.NUL; -- gst/tag/tag.h:366 GST_TAG_IMAGE_HORIZONTAL_PPI : aliased constant String := "image-horizontal-ppi" & ASCII.NUL; -- gst/tag/tag.h:375 GST_TAG_IMAGE_VERTICAL_PPI : aliased constant String := "image-vertical-ppi" & ASCII.NUL; -- gst/tag/tag.h:383 -- unsupported macro: GST_TYPE_TAG_IMAGE_TYPE (gst_tag_image_type_get_type ()) GST_TAG_ID3V2_HEADER_SIZE : constant := 10; -- gst/tag/tag.h:453 -- arg-macro: procedure gst_tag_get_language_code (lang_code) -- gst_tag_get_language_code_iso_639_1(lang_code) -- GStreamer -- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de> -- * Copyright (C) 2006-2011 Tim-Philipp Müller <tim centricular net> -- * -- * 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. -- -- Tag names --* -- * GST_TAG_MUSICBRAINZ_TRACKID -- * -- * MusicBrainz track ID -- --* -- * GST_TAG_MUSICBRAINZ_ARTISTID -- * -- * MusicBrainz artist ID -- --* -- * GST_TAG_MUSICBRAINZ_ALBUMID -- * -- * MusicBrainz album ID -- --* -- * GST_TAG_MUSICBRAINZ_ALBUMARTISTID -- * -- * MusicBrainz album artist ID -- --* -- * GST_TAG_MUSICBRAINZ_TRMID -- * -- * MusicBrainz track TRM ID -- -- FIXME 0.11: remove GST_TAG_MUSICBRAINZ_SORTNAME --* -- * GST_TAG_MUSICBRAINZ_SORTNAME -- * -- * MusicBrainz artist sort name -- * -- * Deprecated. Use GST_TAG_ARTIST_SORTNAME instead. -- --* -- * GST_TAG_CMML_STREAM -- * -- * Annodex CMML stream element tag -- --* -- * GST_TAG_CMML_HEAD -- * -- * Annodex CMML head element tag -- --* -- * GST_TAG_CMML_CLIP -- * -- * Annodex CMML clip element tag -- -- CDDA tags --* -- * GST_TAG_CDDA_CDDB_DISCID: -- * -- * CDDB disc id in its short form (e.g. 'aa063d0f') -- --* -- * GST_TAG_CDDA_CDDB_DISCID_FULL: -- * -- * CDDB disc id including all details -- --* -- * GST_TAG_CDDA_MUSICBRAINZ_DISCID: -- * -- * Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-') -- --* -- * GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL: -- * -- * Musicbrainz disc id details -- --* -- * GST_TAG_CAPTURING_SHUTTER_SPEED: -- * -- * Shutter speed used when capturing an image, in seconds. (fraction) -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_FOCAL_RATIO: -- * -- * Focal ratio (f-number) used when capturing an image. (double) -- * -- * The value stored is the denominator of the focal ratio (f-number). -- * For example, if this tag value is 2, the focal ratio is f/2. -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_FOCAL_LENGTH: -- * -- * Focal length used when capturing an image, in mm. (double) -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO: -- * -- * Digital zoom ratio used when capturing an image. (double) -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_ISO_SPEED: -- * -- * ISO speed used when capturing an image. (integer) -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_EXPOSURE_PROGRAM: -- * -- * Type of exposure control used when capturing an image. (string) -- * -- * The allowed values are: -- * "undefined" -- * "manual" -- * "normal" - automatically controlled -- * "aperture-priority" - user selects aperture value -- * "shutter-priority" - user selects shutter speed -- * "creative" - biased towards depth of field -- * "action" - biased towards fast shutter speed -- * "portrait" - closeup, leaving background out of focus -- * "landscape" - landscape photos, background in focus -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_EXPOSURE_MODE: -- * -- * Exposure mode used when capturing an image. (string) -- * -- * The allowed values are: -- * "auto-exposure" -- * "manual-exposure" -- * "auto-bracket" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_EXPOSURE_COMPENSATION: -- * -- * Exposure compensation using when capturing an image in EV. (double) -- * -- * Since: 0.10.33 -- --* -- * GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE: -- * -- * Scene mode used when capturing an image. (string) -- * -- * The allowed values are: -- * "standard" -- * "landscape" -- * "portrait" -- * "night-scene" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_GAIN_ADJUSTMENT: -- * -- * Gain adjustment applied to an image. (string) -- * -- * The allowed values are: -- * "none" -- * "low-gain-up" -- * "high-gain-up" -- * "low-gain-down" -- * "high-gain-down" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_WHITE_BALANCE: -- * -- * White balance mode used when capturing an image. (string) -- * -- * The allowed values are: -- * "auto" -- * "manual" -- * "daylight" -- * "cloudy" -- * "tungsten" -- * "fluorescent" -- * "fluorescent h" (newer daylight-calibrated fluorescents) -- * "flash" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_CONTRAST: -- * -- * Direction of contrast processing applied when capturing an image. (string) -- * -- * The allowed values are: -- * "normal" -- * "soft" -- * "hard" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_SATURATION: -- * -- * Direction of saturation processing applied when capturing an image. (string) -- * -- * The allowed values are: -- * "normal" -- * "low-saturation" -- * "high-saturation" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_SHARPNESS: -- * -- * Direction of sharpness processing applied when capturing an image. (string) -- * -- * The allowed values are: -- * "normal" -- * "soft" -- * "hard" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_FLASH_FIRED: -- * -- * If flash was fired during the capture of an image. (boolean) -- * -- * Note that if this tag isn't present, it should not be assumed that -- * the flash did not fire. It should be treated as unknown. -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_FLASH_MODE: -- * -- * The flash mode selected during the capture of an image. (string) -- * -- * The allowed values are: -- * "auto" -- * "always" -- * "never" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_METERING_MODE: -- * -- * Defines the way a camera determines the exposure. (string) -- * -- * The allowed values are: -- * "unknown" -- * "average" -- * "center-weighted-average" -- * "spot" -- * "multi-spot" -- * "pattern" -- * "partial" -- * "other" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_CAPTURING_SOURCE: -- * -- * Indicates the source of capture. The device/medium used to do the -- * capture. (string) -- * -- * Allowed values are: -- * "dsc" (= digital still camera) -- * "transparent-scanner" -- * "reflex-scanner" -- * "other" -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_IMAGE_HORIZONTAL_PPI: -- * -- * Media (image/video) intended horizontal pixel density in ppi. (double) -- * -- * Since: 0.10.31 -- --* -- * GST_TAG_IMAGE_VERTICAL_PPI: -- * -- * Media (image/video) intended vertical pixel density in ppi. (double) -- * -- * Since: 0.10.31 -- -- additional information for image tags --* -- * GstTagImageType: -- * @GST_TAG_IMAGE_TYPE_NONE : No image type. Can be used to -- * tell functions such as gst_tag_image_data_to_image_buffer() that no -- * image type should be set. (Since: 0.10.20) -- * @GST_TAG_IMAGE_TYPE_UNDEFINED : Undefined/other image type -- * @GST_TAG_IMAGE_TYPE_FRONT_COVER : Cover (front) -- * @GST_TAG_IMAGE_TYPE_BACK_COVER : Cover (back) -- * @GST_TAG_IMAGE_TYPE_LEAFLET_PAGE : Leaflet page -- * @GST_TAG_IMAGE_TYPE_MEDIUM : Medium (e.g. label side of CD) -- * @GST_TAG_IMAGE_TYPE_LEAD_ARTIST : Lead artist/lead performer/soloist -- * @GST_TAG_IMAGE_TYPE_ARTIST : Artist/performer -- * @GST_TAG_IMAGE_TYPE_CONDUCTOR : Conductor -- * @GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA : Band/orchestra -- * @GST_TAG_IMAGE_TYPE_COMPOSER : Composer -- * @GST_TAG_IMAGE_TYPE_LYRICIST : Lyricist/text writer -- * @GST_TAG_IMAGE_TYPE_RECORDING_LOCATION : Recording location -- * @GST_TAG_IMAGE_TYPE_DURING_RECORDING : During recording -- * @GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE : During performance -- * @GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE : Movie/video screen capture -- * @GST_TAG_IMAGE_TYPE_FISH : A fish as funny as the ID3v2 spec -- * @GST_TAG_IMAGE_TYPE_ILLUSTRATION : Illustration -- * @GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO : Band/artist logotype -- * @GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO : Publisher/studio logotype -- * -- * Type of image contained in an image tag (specified as field in -- * the image buffer's caps structure) -- * -- * Since: 0.10.9 -- -- Note: keep in sync with register_tag_image_type_enum() subtype GstTagImageType is int; GST_TAG_IMAGE_TYPE_NONE : constant GstTagImageType := -1; GST_TAG_IMAGE_TYPE_UNDEFINED : constant GstTagImageType := 0; GST_TAG_IMAGE_TYPE_FRONT_COVER : constant GstTagImageType := 1; GST_TAG_IMAGE_TYPE_BACK_COVER : constant GstTagImageType := 2; GST_TAG_IMAGE_TYPE_LEAFLET_PAGE : constant GstTagImageType := 3; GST_TAG_IMAGE_TYPE_MEDIUM : constant GstTagImageType := 4; GST_TAG_IMAGE_TYPE_LEAD_ARTIST : constant GstTagImageType := 5; GST_TAG_IMAGE_TYPE_ARTIST : constant GstTagImageType := 6; GST_TAG_IMAGE_TYPE_CONDUCTOR : constant GstTagImageType := 7; GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA : constant GstTagImageType := 8; GST_TAG_IMAGE_TYPE_COMPOSER : constant GstTagImageType := 9; GST_TAG_IMAGE_TYPE_LYRICIST : constant GstTagImageType := 10; GST_TAG_IMAGE_TYPE_RECORDING_LOCATION : constant GstTagImageType := 11; GST_TAG_IMAGE_TYPE_DURING_RECORDING : constant GstTagImageType := 12; GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE : constant GstTagImageType := 13; GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE : constant GstTagImageType := 14; GST_TAG_IMAGE_TYPE_FISH : constant GstTagImageType := 15; GST_TAG_IMAGE_TYPE_ILLUSTRATION : constant GstTagImageType := 16; GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO : constant GstTagImageType := 17; GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO : constant GstTagImageType := 18; -- gst/tag/tag.h:440 function gst_tag_image_type_get_type return GLIB.GType; -- gst/tag/tag.h:443 pragma Import (C, gst_tag_image_type_get_type, "gst_tag_image_type_get_type"); --* -- * GST_TAG_ID3V2_HEADER_SIZE: -- * -- * ID3V2 header size considered minimum input for some functions such as -- * gst_tag_list_from_id3v2_tag() and gst_tag_get_id3v2_tag_size() for example. -- * -- * Since: 0.10.36 -- -- functions for vorbis comment manipulation function gst_tag_from_vorbis_tag (vorbis_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:457 pragma Import (C, gst_tag_from_vorbis_tag, "gst_tag_from_vorbis_tag"); function gst_tag_to_vorbis_tag (gst_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:458 pragma Import (C, gst_tag_to_vorbis_tag, "gst_tag_to_vorbis_tag"); procedure gst_vorbis_tag_add (list : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; tag : access GLIB.gchar; value : access GLIB.gchar); -- gst/tag/tag.h:459 pragma Import (C, gst_vorbis_tag_add, "gst_vorbis_tag_add"); function gst_tag_to_vorbis_comments (list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; tag : access GLIB.gchar) return access GStreamer.GST_Low_Level.glib_2_0_glib_glist_h.GList; -- gst/tag/tag.h:463 pragma Import (C, gst_tag_to_vorbis_comments, "gst_tag_to_vorbis_comments"); -- functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back function gst_tag_list_from_vorbiscomment_buffer (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; id_data : access GLIB.guint8; id_data_length : GLIB.guint; vendor_string : System.Address) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:467 pragma Import (C, gst_tag_list_from_vorbiscomment_buffer, "gst_tag_list_from_vorbiscomment_buffer"); function gst_tag_list_to_vorbiscomment_buffer (list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; id_data : access GLIB.guint8; id_data_length : GLIB.guint; vendor_string : access GLIB.gchar) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:471 pragma Import (C, gst_tag_list_to_vorbiscomment_buffer, "gst_tag_list_to_vorbiscomment_buffer"); -- functions for ID3 tag manipulation -- FIXME 0.11: inconsistent API naming: gst_tag_list_new_from_id3v1(), gst_tag_list_from_*_buffer(), -- * gst_tag_list_from_id3v2_tag(). Also, note gst.tag.list_xyz() namespace vs. gst.tag_list_xyz(), -- * which is a bit confusing and possibly doesn't map too well function gst_tag_id3_genre_count return GLIB.guint; -- gst/tag/tag.h:482 pragma Import (C, gst_tag_id3_genre_count, "gst_tag_id3_genre_count"); function gst_tag_id3_genre_get (id : GLIB.guint) return access GLIB.gchar; -- gst/tag/tag.h:483 pragma Import (C, gst_tag_id3_genre_get, "gst_tag_id3_genre_get"); function gst_tag_list_new_from_id3v1 (data : access GLIB.guint8) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:484 pragma Import (C, gst_tag_list_new_from_id3v1, "gst_tag_list_new_from_id3v1"); function gst_tag_from_id3_tag (id3_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:486 pragma Import (C, gst_tag_from_id3_tag, "gst_tag_from_id3_tag"); function gst_tag_from_id3_user_tag (c_type : access GLIB.gchar; id3_user_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:487 pragma Import (C, gst_tag_from_id3_user_tag, "gst_tag_from_id3_user_tag"); function gst_tag_to_id3_tag (gst_tag : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:489 pragma Import (C, gst_tag_to_id3_tag, "gst_tag_to_id3_tag"); function gst_tag_list_add_id3_image (tag_list : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; image_data : access GLIB.guint8; image_data_len : GLIB.guint; id3_picture_type : GLIB.guint) return GLIB.gboolean; -- gst/tag/tag.h:491 pragma Import (C, gst_tag_list_add_id3_image, "gst_tag_list_add_id3_image"); function gst_tag_list_from_id3v2_tag (buffer : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:496 pragma Import (C, gst_tag_list_from_id3v2_tag, "gst_tag_list_from_id3v2_tag"); function gst_tag_get_id3v2_tag_size (buffer : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return GLIB.guint; -- gst/tag/tag.h:498 pragma Import (C, gst_tag_get_id3v2_tag_size, "gst_tag_get_id3v2_tag_size"); -- functions to convert GstBuffers with xmp packets contents to GstTagLists and back function gst_tag_list_from_xmp_buffer (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:501 pragma Import (C, gst_tag_list_from_xmp_buffer, "gst_tag_list_from_xmp_buffer"); function gst_tag_list_to_xmp_buffer (list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; read_only : GLIB.gboolean) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:502 pragma Import (C, gst_tag_list_to_xmp_buffer, "gst_tag_list_to_xmp_buffer"); function gst_tag_list_to_xmp_buffer_full (list : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; read_only : GLIB.gboolean; schemas : System.Address) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:504 pragma Import (C, gst_tag_list_to_xmp_buffer_full, "gst_tag_list_to_xmp_buffer_full"); function gst_tag_xmp_list_schemas return System.Address; -- gst/tag/tag.h:506 pragma Import (C, gst_tag_xmp_list_schemas, "gst_tag_xmp_list_schemas"); -- functions related to exif function gst_tag_list_to_exif_buffer (taglist : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; byte_order : GLIB.gint; base_offset : GLIB.guint32) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:509 pragma Import (C, gst_tag_list_to_exif_buffer, "gst_tag_list_to_exif_buffer"); function gst_tag_list_to_exif_buffer_with_tiff_header (taglist : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:513 pragma Import (C, gst_tag_list_to_exif_buffer_with_tiff_header, "gst_tag_list_to_exif_buffer_with_tiff_header"); function gst_tag_list_from_exif_buffer (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; byte_order : GLIB.gint; base_offset : GLIB.guint32) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:515 pragma Import (C, gst_tag_list_from_exif_buffer, "gst_tag_list_from_exif_buffer"); function gst_tag_list_from_exif_buffer_with_tiff_header (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h.GstTagList; -- gst/tag/tag.h:519 pragma Import (C, gst_tag_list_from_exif_buffer_with_tiff_header, "gst_tag_list_from_exif_buffer_with_tiff_header"); -- other tag-related functions function gst_tag_parse_extended_comment (ext_comment : access GLIB.gchar; key : System.Address; lang : System.Address; value : System.Address; fail_if_no_key : GLIB.gboolean) return GLIB.gboolean; -- gst/tag/tag.h:524 pragma Import (C, gst_tag_parse_extended_comment, "gst_tag_parse_extended_comment"); function gst_tag_freeform_string_to_utf8 (data : access GLIB.gchar; size : GLIB.gint; env_vars : System.Address) return access GLIB.gchar; -- gst/tag/tag.h:530 pragma Import (C, gst_tag_freeform_string_to_utf8, "gst_tag_freeform_string_to_utf8"); function gst_tag_image_data_to_image_buffer (image_data : access GLIB.guint8; image_data_len : GLIB.guint; image_type : GstTagImageType) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer; -- gst/tag/tag.h:534 pragma Import (C, gst_tag_image_data_to_image_buffer, "gst_tag_image_data_to_image_buffer"); -- FIXME 0.11: get rid of this awkward register/init function, see tags.c procedure gst_tag_register_musicbrainz_tags; -- gst/tag/tag.h:539 pragma Import (C, gst_tag_register_musicbrainz_tags, "gst_tag_register_musicbrainz_tags"); -- language tag related functions function gst_tag_get_language_codes return System.Address; -- gst/tag/tag.h:544 pragma Import (C, gst_tag_get_language_codes, "gst_tag_get_language_codes"); function gst_tag_get_language_name (language_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:546 pragma Import (C, gst_tag_get_language_name, "gst_tag_get_language_name"); function gst_tag_get_language_code_iso_639_1 (lang_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:548 pragma Import (C, gst_tag_get_language_code_iso_639_1, "gst_tag_get_language_code_iso_639_1"); function gst_tag_get_language_code_iso_639_2B (lang_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:550 pragma Import (C, gst_tag_get_language_code_iso_639_2B, "gst_tag_get_language_code_iso_639_2B"); function gst_tag_get_language_code_iso_639_2T (lang_code : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:552 pragma Import (C, gst_tag_get_language_code_iso_639_2T, "gst_tag_get_language_code_iso_639_2T"); --* -- * gst_tag_get_language_code: -- * @lang_code: ISO-639 language code (e.g. "deu" or "ger" or "de") -- * -- * Convenience macro wrapping gst_tag_get_language_code_iso_639_1(). -- * -- * Since: 0.10.26 -- -- functions to deal with (mostly) Creative Commons licenses --* -- * GstTagLicenseFlags: -- * @GST_TAG_LICENSE_PERMITS_REPRODUCTION: making multiple copies -- * is allowed -- * @GST_TAG_LICENSE_PERMITS_DISTRIBUTION: distribution, public display -- * and public performance are allowed -- * @GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS: distribution of derivative -- * works is allowed -- * @GST_TAG_LICENSE_PERMITS_SHARING: commercial derivatives are allowed, -- * but only non-commercial distribution is allowed -- * @GST_TAG_LICENSE_REQUIRES_NOTICE: copyright and license notices -- * must be kept intact -- * @GST_TAG_LICENSE_REQUIRES_ATTRIBUTION: credit must be given to -- * copyright holder and/or author -- * @GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE: derivative works must be -- * licensed under the same terms or compatible terms as the original work -- * @GST_TAG_LICENSE_REQUIRES_SOURCE_CODE: source code (the preferred -- * form for making modifications) must be provided when exercising some -- * rights granted by the license -- * @GST_TAG_LICENSE_REQUIRES_COPYLEFT: derivative and combined works -- * must be licensed under specified terms, similar to those of the original -- * work -- * @GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT: derivative works must be -- * licensed under specified terms, with at least the same conditions as -- * the original work; combinations with the work may be licensed under -- * different terms -- * @GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE: exercising rights for -- * commercial purposes is prohibited -- * @GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE: use in a -- * non-developing country is prohibited -- * @GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE: this license was created -- * by the Creative Commons project -- * @GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE: this license was -- * created by the Free Software Foundation (FSF) -- * -- * See http://creativecommons.org/ns for more information. -- * -- * Since: 0.10.36 -- subtype GstTagLicenseFlags is unsigned; GST_TAG_LICENSE_PERMITS_REPRODUCTION : constant GstTagLicenseFlags := 1; GST_TAG_LICENSE_PERMITS_DISTRIBUTION : constant GstTagLicenseFlags := 2; GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS : constant GstTagLicenseFlags := 4; GST_TAG_LICENSE_PERMITS_SHARING : constant GstTagLicenseFlags := 8; GST_TAG_LICENSE_REQUIRES_NOTICE : constant GstTagLicenseFlags := 256; GST_TAG_LICENSE_REQUIRES_ATTRIBUTION : constant GstTagLicenseFlags := 512; GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE : constant GstTagLicenseFlags := 1024; GST_TAG_LICENSE_REQUIRES_SOURCE_CODE : constant GstTagLicenseFlags := 2048; GST_TAG_LICENSE_REQUIRES_COPYLEFT : constant GstTagLicenseFlags := 4096; GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT : constant GstTagLicenseFlags := 8192; GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE : constant GstTagLicenseFlags := 65536; GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE : constant GstTagLicenseFlags := 131072; GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE : constant GstTagLicenseFlags := 16777216; GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE : constant GstTagLicenseFlags := 33554432; -- gst/tag/tag.h:625 function gst_tag_get_licenses return System.Address; -- gst/tag/tag.h:627 pragma Import (C, gst_tag_get_licenses, "gst_tag_get_licenses"); function gst_tag_get_license_flags (license_ref : access GLIB.gchar) return GstTagLicenseFlags; -- gst/tag/tag.h:629 pragma Import (C, gst_tag_get_license_flags, "gst_tag_get_license_flags"); function gst_tag_get_license_nick (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:631 pragma Import (C, gst_tag_get_license_nick, "gst_tag_get_license_nick"); function gst_tag_get_license_title (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:633 pragma Import (C, gst_tag_get_license_title, "gst_tag_get_license_title"); function gst_tag_get_license_version (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:635 pragma Import (C, gst_tag_get_license_version, "gst_tag_get_license_version"); function gst_tag_get_license_description (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:637 pragma Import (C, gst_tag_get_license_description, "gst_tag_get_license_description"); function gst_tag_get_license_jurisdiction (license_ref : access GLIB.gchar) return access GLIB.gchar; -- gst/tag/tag.h:639 pragma Import (C, gst_tag_get_license_jurisdiction, "gst_tag_get_license_jurisdiction"); function gst_tag_license_flags_get_type return GLIB.GType; -- gst/tag/tag.h:641 pragma Import (C, gst_tag_license_flags_get_type, "gst_tag_license_flags_get_type"); end GStreamer.GST_Low_Level.gstreamer_0_10_gst_tag_tag_h;
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure prologin_template_2charline2 is type stringptr is access all char_array; procedure PString(s : stringptr) is begin String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all)); end; procedure PChar(c : in Character) is begin Character'Write (Text_Streams.Stream (Current_Output), c); end; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; procedure SkipSpaces is C : Character; Eol : Boolean; begin loop Look_Ahead(C, Eol); exit when Eol or C /= ' '; Get(C); end loop; end; type c is Array (Integer range <>) of Character; type c_PTR is access c; function programme_candidat(tableau1 : in c_PTR; taille1 : in Integer; tableau2 : in c_PTR; taille2 : in Integer) return Integer is out0 : Integer; begin out0 := 0; for i in integer range 0..taille1 - 1 loop out0 := out0 + Character'Pos(tableau1(i)) * i; PChar(tableau1(i)); end loop; PString(new char_array'( To_C("--" & Character'Val(10)))); for j in integer range 0..taille2 - 1 loop out0 := out0 + Character'Pos(tableau2(j)) * j * 100; PChar(tableau2(j)); end loop; PString(new char_array'( To_C("--" & Character'Val(10)))); return out0; end; taille2 : Integer; taille1 : Integer; tableau2 : c_PTR; tableau1 : c_PTR; begin Get(taille1); SkipSpaces; Get(taille2); SkipSpaces; tableau1 := new c (0..taille1 - 1); for a in integer range 0..taille1 - 1 loop Get(tableau1(a)); end loop; SkipSpaces; tableau2 := new c (0..taille2 - 1); for b in integer range 0..taille2 - 1 loop Get(tableau2(b)); end loop; SkipSpaces; PInt(programme_candidat(tableau1, taille1, tableau2, taille2)); PString(new char_array'( To_C("" & Character'Val(10)))); end;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, 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 STMicroelectronics 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. -- -- -- -- -- -- This file is based on: -- -- -- -- @file stm32f4xx_hal_i2c.c -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief I2C HAL module driver. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ with Ada.Real_Time; use Ada.Real_Time; with STM32_SVD.I2C; use STM32_SVD.I2C; with STM32.Device; use STM32.Device; package body STM32.I2C is use type HAL.I2C.I2C_Status; type I2C_Status_Flag is (Start_Bit, Address_Sent, Byte_Transfer_Finished, Address_Sent_10bit, Stop_Detection, Rx_Data_Register_Not_Empty, Tx_Data_Register_Empty, Bus_Error, Arbitration_Lost, Ack_Failure, UnderOverrun, Packet_Error, Timeout, SMB_Alert, Master_Slave_Mode, Busy, Transmitter_Receiver_Mode, General_Call, SMB_Default, SMB_Host, Dual_Flag); -- Low level flag handling function Flag_Status (This : I2C_Port; Flag : I2C_Status_Flag) return Boolean; procedure Clear_Address_Sent_Status (This : I2C_Port); -- Higher level flag handling procedure Wait_Flag (This : in out I2C_Port; Flag : I2C_Status_Flag; F_State : Boolean; Timeout : Natural; Status : out HAL.I2C.I2C_Status); procedure Wait_Master_Flag (This : in out I2C_Port; Flag : I2C_Status_Flag; Timeout : Natural; Status : out HAL.I2C.I2C_Status); procedure Master_Request_Write (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Timeout : Natural; Status : out HAL.I2C.I2C_Status); procedure Master_Request_Read (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Timeout : Natural; Status : out HAL.I2C.I2C_Status); procedure Mem_Request_Write (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size; Timeout : Natural; Status : out HAL.I2C.I2C_Status); procedure Mem_Request_Read (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size; Timeout : Natural; Status : out HAL.I2C.I2C_Status); --------------- -- Configure -- --------------- procedure Configure (This : in out I2C_Port; Conf : I2C_Configuration) is CR1 : CR1_Register; CCR : CCR_Register; OAR1 : OAR1_Register; PCLK1 : constant UInt32 := System_Clock_Frequencies.PCLK1; Freq_Range : constant UInt16 := UInt16 (PCLK1 / 1_000_000); begin if This.State /= Reset then return; end if; This.Config := Conf; -- Disable the I2C port if Freq_Range < 2 or else Freq_Range > 45 then raise Program_Error with "PCLK1 too high or too low: expected 2-45 MHz, current" & Freq_Range'Img & " MHz"; end if; Set_State (This, False); -- Load CR2 and clear FREQ This.Periph.CR2 := (LAST => False, DMAEN => False, ITBUFEN => False, ITEVTEN => False, ITERREN => False, FREQ => UInt6 (Freq_Range), others => <>); -- Set the port timing if Conf.Clock_Speed <= 100_000 then -- Mode selection to Standard Mode CCR.F_S := False; CCR.CCR := UInt12 (PCLK1 / (Conf.Clock_Speed * 2)); if CCR.CCR < 4 then CCR.CCR := 4; end if; This.Periph.TRISE.TRISE := UInt6 (Freq_Range + 1); else -- Fast mode CCR.F_S := True; if Conf.Duty_Cycle = DutyCycle_2 then CCR.CCR := UInt12 (PCLK1 / (Conf.Clock_Speed * 3)); else CCR.CCR := UInt12 (PCLK1 / (Conf.Clock_Speed * 25)); CCR.DUTY := True; end if; if CCR.CCR = 0 then CCR.CCR := 1; end if; This.Periph.TRISE.TRISE := UInt6 ((UInt32 (Freq_Range) * 300) / 1000 + 1); end if; This.Periph.CCR := CCR; -- CR1 configuration case Conf.Mode is when I2C_Mode => CR1.SMBUS := False; CR1.SMBTYPE := False; when SMBusDevice_Mode => CR1.SMBUS := True; CR1.SMBTYPE := False; when SMBusHost_Mode => CR1.SMBUS := True; CR1.SMBTYPE := True; end case; CR1.ENGC := Conf.General_Call_Enabled; CR1.NOSTRETCH := not Conf.Clock_Stretching_Enabled; This.Periph.CR1 := CR1; -- Address mode (slave mode) configuration OAR1.ADDMODE := Conf.Addressing_Mode = Addressing_Mode_10bit; case Conf.Addressing_Mode is when Addressing_Mode_7bit => OAR1.ADD0 := False; OAR1.ADD7 := UInt7 (Conf.Own_Address / 2); OAR1.ADD10 := 0; when Addressing_Mode_10bit => OAR1.ADD0 := (Conf.Own_Address and 2#1#) /= 0; OAR1.ADD7 := UInt7 ((Conf.Own_Address / 2) and 2#1111111#); OAR1.ADD10 := UInt2 (Conf.Own_Address / 2 ** 8); end case; This.Periph.OAR1 := OAR1; Set_State (This, True); This.State := Ready; end Configure; ----------------- -- Flag_Status -- ----------------- function Flag_Status (This : I2C_Port; Flag : I2C_Status_Flag) return Boolean is begin case Flag is when Start_Bit => return This.Periph.SR1.SB; when Address_Sent => return This.Periph.SR1.ADDR; when Byte_Transfer_Finished => return This.Periph.SR1.BTF; when Address_Sent_10bit => return This.Periph.SR1.ADD10; when Stop_Detection => return This.Periph.SR1.STOPF; when Rx_Data_Register_Not_Empty => return This.Periph.SR1.RxNE; when Tx_Data_Register_Empty => return This.Periph.SR1.TxE; when Bus_Error => return This.Periph.SR1.BERR; when Arbitration_Lost => return This.Periph.SR1.ARLO; when Ack_Failure => return This.Periph.SR1.AF; when UnderOverrun => return This.Periph.SR1.OVR; when Packet_Error => return This.Periph.SR1.PECERR; when Timeout => return This.Periph.SR1.TIMEOUT; when SMB_Alert => return This.Periph.SR1.SMBALERT; when Master_Slave_Mode => return This.Periph.SR2.MSL; when Busy => return This.Periph.SR2.BUSY; when Transmitter_Receiver_Mode => return This.Periph.SR2.TRA; when General_Call => return This.Periph.SR2.GENCALL; when SMB_Default => return This.Periph.SR2.SMBDEFAULT; when SMB_Host => return This.Periph.SR2.SMBHOST; when Dual_Flag => return This.Periph.SR2.DUALF; end case; end Flag_Status; -- ---------------- -- -- Clear_Flag -- -- ---------------- -- -- procedure Clear_Flag -- (Port : in out I2C_Port; -- Target : Clearable_I2C_Status_Flag) -- is -- Unref : Bit with Unreferenced; -- begin -- case Target is -- when Bus_Error => -- Port.SR1.BERR := 0; -- when Arbitration_Lost => -- Port.SR1.ARLO := 0; -- when Ack_Failure => -- Port.SR1.AF := 0; -- when UnderOverrun => -- Port.SR1.OVR := 0; -- when Packet_Error => -- Port.SR1.PECERR := 0; -- when Timeout => -- Port.SR1.TIMEOUT := 0; -- when SMB_Alert => -- Port.SR1.SMBALERT := 0; -- end case; -- end Clear_Flag; ------------------------------- -- Clear_Address_Sent_Status -- ------------------------------- procedure Clear_Address_Sent_Status (This : I2C_Port) is Unref : Boolean with Volatile, Unreferenced; begin -- ADDR is cleared after reading both SR1 and SR2 Unref := This.Periph.SR1.ADDR; Unref := This.Periph.SR2.MSL; end Clear_Address_Sent_Status; -- --------------------------------- -- -- Clear_Stop_Detection_Status -- -- --------------------------------- -- -- procedure Clear_Stop_Detection_Status (Port : in out I2C_Port) is -- Unref : Bit with Volatile, Unreferenced; -- begin -- Unref := Port.SR1.STOPF; -- Port.CR1.PE := True; -- end Clear_Stop_Detection_Status; --------------- -- Wait_Flag -- --------------- procedure Wait_Flag (This : in out I2C_Port; Flag : I2C_Status_Flag; F_State : Boolean; Timeout : Natural; Status : out HAL.I2C.I2C_Status) is Start : constant Time := Clock; begin while Flag_Status (This, Flag) = F_State loop if Clock - Start > Milliseconds (Timeout) then This.State := Ready; Status := HAL.I2C.Err_Timeout; return; end if; end loop; Status := HAL.I2C.Ok; end Wait_Flag; ---------------------- -- Wait_Master_Flag -- ---------------------- procedure Wait_Master_Flag (This : in out I2C_Port; Flag : I2C_Status_Flag; Timeout : Natural; Status : out HAL.I2C.I2C_Status) is Start : constant Time := Clock; begin while not Flag_Status (This, Flag) loop if This.Periph.SR1.AF then -- Generate STOP This.Periph.CR1.STOP := True; -- Clear the AF flag This.Periph.SR1.AF := False; This.State := Ready; Status := HAL.I2C.Err_Error; return; end if; if Clock - Start > Milliseconds (Timeout) then This.State := Ready; Status := HAL.I2C.Err_Timeout; return; end if; end loop; Status := HAL.I2C.Ok; end Wait_Master_Flag; -------------------------- -- Master_Request_Write -- -------------------------- procedure Master_Request_Write (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Timeout : Natural; Status : out HAL.I2C.I2C_Status) is begin This.Periph.CR1.START := True; Wait_Flag (This, Start_Bit, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; if This.Config.Addressing_Mode = Addressing_Mode_7bit then This.Periph.DR.DR := UInt8 (Addr) and not 2#1#; else declare MSB : constant UInt8 := UInt8 (Shift_Right (UInt16 (Addr) and 16#300#, 7)); LSB : constant UInt8 := UInt8 (Addr and 16#FF#); begin -- We need to send 2#1111_MSB0# when MSB are the 3 most -- significant bits of the address This.Periph.DR.DR := MSB or 16#F0#; Wait_Master_Flag (This, Address_Sent_10bit, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.DR.DR := LSB; end; end if; Wait_Master_Flag (This, Address_Sent, Timeout, Status); end Master_Request_Write; -------------------------- -- Master_Request_Write -- -------------------------- procedure Master_Request_Read (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Timeout : Natural; Status : out HAL.I2C.I2C_Status) is begin This.Periph.CR1.ACK := True; This.Periph.CR1.START := True; Wait_Flag (This, Start_Bit, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; if This.Config.Addressing_Mode = Addressing_Mode_7bit then This.Periph.DR.DR := UInt8 (Addr) or 2#1#; else declare MSB : constant UInt8 := UInt8 (Shift_Right (UInt16 (Addr) and 16#300#, 7)); LSB : constant UInt8 := UInt8 (Addr and 16#FF#); begin -- We need to write the address bit. So let's start with a -- write header -- We need to send 2#1111_MSB0# when MSB are the 3 most -- significant bits of the address This.Periph.DR.DR := MSB or 16#F0#; Wait_Master_Flag (This, Address_Sent_10bit, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.DR.DR := LSB; Wait_Master_Flag (This, Address_Sent, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Clear_Address_Sent_Status (This); -- Generate a re-start This.Periph.CR1.START := True; Wait_Flag (This, Start_Bit, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- resend the MSB with the read bit set. This.Periph.DR.DR := MSB or 16#F1#; end; end if; Wait_Master_Flag (This, Address_Sent, Timeout, Status); end Master_Request_Read; ----------------------- -- Mem_Request_Write -- ----------------------- procedure Mem_Request_Write (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size; Timeout : Natural; Status : out HAL.I2C.I2C_Status) is begin This.Periph.CR1.START := True; Wait_Flag (This, Start_Bit, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- Send slave address This.Periph.DR.DR := UInt8 (Addr) and not 2#1#; Wait_Master_Flag (This, Address_Sent, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Clear_Address_Sent_Status (This); -- Wait until TXE flag is set Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; case Mem_Addr_Size is when HAL.I2C.Memory_Size_8b => This.Periph.DR.DR := UInt8 (Mem_Addr); when HAL.I2C.Memory_Size_16b => This.Periph.DR.DR := UInt8 (Shift_Right (Mem_Addr, 8)); Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.DR.DR := UInt8 (Mem_Addr and 16#FF#); end case; -- Wait until TXE flag is set Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); end Mem_Request_Write; ---------------------- -- Mem_Request_Read -- ---------------------- procedure Mem_Request_Read (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size; Timeout : Natural; Status : out HAL.I2C.I2C_Status) is begin This.Periph.CR1.ACK := True; This.Periph.CR1.START := True; Wait_Flag (This, Start_Bit, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- Send slave address in write mode This.Periph.DR.DR := UInt8 (Addr) and not 16#1#; Wait_Master_Flag (This, Address_Sent, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Clear_Address_Sent_Status (This); -- Wait until TXE flag is set Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; case Mem_Addr_Size is when HAL.I2C.Memory_Size_8b => This.Periph.DR.DR := UInt8 (Mem_Addr); when HAL.I2C.Memory_Size_16b => This.Periph.DR.DR := UInt8 (Shift_Right (Mem_Addr, 8)); Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.DR.DR := UInt8 (Mem_Addr and 16#FF#); end case; -- Wait until TXE flag is set Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- We now need to reset and send the slave address in read mode This.Periph.CR1.START := True; Wait_Flag (This, Start_Bit, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- Send slave address in read mode This.Periph.DR.DR := UInt8 (Addr) or 16#1#; Wait_Master_Flag (This, Address_Sent, Timeout, Status); end Mem_Request_Read; --------------------- -- Master_Transmit -- --------------------- overriding procedure Master_Transmit (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Data : HAL.I2C.I2C_Data; Status : out HAL.I2C.I2C_Status; Timeout : Natural := 1000) is Idx : Natural := Data'First; begin if This.State = Reset then Status := HAL.I2C.Err_Error; return; elsif Data'Length = 0 then Status := HAL.I2C.Err_Error; return; end if; Wait_Flag (This, Busy, True, Timeout, Status); if Status /= HAL.I2C.Ok then Status := HAL.I2C.Busy; return; end if; if This.State /= Ready then Status := HAL.I2C.Busy; return; end if; This.State := Master_Busy_Tx; This.Periph.CR1.POS := False; Master_Request_Write (This, Addr, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Clear_Address_Sent_Status (This); while Idx <= Data'Last loop Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.DR.DR := Data (Idx); Idx := Idx + 1; if Flag_Status (This, Byte_Transfer_Finished) and then Idx <= Data'Last and then Status = HAL.I2C.Ok then This.Periph.DR.DR := Data (Idx); Idx := Idx + 1; end if; end loop; Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- Generate STOP This.Periph.CR1.STOP := True; This.State := Ready; end Master_Transmit; -------------------- -- Master_Receive -- -------------------- overriding procedure Master_Receive (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Data : out HAL.I2C.I2C_Data; Status : out HAL.I2C.I2C_Status; Timeout : Natural := 1000) is Idx : Natural := Data'First; begin if This.State = Reset then Status := HAL.I2C.Err_Error; return; elsif Data'Length = 0 then Status := HAL.I2C.Err_Error; return; end if; Wait_Flag (This, Busy, True, Timeout, Status); if Status /= HAL.I2C.Ok then Status := HAL.I2C.Busy; return; end if; if This.State /= Ready then Status := HAL.I2C.Busy; return; end if; This.State := Master_Busy_Rx; This.Periph.CR1.POS := False; Master_Request_Read (This, Addr, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; if Data'Length = 1 then -- Disable acknowledge This.Periph.CR1.ACK := False; Clear_Address_Sent_Status (This); This.Periph.CR1.STOP := True; elsif Data'Length = 2 then -- Disable acknowledge This.Periph.CR1.ACK := False; This.Periph.CR1.POS := True; Clear_Address_Sent_Status (This); else -- Automatic acknowledge This.Periph.CR1.ACK := True; Clear_Address_Sent_Status (This); end if; while Idx <= Data'Last loop if Idx = Data'Last then -- One UInt8 to read Wait_Flag (This, Rx_Data_Register_Not_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; elsif Idx + 1 = Data'Last then -- Two bytes to read This.Periph.CR1.ACK := False; Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.CR1.STOP := True; -- read the data from DR Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; elsif Idx + 2 = Data'Last then -- Three bytes to read Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.CR1.ACK := False; -- read the data from DR Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.CR1.STOP := True; -- read the data from DR Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; else -- One byte to read Wait_Flag (This, Rx_Data_Register_Not_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status = HAL.I2C.Ok then Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; end if; end if; end loop; This.State := Ready; end Master_Receive; --------------- -- Mem_Write -- --------------- overriding procedure Mem_Write (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size; Data : HAL.I2C.I2C_Data; Status : out HAL.I2C.I2C_Status; Timeout : Natural := 1000) is Idx : Natural := Data'First; begin if This.State = Reset then Status := HAL.I2C.Err_Error; return; elsif Data'Length = 0 then Status := HAL.I2C.Err_Error; return; end if; Wait_Flag (This, Busy, True, Timeout, Status); if Status /= HAL.I2C.Ok then Status := HAL.I2C.Busy; return; end if; if This.State /= Ready then Status := HAL.I2C.Busy; return; end if; This.State := Mem_Busy_Tx; This.Periph.CR1.POS := False; Mem_Request_Write (This, Addr, Mem_Addr, Mem_Addr_Size, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; while Idx <= Data'Last loop Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.DR.DR := Data (Idx); Idx := Idx + 1; if Flag_Status (This, Byte_Transfer_Finished) and then Idx <= Data'Last and then Status = HAL.I2C.Ok then This.Periph.DR.DR := Data (Idx); Idx := Idx + 1; end if; end loop; Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; -- Generate STOP This.Periph.CR1.STOP := True; This.State := Ready; end Mem_Write; -------------- -- Mem_Read -- -------------- overriding procedure Mem_Read (This : in out I2C_Port; Addr : HAL.I2C.I2C_Address; Mem_Addr : UInt16; Mem_Addr_Size : HAL.I2C.I2C_Memory_Address_Size; Data : out HAL.I2C.I2C_Data; Status : out HAL.I2C.I2C_Status; Timeout : Natural := 1000) is Idx : Natural := Data'First; begin if This.State = Reset then Status := HAL.I2C.Err_Error; return; elsif Data'Length = 0 then Status := HAL.I2C.Err_Error; return; end if; Wait_Flag (This, Busy, True, Timeout, Status); if Status /= HAL.I2C.Ok then Status := HAL.I2C.Busy; return; end if; if This.State /= Ready then Status := HAL.I2C.Busy; return; end if; This.State := Mem_Busy_Rx; This.Periph.CR1.POS := False; Mem_Request_Read (This, Addr, Mem_Addr, Mem_Addr_Size, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; if Data'Length = 1 then This.Periph.CR1.ACK := False; Clear_Address_Sent_Status (This); This.Periph.CR1.STOP := True; elsif Data'Length = 2 then This.Periph.CR1.ACK := False; This.Periph.CR1.POS := True; Clear_Address_Sent_Status (This); else -- Automatic acknowledge This.Periph.CR1.ACK := True; Clear_Address_Sent_Status (This); end if; while Idx <= Data'Last loop if Idx = Data'Last then -- One byte to read Wait_Flag (This, Rx_Data_Register_Not_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; elsif Idx + 1 = Data'Last then -- Two bytes to read This.Periph.CR1.ACK := False; Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.CR1.STOP := True; -- read the data from DR Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; elsif Idx + 2 = Data'Last then -- Three bytes to read Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.CR1.ACK := False; -- read the data from DR Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; This.Periph.CR1.STOP := True; -- read the data from DR Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; else -- One byte to read Wait_Flag (This, Rx_Data_Register_Not_Empty, False, Timeout, Status); if Status /= HAL.I2C.Ok then return; end if; Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; Wait_Flag (This, Byte_Transfer_Finished, False, Timeout, Status); if Status = HAL.I2C.Ok then Data (Idx) := This.Periph.DR.DR; Idx := Idx + 1; end if; end if; end loop; This.State := Ready; end Mem_Read; --------------- -- Set_State -- --------------- procedure Set_State (This : in out I2C_Port; Enabled : Boolean) is begin This.Periph.CR1.PE := Enabled; end Set_State; ------------------ -- Port_Enabled -- ------------------ function Port_Enabled (This : I2C_Port) return Boolean is begin return This.Periph.CR1.PE; end Port_Enabled; ---------------------- -- Enable_Interrupt -- ---------------------- procedure Enable_Interrupt (This : in out I2C_Port; Source : I2C_Interrupt) is begin case Source is when Error_Interrupt => This.Periph.CR2.ITERREN := True; when Event_Interrupt => This.Periph.CR2.ITEVTEN := True; when Buffer_Interrupt => This.Periph.CR2.ITBUFEN := True; end case; end Enable_Interrupt; ----------------------- -- Disable_Interrupt -- ----------------------- procedure Disable_Interrupt (This : in out I2C_Port; Source : I2C_Interrupt) is begin case Source is when Error_Interrupt => This.Periph.CR2.ITERREN := False; when Event_Interrupt => This.Periph.CR2.ITEVTEN := False; when Buffer_Interrupt => This.Periph.CR2.ITBUFEN := False; end case; end Disable_Interrupt; ------------- -- Enabled -- ------------- function Enabled (This : I2C_Port; Source : I2C_Interrupt) return Boolean is begin case Source is when Error_Interrupt => return This.Periph.CR2.ITERREN; when Event_Interrupt => return This.Periph.CR2.ITEVTEN; when Buffer_Interrupt => return This.Periph.CR2.ITBUFEN; end case; end Enabled; end STM32.I2C;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Examples Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2016-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 Servlet.Container_Initializers; with Servlet.Contexts; package Startup is type Servlet_Container_Initializer is limited new Servlet.Container_Initializers.Servlet_Container_Initializer with null record; overriding procedure On_Startup (Self : in out Servlet_Container_Initializer; Context : in out Servlet.Contexts.Servlet_Context'Class); end Startup;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ D I S P -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- This package contains routines involved in tagged types and dynamic -- dispatching. with Types; use Types; package Sem_Disp is procedure Check_Controlling_Formals (Typ : Entity_Id; Subp : Entity_Id); -- Check that all controlling parameters of Subp are of type Typ, -- that defaults for controlling parameters are tag-indeterminate, -- and that the nominal subtype of the parameters and result -- statically match the first subtype of the controlling type. procedure Check_Dispatching_Call (N : Node_Id); -- Check if a call is a dispatching call. The subprogram is known to -- be a dispatching operation. The call is dispatching if all the -- controlling actuals are dynamically tagged. This procedure is called -- after overload resolution, so the call is known to be unambiguous. procedure Check_Dispatching_Operation (Subp, Old_Subp : Entity_Id); -- Add "Subp" to the list of primitive operations of the corresponding type -- if it has a parameter of this type and is defined at a proper place for -- primitive operations (new primitives are only defined in package spec, -- overridden operation can be defined in any scope). If Old_Subp is not -- Empty we are in the overriding case. procedure Check_Operation_From_Incomplete_Type (Subp : Entity_Id; Typ : Entity_Id); -- If a primitive operation was defined for the incomplete view of the -- type, and the full type declaration is a derived type definition, -- the operation may override an inherited one. procedure Check_Operation_From_Private_View (Subp, Old_Subp : Entity_Id); -- Add "Old_Subp" to the list of primitive operations of the corresponding -- tagged type if it is the full view of a private tagged type. The Alias -- of "OldSubp" is adjusted to point to the inherited procedure of the -- full view because it is always this one which has to be called. function Find_Controlling_Arg (N : Node_Id) return Node_Id; -- Returns the actual controlling argument if N is dynamically tagged, -- and Empty if it is not dynamically tagged. function Find_Dispatching_Type (Subp : Entity_Id) return Entity_Id; -- Check whether a subprogram is dispatching, and find the tagged -- type of the controlling argument or arguments. function Is_Dynamically_Tagged (N : Node_Id) return Boolean; -- Used to determine whether a call is dispatching, i.e. if is an -- an expression of a class_Wide type, or a call to a function with -- controlling result where at least one operand is dynamically tagged. function Is_Tag_Indeterminate (N : Node_Id) return Boolean; -- An expression is tag-indeterminate if it is a call that dispatches -- on result, and all controlling operands are also indeterminate. -- Such a function call may inherit a tag from an enclosing call. procedure Override_Dispatching_Operation (Tagged_Type : Entity_Id; Prev_Op : Entity_Id; New_Op : Entity_Id); -- Replace an implicit dispatching operation with an explicit one. -- Prev_Op is an inherited primitive operation which is overridden -- by the explicit declaration of New_Op. procedure Propagate_Tag (Control : Node_Id; Actual : Node_Id); -- If a function call is tag-indeterminate, its controlling argument is -- found in the context; either an enclosing call, or the left-hand side -- of the enclosing assignment statement. The tag must be propagated -- recursively to the tag-indeterminate actuals of the call. end Sem_Disp;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-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.Touch_Panel is type TP_Touch_State is record X : Natural; Y : Natural; Weight : Natural; end record; Null_Touch_State : constant TP_Touch_State := (0, 0, 0); type Swap_State is new UInt3; Invert_X : constant Swap_State; Invert_Y : constant Swap_State; Swap_XY : constant Swap_State; subtype Touch_Identifier is Natural range 0 .. 10; type TP_State is array (Touch_Identifier range <>) of TP_Touch_State; type Touch_Panel_Device is limited interface; type Any_Touch_Panel is access all Touch_Panel_Device'Class; procedure Set_Bounds (This : in out Touch_Panel_Device; Width : Natural; Height : Natural; Swap : Swap_State) is abstract; -- Set screen bounds. Touch_State must should stay within screen bounds function Active_Touch_Points (This : in out Touch_Panel_Device) return Touch_Identifier is abstract; -- Retrieve the number of active touch points function Get_Touch_Point (This : in out Touch_Panel_Device; Touch_Id : Touch_Identifier) return TP_Touch_State is abstract; -- Retrieves the position and pressure information of the specified -- touch function Get_All_Touch_Points (This : in out Touch_Panel_Device) return TP_State is abstract; -- Retrieves the position and pressure information of every active touch -- points private Invert_X : constant Swap_State := 2#001#; Invert_Y : constant Swap_State := 2#010#; Swap_XY : constant Swap_State := 2#100#; end HAL.Touch_Panel;
-- Copyright 2012-2014 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 Pck; use Pck; procedure Foo is Full : Full_Table := (False, True, False, True, False); begin Do_Nothing (Full'Address); -- STOP end Foo;
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- A S I S . E X T E N S I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1995-2012, Free Software Foundation, Inc. -- -- -- -- ASIS-for-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 -- -- Software Foundation; either version 2, or (at your option) any later -- -- version. ASIS-for-GNAT is distributed in the hope that it will be use- -- -- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- -- -- CHANTABILITY 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 ASIS-for-GNAT; see file -- -- COPYING. If not, write to the Free Software Foundation, 51 Franklin -- -- Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the -- -- Software Engineering Laboratory of the Swiss Federal Institute of -- -- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the -- -- Scientific Research Computer Center of Moscow State University (SRCC -- -- MSU), Russia, with funding partially provided by grants from the Swiss -- -- National Science Foundation and the Swiss Academy of Engineering -- -- Sciences. ASIS-for-GNAT is now maintained by AdaCore -- -- (http://www.adacore.com). -- -- -- ------------------------------------------------------------------------------ with Ada.Characters.Handling; use Ada.Characters.Handling; with GNAT.Directory_Operations; use GNAT.Directory_Operations; with Asis.Compilation_Units; use Asis.Compilation_Units; with Asis.Declarations; use Asis.Declarations; with Asis.Definitions; use Asis.Definitions; with Asis.Errors; use Asis.Errors; with Asis.Exceptions; use Asis.Exceptions; with Asis.Expressions; use Asis.Expressions; with Asis.Statements; use Asis.Statements; with Asis.Set_Get; use Asis.Set_Get; with A4G.A_Debug; use A4G.A_Debug; with A4G.A_Opt; use A4G.A_Opt; with A4G.A_Sem; use A4G.A_Sem; with A4G.A_Sinput; use A4G.A_Sinput; with A4G.Contt; use A4G.Contt; with A4G.Contt.TT; use A4G.Contt.TT; with A4G.Contt.UT; use A4G.Contt.UT; with A4G.DDA_Aux; use A4G.DDA_Aux; with A4G.Decl_Sem; use A4G.Decl_Sem; with A4G.Asis_Tables; use A4G.Asis_Tables; with A4G.Expr_Sem; use A4G.Expr_Sem; with A4G.GNAT_Int; use A4G.GNAT_Int; with A4G.Mapping; use A4G.Mapping; with A4G.Queries; use A4G.Queries; with A4G.Vcheck; use A4G.Vcheck; with Atree; use Atree; with Einfo; use Einfo; with Elists; use Elists; with Namet; use Namet; with Nlists; use Nlists; with Output; use Output; with Sinfo; use Sinfo; with Sinput; use Sinput; with Snames; use Snames; with Stand; use Stand; with Stringt; use Stringt; with Uintp; use Uintp; with Urealp; use Urealp; package body Asis.Extensions is Package_Name : constant String := "Asis.Extensions."; ----------------------- -- Local subprograms -- ----------------------- function Is_Typeless_Subaggregate (Aggr : Node_Id) return Boolean; -- Checks if Aggr represents an inner typeless subaggregate of -- multi-dimensional array aggregate. A caller is responsible for providing -- only nodes that represents components of array aggregates as actuals. function Is_Expanded_Subprogram (N : Node_Id) return Boolean; -- Checks if N corresponds to the spec of an expanded generic -- subprogram. Is needed because Comes_From_Source in this case is -- set OFF (opposite to expanded packages) function Is_Type_Operator (Op_Decl : Asis.Element; Type_Decl : Asis.Element) return Boolean; -- Checks if Op_Decl declares an operator function having a parameter -- or a result of the type Type_Decl (Type_Decl is supposed to be a type -- declaration name). Returns False for a function body if the body has -- the separate spec function Overrides_Type_Operator (Op_Decl : Asis.Element; Type_Decl : Asis.Element) return Boolean; -- Provided that Is_Type_Operator (Op_Decl, Type_Decl) is True (note, -- that this function does not check this, it should be checked by the -- caller), checks if Op_Decl overrides a predefined or inherited -- operator function that exists for Type_Decl function Is_From_Import_Procedure_Pragma (N : Node_Id) return Boolean; -- Checks a specific situation for an identifier specific to a pragma for -- GNAT-specific pragmas Import_Procedure and Import_Valued_Procedure - -- for components of MECHANISM_NAME having the form of A (B). function Get_LF_From_Ureal (U : Ureal) return Long_Long_Float; -- Converts universal real into Long_Float. This is a quick-and-dirty -- solution for extending Static_Expression_Value_Image for real image, -- it may blow up in case if numerator or denominator is too big. The -- conversion does some arbitrary rounding (I believe this rounding is -- reasonable, but I have no proof of this) pragma Unreferenced (Get_LF_From_Ureal); function Get_Implemented_Op (Op_Decl : Asis.Element; Type_Def : Asis.Element) return Asis.Element; pragma Unreferenced (Get_Implemented_Op); -- Op_Decl is supposed to be a declaration of a dispatching operation for -- that Is_Overriding_Operation is true. Type_Def is supposed to be an -- interface type definition for some interface type that is included in -- the interface list of the definition of the type that is the type -- of dispatching operand(s) of Op_Decl. This function checks if Op_Decl -- may implement some operation of this interface, and if it may returns -- the declaration of this interface operation as a result, otherwise it -- returns Nil_Element. function Is_Procedure (Decl : Asis.Element) return Boolean; pragma Unreferenced (Is_Procedure); -- Checks that Decl declares a procedure ------------------ -- Acts_As_Spec -- ------------------ function Acts_As_Spec (Declaration : Asis.Element) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration); Arg_Node : Node_Id; Name_Node : Node_Id; Spec_Node : Node_Id; Arg_Ekind : Entity_Kind; Result : Boolean := False; begin Check_Validity (Declaration, Package_Name & "Acts_As_Spec"); Arg_Node := Node (Declaration); case Arg_Kind is when A_Procedure_Body_Declaration | A_Function_Body_Declaration => Result := Acts_As_Spec (Arg_Node); -- The problem here is that for some subprogram bodies the -- front-end creates artificial specs and sets OFF the -- Acts_As_Spec flag for the body. At the moment we have detected -- two such situations (and we exclude the case of expanded -- subprogram body not to mix up with the similar situation in -- the tree, see : if not Result and then Special_Case (Declaration) /= Expanded_Subprogram_Instantiation then -- (1) Bodies declared immediately within protected bodies if Nkind (Parent (Arg_Node)) = N_Protected_Body then Spec_Node := Corresponding_Spec (Arg_Node); if Is_Artificial_Protected_Op_Item_Spec (Spec_Node) then Result := True; end if; else -- (2) child subprogram bodies with no separate spec Name_Node := Defining_Unit_Name (Specification (Arg_Node)); if Nkind (Name_Node) = N_Defining_Program_Unit_Name then Arg_Node := Corresponding_Spec (Arg_Node); if Present (Arg_Node) then while not (Nkind (Arg_Node) = N_Subprogram_Declaration or else Nkind (Arg_Node) = N_Generic_Subprogram_Declaration) loop Arg_Node := Parent (Arg_Node); end loop; Result := not Comes_From_Source (Arg_Node); end if; end if; end if; end if; when A_Procedure_Body_Stub | A_Function_Body_Stub => Arg_Ekind := Ekind (Defining_Unit_Name (Specification (Arg_Node))); Result := Arg_Ekind = E_Function or else Arg_Ekind = E_Procedure; when An_Expression_Function_Declaration => if Is_Part_Of_Inherited (Declaration) then Result := True; else Result := Nkind (R_Node (Declaration)) = N_Subprogram_Declaration; end if; when others => null; end case; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Acts_As_Spec"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Acts_As_Spec", Ex => Ex, Arg_Element => Declaration); end Acts_As_Spec; ------------------------------ -- Compilation_Dependencies -- ------------------------------ function Compilation_Dependencies (Main_Unit : Asis.Compilation_Unit) return Asis.Compilation_Unit_List is Arg_Kind : constant Asis.Unit_Kinds := Kind (Main_Unit); Arg_Unit_Id : Unit_Id; Res_Cont_Id : Context_Id; begin Check_Validity (Main_Unit, Package_Name & "Compilation_Dependencies"); if Arg_Kind not in A_Procedure .. A_Protected_Body_Subunit then Raise_ASIS_Inappropriate_Compilation_Unit (Diagnosis => Package_Name & "Compilation_Dependencies"); end if; Res_Cont_Id := Encl_Cont_Id (Main_Unit); Reset_Context (Res_Cont_Id); Arg_Unit_Id := Get_Unit_Id (Main_Unit); declare Result_Id_List : constant Unit_Id_List := GNAT_Compilation_Dependencies (Arg_Unit_Id); Result_List : constant Compilation_Unit_List := Get_Comp_Unit_List (Result_Id_List, Res_Cont_Id); begin if Is_Nil (Result_List) then Raise_ASIS_Inappropriate_Compilation_Unit (Diagnosis => Package_Name & "Compilation_Dependencies"); else return Result_List; end if; end; exception when ASIS_Inappropriate_Compilation_Unit => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Outer_Call => Package_Name & "Compilation_Dependencies"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Compilation_Dependencies", Ex => Ex, Arg_CU => Main_Unit); end Compilation_Dependencies; ------------- -- Compile -- ------------- procedure Compile (Source_File : String_Access; Args : Argument_List; Success : out Boolean; GCC : String_Access := null; Use_GNATMAKE : Boolean := False; Use_Temp_Prj : Boolean := False; Compiler_Out : String := ""; All_Warnings_Off : Boolean := True; Display_Call : Boolean := False) is Comp_Args : Argument_List (Args'First .. Args'Last + 12 + 1); First_Idx : constant Integer := Comp_Args'First; Last_Idx : Integer := First_Idx; Obj_Name : String_Access; Dot_Idx : Natural; Is_GNAAMP_Call : Boolean := False; -- In case of the call to GNAAMP we should not set '-x ada' flags Is_GNATMAKE_Call : Boolean := Use_GNATMAKE; begin if Is_GNATMAKE_Call and then GCC = null then -- We can not set gnatmake-specific parameters in this case Is_GNATMAKE_Call := False; end if; if GCC /= null then declare -- ??? What an awful code! Name : constant String := To_Lower (Base_Name (GCC.all)); Dot_Idx : Positive := Name'Last; begin for J in reverse Name'Range loop if Name (J) = '.' then Dot_Idx := J - 1; exit; end if; end loop; if Name (Name'First .. Dot_Idx) = "gnaamp" then Is_GNAAMP_Call := True; end if; end; end if; Comp_Args (Last_Idx) := Comp_Flag; Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GNAT_Flag_ct; Last_Idx := Last_Idx + 1; if Is_GNATMAKE_Call then Comp_Args (Last_Idx) := GNATMAKE_Flag_u; Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GNATMAKE_Flag_f; Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GNATMAKE_Flag_q; Last_Idx := Last_Idx + 1; elsif not Is_GNAAMP_Call then Comp_Args (Last_Idx) := GCC_Flag_X; Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GCC_Par_Ada; Last_Idx := Last_Idx + 1; end if; for J in Args'Range loop Comp_Args (Last_Idx) := Args (J); Last_Idx := Last_Idx + 1; end loop; if All_Warnings_Off then Comp_Args (Last_Idx) := GNAT_Flag_ws; Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GNAT_Flag_yN; Last_Idx := Last_Idx + 1; end if; Comp_Args (Last_Idx) := Source_File; if Is_GNATMAKE_Call and then not Use_Temp_Prj then Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GNATMAKE_Flag_cargs; Last_Idx := Last_Idx + 1; Comp_Args (Last_Idx) := GCC_Flag_o; Last_Idx := Last_Idx + 1; Obj_Name := new String'(Base_Name (Source_File.all)); Dot_Idx := Obj_Name'Last; for J in reverse Obj_Name'Range loop if Obj_Name (J) = '.' then Dot_Idx := J - 1; exit; end if; end loop; Comp_Args (Last_Idx) := new String' (Get_Current_Dir & Directory_Separator & Obj_Name (Obj_Name'First .. Dot_Idx) & ".o"); end if; Success := Execute (GCC, Comp_Args (Args'First .. Last_Idx), Compiler_Out, Display_Call => Display_Call); end Compile; ---------------- -- Components -- ---------------- function Components (E : Asis.Element) return Asis.Element_List is Child_Access : constant Query_Array := Appropriate_Queries (E); Result_Length : Integer := 0; begin Check_Validity (E, Package_Name & "Components"); if Is_Nil (E) then return Nil_Element_List; end if; -- first, we compute the result's length: for Each_Query in Child_Access'Range loop case Child_Access (Each_Query).Query_Kind is when Bug => null; when Single_Element_Query => if not Is_Nil (Child_Access (Each_Query).Func_Simple (E)) then Result_Length := Result_Length + 1; end if; when Element_List_Query => declare Child_List : constant Asis.Element_List := Child_Access (Each_Query).Func_List (E); begin Result_Length := Result_Length + Child_List'Length; end; when Element_List_Query_With_Boolean => declare Child_List : constant Asis.Element_List := Child_Access (Each_Query).Func_List_Boolean (E, Child_Access (Each_Query).Bool); begin Result_Length := Result_Length + Child_List'Length; end; end case; end loop; -- and now, we define the result element list of Result_Length -- length and fill it in by repeating the same loop. This is -- not effective, and this will have to be revised. if Result_Length = 0 then return Nil_Element_List; end if; declare Result_List : Asis.Element_List (1 .. Result_Length); Next_Element : Integer := 1; begin for Each_Query in Child_Access'Range loop case Child_Access (Each_Query).Query_Kind is when Bug => null; when Single_Element_Query => if not Is_Nil (Child_Access (Each_Query).Func_Simple (E)) then Result_List (Next_Element) := Child_Access (Each_Query).Func_Simple (E); Next_Element := Next_Element + 1; end if; when Element_List_Query => declare Child_List : constant Asis.Element_List := Child_Access (Each_Query).Func_List (E); begin for I in Child_List'First .. Child_List'Last loop Result_List (Next_Element) := Child_List (I); Next_Element := Next_Element + 1; end loop; end; when Element_List_Query_With_Boolean => declare Child_List : constant Asis.Element_List := Child_Access (Each_Query).Func_List_Boolean (E, Child_Access (Each_Query).Bool); begin for I in Child_List'First .. Child_List'Last loop Result_List (Next_Element) := Child_List (I); Next_Element := Next_Element + 1; end loop; end; end case; end loop; return Result_List; end; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => E, Outer_Call => Package_Name & "Components"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Components", Ex => Ex, Arg_Element => E); end Components; ----------------------------------------------- -- Corresponding_Body_Parameter_Definition -- ----------------------------------------------- function Corresponding_Body_Parameter_Definition (Defining_Name : Asis.Defining_Name) return Asis.Defining_Name is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Defining_Name); Encl_Constr : Asis.Element; Encl_Constr_Kind : Internal_Element_Kinds; Result : Asis.Element := Nil_Element; begin Check_Validity (Defining_Name, Package_Name & "Corresponding_Body_Parameter_Definition"); if Arg_Kind /= A_Defining_Identifier then Raise_ASIS_Inappropriate_Element (Package_Name & "Corresponding_Body_Parameter_Definition", Wrong_Kind => Arg_Kind); end if; Encl_Constr := Enclosing_Element (Defining_Name); if Declaration_Kind (Encl_Constr) not in A_Formal_Declaration then Encl_Constr := (Enclosing_Element (Encl_Constr)); end if; Encl_Constr_Kind := Int_Kind (Encl_Constr); case Encl_Constr_Kind is when A_Procedure_Body_Declaration | A_Function_Body_Declaration => Result := Defining_Name; when A_Procedure_Body_Stub | A_Function_Body_Stub => Encl_Constr := Corresponding_Subunit (Encl_Constr); when A_Procedure_Declaration | A_Function_Declaration | A_Generic_Function_Declaration | A_Generic_Procedure_Declaration => Encl_Constr := Corresponding_Body (Encl_Constr); Encl_Constr_Kind := Int_Kind (Encl_Constr); if Encl_Constr_Kind = A_Procedure_Body_Stub or else Encl_Constr_Kind = A_Function_Body_Stub then Encl_Constr := Corresponding_Subunit (Encl_Constr); elsif Encl_Constr_Kind = An_Import_Pragma then Encl_Constr := Nil_Element; end if; when others => -- For all the other situations we can not return a parameter -- definition in the body Encl_Constr := Nil_Element; end case; if not Is_Nil (Result) or else Is_Nil (Encl_Constr) or else Declaration_Kind (Encl_Constr) = Not_A_Declaration then return Result; end if; Process_Parameter_Specifications : declare Def_Name_Image : constant String := To_Lower (To_String (Defining_Name_Image (Defining_Name))); Param_Specs : constant Asis.Element_List := Parameter_Profile (Encl_Constr); begin Through_Parameter_Specs : for I in Param_Specs'Range loop Process_Parameter_Names : declare Par_Names : constant Asis.Element_List := Names (Param_Specs (I)); begin Through_Parameter_Names : for J in Par_Names'Range loop if Def_Name_Image = To_Lower (To_String (Defining_Name_Image (Par_Names (J)))) then Result := Par_Names (J); exit Through_Parameter_Specs; end if; end loop Through_Parameter_Names; end Process_Parameter_Names; end loop Through_Parameter_Specs; end Process_Parameter_Specifications; pragma Assert (not Is_Nil (Result)); return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Defining_Name, Outer_Call => Package_Name & "Corresponding_Body_Parameter_Definition"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_Body_Parameter_Definition", Ex => Ex, Arg_Element => Defining_Name); end Corresponding_Body_Parameter_Definition; ----------------------------------------- -- Corresponding_Called_Entity_Unwound -- ----------------------------------------- function Corresponding_Called_Entity_Unwound (Statement : Asis.Statement) return Asis.Declaration is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Statement); Arg_Node : Node_Id; Arg_Node_Kind : Node_Kind; Result_Node : Node_Id; Result_Unit : Compilation_Unit; Res_Spec_Case : Special_Cases := Not_A_Special_Case; begin Check_Validity (Statement, Package_Name & "Corresponding_Called_Entity_Unwound"); if not (Arg_Kind = An_Entry_Call_Statement or else Arg_Kind = A_Procedure_Call_Statement) then Raise_ASIS_Inappropriate_Element (Package_Name & "Corresponding_Called_Entity_Unwound", Wrong_Kind => Arg_Kind); end if; -- the implementation approach is similar to the approach taken for -- Asis.Expressions.Corresponding_Called_Function Arg_Node := R_Node (Statement); -- To be on the safe side, we use R_Node instead of Node, but it looks -- like in this case R_Node and Node should be the same Arg_Node_Kind := Nkind (Arg_Node); case Arg_Node_Kind is when N_Attribute_Reference => return Nil_Element; -- call to a procedure-attribute when N_Entry_Call_Statement | N_Procedure_Call_Statement => -- here we have to filter out the case when Nil_Element -- should be returned for a call through access-to-function: if Nkind (Sinfo.Name (Arg_Node)) = N_Explicit_Dereference then return Nil_Element; end if; -- ??? <tree problem 4> -- this fragment should be revised when the problem is fixed (as it should) if Arg_Node_Kind = N_Entry_Call_Statement then Result_Node := Sinfo.Name (Arg_Node); -- Result_Node points to the name of the called entry if Nkind (Result_Node) = N_Indexed_Component then -- this is the case for a call to an entry from an -- entry family Result_Node := Prefix (Result_Node); end if; Result_Node := Entity (Selector_Name (Result_Node)); else Result_Node := Entity (Sinfo.Name (Arg_Node)); -- only this assignment is needed if tree problem 4 is -- fixed end if; -- ??? <tree problem 4> - end when others => pragma Assert (False); null; end case; Result_Node := Unwind_Renaming (Result_Node); if No (Result_Node) then -- renaming of a procedure-attribute return Nil_Element; end if; if not Comes_From_Source (Result_Node) then return Nil_Element; end if; Result_Unit := Enclosing_Unit (Encl_Cont_Id (Statement), Result_Node); -- if not Is_Consistent (Result_Unit, Encl_Unit (Statement)) then -- return Nil_Element; -- end if; -- And now - from a defining name to a declaration itself Result_Node := Parent (Result_Node); if Nkind (Result_Node) in N_Function_Specification .. N_Procedure_Specification then Result_Node := Parent (Result_Node); end if; if Is_Expanded_Subprogram (Result_Node) then Res_Spec_Case := Expanded_Subprogram_Instantiation; end if; return Node_To_Element_New (Node => Result_Node, Spec_Case => Res_Spec_Case, In_Unit => Result_Unit); exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Statement, Outer_Call => Package_Name & "Corresponding_Called_Entity_Unwound"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_Called_Entity_Unwound", Ex => Ex, Arg_Element => Statement); end Corresponding_Called_Entity_Unwound; ------------------------------------------- -- Corresponding_Called_Function_Unwound -- ------------------------------------------- function Corresponding_Called_Function_Unwound (Expression : Asis.Expression) return Asis.Declaration is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Expression); Arg_Node : Node_Id; Arg_Node_Kind : Node_Kind; Result_Node : Node_Id; Result_Unit : Compilation_Unit; Res_Spec_Case : Special_Cases := Not_A_Special_Case; begin Check_Validity (Expression, Package_Name & "Corresponding_Called_Function_Unwound"); if not (Arg_Kind = A_Function_Call) then Raise_ASIS_Inappropriate_Element (Package_Name & "Corresponding_Called_Function_Unwound", Wrong_Kind => Arg_Kind); end if; -- first, we have to filter out the cases when a Nil_Element -- should be returned. For now, these cases include: -- -- - calls to functions-attributes; -- - all forms of calls to predefined operators; -- - all forms of calls to inherited functions -- -- We hope to implement the last case in future... -- First, we try the simplest approach, and then we will add patches -- if needed: Arg_Node := R_Node (Expression); Arg_Node_Kind := Nkind (Arg_Node); -- Rewritten node should know everything. But if this node is the -- result of compile-time optimization, we have to work with -- original node only: if Arg_Node_Kind = N_String_Literal or else Arg_Node_Kind = N_Integer_Literal or else Arg_Node_Kind = N_Real_Literal or else Arg_Node_Kind = N_Character_Literal or else Arg_Node_Kind = N_Raise_Constraint_Error or else Arg_Node_Kind = N_Identifier then Arg_Node := Node (Expression); Arg_Node_Kind := Nkind (Arg_Node); elsif Arg_Node_Kind = N_Explicit_Dereference then -- See F727-023 Arg_Node := Sinfo.Prefix (Arg_Node); Arg_Node_Kind := Nkind (Arg_Node); end if; case Arg_Node_Kind is when N_Attribute_Reference => return Nil_Element; when N_Function_Call | N_Procedure_Call_Statement => -- The second choice here corresponds to a procedure that is an -- argument of Debug pragma -- here we have to filter out the case when Nil_Element -- should be returned for a call through access-to-function: if Nkind (Sinfo.Name (Arg_Node)) = N_Explicit_Dereference then return Nil_Element; else Result_Node := Entity (Sinfo.Name (Arg_Node)); end if; when N_Op => -- all the predefined operations (??) Result_Node := Entity (Arg_Node); when others => pragma Assert (False); null; end case; -- here we have Result_Node pointed to the defining occurrence of -- the corresponding called function. Three things should be done: -- 1. If Result_Node is defined in a renaming definition, we have -- to unwind all the renamings till the defining occurrence of -- the corresponding callable entity will be reached; -- 2. If a given callable entity is implicitly defined, Nil_Element -- should be returned; -- 3. We have to come from a defining name to the corresponding -- declaration and then we should return the Element -- corresponding to this declaration Result_Node := Unwind_Renaming (Result_Node); if No (Result_Node) then -- renaming of a function-attribute return Nil_Element; end if; -- here we have Result_Node pointing to the defining occurrence of the -- name of the corresponding called function. First, we have to -- filter out implicitly declared functions: if not Comes_From_Source (Result_Node) then return Nil_Element; end if; Result_Unit := Enclosing_Unit (Encl_Cont_Id (Expression), Result_Node); Result_Node := Parent (Result_Node); if Nkind (Result_Node) = N_Defining_Program_Unit_Name then Result_Node := Parent (Result_Node); end if; Result_Node := Parent (Result_Node); -- to go from a defining name to a declaration itself if Is_Expanded_Subprogram (Result_Node) then Res_Spec_Case := Expanded_Subprogram_Instantiation; end if; return Node_To_Element_New (Node => Result_Node, Spec_Case => Res_Spec_Case, In_Unit => Result_Unit); exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Expression, Outer_Call => Package_Name & "Corresponding_Called_Function_Unwound"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_Called_Function_Unwound", Ex => Ex, Arg_Element => Expression); end Corresponding_Called_Function_Unwound; ------------------------------------ -- Corresponding_First_Definition -- ------------------------------------ function Corresponding_First_Definition (Defining_Name : Asis.Defining_Name) return Asis.Defining_Name is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Defining_Name); Is_Parameter : Boolean := False; Encl_Constr : Asis.Element; Encl_Constr_Kind : Internal_Element_Kinds; First_Declaration : Asis.Element; Result : Asis.Element := Nil_Element; begin Check_Validity (Defining_Name, Package_Name & "Corresponding_First_Definition"); if Arg_Kind not in Internal_Defining_Name_Kinds then Raise_ASIS_Inappropriate_Element (Package_Name & "Corresponding_First_Definition", Wrong_Kind => Arg_Kind); end if; Encl_Constr := Enclosing_Element (Defining_Name); if Int_Kind (Encl_Constr) = A_Parameter_Specification then Encl_Constr := Enclosing_Element (Encl_Constr); Is_Parameter := True; end if; if Is_Subunit (Encl_Constr) then Encl_Constr := Corresponding_Body_Stub (Encl_Constr); end if; Encl_Constr_Kind := Int_Kind (Encl_Constr); case Encl_Constr_Kind is when A_Procedure_Body_Declaration | A_Function_Body_Declaration | A_Function_Renaming_Declaration | A_Procedure_Renaming_Declaration | A_Procedure_Body_Stub | A_Function_Body_Stub => if ((Encl_Constr_Kind = A_Procedure_Body_Declaration or else Encl_Constr_Kind = A_Function_Body_Declaration or else Encl_Constr_Kind = A_Procedure_Body_Stub or else Encl_Constr_Kind = A_Function_Body_Stub) and then (not (Acts_As_Spec (Encl_Constr)))) or else ((Encl_Constr_Kind = A_Function_Renaming_Declaration or else Encl_Constr_Kind = A_Procedure_Renaming_Declaration) and then Is_Renaming_As_Body (Encl_Constr)) then -- there should be a corresponding spec where the first -- definition should be: if Is_Subunit (Encl_Constr) then Encl_Constr := Corresponding_Body_Stub (Encl_Constr); end if; First_Declaration := Corresponding_Declaration (Encl_Constr); if not Is_Parameter then -- just returning a defining name from a declaration, -- otherwise Result will remain nil, and we will have -- to process the case of a formal parameter after this -- case statement Result := Names (First_Declaration) (1); end if; else Result := Defining_Name; end if; when A_Package_Body_Declaration | A_Task_Body_Declaration | A_Protected_Body_Declaration | A_Package_Body_Stub | A_Task_Body_Stub | A_Protected_Body_Stub | An_Entry_Body_Declaration => First_Declaration := Corresponding_Declaration (Encl_Constr); if not Is_Parameter then Result := Names (First_Declaration) (1); end if; when An_Accept_Statement => First_Declaration := Corresponding_Entry (Encl_Constr); when An_Ordinary_Type_Declaration => Result := Corresponding_Type_Declaration (Encl_Constr); if Is_Nil (Result) then -- Encl_Constr is not a completion of an incomplete or -- private type declaration Result := Defining_Name; else Result := Names (Result) (1); end if; when others => Result := Defining_Name; end case; if Is_Nil (Result) then -- here we have to compute the first definition of the formal -- parameter in a subprogram spec/entry declaration Process_Parameter_Specifications : declare Def_Name_Image : constant String := To_Lower (To_String (Defining_Name_Image (Defining_Name))); Param_Specs : constant Asis.Element_List := Parameter_Profile (First_Declaration); begin Through_Parameter_Specs : for I in Param_Specs'Range loop Process_Parameter_Names : declare Par_Names : constant Asis.Element_List := Names (Param_Specs (I)); begin Through_Parameter_Names : for J in Par_Names'Range loop if Def_Name_Image = To_Lower (To_String (Defining_Name_Image (Par_Names (J)))) then Result := Par_Names (J); exit Through_Parameter_Specs; end if; end loop Through_Parameter_Names; end Process_Parameter_Names; end loop Through_Parameter_Specs; end Process_Parameter_Specifications; end if; pragma Assert (not Is_Nil (Result)); return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Defining_Name, Outer_Call => Package_Name & "Corresponding_First_Definition"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_First_Definition", Ex => Ex, Arg_Element => Defining_Name); end Corresponding_First_Definition; ---------------------------------------- -- Corresponding_Overridden_Operation -- ---------------------------------------- function Corresponding_Overridden_Operation (Declaration : Asis.Declaration) return Asis.Declaration is Result : Asis.Element := Nil_Element; Result_Unit : Compilation_Unit; Result_Node : Node_Id; Inherited : Boolean := False; Association_Type : Node_Id; begin Check_Validity (Declaration, Package_Name & "Corresponding_Overridden_Operation"); case Declaration_Kind (Declaration) is when A_Procedure_Declaration | A_Function_Declaration | A_Procedure_Instantiation | A_Function_Instantiation | A_Procedure_Body_Declaration | A_Null_Procedure_Declaration | A_Function_Body_Declaration | A_Procedure_Renaming_Declaration | A_Function_Renaming_Declaration => null; when others => Raise_ASIS_Inappropriate_Element (Diagnosis => Package_Name & "Corresponding_Overridden_Operation", Wrong_Kind => Int_Kind (Declaration)); end case; if Is_Overriding_Operation (Declaration) then if Declaration_Kind (Declaration) in A_Procedure_Instantiation .. A_Function_Instantiation then Result_Node := Specification (Instance_Spec (Node (Declaration))); Result_Node := Related_Instance (Defining_Unit_Name (Result_Node)); else Result_Node := Defining_Unit_Name (Specification (Node (Declaration))); end if; Result_Node := Overridden_Operation (Result_Node); Inherited := not Comes_From_Source (Result_Node); if Inherited then Association_Type := Result_Node; Result_Node := Explicit_Parent_Subprogram (Result_Node); Result_Unit := Enclosing_Unit (Encl_Cont_Id (Declaration), Association_Type); Result := Node_To_Element_New (Node => Result_Node, Node_Field_1 => Association_Type, Inherited => True, In_Unit => Result_Unit); if Is_From_Instance (Association_Type) then Set_From_Instance (Result, True); else Set_From_Instance (Result, False); end if; else Result_Unit := Enclosing_Unit (Encl_Cont_Id (Declaration), Result_Node); Result := Node_To_Element_New (Node => Result_Node, In_Unit => Result_Unit); end if; Result := Enclosing_Element (Result); if Special_Case (Result) = Expanded_Subprogram_Instantiation then Result := Enclosing_Element (Result); end if; end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Corresponding_Overridden_Operation"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_Overridden_Operation", Ex => Ex, Arg_Element => Declaration); end Corresponding_Overridden_Operation; ----------------------------------------- -- Corresponding_Overridden_Operations -- ----------------------------------------- -- UNDER CONSTRUCTION!!! pragma Warnings (Off); function Corresponding_Overridden_Operations (Declaration : Asis.Declaration) return Asis.Element_List is Type_Def : Asis.Element; Tmp_El : Asis.Element; Result : Asis.Element := Nil_Element; Arg_Node : Entity_Id; Prim_Elmt : Elmt_Id; Prim_Node : Entity_Id; Res_Node : Node_Id; begin Check_Validity (Declaration, Package_Name & "Corresponding_Overridden_Operations"); case Declaration_Kind (Declaration) is when A_Procedure_Declaration | A_Function_Declaration | A_Procedure_Instantiation | A_Function_Instantiation | A_Procedure_Body_Declaration | A_Function_Body_Declaration | A_Null_Procedure_Declaration | A_Procedure_Renaming_Declaration | A_Function_Renaming_Declaration => null; when others => Raise_ASIS_Inappropriate_Element (Diagnosis => Package_Name & "Corresponding_Overridden_Operations", Wrong_Kind => Int_Kind (Declaration)); end case; if not Is_Overriding_Operation (Declaration) then return Nil_Element_List; end if; -- Simple case: single inheritance: Type_Def := Primitive_Owner (Declaration); if Is_Nil (Definition_Interface_List (Type_Def)) then return (1 => Corresponding_Overridden_Operation (Declaration)); end if; -- General case - multiple inheritance Asis_Element_Table.Init; Tmp_El := First_Name (Declaration); Arg_Node := R_Node (Tmp_El); Tmp_El := First_Name (Enclosing_Element (Type_Def)); Prim_Elmt := First_Elmt (Primitive_Operations (R_Node (Tmp_El))); Prim_Node := Node (Prim_Elmt); while Present (Prim_Elmt) loop -- Check if Prim_Node corresponds to overridden primitive: if Present (Interface_Alias (Prim_Node)) and then Alias (Prim_Node) = Arg_Node then Res_Node := Interface_Alias (Prim_Node); -- ??? -- !!! Here we have to form the element representing overridden -- subprogram and to add it to Asis_Element_Table end if; Prim_Elmt := Next_Elmt (Prim_Elmt); Prim_Node := Node (Prim_Elmt); end loop; -- ??? Asis_Element_Table.Append (Corresponding_Overridden_Operation (Declaration)); return Asis.Declaration_List (Asis_Element_Table.Table (1 .. Asis_Element_Table.Last)); exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Corresponding_Overridden_Operations"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_Overridden_Operations", Ex => Ex, Arg_Element => Declaration); end Corresponding_Overridden_Operations; pragma Warnings (On); -- function Corresponding_Overridden_Operations -- (Declaration : Asis.Declaration) -- return Asis.Element_List -- is -- Type_Def : Asis.Element; -- Result : Asis.Element := Nil_Element; -- begin -- Check_Validity (Declaration, -- Package_Name & "Corresponding_Overridden_Operations"); -- case Declaration_Kind (Declaration) is -- when A_Procedure_Declaration | -- A_Function_Declaration | -- A_Procedure_Instantiation | -- A_Function_Instantiation | -- A_Procedure_Body_Declaration | -- A_Function_Body_Declaration | -- A_Procedure_Renaming_Declaration | -- A_Function_Renaming_Declaration => -- null; -- when others => -- Raise_ASIS_Inappropriate_Element -- (Diagnosis => Package_Name & -- "Corresponding_Overridden_Operations"); -- end case; -- if not Is_Overriding_Operation (Declaration) then -- return Nil_Element_List; -- end if; -- -- Simple case: single inheritance: -- Type_Def := Primitive_Owner (Declaration); -- if Is_Nil (Definition_Interface_List (Type_Def)) then -- return (1 => Corresponding_Overridden_Operation (Declaration)); -- end if; -- -- General case - multiple inheritance -- declare -- Interfaces : Asis.Element_List := -- Definition_Interface_List (Type_Def); -- Start_From : Positive := Interfaces'First; -- begin -- Asis_Element_Table.Init; -- Result := Corresponding_Overridden_Operation (Declaration); -- Asis_Element_Table.Append (Result); -- Type_Def := Primitive_Owner (Declaration); -- -- First, replace each interface name in Interfaces with the -- -- corresponding type definition and check if we may start further -- -- processing not from the first interface in the list -- for J in Interfaces'Range loop -- Interfaces (J) := -- Type_Declaration_View -- (Corresponding_Name_Definition -- (Normalize_Reference (Interfaces (J)))); -- if Is_Equal (Interfaces (J), Type_Def) then -- Start_From := J + 1; -- end if; -- end loop; -- for J in Start_From .. Interfaces'Last loop -- Result := Get_Implemented_Op (Declaration, Interfaces (J)); -- if not Is_Nil (Result) then -- Asis_Element_Table.Append (Result); -- end if; -- end loop; -- return Asis.Declaration_List -- (Asis_Element_Table.Table (1 .. Asis_Element_Table.Last)); -- end; -- exception -- when ASIS_Inappropriate_Element => -- raise; -- when ASIS_Failed => -- if Status_Indicator = Unhandled_Exception_Error then -- Add_Call_Information -- (Argument => Declaration, -- Outer_Call => Package_Name & -- "Corresponding_Overridden_Operations"); -- end if; -- raise; -- when Ex : others => -- Report_ASIS_Bug -- (Query_Name => Package_Name & -- "Corresponding_Overridden_Operations", -- Ex => Ex, -- Arg_Element => Declaration); -- end Corresponding_Overridden_Operations; ---------------------------------------------- -- Corresponding_Parent_Subtype_Unwind_Base -- ---------------------------------------------- function Corresponding_Parent_Subtype_Unwind_Base (Type_Definition : Asis.Type_Definition) return Asis.Declaration is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Type_Definition); Arg_Elem : Asis.Element := Type_Definition; Result : Asis.Element := Nil_Element; begin Check_Validity (Type_Definition, Package_Name & "Corresponding_Parent_Subtype_Unwind_Base"); if not (Arg_Kind = A_Derived_Type_Definition or else Arg_Kind = A_Derived_Record_Extension_Definition) then Raise_ASIS_Inappropriate_Element (Diagnosis => Package_Name & "Corresponding_Parent_Subtype_Unwind_Base", Wrong_Kind => Arg_Kind); end if; Result := Corresponding_Parent_Subtype (Arg_Elem); if Is_Nil (Result) then -- The only possible case for this - we have a 'Base attribute -- reference as a parent subtype mark Arg_Elem := Parent_Subtype_Indication (Arg_Elem); Arg_Elem := Asis.Definitions.Subtype_Mark (Arg_Elem); while Attribute_Kind (Arg_Elem) = A_Base_Attribute loop Arg_Elem := Prefix (Arg_Elem); end loop; if Expression_Kind (Arg_Elem) = A_Selected_Component then Arg_Elem := Selector (Arg_Elem); end if; Arg_Elem := Corresponding_Name_Declaration (Arg_Elem); if Declaration_Kind (Result) = A_Subtype_Declaration then Result := Corresponding_First_Subtype (Arg_Elem); else Result := Arg_Elem; end if; end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Type_Definition, Outer_Call => Package_Name & "Corresponding_Parent_Subtype_Unwind_Base"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Corresponding_Parent_Subtype_Unwind_Base", Ex => Ex, Arg_Element => Type_Definition); end Corresponding_Parent_Subtype_Unwind_Base; ---------------------- -- CU_Requires_Body -- ---------------------- function CU_Requires_Body (Right : Asis.Compilation_Unit) return Boolean is Unit_Kind : constant Asis.Unit_Kinds := Kind (Right); Result : Boolean := False; begin Check_Validity (Right, Package_Name & "CU_Requires_Body"); Reset_Context (Encl_Cont_Id (Right)); case Unit_Kind is when A_Generic_Procedure | A_Generic_Function | A_Procedure | A_Function | A_Package | A_Generic_Package => Result := Asis.Set_Get.Is_Body_Required (Right); when others => null; end case; return Result; end CU_Requires_Body; --------------------------- -- Elements_Hash_Wrapper -- --------------------------- function Elements_Hash_Wrapper (E : Asis.Element) return Ada.Containers.Hash_Type is use Ada.Containers; Asis_Hash : constant Asis.ASIS_Integer := abs Asis.Elements.Hash (E); Result : Ada.Containers.Hash_Type; begin Result := Ada.Containers.Hash_Type (Asis_Hash); return Result; exception when Constraint_Error => return 0; end Elements_Hash_Wrapper; ------------------------------- -- Element_Image_In_Template -- ------------------------------- function Element_Image_In_Template (Element : Asis.Element) return Program_Text is Tmp_Element : Asis.Element := Element; begin Check_Validity (Element, Package_Name & "Element_Image_In_Template"); if Is_Part_Of_Implicit (Element) or else not Is_Part_Of_Instance (Element) then return ""; else -- What we are doing is tricky, but it gives the fast and -- easy-to-maintain solution: we consider the argument as if it is -- NOT from the expanded template, and we use the normal ASIS -- Element_Span function for it. The idea is to use Sloc fields -- from the element node which point to the corresponding positions -- in the template. Set_From_Instance (Tmp_Element, False); return Element_Image (Tmp_Element); end if; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Element, Outer_Call => Package_Name & "Element_Image_In_Template"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Element_Image_In_Template", Ex => Ex, Arg_Element => Element); end Element_Image_In_Template; ------------------------------ -- Element_Span_In_Template -- ------------------------------ function Element_Span_In_Template (Element : Asis.Element) return Asis.Text.Span is Tmp_Element : Asis.Element := Element; begin Check_Validity (Element, Package_Name & "Element_Span_In_Template"); if Is_Part_Of_Implicit (Element) or else not Is_Part_Of_Instance (Element) then return Nil_Span; else -- What we are doing is tricky, but it gives the fast and -- easy-to-maintain solution: we consider the argument as if it is -- NOT from the expanded template, and we use the normal ASIS -- Element_Span function for it. The idea is to use Sloc fields -- from the element node which point to the corresponding positions -- in the template. Set_From_Instance (Tmp_Element, False); return Element_Span (Tmp_Element); end if; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Element, Outer_Call => Package_Name & "Element_Span_In_Template"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Element_Span_In_Template", Ex => Ex, Arg_Element => Element); end Element_Span_In_Template; ----------------------------- -- Explicit_Type_Operators -- ----------------------------- function Explicit_Type_Operators (Type_Definition : Asis.Type_Definition) return Asis.Declaration_List is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Type_Definition); Parent_El : Asis.Element; -- The construct where the argument type is defined Type_Decl : Asis.Element; -- Declaration of the argument type In_Package_Spec : Boolean; -- If the argument type is declared not in a package spec, but it is -- a derived type, we have to count all the explicit overridings of -- inherited operators, but if we are in the package spec, we just -- collect all the explicitly declared type operators Is_Formal_Type : Boolean; begin Check_Validity (Type_Definition, Package_Name & "Explicit_Type_Operators"); if not (Arg_Kind in Internal_Type_Kinds or else Arg_Kind in Internal_Formal_Type_Kinds or else Arg_Kind in A_Private_Type_Definition .. A_Protected_Definition) then Raise_ASIS_Inappropriate_Element (Diagnosis => Package_Name & "Explicit_Type_Operators", Wrong_Kind => Arg_Kind); end if; Type_Decl := Enclosing_Element (Type_Definition); Parent_El := Enclosing_Element (Type_Decl); Is_Formal_Type := Arg_Kind in Internal_Formal_Type_Kinds; In_Package_Spec := Declaration_Kind (Parent_El) = A_Package_Declaration or else (not Is_Formal_Type and then Declaration_Kind (Parent_El) = A_Formal_Package_Declaration); declare All_Comp : constant Asis.Element_List := Components (Parent_El); Start_From : Natural; Result : Asis.Element_List (All_Comp'Range); Res_First : constant Natural := Result'First; Res_Last : Natural := Res_First - 1; begin for J in All_Comp'Range loop if Is_Equal (Type_Decl, All_Comp (J)) then Start_From := J + 1; exit; end if; end loop; for J in Start_From .. All_Comp'Last loop if Is_Formal_Type and then Declaration_Kind (All_Comp (J)) not in A_Formal_Declaration then exit; end if; if Is_Type_Operator (All_Comp (J), Type_Decl) and then (In_Package_Spec or else Overrides_Type_Operator (All_Comp (J), Type_Decl)) then Res_Last := Res_Last + 1; Result (Res_Last) := All_Comp (J); if Is_Bool_Eq_Declaration (All_Comp (J)) then Res_Last := Res_Last + 1; Result (Res_Last) := Corresponding_Equality_Operator (All_Comp (J)); end if; end if; end loop; return Result (Res_First .. Res_Last); end; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Type_Definition, Outer_Call => Package_Name & "Explicit_Type_Operators"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Explicit_Type_Operators", Ex => Ex, Arg_Element => Type_Definition); end Explicit_Type_Operators; ---------------- -- First_Name -- ---------------- function First_Name (Dcl : Asis.Element) return Asis.Element is Name_List : constant Asis.Element_List := Names (Dcl); begin return Name_List (Name_List'First); end First_Name; ------------------------------- -- Formal_Subprogram_Default -- ------------------------------- function Formal_Subprogram_Default (Declaration : Asis.Generic_Formal_Parameter) return Asis.Expression is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration); Arg_Node : Node_Id; begin Arg_Node := Node (Declaration); Check_Validity (Declaration, Package_Name & "Formal_Subprogram_Default"); if not (Arg_Kind = A_Formal_Procedure_Declaration or else Arg_Kind = A_Formal_Function_Declaration) then Raise_ASIS_Inappropriate_Element (Package_Name & "Formal_Subprogram_Default", Wrong_Kind => Arg_Kind); end if; if not Present (Default_Name (Arg_Node)) then return Nil_Element; end if; return Node_To_Element_New (Node => Default_Name (Arg_Node), Starting_Element => Declaration); exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Formal_Subprogram_Default"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Formal_Subprogram_Default", Ex => Ex, Arg_Element => Declaration); end Formal_Subprogram_Default; --------------------- -- Full_Name_Image -- --------------------- function Full_Name_Image (Expression : Asis.Expression) return Program_Text is begin case Expression_Kind (Expression) is when An_Identifier .. An_Enumeration_Literal => return Asis.Expressions.Name_Image (Expression); when A_Selected_Component => return Full_Name_Image (Prefix (Expression)) & '.' & Asis.Expressions.Name_Image (Selector (Expression)); when others => Raise_ASIS_Inappropriate_Element (Package_Name & "Full_Name_Image", Wrong_Kind => Int_Kind (Expression)); end case; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Expression, Outer_Call => Package_Name & "Full_Name_Image"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Full_Name_Image", Ex => Ex, Arg_Element => Expression); end Full_Name_Image; ------------------------- -- Get_Call_Parameters -- ------------------------- function Get_Call_Parameters (Call : Asis.Element; Normalized : Boolean := False) return Asis.Element_List is begin if Expression_Kind (Call) = A_Function_Call then return Function_Call_Parameters (Call, Normalized); else return Call_Statement_Parameters (Call, Normalized); end if; end Get_Call_Parameters; ------------------------ -- Get_Implemented_Op -- ------------------------ -- Under construction! function Get_Implemented_Op (Op_Decl : Asis.Element; Type_Def : Asis.Element) return Asis.Element is pragma Unreferenced (Op_Decl, Type_Def); begin return Nil_Element; end Get_Implemented_Op; -- function Get_Implemented_Op -- (Op_Decl : Asis.Element; -- Type_Def : Asis.Element) -- return Asis.Element -- is -- Result : Asis.Element := Nil_Element; -- Look_For_Proc : constant Boolean := Is_Procedure (Op_Decl); -- Primitives : constant Asis.Element_List := Get_Primitives (Type_Def); -- Arg_Chars : Name_Id; -- Res_Chars : Name_Id; -- Tmp_Node : Node_Id; -- Tmp_El1 : Asis.Element; -- Tmp_El2 : Asis.Element; -- Success : Boolean; -- Is_Controlling : Boolean; -- Arg_Params : constant Asis.Element_List := Parameter_Profile (Op_Decl); -- begin -- Tmp_El := First_Name (Decl); -- Arg_Chars := Chars (R_Node (Tmp_El)); -- Scan_Primitives : for J in Primitives'Range loop -- if Look_For_Proc xor Is_Procedure (Primitives (J)) then -- Res_Chars := Chars (R_Node (First_Name (Primitives (J)))); -- if Res_Chars = Arg_Chars -- and then -- Arg_Params'Length = Parameter_Profile (Primitives (J))'Length -- then -- -- Check parameter profiles: -- Success := True; -- if not Look_For_Proc then -- -- Check for the result type -- Tmp_El1 := First_Name (Op_Decl); -- Tmp_El2 := First_Name (Primitives (J)); -- if Has_Controlling_Result (R_Node (Tmp_El1)) xor -- Has_Controlling_Result (R_Node (Tmp_El2)) -- then -- Success := False; -- else -- Is_Controlling := -- Has_Controlling_Result (R_Node (Tmp_El1)); -- Tmp_El1 := Result_Profile (Op_Decl); -- Tmp_El2 := Result_Profile (Primitives (J)); -- if Definition_Kind (Tmp_El1) = An_Access_Definition -- xor -- Definition_Kind (Tmp_El2) = An_Access_Definition -- then -- Success := False; -- elsif not Is_Controlling then -- Succes := Are_Type_Conforming (Tmp_El1, Tmp_El2); -- end if; -- end if; -- end if; -- end if; -- if Success then -- declare -- Res_Params : constant Asis.Element_List := -- Parameter_Profile (Primitives (J)); -- begin -- Scan_Params : for P in Arg_Params'Range loop -- if not Are_Conformant -- (Arg_Params (P), Res_Params (P)) -- then -- Success := False; -- exit Scan_Params; -- end if; -- end loop; -- end; -- end if; -- if Success then -- Result := Primitives (J) -- exit Scan_Primitives; -- end if; -- end if; -- end if; -- end loop Scan_Primitives; -- return Result; -- end Get_Implemented_Op; ------------------------ -- Get_Last_Component -- ------------------------ function Get_Last_Component (E : Asis.Element) return Asis.Element is Child_Access : constant Query_Array := Appropriate_Queries (E); Child : Asis.Element := Asis.Nil_Element; begin Check_Validity (E, Package_Name & "Get_Last_Component"); if Is_Nil (E) then Raise_ASIS_Inappropriate_Element (Package_Name & "Get_Last_Component", Wrong_Kind => Not_An_Element); end if; if Debug_Flag_X then Write_Str (" Get_Last_Component - called for "); Write_Str (Internal_Element_Kinds'Image (Int_Kind (E))); Write_Eol; end if; for Each_Query in reverse Child_Access'Range loop case Child_Access (Each_Query).Query_Kind is when Bug => null; when Single_Element_Query => Child := Child_Access (Each_Query).Func_Simple (E); when Element_List_Query => declare Child_List : constant Asis.Element_List := Child_Access (Each_Query).Func_List (E); begin if not Is_Nil (Child_List) then Child := Child_List (Child_List'Last); end if; end; when Element_List_Query_With_Boolean => declare Child_List : constant Asis.Element_List := Child_Access (Each_Query).Func_List_Boolean (E, Child_Access (Each_Query).Bool); begin if not Is_Nil (Child_List) then Child := Child_List (Child_List'Last); end if; end; end case; exit when not Is_Nil (Child); end loop; if Debug_Flag_X then Write_Str (" Get_Last_Component - returns "); Write_Str (Internal_Element_Kinds'Image (Int_Kind (Child))); Write_Eol; end if; return Child; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => E, Outer_Call => Package_Name & "Get_Last_Component"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Get_Last_Component", Ex => Ex, Arg_Element => E); end Get_Last_Component; ----------------------- -- Get_LF_From_Ureal -- ----------------------- function Get_LF_From_Ureal (U : Ureal) return Long_Long_Float is Result : Long_Long_Float; Base : constant Nat := Rbase (U); U_Num : constant Uint := Numerator (U); U_Denum : constant Uint := Denominator (U); Num : Long_Long_Integer; Denum : Long_Long_Integer; begin UI_Image (U_Num, Format => Decimal); Num := Long_Long_Integer'Value (UI_Image_Buffer (1 .. UI_Image_Length)); UI_Image (U_Denum, Format => Decimal); Denum := Long_Long_Integer'Value (UI_Image_Buffer (1 .. UI_Image_Length)); if Base /= 0 then Denum := Long_Long_Integer (2 ** Natural (Denum)); end if; Result := Long_Long_Float (Num) / Long_Long_Float (Denum); if UR_Is_Negative (U) then Result := -Result; end if; return Result; end Get_LF_From_Ureal; -------------------------- -- Has_Enumeration_Type -- -------------------------- function Has_Enumeration_Type (Expression : Asis.Expression) return Boolean is Result : Boolean := False; begin Check_Validity (Expression, Package_Name & "Has_Enumeration_Type"); if Ekind (Etype (R_Node (Expression))) in Enumeration_Kind then Result := True; end if; return Result; end Has_Enumeration_Type; ---------------------- -- Has_Integer_Type -- ---------------------- function Has_Integer_Type (Expression : Asis.Expression) return Boolean is Result : Boolean := False; begin Check_Validity (Expression, Package_Name & "Has_Integer_Type"); if Ekind (Etype (R_Node (Expression))) in Integer_Kind then Result := True; end if; return Result; end Has_Integer_Type; ------------------------------ -- Inherited_Type_Operators -- ------------------------------ function Inherited_Type_Operators (Type_Definition : Asis.Type_Definition) return Asis.Declaration_List is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Type_Definition); Type_Decl : Asis.Element; begin Check_Validity (Type_Definition, Package_Name & "Inherited_Type_Operators"); if not (Arg_Kind in Internal_Type_Kinds or else Arg_Kind in Internal_Formal_Type_Kinds or else Arg_Kind in A_Private_Type_Definition .. A_Protected_Definition) then Raise_ASIS_Inappropriate_Element (Diagnosis => Package_Name & "Inherited_Type_Operators", Wrong_Kind => Arg_Kind); end if; if not (Arg_Kind = A_Private_Extension_Definition or else Arg_Kind = A_Derived_Type_Definition or else Arg_Kind = A_Derived_Record_Extension_Definition or else Arg_Kind = A_Formal_Derived_Type_Definition) then return Nil_Element_List; end if; declare All_Inherited_Ops : constant Asis.Declaration_List := Implicit_Inherited_Subprograms (Type_Definition); Result : Asis.Declaration_List (All_Inherited_Ops'Range); Res_First : constant Natural := Result'First; Res_Last : Natural := Res_First - 1; begin Type_Decl := Enclosing_Element (Type_Definition); for J in All_Inherited_Ops'Range loop if Is_Type_Operator (All_Inherited_Ops (J), Type_Decl) then Res_Last := Res_Last + 1; Result (Res_Last) := All_Inherited_Ops (J); end if; end loop; return Result (Res_First .. Res_Last); end; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Type_Definition, Outer_Call => Package_Name & "Inherited_Type_Operators"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Inherited_Type_Operators", Ex => Ex, Arg_Element => Type_Definition); end Inherited_Type_Operators; -------------------- -- Is_Aspect_Mark -- -------------------- function Is_Aspect_Mark (Element : Asis.Element) return Boolean is Result : Boolean := False; Tmp : Node_Id; begin if Expression_Kind (Element) = An_Identifier or else Attribute_Kind (Element) = A_Class_Attribute then Tmp := R_Node (Element); Result := Nkind (Parent (Tmp)) = N_Aspect_Specification and then Tmp = Sinfo.Identifier (Parent (Tmp)); end if; return Result; end Is_Aspect_Mark; ----------------------------------- -- Is_Aspect_Specific_Identifier -- ----------------------------------- function Is_Aspect_Specific_Identifier (Element : Asis.Element) return Boolean is Result : Boolean := False; Tmp : Node_Id; begin if Expression_Kind (Element) = An_Identifier then Tmp := R_Node (Element); if Nkind (Tmp) = N_Identifier and then not Present (Entity (Tmp)) then Tmp := Parent (Tmp); if Present (Tmp) then case Nkind (Tmp) is when N_Component_Association => if Nkind (Parent (Parent (Tmp))) = N_Aspect_Specification then Result := True; end if; when N_Aspect_Specification => Result := R_Node (Element) /= Sinfo.Identifier (Tmp); -- ... to be continued... when others => null; end case; end if; end if; end if; return Result; end Is_Aspect_Specific_Identifier; ---------------------------- -- Is_Bool_Eq_Declaration -- ---------------------------- function Is_Bool_Eq_Declaration (Declaration : Asis.Element) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration); Result : Boolean := False; Op_Node : Node_Id; Op_Etype : Node_Id; begin Check_Validity (Declaration, Package_Name & "Is_Bool_Eq_Declaration"); if Arg_Kind = A_Function_Declaration or else (Arg_Kind = A_Function_Body_Declaration and then Acts_As_Spec (Declaration)) or else Arg_Kind = A_Function_Renaming_Declaration then Op_Node := Defining_Unit_Name (Specification (Node (Declaration))); Op_Etype := Etype (Op_Node); if Is_Generic_Instance (Op_Node) then Op_Node := Defining_Unit_Name (Node (Enclosing_Element (Declaration))); end if; if Nkind (Op_Node) = N_Defining_Program_Unit_Name then Op_Node := Defining_Identifier (Op_Node); end if; if Nkind (Op_Node) = N_Defining_Operator_Symbol and then Chars (Op_Node) = Name_Op_Eq and then Op_Etype = Standard_Boolean then Result := True; end if; end if; return Result; end Is_Bool_Eq_Declaration; ------------------- -- Is_Class_Wide -- ------------------- function Is_Class_Wide (Declaration : Asis.Declaration) return Boolean is Result : Boolean := False; Subtype_Entity : Entity_Id; begin if Declaration_Kind (Declaration) = A_Subtype_Declaration then Subtype_Entity := R_Node (Declaration); Subtype_Entity := Defining_Identifier (Subtype_Entity); Result := Ekind (Subtype_Entity) = E_Class_Wide_Subtype; end if; return Result; end Is_Class_Wide; ------------------ -- Is_Completed -- ------------------ function Is_Completed (Declaration : Asis.Element) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration); Arg_Node : Node_Id; Result : Boolean := False; begin Check_Validity (Declaration, Package_Name & "Is_Completed"); -- JUNK IMPLEMENTATION!!! if not (Arg_Kind = A_Procedure_Declaration or else Arg_Kind = A_Function_Declaration) or else Is_Part_Of_Inherited (Declaration) then return False; end if; Arg_Node := Defining_Unit_Name (Specification (Node (Declaration))); Result := Has_Completion (Arg_Node); return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Is_Completed"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Completed", Ex => Ex, Arg_Element => Declaration); end Is_Completed; ----------------------------------- -- Is_Default_For_Null_Procedure -- ----------------------------------- function Is_Default_For_Null_Procedure (Reference : Asis.Element) return Boolean is Result : Boolean := False; Tmp : Node_Id; begin if Expression_Kind (Reference) = An_Identifier and then Is_Part_Of_Instance (Reference) then Tmp := R_Node (Reference); if Nkind (Tmp) in N_Has_Entity then Tmp := Entity (Tmp); if Present (Tmp) and then Ekind (Tmp) = E_Procedure then Tmp := Parent (Parent (Tmp)); Result := Nkind (Tmp) = N_Subprogram_Body and then Nkind (Parent (Tmp)) = N_Package_Specification; end if; end if; end if; return Result; end Is_Default_For_Null_Procedure; ---------------------------- -- Is_Expanded_Subprogram -- ---------------------------- function Is_Expanded_Subprogram (N : Node_Id) return Boolean is Result : Boolean := False; Tmp : Node_Id; begin if Nkind (N) = N_Subprogram_Declaration then Tmp := Defining_Unit_Name (Specification (N)); if Nkind (Tmp) = N_Defining_Program_Unit_Name then Tmp := Defining_Identifier (Tmp); end if; if Is_Generic_Instance (Tmp) then Result := True; end if; end if; return Result; end Is_Expanded_Subprogram; ----------------- -- Is_Exported -- ----------------- function Is_Exported (Defining_Name : Asis.Defining_Name) return Boolean is Arg_Node : Node_Id; Tmp : Node_Id; Result : Boolean := False; begin Check_Validity (Defining_Name, Package_Name & "Is_Exported"); if Int_Kind (Defining_Name) not in Internal_Defining_Name_Kinds then return False; end if; Arg_Node := R_Node (Defining_Name); if Nkind (Arg_Node) = N_Defining_Program_Unit_Name then Arg_Node := Defining_Identifier (Arg_Node); end if; if Ekind (Arg_Node) = E_Subprogram_Body then -- Go to the corresponding spec entity Tmp := Parent (Arg_Node); while Nkind (Tmp) not in N_Subprogram_Specification loop Tmp := Parent (Tmp); end loop; Tmp := Parent (Tmp); Tmp := Corresponding_Decl_Node (Tmp); Arg_Node := Defining_Unit_Name (Specification (Tmp)); if Nkind (Arg_Node) = N_Defining_Program_Unit_Name then Arg_Node := Defining_Identifier (Arg_Node); end if; end if; Result := Is_Exported (Arg_Node); return Result; end Is_Exported; ------------------------------------- -- Is_From_Import_Procedure_Pragma -- ------------------------------------- function Is_From_Import_Procedure_Pragma (N : Node_Id) return Boolean is Tmp : Node_Id := Parent (N); Result : Boolean := False; begin if Nkind (Tmp) = N_Indexed_Component then Tmp := Parent (Tmp); if Nkind (Tmp) = N_Aggregate then Tmp := Parent (Tmp); if Nkind (Tmp) = N_Pragma_Argument_Association then Tmp := Pragma_Identifier (Parent (Tmp)); Result := Chars (Tmp) = Name_Import_Procedure or else Chars (Tmp) = Name_Import_Valued_Procedure; end if; end if; end if; return Result; end Is_From_Import_Procedure_Pragma; --------------------------------- -- Is_Implicit_Neq_Declaration -- --------------------------------- function Is_Implicit_Neq_Declaration (Declaration : Asis.Element) return Boolean is begin return Declaration_Kind (Declaration) = A_Function_Declaration and then Special_Case (Declaration) = Is_From_Imp_Neq_Declaration; end Is_Implicit_Neq_Declaration; -------------- -- Is_Label -- -------------- function Is_Label (Defining_Name : Asis.Defining_Name) return Boolean is N : constant Node_Id := Node (Defining_Name); Result : Boolean := False; begin if Int_Kind (Defining_Name) = A_Defining_Identifier then if Nkind (N) = N_Label then Result := True; elsif Nkind (N) = N_Identifier and then Nkind (Parent (N)) = N_Loop_Statement and then Nkind (Original_Node (Parent (N))) = N_Goto_Statement then -- An infinite loop is implemented with goto statement Result := True; end if; end if; return Result; end Is_Label; -------------------------- -- Is_Main_Unit_In_Tree -- -------------------------- function Is_Main_Unit_In_Tree (Right : Asis.Compilation_Unit) return Boolean is Arg_Kind : constant Unit_Kinds := Kind (Right); Arg_Unit_Id : Unit_Id; Arg_Cont_Id : Context_Id; begin Check_Validity (Right, Package_Name & "Is_Main_Unit_In_Tree"); Arg_Cont_Id := Encl_Cont_Id (Right); Reset_Context (Arg_Cont_Id); Arg_Unit_Id := Get_Unit_Id (Right); if Arg_Kind in A_Procedure .. A_Protected_Body_Subunit then return GNAT_Compilation_Dependencies (Arg_Unit_Id) /= Nil_Unit_Id_List; else return False; end if; exception when ASIS_Inappropriate_Compilation_Unit => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Outer_Call => Package_Name & "Is_Main_Unit_In_Tree"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Main_Unit_In_Tree", Ex => Ex, Arg_CU => Right); end Is_Main_Unit_In_Tree; ----------------- -- Is_Obsolete -- ----------------- function Is_Obsolete (Right : Asis.Compilation_Unit) return Boolean is Arg_Kind : constant Unit_Kinds := Kind (Right); Arg_Id : Unit_Id; Result : Boolean := True; begin Check_Validity (Right, Package_Name & "Is_Obsolete"); case Arg_Kind is when Not_A_Unit | A_Nonexistent_Declaration | A_Nonexistent_Body | An_Unknown_Unit => null; when others => Arg_Id := Get_Unit_Id (Right); if Arg_Id = Standard_Id then Result := False; else Result := not (Source_Status (Right) = Up_To_Date); end if; end case; return Result; exception when ASIS_Inappropriate_Compilation_Unit => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Outer_Call => Package_Name & "Is_Obsolete"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Obsolete", Ex => Ex, Arg_CU => Right); end Is_Obsolete; ----------------------------- -- Is_Overriding_Operation -- ----------------------------- function Is_Overriding_Operation (Declaration : Asis.Element) return Boolean is Result : Boolean := False; Entity_N : Entity_Id := Empty; begin case Declaration_Kind (Declaration) is when A_Procedure_Instantiation | A_Function_Instantiation => Entity_N := Specification (Instance_Spec (Node (Declaration))); Entity_N := Related_Instance (Defining_Unit_Name (Entity_N)); when A_Procedure_Declaration | A_Function_Declaration | A_Procedure_Body_Declaration | A_Function_Body_Declaration | A_Null_Procedure_Declaration | A_Procedure_Renaming_Declaration | A_Function_Renaming_Declaration => if not Is_Part_Of_Implicit (Declaration) then Entity_N := Specification (Node (Declaration)); Entity_N := Defining_Unit_Name (Entity_N); end if; when others => null; end case; if Present (Entity_N) and then Nkind (Entity_N) in N_Defining_Identifier .. N_Defining_Operator_Symbol then Result := Present (Overridden_Operation (Entity_N)); end if; return Result; end Is_Overriding_Operation; ---------------------------- -- Is_Predefined_Operator -- ---------------------------- function Is_Predefined_Operator (Operator : Asis.Element) return Boolean is Result : Boolean := False; Entity_N : Entity_Id; begin if Expression_Kind (Operator) = An_Operator_Symbol then Entity_N := Entity (Node (Operator)); Result := Present (Entity_N) and then Is_Predefined (Entity_N); end if; return Result; end Is_Predefined_Operator; ---------------- -- Is_Private -- ---------------- function Is_Private (Declaration : Asis.Element) return Boolean is Arg_Element : Element := Declaration; Result : Boolean := False; Next_Node : Node_Id; Enclosing_List : List_Id; Enclosing_Node : Node_Id; begin Check_Validity (Declaration, Package_Name & "Is_Private"); if Declaration_Kind (Declaration) = Not_A_Declaration or else Declaration_Kind (Declaration) in A_Loop_Parameter_Specification .. An_Element_Iterator_Specification then return False; end if; -- In case of an implicit Element we go to the "enclosing" explicit -- Element to get the node stored in R_Node field which can safely be -- used for tree traversal (for implicit Elements R_Node may be of -- special use and it may have the Parent field set to Empty while Is_Part_Of_Implicit (Arg_Element) and then Special_Case (Arg_Element) /= From_Limited_View loop Arg_Element := Enclosing_Element (Arg_Element); end loop; Next_Node := R_Node (Arg_Element); while Nkind (Next_Node) /= N_Compilation_Unit and then not Is_List_Member (Next_Node) loop Next_Node := Parent (Next_Node); end loop; while Nkind (Next_Node) /= N_Compilation_Unit loop -- If we are here, we have Next_Node being a list member Enclosing_List := List_Containing (Next_Node); Enclosing_Node := Parent (Enclosing_List); case Nkind (Enclosing_Node) is when N_Statement_Other_Than_Procedure_Call => -- We can not be in any private part exit; when N_Package_Specification | N_Task_Definition | N_Protected_Definition => if Enclosing_List = Private_Declarations (Enclosing_Node) then Result := True; exit; end if; when others => null; end case; Next_Node := Parent (Next_Node); while Nkind (Next_Node) /= N_Compilation_Unit and then not Is_List_Member (Next_Node) loop Next_Node := Parent (Next_Node); end loop; end loop; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Is_Private"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Private", Ex => Ex, Arg_Element => Declaration); end Is_Private; ------------------ -- Is_Procedure -- ------------------ function Is_Procedure (Decl : Asis.Element) return Boolean is Result : Boolean := False; begin case Declaration_Kind (Decl) is when A_Procedure_Declaration | A_Procedure_Instantiation | A_Procedure_Body_Declaration | A_Null_Procedure_Declaration | A_Procedure_Renaming_Declaration => Result := True; when others => null; end case; return Result; end Is_Procedure; ----------------- -- Is_RCI_Unit -- ----------------- function Is_RCI_Unit (C : Asis.Compilation_Unit) return Boolean is Arg_Node : Node_Id; Result : Boolean := False; begin if Is_Standard (C) then return False; end if; case Unit_Kind (C) is when A_Package | A_Procedure_Body | A_Function_Body | A_Generic_Package => Arg_Node := Unit (Top (C)); Arg_Node := Defining_Unit_Name (Specification (Arg_Node)); if Nkind (Arg_Node) = N_Defining_Program_Unit_Name then Arg_Node := Defining_Identifier (Arg_Node); end if; Result := Is_Remote_Call_Interface (Arg_Node); when others => null; end case; return Result; end Is_RCI_Unit; ------------------------- -- Is_Renaming_As_Body -- ------------------------- function Is_Renaming_As_Body (Declaration : Asis.Element) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration); Arg_Node : Node_Id; Result : Boolean := False; begin Check_Validity (Declaration, Package_Name & "Is_Renaming_As_Body"); if Arg_Kind = A_Procedure_Renaming_Declaration or else Arg_Kind = A_Function_Renaming_Declaration then Arg_Node := R_Node (Declaration); if Nkind (Arg_Node) /= N_Subprogram_Declaration then Result := Present (Corresponding_Spec (Arg_Node)); end if; end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Is_Renaming_As_Body"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Renaming_As_Body", Ex => Ex, Arg_Element => Declaration); end Is_Renaming_As_Body; --------------- -- Is_Static -- --------------- function Is_Static (Element : Asis.Element) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Element); Arg_Node : Node_Id; Result : Boolean := False; begin Check_Validity (Element, Package_Name & "Is_Static"); if Arg_Kind in Internal_Expression_Kinds and then Is_True_Expression (Element) then Result := Sinfo.Is_Static_Expression (R_Node (Element)); elsif Arg_Kind = A_Range_Attribute_Reference or else Arg_Kind = A_Discrete_Range_Attribute_Reference_As_Subtype_Definition or else Arg_Kind = A_Discrete_Range_Attribute_Reference then Arg_Node := R_Node (Element); if Nkind (Arg_Node) = N_Range_Constraint then Arg_Node := Range_Expression (Arg_Node); end if; if Nkind (Arg_Node) = N_Range and then Is_Static_Expression (Low_Bound (Arg_Node)) and then Is_Static_Expression (High_Bound (Arg_Node)) then Result := True; end if; end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Element, Outer_Call => Package_Name & "Is_Static"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Static", Ex => Ex, Arg_Element => Element); end Is_Static; ------------------------ -- Is_True_Expression -- ------------------------ function Is_True_Expression (Expression : Asis.Expression) return Boolean is Arg_Node : Node_Id := Node (Expression); Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Expression); Expr_Chars : Name_Id; Entity_Node : Entity_Id; Result : Boolean := True; -- the idea of the implementation is to find out the cases when -- Expression is NOT a true exception, so we initialize Result -- as True begin Check_Validity (Expression, Package_Name & "Is_True_Expression"); if Arg_Kind not in Internal_Expression_Kinds then return False; end if; if Nkind (Arg_Node) = N_Identifier and then Nkind (Parent (Arg_Node)) = N_Expanded_Name and then Arg_Node = Selector_Name (Parent (Arg_Node)) then -- selector in an expanded name - all the semantic fields -- are set for the whole name, but not for this selector. -- So: Arg_Node := Parent (Arg_Node); end if; if Nkind (Arg_Node) not in N_Has_Etype or else No (Etype (Arg_Node)) or else Is_Anonymous (Ekind (Etype (Arg_Node))) or else Ekind (Etype (Arg_Node)) = E_Subprogram_Type then -- Expression may be a true expression, but it may have a type which -- cannot be represented in ASIS (such as an anonymous access type), -- in such cases we also classify it as being not true expression Result := False; else -- in some cases more detailed analysis is required. -- ??? This part may require some more analysis - it may be -- somewhat redundant case Arg_Kind is when An_Identifier | A_Selected_Component => -- and here we have to investigate whether or not this -- Expression is a "naming expression" if Special_Case (Expression) = Rewritten_Named_Number then return True; end if; -- ??? <tree problem 1> -- this fragment should be revised when the problem is fixed (as it should) if Nkind (Arg_Node) = N_Selected_Component and then Etype (Arg_Node) = Any_Type -- for now (GNAT 3.05) this means, that Expression is an -- expanded name of the character literal of ether a -- predefined character type or of the type derived from a -- predefined character type; the problem is that the -- Entity field is not set for such a node then return True; end if; -- ??? <tree problem 1> - end -- now taking the Entity field (if any) and looking, -- what we have: if Nkind (Arg_Node) = N_Selected_Component then Entity_Node := Entity (Selector_Name (Arg_Node)); elsif Nkind (Arg_Node) = N_Attribute_Definition_Clause then -- the attribute designator in an attribute definition -- clause Entity_Node := Empty; else Entity_Node := Entity (Arg_Node); end if; if No (Entity_Node) then Result := False; elsif Ekind (Entity_Node) = E_Enumeration_Literal then null; else case Ekind (Entity_Node) is -- the first choice in this case statement should -- filter in entities which *ARE* expressions in Ada -- sense when E_Variable => -- tasks and protected objects declared by _single_ -- task/protected declarations do not have -- corresponding type declarations which can be -- represented in ASIS Result := Comes_From_Source (Parent (Entity_Node)); when E_Component | E_Constant | E_Discriminant | E_Loop_Parameter | E_In_Out_Parameter | E_In_Parameter | E_Out_Parameter | E_Generic_In_Out_Parameter | E_Generic_In_Parameter | E_Named_Integer | E_Named_Real | E_Enumeration_Literal | -- ??? (see elsif path) -- enumeration literals are not treated as -- functions in ASIS E_Entry_Index_Parameter | E_Protected_Object => null; -- simply keeping the initialization of Result when others => Result := False; end case; end if; when Internal_Operator_Symbol_Kinds => Result := False; when Internal_Attribute_Reference_Kinds => case Internal_Attribute_Reference_Kinds (Arg_Kind) is when An_Adjacent_Attribute | A_Base_Attribute | A_Ceiling_Attribute | A_Class_Attribute | A_Compose_Attribute | A_Copy_Sign_Attribute | An_Exponent_Attribute | A_Floor_Attribute | A_Fraction_Attribute | An_Image_Attribute | An_Input_Attribute | A_Leading_Part_Attribute | A_Machine_Attribute | A_Max_Attribute | A_Min_Attribute | A_Model_Attribute | An_Output_Attribute | A_Pos_Attribute | A_Pred_Attribute | A_Range_Attribute | A_Read_Attribute | A_Remainder_Attribute | A_Round_Attribute | A_Rounding_Attribute | A_Scaling_Attribute | A_Succ_Attribute | A_Truncation_Attribute | An_Unbiased_Rounding_Attribute | A_Val_Attribute | A_Value_Attribute | A_Wide_Image_Attribute | A_Wide_Value_Attribute | A_Write_Attribute => Result := False; when An_Implementation_Defined_Attribute => Expr_Chars := Attribute_Name (Arg_Node); if Expr_Chars = Name_Abort_Signal or else Expr_Chars = Name_Elab_Body or else Expr_Chars = Name_Elab_Spec then Result := False; end if; when others => null; end case; when A_Positional_Array_Aggregate | A_Named_Array_Aggregate => if Nkind (Parent (Arg_Node)) = N_Enumeration_Representation_Clause or else Is_Typeless_Subaggregate (Arg_Node) then Result := False; end if; when others => null; end case; end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Expression, Outer_Call => Package_Name & "Is_True_Expression"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_True_Expression", Ex => Ex, Arg_Element => Expression); end Is_True_Expression; ---------------------- -- Is_Type_Operator -- ---------------------- function Is_Type_Operator (Op_Decl : Asis.Element; Type_Decl : Asis.Element) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Op_Decl); Result : Boolean := False; Next_Type : Asis.Element; begin if (Arg_Kind = A_Function_Declaration or else ((Arg_Kind = A_Function_Body_Declaration or else Arg_Kind = A_Function_Body_Stub or else Arg_Kind = A_Function_Renaming_Declaration) and then not (Is_Equal (Corresponding_Declaration (Op_Decl), Op_Decl))) or else Arg_Kind = A_Function_Instantiation or else Arg_Kind = A_Formal_Function_Declaration) and then Int_Kind (Names (Op_Decl) (1)) in Internal_Defining_Operator_Kinds then -- First, check the result type Next_Type := Result_Profile (Op_Decl); if Int_Kind (Next_Type) = A_Selected_Component then Next_Type := Selector (Next_Type); end if; if Int_Kind (Next_Type) = An_Identifier then Next_Type := Corresponding_Name_Declaration (Next_Type); Next_Type := Corresponding_First_Subtype (Next_Type); if Is_Equal (Next_Type, Type_Decl) then Result := True; end if; end if; if not Result then -- check parameter types declare Params : constant Asis.Element_List := Parameter_Profile (Op_Decl); begin for J in Params'Range loop Next_Type := Object_Declaration_View (Params (J)); if Int_Kind (Next_Type) = A_Selected_Component then Next_Type := Selector (Next_Type); end if; if Int_Kind (Next_Type) = An_Identifier then Next_Type := Corresponding_Name_Declaration (Next_Type); Next_Type := Corresponding_First_Subtype (Next_Type); if Is_Equal (Next_Type, Type_Decl) then Result := True; exit; end if; end if; end loop; end; end if; end if; return Result; end Is_Type_Operator; ------------------------------ -- Is_Typeless_Subaggregate -- ------------------------------ function Is_Typeless_Subaggregate (Aggr : Node_Id) return Boolean is Parent_Node : Node_Id := Parent (Aggr); Result : Boolean := False; Arg_Type : Entity_Id; Parent_Type : Entity_Id; begin if Nkind (Parent_Node) = N_Component_Association then Parent_Node := Parent (Parent_Node); end if; if Nkind (Parent_Node) = N_Aggregate then Arg_Type := Etype (Aggr); while Present (Arg_Type) and then Etype (Arg_Type) /= Arg_Type loop Arg_Type := Etype (Arg_Type); end loop; Parent_Type := Etype (Parent_Node); while Present (Parent_Type) and then Etype (Parent_Type) /= Parent_Type loop Parent_Type := Etype (Parent_Type); end loop; Result := Arg_Type = Parent_Type; end if; return Result; end Is_Typeless_Subaggregate; ------------------------- -- Is_Uniquely_Defined -- ------------------------- function Is_Uniquely_Defined (Reference : Asis.Expression) return Boolean is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Reference); Arg_Node : Node_Id; Result : Boolean := False; begin Check_Validity (Reference, Package_Name & "Is_Uniquely_Defined"); if Arg_Kind = An_Identifier or else Arg_Kind in Internal_Operator_Symbol_Kinds or else Arg_Kind = A_Character_Literal or else Arg_Kind = An_Enumeration_Literal then Result := True; -- We suppose, that in general case we have a unique declaration, -- and now let's try to detect if we have a special case: Arg_Node := Node (Reference); -- first, the situation when "passed a portion of a pragma that -- was "ignored" by the compiler", it relates to pragma arguments -- only, but not to pragma element identifiers: -- GNAT rewrites the tree structure for non-recognized pragma as -- if it is a null statement, so: if Nkind (Parent (Parent (Arg_Node))) = N_Null_Statement then Result := False; end if; if Arg_Kind = An_Identifier then -- There are three checks specific to arguments of An_Identifier -- kind only: a pragma_argument_identifier, an identifier specific -- to a pragma and a reference to an attribute_designator: if Nkind (Arg_Node) = N_Pragma_Argument_Association -- a reference to a pragma_argument_identifier or else (Nkind (Arg_Node) in N_Has_Entity and then No (Entity (Arg_Node)) and then (Nkind (Parent (Arg_Node)) = N_Pragma_Argument_Association or else Is_From_Import_Procedure_Pragma (Arg_Node))) -- an identifier specific to a pragma, we make a guess that -- any identifier on the place of a pragma argument is -- specific to the pragma, if the Entity field is not set -- for this identifier. Is it really true??? or else Nkind (Arg_Node) = N_Attribute_Reference or else Special_Case (Reference) = Dummy_Class_Attribute_Designator -- a reference to an attribute_designator or else Nkind (Arg_Node) = N_Attribute_Definition_Clause -- attribute designator from an attribute definition clause then Result := False; end if; end if; -- One more check for pragma argument. It corresponds to the -- situation when the identifier is specific for a pragma, but in -- the same time it is a part of other expression. This check is -- specific to extended Import and Export pragmas applying to -- subprograms. if Result and then Special_Case (Reference) = Not_A_Special_Case and then Arg_Kind = An_Identifier and then No (Entity (Arg_Node)) then -- The first possibility: -- -- pragma Import_Function (Internal => Unix_Code_Mappings, -- External => "unix_code_mappings", -- Result_Type => Integer, -- Mechanism => (Value)); -- -- Value is rewritten into N_Aggregate -- -- The second possibility: -- -- pragma Import_Procedure (Internal => Ignore_Signal, -- External => "ignore_signal", -- Mechanism => (Value, Value)); -- -- Value is not rewritten and it is represented as a "normal" -- aggregate component -- -- And the third possibility: -- -- pragma Export_Procedure -- (Internal => Reset, -- External => "", -- Parameter_Types => (File_Type, File_Mode), -- Mechanism => (File => Reference)); -- -- Here we have an aggregate with named associations: if (Nkind (R_Node (Reference)) = N_Aggregate and then (Nkind (Parent (R_Node (Reference)))) = N_Pragma_Argument_Association) or else (Nkind (R_Node (Reference)) = N_Identifier and then not (Is_Rewrite_Substitution (R_Node (Reference))) and then ((Nkind (Parent (R_Node (Reference))) = N_Aggregate and then Nkind (Parent (Parent (R_Node (Reference)))) = N_Pragma_Argument_Association) or else (Nkind (Parent (R_Node (Reference))) = N_Component_Association and then Nkind (Parent (Parent (R_Node (Reference)))) = N_Aggregate and then Nkind (Parent (Parent (Parent ((R_Node (Reference)))))) = N_Pragma_Argument_Association) ) ) then Result := False; end if; end if; -- Then check for the situation when if passed a portion of a pragma -- that may be an ambiguous reference to more than one entity. if Result and then Nkind (Parent (Arg_Node)) = N_Pragma_Argument_Association and then Needs_List (Reference) then declare Res_List : constant Asis.Element_List := Corresponding_Name_Definition_List (Reference); begin if Res_List'Length /= 1 then Result := False; end if; end; end if; end if; -- Case when the argument is a parameter of Source_File_Name pragma or -- component thereof if Result then while not Is_List_Member (Arg_Node) and then Present (Arg_Node) loop Arg_Node := Parent (Arg_Node); end loop; if Nkind (Arg_Node) = N_Pragma_Argument_Association and then Pragma_Name (Parent (Arg_Node)) = Name_Source_File_Name then Result := False; end if; end if; -- Case when the argument is the (component of the) prefix of the -- GNAT-specific attribute 'Elab_Body or 'Elab_Spec if Result then Arg_Node := Parent (R_Node (Reference)); while Nkind (Arg_Node) = N_Selected_Component loop Arg_Node := Parent (Arg_Node); end loop; if Nkind (Arg_Node) = N_Attribute_Reference and then Attribute_Name (Arg_Node) in Name_Elab_Body .. Name_Elab_Spec then Result := False; end if; end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Reference, Outer_Call => Package_Name & "Is_Uniquely_Defined"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Is_Uniquely_Defined", Ex => Ex, Arg_Element => Reference); end Is_Uniquely_Defined; ------------------------------- -- Main_Unit_In_Current_Tree -- ------------------------------- function Main_Unit_In_Current_Tree (The_Context : Asis.Context) return Asis.Compilation_Unit is Curr_Tree_Id : Tree_Id; Curr_Cont_Id : Context_Id; Res_Unit_Id : Unit_Id := Nil_Unit; begin Check_Validity (The_Context, Package_Name & "Main_Unit_In_Current_Tree"); Curr_Cont_Id := Get_Current_Cont; Curr_Tree_Id := Get_Current_Tree; if Tree_Processing_Mode (Get_Cont_Id (The_Context)) = GNSA then -- Note, that for GNSA Context no check is made! This works correctly -- only for -GNSA -C1 Context and if only this Context Is_Open -- at the moment Res_Unit_Id := Config_Comp_Id + 1; -- ??? -- Not a good approach!!! elsif Get_Cont_Id (The_Context) = Curr_Cont_Id and then Curr_Cont_Id /= Nil_Context_Id and then Present (Curr_Tree_Id) then Res_Unit_Id := Main_Unit_Id; elsif Get_Cont_Id (The_Context) /= Nil_Context_Id then Reset_Context (Get_Cont_Id (The_Context)); if Tree_Processing_Mode (Get_Cont_Id (The_Context)) = GNSA then -- Note, that for GNSA Context no check is made! This works -- correctly only for -GNSA -C1 Context and if only this Context -- Is_Open at the moment Res_Unit_Id := Config_Comp_Id + 1; -- ??? -- Not a good approach!!! elsif Last_Tree (Get_Cont_Id (The_Context)) >= First_Tree_Id then Res_Unit_Id := Main_Unit_Id (First_Tree_Id); end if; end if; if Present (Res_Unit_Id) then return Get_Comp_Unit (Res_Unit_Id, Get_Cont_Id (The_Context)); else return Nil_Compilation_Unit; end if; exception when ASIS_Inappropriate_Context => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Outer_Call => Package_Name & "Main_Unit_In_Current_Tree"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Main_Unit_In_Current_Tree", Ex => Ex); end Main_Unit_In_Current_Tree; ----------- -- No_Op -- ----------- procedure No_Op (Element : Asis.Element; Control : in out Traverse_Control; State : in out No_State) is begin pragma Unreferenced (Element); pragma Unreferenced (Control); pragma Unreferenced (State); null; end No_Op; ------------------------- -- Normalize_Reference -- ------------------------- function Normalize_Reference (Ref : Asis.Element) return Asis.Element is Result : Asis.Element := Ref; begin case Expression_Kind (Ref) is when A_Selected_Component => Result := Selector (Ref); when An_Attribute_Reference => Result := Normalize_Reference (Prefix (Ref)); when others => null; end case; return Result; end Normalize_Reference; -------------------------- -- Original_Line_Number -- -------------------------- function Original_Line_Number (Element : Asis.Element; Compiled_Line : Line_Number_Positive) return Line_Number is SFI : Source_File_Index; Result : Line_Number := 0; begin Check_Validity (Element, Package_Name & "Original_Line_Number"); if Is_Text_Available (Element) then if Compiled_Line > Line_Number (Number_Of_Lines (Element)) then Raise_ASIS_Inappropriate_Line_Number (Package_Name & "Original_Line_Number"); end if; SFI := Get_Source_File_Index (Location (Element)); Result := Line_Number (Sinput.Physical_To_Logical (Physical_Line_Number (Compiled_Line), SFI)); end if; return Result; exception when ASIS_Inappropriate_Element | ASIS_Inappropriate_Line_Number => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Element, Outer_Call => Package_Name & "Original_Line_Number"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Original_Line_Number", Ex => Ex, Arg_Element => Element); end Original_Line_Number; ------------------------ -- Original_Text_Name -- ------------------------ function Original_Text_Name (Compilation_Unit : Asis.Compilation_Unit) return Wide_String is begin Check_Validity (Compilation_Unit, Package_Name & "Original_Text_Name"); if not Exists (Compilation_Unit) then return Nil_Asis_Wide_String; else -- Exists resets the Context! return To_Program_Text (Ref_File (Compilation_Unit)); end if; exception when ASIS_Inappropriate_Compilation_Unit => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Outer_Call => Package_Name & "Original_Text_Name"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Original_Text_Name", Ex => Ex, Arg_CU => Compilation_Unit); end Original_Text_Name; ----------------------------- -- Overrides_Type_Operator -- ----------------------------- function Overrides_Type_Operator (Op_Decl : Asis.Element; Type_Decl : Asis.Element) return Boolean is pragma Unreferenced (Type_Decl); Op_Entity : Entity_Id; Result : Boolean := False; begin -- We assume that Is_Type_Operator (Op_Decl, Type_Decl) is True -- !!! The implementation is incomplete!!! Op_Entity := Node (Names (Op_Decl) (1)); if Present (Overridden_Operation (Op_Entity)) then Result := True; end if; return Result; end Overrides_Type_Operator; --------------------- -- Primitive_Owner -- --------------------- function Primitive_Owner (Declaration : Asis.Declaration) return Asis.Type_Definition is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Declaration); Arg_Node : Node_Id := Empty; Par_Node : Node_Id := Empty; Res_Node : Node_Id := Empty; Result : Element := Nil_Element; Res_Kind : Internal_Element_Kinds := Not_An_Element; begin Check_Validity (Declaration, Package_Name & "Primitive_Owner"); if not (Arg_Kind = A_Procedure_Declaration or else Arg_Kind = A_Null_Procedure_Declaration or else Arg_Kind = A_Function_Declaration or else Arg_Kind = A_Procedure_Renaming_Declaration or else Arg_Kind = A_Function_Renaming_Declaration or else Arg_Kind = A_Procedure_Body_Declaration or else Arg_Kind = A_Function_Body_Declaration or else Arg_Kind = A_Procedure_Body_Stub or else Arg_Kind = A_Function_Body_Stub) then Raise_ASIS_Inappropriate_Element (Package_Name & "Primitive_Owner", Wrong_Kind => Arg_Kind); end if; if not Is_From_Implicit (Declaration) and then Asis.Declarations.Is_Dispatching_Operation (Declaration) then Arg_Node := Specification (Node (Declaration)); if Nkind (Arg_Node) = N_Function_Specification then if Has_Controlling_Result (Defining_Unit_Name (Arg_Node)) then Res_Node := Defining_Unit_Name (Arg_Node); Res_Node := Parent (Res_Node); Res_Node := Sinfo.Result_Definition (Res_Node); if Nkind (Res_Node) = N_Access_Definition then Res_Node := Sinfo.Subtype_Mark (Res_Node); end if; Res_Node := Entity (Res_Node); end if; end if; if No (Res_Node) then -- This means that we do not have a function with controlling -- result, so we have to go through the formal parameter list, -- and it can not be No_List or empty Par_Node := First (Parameter_Specifications (Arg_Node)); while Present (Par_Node) loop if Is_Controlling_Formal (Defining_Identifier (Par_Node)) then if Nkind (Parameter_Type (Par_Node)) = N_Access_Definition then Res_Node := Sinfo.Subtype_Mark (Parameter_Type (Par_Node)); else Res_Node := Defining_Identifier (Par_Node); end if; Res_Node := Etype (Res_Node); exit; end if; Par_Node := Next (Par_Node); end loop; end if; pragma Assert (Present (Res_Node)); if Nkind (Parent (Res_Node)) = N_Subtype_Declaration then Res_Node := Etype (Res_Node); end if; Res_Node := Parent (Res_Node); case Nkind (Res_Node) is when N_Private_Type_Declaration => if Tagged_Present (Res_Node) then Res_Kind := A_Tagged_Private_Type_Definition; else -- It can be non-tagged, if the full view is tagged Res_Kind := A_Private_Type_Definition; end if; when N_Private_Extension_Declaration => Res_Kind := A_Private_Extension_Definition; when N_Full_Type_Declaration => Res_Node := Sinfo.Type_Definition (Res_Node); when others => pragma Assert (False); null; end case; Result := Node_To_Element_New (Node => Res_Node, Internal_Kind => Res_Kind, Starting_Element => Declaration); end if; return Result; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Declaration, Outer_Call => Package_Name & "Primitive_Owner"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Primitive_Owner", Ex => Ex, Arg_Element => Declaration); end Primitive_Owner; ------------------------ -- Source_File_Status -- ------------------------ function Source_File_Status (Right : Asis.Compilation_Unit) return Source_File_Statuses is Arg_Kind : constant Unit_Kinds := Kind (Right); Result : Source_File_Statuses; begin Check_Validity (Right, Package_Name & "Source_File_Status"); case Arg_Kind is when Not_A_Unit | A_Nonexistent_Declaration | A_Nonexistent_Body | An_Unknown_Unit => Result := Absent; when others => Result := Source_Status (Right); end case; return Result; exception when ASIS_Inappropriate_Compilation_Unit => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Outer_Call => Package_Name & "Source_File_Status"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Source_File_Status", Ex => Ex, Arg_CU => Right); end Source_File_Status; ----------------------------------- -- Static_Expression_Value_Image -- ----------------------------------- function Static_Expression_Value_Image (Expression : Asis.Expression) return Wide_String is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Expression); Arg_Node : Node_Id := Empty; Result : Uint; Tmp_El : Asis.Element; begin Check_Validity (Expression, Package_Name & "Static_Expression_Value_Image"); if Arg_Kind not in Internal_Expression_Kinds then Raise_ASIS_Inappropriate_Element (Package_Name & "Static_Expression_Value_Image", Wrong_Kind => Arg_Kind); end if; if not (Is_True_Expression (Expression) and then Is_Static (Expression)) then return ""; end if; Arg_Node := R_Node (Expression); if Nkind (Arg_Node) = N_String_Literal then String_To_Name_Buffer (Strval (Arg_Node)); return To_Wide_String (Name_Buffer (1 .. Name_Len)); -- elsif Nkind (Arg_Node) = N_Real_Literal then -- begin -- return Long_Long_Float'Wide_Image -- (Get_LF_From_Ureal (Realval (Arg_Node))); -- exception -- when others => return ""; -- end; elsif Has_Enumeration_Type (Expression) or else Has_Integer_Type (Expression) then Result := Eval_Scalar_Node (Arg_Node); UI_Image (Result, Format => Decimal); return To_Wide_String (UI_Image_Buffer (1 .. UI_Image_Length)); else if Expression_Kind (Expression) = A_Selected_Component then Tmp_El := Selector (Expression); else Tmp_El := Expression; end if; if Expression_Kind (Tmp_El) = An_Identifier then begin Tmp_El := Corresponding_Name_Declaration (Tmp_El); exception when ASIS_Inappropriate_Element => Tmp_El := Nil_Element; end; if Declaration_Kind (Tmp_El) = A_Constant_Declaration then Tmp_El := Initialization_Expression (Tmp_El); return Static_Expression_Value_Image (Tmp_El); end if; end if; end if; return ""; exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Expression, Outer_Call => Package_Name & "Static_Expression_Value_Image"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Static_Expression_Value_Image", Ex => Ex, Arg_Element => Expression); end Static_Expression_Value_Image; ----------------------------------------- -- Static_Range_High_Bound_Value_Image -- ----------------------------------------- function Static_Range_High_Bound_Value_Image (Range_Element : Asis.Range_Constraint) return Wide_String is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Range_Element); Arg_Node : Node_Id := Empty; Arg_Ekind : Entity_Kind; Result : Uint; begin Check_Validity (Range_Element, Package_Name & "Static_Range_High_Bound_Value_Image"); if not (Arg_Kind = A_Range_Attribute_Reference or else Arg_Kind = A_Discrete_Range_Attribute_Reference_As_Subtype_Definition or else Arg_Kind = A_Discrete_Range_Attribute_Reference) then Raise_ASIS_Inappropriate_Element (Package_Name & "Static_Range_High_Bound_Value_Image", Wrong_Kind => Arg_Kind); end if; if not (Is_Static (Range_Element)) then return ""; end if; Arg_Node := R_Node (Range_Element); if Nkind (Arg_Node) = N_Range_Constraint then Arg_Node := Range_Expression (Arg_Node); end if; Arg_Ekind := Ekind (Etype (Arg_Node)); if not (Arg_Ekind in Discrete_Kind) then -- Implementation limitation!!! return ""; end if; Result := Eval_Scalar_Node (High_Bound (Arg_Node)); UI_Image (Result, Format => Decimal); return To_Wide_String (UI_Image_Buffer (1 .. UI_Image_Length)); exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Range_Element, Outer_Call => Package_Name & "Static_Range_High_Bound_Value_Image"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Static_Range_High_Bound_Value_Image", Ex => Ex, Arg_Element => Range_Element); end Static_Range_High_Bound_Value_Image; ---------------------------------------- -- Static_Range_Low_Bound_Value_Image -- ---------------------------------------- function Static_Range_Low_Bound_Value_Image (Range_Element : Asis.Range_Constraint) return Wide_String is Arg_Kind : constant Internal_Element_Kinds := Int_Kind (Range_Element); Arg_Node : Node_Id := Empty; Arg_Ekind : Entity_Kind; Result : Uint; begin Check_Validity (Range_Element, Package_Name & "Static_Range_Low_Bound_Value_Image"); if not (Arg_Kind = A_Range_Attribute_Reference or else Arg_Kind = A_Discrete_Range_Attribute_Reference_As_Subtype_Definition or else Arg_Kind = A_Discrete_Range_Attribute_Reference) then Raise_ASIS_Inappropriate_Element (Diagnosis => Package_Name & "Static_Range_Low_Bound_Value_Image", Wrong_Kind => Arg_Kind); end if; if not (Is_Static (Range_Element)) then return ""; end if; Arg_Node := R_Node (Range_Element); if Nkind (Arg_Node) = N_Range_Constraint then Arg_Node := Range_Expression (Arg_Node); end if; Arg_Ekind := Ekind (Etype (Arg_Node)); if not (Arg_Ekind in Discrete_Kind) then -- Implementation limitation!!! return ""; end if; Result := Eval_Scalar_Node (Low_Bound (Arg_Node)); UI_Image (Result, Format => Decimal); return To_Wide_String (UI_Image_Buffer (1 .. UI_Image_Length)); exception when ASIS_Inappropriate_Element => raise; when ASIS_Failed => if Status_Indicator = Unhandled_Exception_Error then Add_Call_Information (Argument => Range_Element, Outer_Call => Package_Name & "Static_Range_Low_Bound_Value_Image"); end if; raise; when Ex : others => Report_ASIS_Bug (Query_Name => Package_Name & "Static_Range_Low_Bound_Value_Image", Ex => Ex, Arg_Element => Range_Element); end Static_Range_Low_Bound_Value_Image; end Asis.Extensions;
------------------------------------------------------------------------------- -- Copyright (c) 2019, Daniel King -- 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. -- * The name of the copyright holder may not 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 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 Interfaces; use Interfaces; package body Keccak.Padding with SPARK_Mode => On is --------------------------- -- Pad101_Single_Block -- --------------------------- procedure Pad101_Single_Block (Block : in out Keccak.Types.Byte_Array; Num_Used_Bits : in Natural; Max_Bit_Length : in Natural) is Last_Bit : Keccak.Types.Byte; begin -- Append first 1 bit Block (Block'First + (Num_Used_Bits / 8)) := (Block (Block'First + (Num_Used_Bits / 8)) and (2**(Num_Used_Bits mod 8) - 1)) or Shift_Left (1, Num_Used_Bits mod 8); -- Append zeroes Block (Block'First + (Num_Used_Bits / 8) + 1 .. Block'Last) := (others => 0); -- Append last 1 bit if Max_Bit_Length mod 8 = 0 then Last_Bit := 2#1000_0000#; else Last_Bit := Shift_Right (2#1000_0000#, 8 - (Max_Bit_Length mod 8)); end if; Block (Block'Last) := Block (Block'Last) or Last_Bit; end Pad101_Single_Block; --------------------------- -- Pad101_Multi_Blocks -- --------------------------- procedure Pad101_Multi_Blocks (First_Block : in out Keccak.Types.Byte_Array; Num_Used_Bits : in Natural; Max_Bit_Length : in Natural; Next_Block : out Keccak.Types.Byte_Array; Spilled : out Boolean) is Num_Free_Bits : constant Natural := Max_Bit_Length - Num_Used_Bits; Last_Bit : Keccak.Types.Byte; First_Bit : Keccak.Types.Byte; begin Next_Block := (others => 0); if Max_Bit_Length mod 8 = 0 then Last_Bit := 2#1000_0000#; else Last_Bit := Shift_Right (2#1000_0000#, 8 - (Max_Bit_Length mod 8)); end if; First_Bit := Shift_Left (1, Num_Used_Bits mod 8); if Num_Free_Bits >= 2 then -- This is the case where there are at least 2 bits free in the first -- block. In this case, there's enough space for all the padding bits. -- -- +---------------------+---------------------+ -- | first block | next block | -- +---------------------+---------------------+ -- |<-total len->|<-pad->| Spilled := False; -- Append first 1 bit First_Block (First_Block'First + (Num_Used_Bits / 8)) := (First_Block (First_Block'First + (Num_Used_Bits / 8)) and (First_Bit - 1)) or First_Bit; -- Append zeroes First_Block (First_Block'First + (Num_Used_Bits / 8) + 1 .. First_Block'Last) := (others => 0); -- Append last 1 bit First_Block (First_Block'Last) := First_Block (First_Block'Last) or Last_Bit; else -- This is the case where there is only 1 bit free in the first block. -- In this case, the padding spills into another block. -- -- +----------------+----------------+ -- | first block | next block | -- +----------------+----------------+ -- |<--total len-->|<-------pad----->| Spilled := True; pragma Assert (Num_Free_Bits = 1); -- First 1 bit First_Block (First_Block'Last) := (First_Block (First_Block'Last) and (First_Bit - 1)) or First_Bit; -- Next_Block is already padded with zeroes (see above). -- Append last 1 bit Next_Block (Next_Block'Last) := Last_Bit; end if; end Pad101_Multi_Blocks; ----------------------------- -- XOR_Pad101_Into_State -- ----------------------------- procedure XOR_Pad101_Into_State (State : in out State_Type; First_Bit : in Natural; Last_Bit : in Natural) is begin XOR_Byte_Into_State (State => State, Offset => First_Bit / 8, Value => Shift_Left (1, First_Bit mod 8)); XOR_Byte_Into_State (State => State, Offset => Last_Bit / 8, Value => Shift_Left (1, Last_Bit mod 8)); end XOR_Pad101_Into_State; ------------------------------------- -- Pad10_Multi_Blocks_Big_Endian -- ------------------------------------- procedure Pad10_Multi_Blocks_Big_Endian (First_Block : in out Keccak.Types.Byte_Array; Num_Used_Bits : in Natural; Max_Bit_Length : in Natural; Next_Block : out Keccak.Types.Byte_Array; Spilled : out Boolean) is Num_Free_Bits : constant Natural := Max_Bit_Length - Num_Used_Bits; Pos : Keccak.Types.Index_Number; First_Bit : Keccak.Types.Byte; begin Next_Block := (others => 0); First_Bit := Shift_Right (16#80#, Num_Used_Bits mod 8); if Num_Free_Bits >= 2 then -- This is the case where there are at least 2 bits free in the first -- block. In this case, there's enough space for all the padding bits. -- -- +---------------------+---------------------+ -- | first block | next block | -- +---------------------+---------------------+ -- |<-total len->|<-pad->| Spilled := False; -- Append first 1 bit Pos := First_Block'First + (Num_Used_Bits / 8); if Num_Used_Bits mod 8 = 0 then First_Block (Pos) := First_Bit; else -- Align last bits to the MSB. -- E.g. move 2#0000_0011# --> 2#1100_0000# First_Block (Pos) := Shift_Left (First_Block (Pos), 8 - (Num_Used_Bits mod 8)); First_Block (Pos) := First_Block (Pos) or First_Bit; end if; -- Append zeroes First_Block (First_Block'First + (Num_Used_Bits / 8) + 1 .. First_Block'Last) := (others => 0); else -- This is the case where there is only 1 bit free in the first block. -- In this case, the padding spills into another block. -- -- +----------------+----------------+ -- | first block | next block | -- +----------------+----------------+ -- |<--total len-->|<-------pad----->| Spilled := True; pragma Assert (Num_Free_Bits = 1); -- First 1 bit Pos := First_Block'First + (Num_Used_Bits / 8); if Num_Used_Bits mod 8 = 0 then First_Block (Pos) := First_Bit; else -- Align last bits to the MSB. -- E.g. move 2#0000_0011# --> 2#1100_0000# First_Block (Pos) := Shift_Left (First_Block (Pos), 8 - (Num_Used_Bits mod 8)); First_Block (Pos) := First_Block (Pos) or First_Bit; end if; -- Next_Block is already padded with zeroes (see above). end if; end Pad10_Multi_Blocks_Big_Endian; end Keccak.Padding;
------------------------------------------------------------------------------ -- -- -- Copyright (c) 2016 Vitalij Bondarenko <vibondare@gmail.com> -- -- -- ------------------------------------------------------------------------------ -- -- -- The MIT License (MIT) -- -- -- -- 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 Formatted_Output.Integer_Output; package Formatted_Output_Natural is new Formatted_Output.Integer_Output (Natural);
------------------------------------------------------------------------------ -- Copyright (c) 2013-2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Encodings; package body Natools.S_Expressions.Parsers is ---------------------- -- Parser Interface -- ---------------------- procedure Reset (Self : in out Parser; Hard : in Boolean := False) is Null_Stack : Lockable.Lock_Stack; begin Self.Internal := (State => Waiting); Self.Next_Event := Events.End_Of_Input; Self.Latest := Events.Error; Self.Level := 0; Self.Lock_Stack := Null_Stack; Self.Locked := False; if Hard then Self.Pending.Hard_Reset; Self.Buffer.Hard_Reset; else Self.Pending.Soft_Reset; Self.Buffer.Soft_Reset; end if; end Reset; overriding function Current_Event (Self : in Parser) return Events.Event is begin if Self.Locked then return Events.End_Of_Input; else return Self.Latest; end if; end Current_Event; overriding function Current_Atom (Self : in Parser) return Atom is begin if Self.Locked or Self.Latest /= Events.Add_Atom then raise Program_Error; end if; return Self.Buffer.Data; end Current_Atom; overriding function Current_Level (Self : in Parser) return Natural is begin if Self.Locked then return 0; else return Self.Level - Lockable.Current_Level (Self.Lock_Stack); end if; end Current_Level; overriding procedure Query_Atom (Self : in Parser; Process : not null access procedure (Data : in Atom)) is begin if Self.Locked or Self.Latest /= Events.Add_Atom then raise Program_Error; end if; Self.Buffer.Query (Process); end Query_Atom; overriding procedure Read_Atom (Self : in Parser; Data : out Atom; Length : out Count) is begin if Self.Locked or Self.Latest /= Events.Add_Atom then raise Program_Error; end if; Self.Buffer.Peek (Data, Length); end Read_Atom; overriding procedure Next (Self : in out Parser; Event : out Events.Event) is O : Octet; begin if Self.Locked then Event := Events.End_Of_Input; return; end if; Self.Latest := Events.Error; loop -- Process pending events if Self.Next_Event /= Events.End_Of_Input then Self.Latest := Self.Next_Event; Self.Next_Event := Events.End_Of_Input; case Self.Latest is when Events.Open_List => Self.Level := Self.Level + 1; when Events.Close_List => if Self.Level > 0 then Self.Level := Self.Level - 1; end if; when others => null; end case; exit; end if; -- Read a single octet from source if Self.Pending.Length = 0 then Read_More (Parser'Class (Self), Self.Pending); if Self.Pending.Length = 0 then Self.Latest := Events.End_Of_Input; exit; end if; Self.Pending.Invert; end if; Self.Pending.Pop (O); -- Process octet case Self.Internal.State is when Waiting => Self.Buffer.Soft_Reset; case O is when 0 | Encodings.Space | Encodings.HT | Encodings.CR | Encodings.LF | Encodings.VT | Encodings.FF => null; when Encodings.List_Begin => Self.Latest := Events.Open_List; Self.Level := Self.Level + 1; when Encodings.List_End => Self.Latest := Events.Close_List; if Self.Level > 0 then Self.Level := Self.Level - 1; end if; when Encodings.Base64_Atom_Begin => Self.Internal := (State => Base64_Atom, Chunk => (Data => <>, Length => 0)); when Encodings.Base64_Expr_Begin => Self.Internal := (State => Base64_Expr, Chunk => (Data => <>, Length => 0)); when Encodings.Hex_Atom_Begin => Self.Internal := (State => Hex_Atom, Nibble_Buffer => 0); when Encodings.Quoted_Atom_Begin => Self.Internal := (State => Quoted_Atom, Escape => (Data => <>, Length => 0)); when Encodings.Digit_0 .. Encodings.Digit_9 => Self.Internal := (State => Number); Atom_Buffers.Append (Self.Buffer, O); when others => Self.Internal := (State => Token); Atom_Buffers.Append (Self.Buffer, O); end case; when Base64_Atom | Base64_Expr => if Encodings.Is_Base64_Digit (O) then Self.Internal.Chunk.Data (Self.Internal.Chunk.Length) := O; Self.Internal.Chunk.Length := Self.Internal.Chunk.Length + 1; if Self.Internal.Chunk.Length = 4 then Self.Buffer.Append (Encodings.Decode_Base64 (Self.Internal.Chunk.Data)); Self.Internal.Chunk.Length := 0; end if; elsif (O = Encodings.Base64_Atom_End and Self.Internal.State = Base64_Atom) or (O = Encodings.Base64_Expr_End and Self.Internal.State = Base64_Expr) then Self.Buffer.Append (Encodings.Decode_Base64 (Self.Internal.Chunk.Data (0 .. Self.Internal.Chunk.Length - 1))); if Self.Internal.State = Base64_Atom then Self.Latest := Events.Add_Atom; else Self.Pending.Append_Reverse (Self.Buffer.Data); Self.Buffer.Soft_Reset; end if; Self.Internal := (State => Waiting); end if; when Hex_Atom => if Encodings.Is_Hex_Digit (O) then if Encodings.Is_Hex_Digit (Self.Internal.Nibble_Buffer) then Self.Buffer.Append (Encodings.Decode_Hex (Self.Internal.Nibble_Buffer, O)); Self.Internal.Nibble_Buffer := 0; else Self.Internal.Nibble_Buffer := O; end if; elsif O = Encodings.Hex_Atom_End then Self.Latest := Events.Add_Atom; Self.Internal := (State => Waiting); end if; when Number => case O is when Encodings.Digit_0 .. Encodings.Digit_9 => Self.Buffer.Append (O); when Encodings.Verbatim_Begin => Self.Internal := (State => Verbatim_Atom, Size => 0); for I in 1 .. Self.Buffer.Length loop Self.Internal.Size := Self.Internal.Size * 10 + Count (Self.Buffer.Element (I) - Encodings.Digit_0); end loop; Self.Buffer.Soft_Reset; if Self.Internal.Size = 0 then Self.Latest := Events.Add_Atom; Self.Internal := (State => Waiting); else Self.Buffer.Preallocate (Self.Internal.Size); end if; when 0 | Encodings.Space | Encodings.HT | Encodings.CR | Encodings.LF | Encodings.VT | Encodings.FF => Self.Latest := Events.Add_Atom; Self.Internal := (State => Waiting); when Encodings.List_Begin => Self.Internal := (State => Waiting); Self.Next_Event := Events.Open_List; Self.Latest := Events.Add_Atom; when Encodings.List_End => Self.Internal := (State => Waiting); Self.Next_Event := Events.Close_List; Self.Latest := Events.Add_Atom; when Encodings.Base64_Atom_Begin => Self.Internal := (State => Base64_Atom, Chunk => (Data => <>, Length => 0)); Self.Buffer.Soft_Reset; when Encodings.Base64_Expr_Begin => Self.Internal := (State => Base64_Expr, Chunk => (Data => <>, Length => 0)); Self.Buffer.Soft_Reset; when Encodings.Hex_Atom_Begin => Self.Internal := (State => Hex_Atom, Nibble_Buffer => 0); Self.Buffer.Soft_Reset; when Encodings.Quoted_Atom_Begin => Self.Internal := (State => Quoted_Atom, Escape => (Data => <>, Length => 0)); Self.Buffer.Soft_Reset; when others => Self.Buffer.Append (O); Self.Internal := (State => Token); end case; when Quoted_Atom => case Self.Internal.Escape.Length is when 0 => case O is when Encodings.Escape => Self.Internal.Escape.Data (0) := O; Self.Internal.Escape.Length := 1; when Encodings.Quoted_Atom_End => Self.Internal := (State => Waiting); Self.Latest := Events.Add_Atom; when others => Self.Buffer.Append (O); end case; when 1 => case O is when Character'Pos ('b') => Self.Buffer.Append (8); Self.Internal.Escape.Length := 0; when Character'Pos ('t') => Self.Buffer.Append (9); Self.Internal.Escape.Length := 0; when Character'Pos ('n') => Self.Buffer.Append (10); Self.Internal.Escape.Length := 0; when Character'Pos ('v') => Self.Buffer.Append (11); Self.Internal.Escape.Length := 0; when Character'Pos ('f') => Self.Buffer.Append (12); Self.Internal.Escape.Length := 0; when Character'Pos ('r') => Self.Buffer.Append (13); Self.Internal.Escape.Length := 0; when Character'Pos (''') | Encodings.Escape | Encodings.Quoted_Atom_End => Self.Buffer.Append (O); Self.Internal.Escape.Length := 0; when Encodings.Digit_0 .. Encodings.Digit_0 + 3 | Character'Pos ('x') | Encodings.CR | Encodings.LF => Self.Internal.Escape.Data (1) := O; Self.Internal.Escape.Length := 2; when others => Self.Buffer.Append (Self.Internal.Escape.Data (0)); Self.Pending.Append (O); Self.Internal.Escape.Length := 0; end case; when 2 => if (Self.Internal.Escape.Data (1) in Encodings.Digit_0 .. Encodings.Digit_0 + 3 and O in Encodings.Digit_0 .. Encodings.Digit_0 + 7) or (Self.Internal.Escape.Data (1) = Character'Pos ('x') and then Encodings.Is_Hex_Digit (O)) then Self.Internal.Escape.Data (2) := O; Self.Internal.Escape.Length := 3; elsif Self.Internal.Escape.Data (1) = Encodings.CR or Self.Internal.Escape.Data (1) = Encodings.LF then Self.Internal.Escape.Length := 0; if not ((O = Encodings.CR or O = Encodings.LF) and O /= Self.Internal.Escape.Data (1)) then Self.Pending.Append (O); end if; else Self.Buffer.Append ((Self.Internal.Escape.Data (0), Self.Internal.Escape.Data (1))); Self.Pending.Append (O); Self.Internal.Escape.Length := 0; end if; when 3 => if Self.Internal.Escape.Data (1) = Character'Pos ('x') then if Encodings.Is_Hex_Digit (O) then Self.Buffer.Append (Encodings.Decode_Hex (Self.Internal.Escape.Data (2), O)); else Self.Buffer.Append ((Self.Internal.Escape.Data (0), Self.Internal.Escape.Data (1), Self.Internal.Escape.Data (2))); Self.Pending.Append (O); end if; else pragma Assert (Self.Internal.Escape.Data (1) in Encodings.Digit_0 .. Encodings.Digit_0 + 3); if O in Encodings.Digit_0 .. Encodings.Digit_0 + 7 then Atom_Buffers.Append (Self.Buffer, (Self.Internal.Escape.Data (1) - Encodings.Digit_0) * 2**6 + (Self.Internal.Escape.Data (2) - Encodings.Digit_0) * 2**3 + (O - Encodings.Digit_0)); else Self.Buffer.Append ((Self.Internal.Escape.Data (0), Self.Internal.Escape.Data (1), Self.Internal.Escape.Data (2))); Self.Pending.Append (O); end if; end if; Self.Internal.Escape.Length := 0; when 4 => raise Program_Error; end case; when Token => case O is when 0 | Encodings.Space | Encodings.HT | Encodings.CR | Encodings.LF | Encodings.VT | Encodings.FF => Self.Internal := (State => Waiting); Self.Latest := Events.Add_Atom; when Encodings.List_Begin => Self.Internal := (State => Waiting); Self.Next_Event := Events.Open_List; Self.Latest := Events.Add_Atom; when Encodings.List_End => Self.Internal := (State => Waiting); Self.Next_Event := Events.Close_List; Self.Latest := Events.Add_Atom; when others => Self.Buffer.Append (O); end case; when Verbatim_Atom => Self.Buffer.Append (O); pragma Assert (Self.Buffer.Length <= Self.Internal.Size); if Self.Buffer.Length = Self.Internal.Size then Self.Internal := (State => Waiting); Self.Latest := Events.Add_Atom; end if; end case; exit when Self.Latest /= Events.Error; end loop; if Self.Latest = Events.Close_List and then Self.Level < Lockable.Current_Level (Self.Lock_Stack) then Self.Locked := True; Event := Events.End_Of_Input; else Event := Self.Latest; end if; end Next; overriding procedure Lock (Self : in out Parser; State : out Lockable.Lock_State) is begin Lockable.Push_Level (Self.Lock_Stack, Self.Level, State); end Lock; overriding procedure Unlock (Self : in out Parser; State : in out Lockable.Lock_State; Finish : in Boolean := True) is Previous_Level : constant Natural := Lockable.Current_Level (Self.Lock_Stack); Event : Events.Event; begin Lockable.Pop_Level (Self.Lock_Stack, State); State := Lockable.Null_State; if Finish then Event := Self.Current_Event; loop case Event is when Events.Open_List | Events.Add_Atom => null; when Events.Close_List => exit when Self.Level < Previous_Level; when Events.Error | Events.End_Of_Input => exit; end case; Self.Next (Event); end loop; end if; Self.Locked := Self.Level < Lockable.Current_Level (Self.Lock_Stack); end Unlock; ------------------- -- Stream Parser -- ------------------- overriding procedure Read_More (Self : in out Stream_Parser; Buffer : out Atom_Buffers.Atom_Buffer) is Item : Ada.Streams.Stream_Element_Array (1 .. 128); Last : Ada.Streams.Stream_Element_Offset; begin Self.Input.Read (Item, Last); if Last in Item'Range then Buffer.Append (Item (Item'First .. Last)); end if; end Read_More; ------------------- -- Memory Parser -- ------------------- not overriding function Create (Data : in Ada.Streams.Stream_Element_Array) return Memory_Parser is begin return P : Memory_Parser do P.Pending.Append (Data); P.Pending.Invert; end return; end Create; not overriding function Create_From_String (Data : in String) return Memory_Parser is begin return Create (To_Atom (Data)); end Create_From_String; end Natools.S_Expressions.Parsers;
package TREE_STATIC_Def is type Int is record Value : Integer; end record; procedure check (I : Int; v : integer); One : constant Int := (Value => 1); end;
<?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>rgb2yuv11</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>16</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_channels_ch1</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>in.channels.ch1</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>8</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>2457600</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>in_channels_ch2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in.channels.ch2</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>8</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>2457600</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>in_channels_ch3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in.channels.ch3</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>8</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>2457600</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>in_width</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in.width</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>in_height</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in.height</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>out_channels_ch1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.channels.ch1</originalName> <rtlName></rtlName> <coreName>FIFO_LUTRAM</coreName> </Obj> <bitwidth>8</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> <item class_id_reference="3" object_id="_7"> <Value> <Obj> <type>1</type> <id>7</id> <name>out_channels_ch2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.channels.ch2</originalName> <rtlName></rtlName> <coreName>FIFO_LUTRAM</coreName> </Obj> <bitwidth>8</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> <item class_id_reference="3" object_id="_8"> <Value> <Obj> <type>1</type> <id>8</id> <name>out_channels_ch3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.channels.ch3</originalName> <rtlName></rtlName> <coreName>FIFO_LUTRAM</coreName> </Obj> <bitwidth>8</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> <item class_id_reference="3" object_id="_9"> <Value> <Obj> <type>1</type> <id>9</id> <name>out_width</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.width</originalName> <rtlName></rtlName> <coreName>FIFO_LUTRAM</coreName> </Obj> <bitwidth>16</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> <item class_id_reference="3" object_id="_10"> <Value> <Obj> <type>1</type> <id>10</id> <name>out_height</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out.height</originalName> <rtlName></rtlName> <coreName>FIFO_LUTRAM</coreName> </Obj> <bitwidth>16</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> <item class_id_reference="3" object_id="_11"> <Value> <Obj> <type>1</type> <id>11</id> <name>Y_scale</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> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_12"> <Value> <Obj> <type>1</type> <id>12</id> <name>U_scale</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> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_13"> <Value> <Obj> <type>1</type> <id>13</id> <name>V_scale</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> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_14"> <Value> <Obj> <type>1</type> <id>14</id> <name>Y_scale_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>FIFO_LUTRAM</coreName> </Obj> <bitwidth>8</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> <item class_id_reference="3" object_id="_15"> <Value> <Obj> <type>1</type> <id>15</id> <name>U_scale_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>FIFO_LUTRAM</coreName> </Obj> <bitwidth>8</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> <item class_id_reference="3" object_id="_16"> <Value> <Obj> <type>1</type> <id>16</id> <name>V_scale_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>FIFO_LUTRAM</coreName> </Obj> <bitwidth>8</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>93</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_17"> <Value> <Obj> <type>0</type> <id>23</id> <name>V_scale_read</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> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>129</item> <item>130</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>24</id> <name>U_scale_read</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> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>131</item> <item>132</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>25</id> <name>Y_scale_read</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> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>133</item> <item>134</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>26</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>136</item> <item>137</item> <item>138</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>28</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>139</item> <item>140</item> <item>141</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>30</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>142</item> <item>143</item> <item>144</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>31</id> <name>width</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>43</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second class_id="12" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="13" tracking_level="0" version="0"> <first class_id="14" tracking_level="0" version="0"> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>43</second> </item> </second> </item> </inlineStackInfo> <originalName>width</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>146</item> <item>147</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>32</id> <name>height</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>44</second> </item> </second> </item> </inlineStackInfo> <originalName>height</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>148</item> <item>149</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>33</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>45</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>45</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>151</item> <item>152</item> <item>153</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>34</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>46</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>154</item> <item>155</item> <item>156</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>35</id> <name>cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>43</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>43</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>157</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>36</id> <name>cast1</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>44</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>158</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>37</id> <name>bound</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>44</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>159</item> <item>160</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>38</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>49</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>161</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>40</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>32</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>163</item> <item>164</item> <item>165</item> <item>166</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>41</id> <name>x_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>168</item> <item>169</item> <item>170</item> <item>171</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>42</id> <name>y_i_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>172</item> <item>173</item> <item>174</item> <item>175</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>43</id> <name>exitcond_flatten</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>44</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>176</item> <item>177</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>44</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>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>178</item> <item>180</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>45</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>44</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>181</item> <item>182</item> <item>183</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>47</id> <name>x</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>185</item> <item>186</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>50</id> <name>exitcond_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>52</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>52</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>187</item> <item>188</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>51</id> <name>y_i_i_mid2</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>52</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>52</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>189</item> <item>190</item> <item>191</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>52</id> <name>tmp_i_i_mid2_v</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>192</item> <item>193</item> <item>194</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>53</id> <name>tmp_22</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>195</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>54</id> <name>p_shl_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>23</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>197</item> <item>198</item> <item>200</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>55</id> <name>tmp_23</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>201</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>56</id> <name>p_shl1_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>23</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>203</item> <item>204</item> <item>206</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>57</id> <name>tmp_s</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>23</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>207</item> <item>208</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>61</id> <name>tmp_i_i_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>23</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>209</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>62</id> <name>tmp_24</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>23</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>210</item> <item>211</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>63</id> <name>tmp_26_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</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>212</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>64</id> <name>in_channels_ch1_addr</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>22</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>213</item> <item>215</item> <item>216</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>65</id> <name>in_channels_ch2_addr</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>55</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>55</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>22</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>217</item> <item>218</item> <item>219</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>66</id> <name>in_channels_ch3_addr</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>56</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>56</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>22</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>220</item> <item>221</item> <item>222</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>67</id> <name>R</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName>R</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>223</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>68</id> <name>G</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>55</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>55</second> </item> </second> </item> </inlineStackInfo> <originalName>G</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>224</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>69</id> <name>B</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>56</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>56</second> </item> </second> </item> </inlineStackInfo> <originalName>B</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>225</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>70</id> <name>tmp_40_cast14_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>226</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>71</id> <name>p_shl5_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>14</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>228</item> <item>229</item> <item>231</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>72</id> <name>p_shl5_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>232</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>73</id> <name>p_shl6_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>234</item> <item>235</item> <item>237</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>74</id> <name>p_shl6_cast_i_i_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>238</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>75</id> <name>tmp_42_cast11_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</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>239</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>76</id> <name>tmp_42_cast11_i_i_ca</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>240</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_62"> <Value> <Obj> <type>0</type> <id>77</id> <name>p_shl4_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>242</item> <item>243</item> <item>245</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_63"> <Value> <Obj> <type>0</type> <id>78</id> <name>p_shl4_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</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>246</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_64"> <Value> <Obj> <type>0</type> <id>79</id> <name>tmp_44_cast10_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>247</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_65"> <Value> <Obj> <type>0</type> <id>80</id> <name>tmp_45_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>249</item> <item>250</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_66"> <Value> <Obj> <type>0</type> <id>81</id> <name>tmp</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>252</item> <item>253</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_67"> <Value> <Obj> <type>0</type> <id>82</id> <name>tmp_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>254</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_68"> <Value> <Obj> <type>0</type> <id>83</id> <name>tmp_46_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>255</item> <item>256</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_69"> <Value> <Obj> <type>0</type> <id>84</id> <name>tmp_46_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</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>257</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_70"> <Value> <Obj> <type>0</type> <id>85</id> <name>tmp1</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>258</item> <item>259</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_71"> <Value> <Obj> <type>0</type> <id>86</id> <name>tmp2</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>260</item> <item>261</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_72"> <Value> <Obj> <type>0</type> <id>87</id> <name>tmp2_cast</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</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>262</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_73"> <Value> <Obj> <type>0</type> <id>88</id> <name>tmp_48_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>263</item> <item>264</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_74"> <Value> <Obj> <type>0</type> <id>89</id> <name>tmp_50_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>266</item> <item>267</item> <item>269</item> <item>271</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_75"> <Value> <Obj> <type>0</type> <id>90</id> <name>Y</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>57</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>57</second> </item> </second> </item> </inlineStackInfo> <originalName>Y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>273</item> <item>274</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_76"> <Value> <Obj> <type>0</type> <id>91</id> <name>tmp_51_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>276</item> <item>277</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_77"> <Value> <Obj> <type>0</type> <id>92</id> <name>tmp_52_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>279</item> <item>280</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_78"> <Value> <Obj> <type>0</type> <id>93</id> <name>p_shl2_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>281</item> <item>282</item> <item>283</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_79"> <Value> <Obj> <type>0</type> <id>94</id> <name>p_shl2_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</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>284</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_80"> <Value> <Obj> <type>0</type> <id>95</id> <name>p_shl3_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>12</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>286</item> <item>287</item> <item>289</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_81"> <Value> <Obj> <type>0</type> <id>96</id> <name>p_shl3_cast7_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>290</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_82"> <Value> <Obj> <type>0</type> <id>97</id> <name>p_shl3_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</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>291</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_83"> <Value> <Obj> <type>0</type> <id>98</id> <name>tmp_53_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>292</item> <item>293</item> </oprand_edges> <opcode>sub</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_84"> <Value> <Obj> <type>0</type> <id>99</id> <name>tmp_54_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>295</item> <item>296</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_85"> <Value> <Obj> <type>0</type> <id>100</id> <name>tmp_54_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</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>297</item> </oprand_edges> <opcode>sext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_86"> <Value> <Obj> <type>0</type> <id>101</id> <name>tmp3</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>298</item> <item>299</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_87"> <Value> <Obj> <type>0</type> <id>102</id> <name>tmp_56_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>300</item> <item>301</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_88"> <Value> <Obj> <type>0</type> <id>103</id> <name>tmp_58_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>302</item> <item>303</item> <item>304</item> <item>305</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_89"> <Value> <Obj> <type>0</type> <id>104</id> <name>U</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName>U</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>306</item> <item>308</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_90"> <Value> <Obj> <type>0</type> <id>105</id> <name>tmp_59_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>310</item> <item>311</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_91"> <Value> <Obj> <type>0</type> <id>106</id> <name>tmp_60_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>313</item> <item>314</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_92"> <Value> <Obj> <type>0</type> <id>107</id> <name>p_neg_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>13</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>316</item> <item>317</item> </oprand_edges> <opcode>sub</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_93"> <Value> <Obj> <type>0</type> <id>108</id> <name>p_neg_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>14</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>318</item> </oprand_edges> <opcode>sext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_94"> <Value> <Obj> <type>0</type> <id>109</id> <name>p_shl1_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>319</item> <item>320</item> <item>321</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_95"> <Value> <Obj> <type>0</type> <id>110</id> <name>p_shl1_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>14</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>322</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_96"> <Value> <Obj> <type>0</type> <id>111</id> <name>tmp_61_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>14</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>323</item> <item>324</item> </oprand_edges> <opcode>sub</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_97"> <Value> <Obj> <type>0</type> <id>112</id> <name>tmp_61_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</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>325</item> </oprand_edges> <opcode>sext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_98"> <Value> <Obj> <type>0</type> <id>113</id> <name>tmp_62_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>326</item> <item>327</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_99"> <Value> <Obj> <type>0</type> <id>114</id> <name>tmp_62_cast_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</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>328</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_100"> <Value> <Obj> <type>0</type> <id>115</id> <name>tmp4</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>329</item> <item>330</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_101"> <Value> <Obj> <type>0</type> <id>116</id> <name>tmp_64_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>331</item> <item>332</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_102"> <Value> <Obj> <type>0</type> <id>117</id> <name>tmp_66_i_i</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>333</item> <item>334</item> <item>335</item> <item>336</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_103"> <Value> <Obj> <type>0</type> <id>118</id> <name>V</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName>V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>337</item> <item>338</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_104"> <Value> <Obj> <type>0</type> <id>119</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>60</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>60</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>340</item> <item>341</item> <item>342</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_105"> <Value> <Obj> <type>0</type> <id>120</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</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>343</item> <item>344</item> <item>345</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_106"> <Value> <Obj> <type>0</type> <id>121</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>62</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</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>346</item> <item>347</item> <item>348</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_107"> <Value> <Obj> <type>0</type> <id>123</id> <name>y</name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>52</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>52</second> </item> </second> </item> </inlineStackInfo> <originalName>y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>349</item> <item>350</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_108"> <Value> <Obj> <type>0</type> <id>124</id> <name></name> <fileName>yuv_filter.c</fileName> <fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</fileDirectory> <lineNumber>52</lineNumber> <contextFuncName>rgb2yuv</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>yuv_filter.c</first> <second>rgb2yuv</second> </first> <second>52</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>351</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_109"> <Value> <Obj> <type>0</type> <id>126</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>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>23</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_110"> <Value> <Obj> <type>2</type> <id>162</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="_111"> <Value> <Obj> <type>2</type> <id>167</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>16</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_112"> <Value> <Obj> <type>2</type> <id>179</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>1</content> </item> <item class_id_reference="16" object_id="_113"> <Value> <Obj> <type>2</type> <id>184</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>16</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_114"> <Value> <Obj> <type>2</type> <id>199</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>10</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_115"> <Value> <Obj> <type>2</type> <id>205</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>0</content> </item> <item class_id_reference="16" object_id="_116"> <Value> <Obj> <type>2</type> <id>214</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="_117"> <Value> <Obj> <type>2</type> <id>230</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>6</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_118"> <Value> <Obj> <type>2</type> <id>236</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>1</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_119"> <Value> <Obj> <type>2</type> <id>244</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="_120"> <Value> <Obj> <type>2</type> <id>248</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>13</bitwidth> </Value> <const_type>0</const_type> <content>25</content> </item> <item class_id_reference="16" object_id="_121"> <Value> <Obj> <type>2</type> <id>251</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>10</bitwidth> </Value> <const_type>0</const_type> <content>128</content> </item> <item class_id_reference="16" object_id="_122"> <Value> <Obj> <type>2</type> <id>268</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>8</content> </item> <item class_id_reference="16" object_id="_123"> <Value> <Obj> <type>2</type> <id>270</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>15</content> </item> <item class_id_reference="16" object_id="_124"> <Value> <Obj> <type>2</type> <id>272</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>16</content> </item> <item class_id_reference="16" object_id="_125"> <Value> <Obj> <type>2</type> <id>275</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>15</bitwidth> </Value> <const_type>0</const_type> <content>32730</content> </item> <item class_id_reference="16" object_id="_126"> <Value> <Obj> <type>2</type> <id>278</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>16</bitwidth> </Value> <const_type>0</const_type> <content>65462</content> </item> <item class_id_reference="16" object_id="_127"> <Value> <Obj> <type>2</type> <id>288</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="_128"> <Value> <Obj> <type>2</type> <id>294</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>15</bitwidth> </Value> <const_type>0</const_type> <content>128</content> </item> <item class_id_reference="16" object_id="_129"> <Value> <Obj> <type>2</type> <id>307</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>128</content> </item> <item class_id_reference="16" object_id="_130"> <Value> <Obj> <type>2</type> <id>309</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>15</bitwidth> </Value> <const_type>0</const_type> <content>122</content> </item> <item class_id_reference="16" object_id="_131"> <Value> <Obj> <type>2</type> <id>312</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>16</bitwidth> </Value> <const_type>0</const_type> <content>65442</content> </item> <item class_id_reference="16" object_id="_132"> <Value> <Obj> <type>2</type> <id>315</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>13</bitwidth> </Value> <const_type>0</const_type> <content>0</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="_133"> <Obj> <type>3</type> <id>39</id> <name>entry</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>14</count> <item_version>0</item_version> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>28</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> </node_objs> </item> <item class_id_reference="18" object_id="_134"> <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>6</count> <item_version>0</item_version> <item>40</item> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> </node_objs> </item> <item class_id_reference="18" object_id="_135"> <Obj> <type>3</type> <id>125</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>72</count> <item_version>0</item_version> <item>47</item> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>57</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> <item>65</item> <item>66</item> <item>67</item> <item>68</item> <item>69</item> <item>70</item> <item>71</item> <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> <item>82</item> <item>83</item> <item>84</item> <item>85</item> <item>86</item> <item>87</item> <item>88</item> <item>89</item> <item>90</item> <item>91</item> <item>92</item> <item>93</item> <item>94</item> <item>95</item> <item>96</item> <item>97</item> <item>98</item> <item>99</item> <item>100</item> <item>101</item> <item>102</item> <item>103</item> <item>104</item> <item>105</item> <item>106</item> <item>107</item> <item>108</item> <item>109</item> <item>110</item> <item>111</item> <item>112</item> <item>113</item> <item>114</item> <item>115</item> <item>116</item> <item>117</item> <item>118</item> <item>119</item> <item>120</item> <item>121</item> <item>123</item> <item>124</item> </node_objs> </item> <item class_id_reference="18" object_id="_136"> <Obj> <type>3</type> <id>127</id> <name>.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>126</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>169</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_137"> <id>130</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>132</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>134</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>137</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>138</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>140</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>141</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>143</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>144</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>147</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>149</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>152</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>153</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>155</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>156</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>157</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>158</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>159</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>160</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>161</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>163</id> <edge_type>1</edge_type> <source_obj>162</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>164</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>165</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>166</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>168</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>169</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>170</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>171</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>172</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>173</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>174</id> <edge_type>1</edge_type> <source_obj>123</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>175</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>176</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>177</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>178</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>180</id> <edge_type>1</edge_type> <source_obj>179</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>181</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>182</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>183</id> <edge_type>2</edge_type> <source_obj>127</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>185</id> <edge_type>1</edge_type> <source_obj>184</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>186</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>187</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>188</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>189</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>190</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>191</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>192</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>193</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>194</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>195</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>198</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>200</id> <edge_type>1</edge_type> <source_obj>199</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>201</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>204</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>206</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>207</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>208</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>209</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>210</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>211</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>212</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>213</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_199"> <id>215</id> <edge_type>1</edge_type> <source_obj>214</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_200"> <id>216</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_201"> <id>217</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_202"> <id>218</id> <edge_type>1</edge_type> <source_obj>214</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_203"> <id>219</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_204"> <id>220</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_205"> <id>221</id> <edge_type>1</edge_type> <source_obj>214</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_206"> <id>222</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_207"> <id>223</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_208"> <id>224</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_209"> <id>225</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_210"> <id>226</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_211"> <id>229</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_212"> <id>231</id> <edge_type>1</edge_type> <source_obj>230</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_213"> <id>232</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_214"> <id>235</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_215"> <id>237</id> <edge_type>1</edge_type> <source_obj>236</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_216"> <id>238</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_217"> <id>239</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_218"> <id>240</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_219"> <id>243</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_220"> <id>245</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_221"> <id>246</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_222"> <id>247</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_223"> <id>249</id> <edge_type>1</edge_type> <source_obj>248</source_obj> <sink_obj>80</sink_obj> </item> <item class_id_reference="20" object_id="_224"> <id>250</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>80</sink_obj> </item> <item class_id_reference="20" object_id="_225"> <id>252</id> <edge_type>1</edge_type> <source_obj>251</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_226"> <id>253</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_227"> <id>254</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>82</sink_obj> </item> <item class_id_reference="20" object_id="_228"> <id>255</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>83</sink_obj> </item> <item class_id_reference="20" object_id="_229"> <id>256</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>83</sink_obj> </item> <item class_id_reference="20" object_id="_230"> <id>257</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_231"> <id>258</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>85</sink_obj> </item> <item class_id_reference="20" object_id="_232"> <id>259</id> <edge_type>1</edge_type> <source_obj>84</source_obj> <sink_obj>85</sink_obj> </item> <item class_id_reference="20" object_id="_233"> <id>260</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>86</sink_obj> </item> <item class_id_reference="20" object_id="_234"> <id>261</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>86</sink_obj> </item> <item class_id_reference="20" object_id="_235"> <id>262</id> <edge_type>1</edge_type> <source_obj>86</source_obj> <sink_obj>87</sink_obj> </item> <item class_id_reference="20" object_id="_236"> <id>263</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>88</sink_obj> </item> <item class_id_reference="20" object_id="_237"> <id>264</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>88</sink_obj> </item> <item class_id_reference="20" object_id="_238"> <id>267</id> <edge_type>1</edge_type> <source_obj>88</source_obj> <sink_obj>89</sink_obj> </item> <item class_id_reference="20" object_id="_239"> <id>269</id> <edge_type>1</edge_type> <source_obj>268</source_obj> <sink_obj>89</sink_obj> </item> <item class_id_reference="20" object_id="_240"> <id>271</id> <edge_type>1</edge_type> <source_obj>270</source_obj> <sink_obj>89</sink_obj> </item> <item class_id_reference="20" object_id="_241"> <id>273</id> <edge_type>1</edge_type> <source_obj>272</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_242"> <id>274</id> <edge_type>1</edge_type> <source_obj>89</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_243"> <id>276</id> <edge_type>1</edge_type> <source_obj>275</source_obj> <sink_obj>91</sink_obj> </item> <item class_id_reference="20" object_id="_244"> <id>277</id> <edge_type>1</edge_type> <source_obj>70</source_obj> <sink_obj>91</sink_obj> </item> <item class_id_reference="20" object_id="_245"> <id>279</id> <edge_type>1</edge_type> <source_obj>278</source_obj> <sink_obj>92</sink_obj> </item> <item class_id_reference="20" object_id="_246"> <id>280</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>92</sink_obj> </item> <item class_id_reference="20" object_id="_247"> <id>282</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>93</sink_obj> </item> <item class_id_reference="20" object_id="_248"> <id>283</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>93</sink_obj> </item> <item class_id_reference="20" object_id="_249"> <id>284</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>94</sink_obj> </item> <item class_id_reference="20" object_id="_250"> <id>287</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>95</sink_obj> </item> <item class_id_reference="20" object_id="_251"> <id>289</id> <edge_type>1</edge_type> <source_obj>288</source_obj> <sink_obj>95</sink_obj> </item> <item class_id_reference="20" object_id="_252"> <id>290</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>96</sink_obj> </item> <item class_id_reference="20" object_id="_253"> <id>291</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>97</sink_obj> </item> <item class_id_reference="20" object_id="_254"> <id>292</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_255"> <id>293</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_256"> <id>295</id> <edge_type>1</edge_type> <source_obj>294</source_obj> <sink_obj>99</sink_obj> </item> <item class_id_reference="20" object_id="_257"> <id>296</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>99</sink_obj> </item> <item class_id_reference="20" object_id="_258"> <id>297</id> <edge_type>1</edge_type> <source_obj>99</source_obj> <sink_obj>100</sink_obj> </item> <item class_id_reference="20" object_id="_259"> <id>298</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>101</sink_obj> </item> <item class_id_reference="20" object_id="_260"> <id>299</id> <edge_type>1</edge_type> <source_obj>100</source_obj> <sink_obj>101</sink_obj> </item> <item class_id_reference="20" object_id="_261"> <id>300</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_262"> <id>301</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_263"> <id>303</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>103</sink_obj> </item> <item class_id_reference="20" object_id="_264"> <id>304</id> <edge_type>1</edge_type> <source_obj>268</source_obj> <sink_obj>103</sink_obj> </item> <item class_id_reference="20" object_id="_265"> <id>305</id> <edge_type>1</edge_type> <source_obj>270</source_obj> <sink_obj>103</sink_obj> </item> <item class_id_reference="20" object_id="_266"> <id>306</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>104</sink_obj> </item> <item class_id_reference="20" object_id="_267"> <id>308</id> <edge_type>1</edge_type> <source_obj>307</source_obj> <sink_obj>104</sink_obj> </item> <item class_id_reference="20" object_id="_268"> <id>310</id> <edge_type>1</edge_type> <source_obj>309</source_obj> <sink_obj>105</sink_obj> </item> <item class_id_reference="20" object_id="_269"> <id>311</id> <edge_type>1</edge_type> <source_obj>70</source_obj> <sink_obj>105</sink_obj> </item> <item class_id_reference="20" object_id="_270"> <id>313</id> <edge_type>1</edge_type> <source_obj>312</source_obj> <sink_obj>106</sink_obj> </item> <item class_id_reference="20" object_id="_271"> <id>314</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>106</sink_obj> </item> <item class_id_reference="20" object_id="_272"> <id>316</id> <edge_type>1</edge_type> <source_obj>315</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_273"> <id>317</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_274"> <id>318</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>108</sink_obj> </item> <item class_id_reference="20" object_id="_275"> <id>320</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>109</sink_obj> </item> <item class_id_reference="20" object_id="_276"> <id>321</id> <edge_type>1</edge_type> <source_obj>236</source_obj> <sink_obj>109</sink_obj> </item> <item class_id_reference="20" object_id="_277"> <id>322</id> <edge_type>1</edge_type> <source_obj>109</source_obj> <sink_obj>110</sink_obj> </item> <item class_id_reference="20" object_id="_278"> <id>323</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_279"> <id>324</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_280"> <id>325</id> <edge_type>1</edge_type> <source_obj>111</source_obj> <sink_obj>112</sink_obj> </item> <item class_id_reference="20" object_id="_281"> <id>326</id> <edge_type>1</edge_type> <source_obj>294</source_obj> <sink_obj>113</sink_obj> </item> <item class_id_reference="20" object_id="_282"> <id>327</id> <edge_type>1</edge_type> <source_obj>105</source_obj> <sink_obj>113</sink_obj> </item> <item class_id_reference="20" object_id="_283"> <id>328</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>114</sink_obj> </item> <item class_id_reference="20" object_id="_284"> <id>329</id> <edge_type>1</edge_type> <source_obj>114</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_285"> <id>330</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_286"> <id>331</id> <edge_type>1</edge_type> <source_obj>115</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_287"> <id>332</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_288"> <id>334</id> <edge_type>1</edge_type> <source_obj>116</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_289"> <id>335</id> <edge_type>1</edge_type> <source_obj>268</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_290"> <id>336</id> <edge_type>1</edge_type> <source_obj>270</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_291"> <id>337</id> <edge_type>1</edge_type> <source_obj>117</source_obj> <sink_obj>118</sink_obj> </item> <item class_id_reference="20" object_id="_292"> <id>338</id> <edge_type>1</edge_type> <source_obj>307</source_obj> <sink_obj>118</sink_obj> </item> <item class_id_reference="20" object_id="_293"> <id>341</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>119</sink_obj> </item> <item class_id_reference="20" object_id="_294"> <id>342</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>119</sink_obj> </item> <item class_id_reference="20" object_id="_295"> <id>344</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_296"> <id>345</id> <edge_type>1</edge_type> <source_obj>104</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_297"> <id>347</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>121</sink_obj> </item> <item class_id_reference="20" object_id="_298"> <id>348</id> <edge_type>1</edge_type> <source_obj>118</source_obj> <sink_obj>121</sink_obj> </item> <item class_id_reference="20" object_id="_299"> <id>349</id> <edge_type>1</edge_type> <source_obj>184</source_obj> <sink_obj>123</sink_obj> </item> <item class_id_reference="20" object_id="_300"> <id>350</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>123</sink_obj> </item> <item class_id_reference="20" object_id="_301"> <id>351</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>124</sink_obj> </item> <item class_id_reference="20" object_id="_302"> <id>523</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_303"> <id>524</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>127</sink_obj> </item> <item class_id_reference="20" object_id="_304"> <id>525</id> <edge_type>2</edge_type> <source_obj>46</source_obj> <sink_obj>125</sink_obj> </item> <item class_id_reference="20" object_id="_305"> <id>526</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>46</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="_306"> <mId>1</mId> <mTag>rgb2yuv11</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>2457609</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_307"> <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>39</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="_308"> <mId>3</mId> <mTag>RGB2YUV_LOOP_X_RGB2YUV_LOOP_Y</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>46</item> <item>125</item> </basic_blocks> <mII>1</mII> <mDepth>9</mDepth> <mMinTripCount>40000</mMinTripCount> <mMaxTripCount>2457600</mMaxTripCount> <mMinLatency>2457607</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_309"> <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>127</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="_310"> <states class_id="25" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_311"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>22</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_312"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_313"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_314"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_315"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_316"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_317"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_318"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_319"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_320"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_321"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_322"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_323"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_324"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_325"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_326"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_327"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_328"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_329"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_330"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_331"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_332"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_333"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_334"> <id>2</id> <operations> <count>12</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_335"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_336"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_337"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_338"> <id>43</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_339"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_340"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_341"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_342"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_343"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_344"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_345"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_346"> <id>55</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_347"> <id>3</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_348"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_349"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_350"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_351"> <id>61</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_352"> <id>62</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_353"> <id>123</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_354"> <id>4</id> <operations> <count>7</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_355"> <id>63</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_356"> <id>64</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_357"> <id>65</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_358"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_359"> <id>67</id> <stage>4</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_360"> <id>68</id> <stage>4</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_361"> <id>69</id> <stage>4</stage> <latency>4</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_362"> <id>5</id> <operations> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_363"> <id>67</id> <stage>3</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_364"> <id>68</id> <stage>3</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_365"> <id>69</id> <stage>3</stage> <latency>4</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_366"> <id>6</id> <operations> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_367"> <id>67</id> <stage>2</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_368"> <id>68</id> <stage>2</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_369"> <id>69</id> <stage>2</stage> <latency>4</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_370"> <id>7</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_371"> <id>67</id> <stage>1</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_372"> <id>68</id> <stage>1</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_373"> <id>69</id> <stage>1</stage> <latency>4</latency> </item> <item class_id_reference="28" object_id="_374"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_375"> <id>74</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_376"> <id>81</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_377"> <id>8</id> <operations> <count>33</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_378"> <id>70</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_379"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_380"> <id>72</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_381"> <id>76</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_382"> <id>77</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_383"> <id>78</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_384"> <id>79</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_385"> <id>80</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_386"> <id>82</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_387"> <id>83</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_388"> <id>84</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_389"> <id>85</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_390"> <id>86</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_391"> <id>87</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_392"> <id>88</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_393"> <id>89</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_394"> <id>91</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_395"> <id>93</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_396"> <id>94</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_397"> <id>95</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_398"> <id>96</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_399"> <id>97</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_400"> <id>98</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_401"> <id>99</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_402"> <id>100</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_403"> <id>101</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_404"> <id>105</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_405"> <id>107</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_406"> <id>108</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_407"> <id>109</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_408"> <id>110</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_409"> <id>111</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_410"> <id>113</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_411"> <id>9</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_412"> <id>75</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_413"> <id>92</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_414"> <id>102</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_415"> <id>103</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_416"> <id>106</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_417"> <id>112</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_418"> <id>114</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_419"> <id>115</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_420"> <id>116</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_421"> <id>117</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_422"> <id>10</id> <operations> <count>13</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_423"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_424"> <id>49</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_425"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_426"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_427"> <id>60</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_428"> <id>90</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_429"> <id>104</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_430"> <id>118</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_431"> <id>119</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_432"> <id>120</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_433"> <id>121</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_434"> <id>122</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_435"> <id>124</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_436"> <id>11</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_437"> <id>126</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="_438"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>23</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="_439"> <inState>3</inState> <outState>4</outState> <condition> <id>38</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="_440"> <inState>4</inState> <outState>5</outState> <condition> <id>39</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="_441"> <inState>5</inState> <outState>6</outState> <condition> <id>40</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="_442"> <inState>6</inState> <outState>7</outState> <condition> <id>41</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="_443"> <inState>7</inState> <outState>8</outState> <condition> <id>42</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="_444"> <inState>8</inState> <outState>9</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="_445"> <inState>9</inState> <outState>10</outState> <condition> <id>44</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="_446"> <inState>10</inState> <outState>2</outState> <condition> <id>45</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="_447"> <inState>2</inState> <outState>11</outState> <condition> <id>37</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>43</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_448"> <inState>2</inState> <outState>3</outState> <condition> <id>46</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>43</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>93</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>23</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>55</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>57</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>67</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>68</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>69</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>70</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>76</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>77</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>78</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>80</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>81</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>82</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>83</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>84</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>85</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>86</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>87</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>88</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>89</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>90</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>91</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>92</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>93</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>94</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>95</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>96</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>97</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>98</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>99</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>100</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>101</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>102</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>103</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>104</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>105</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>106</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>107</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>108</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>109</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>110</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>111</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>112</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>113</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>114</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>115</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>116</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>117</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>118</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>119</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>120</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>121</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>123</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>124</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>126</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>39</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>125</first> <second> <first>1</first> <second>9</second> </second> </item> <item> <first>127</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="_449"> <region_name>RGB2YUV_LOOP_X_RGB2YUV_LOOP_Y</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>46</item> <item>125</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>1</interval> <pipe_depth>9</pipe_depth> </item> </regions> <dp_fu_nodes class_id="45" tracking_level="0" version="0"> <count>84</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>134</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>140</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>146</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>152</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>160</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>168</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>176</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>182</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>188</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>196</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>204</first> <second> <count>1</count> <item_version>0</item_version> <item>119</item> </second> </item> <item> <first>211</first> <second> <count>1</count> <item_version>0</item_version> <item>120</item> </second> </item> <item> <first>218</first> <second> <count>1</count> <item_version>0</item_version> <item>121</item> </second> </item> <item> <first>225</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>232</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>239</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>246</first> <second> <count>4</count> <item_version>0</item_version> <item>67</item> <item>67</item> <item>67</item> <item>67</item> </second> </item> <item> <first>251</first> <second> <count>4</count> <item_version>0</item_version> <item>68</item> <item>68</item> <item>68</item> <item>68</item> </second> </item> <item> <first>256</first> <second> <count>4</count> <item_version>0</item_version> <item>69</item> <item>69</item> <item>69</item> <item>69</item> </second> </item> <item> <first>265</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>276</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>287</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>294</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>298</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>302</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>307</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>313</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>319</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>324</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>332</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>340</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>344</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>348</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>355</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>362</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>368</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>371</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>377</first> <second> <count>1</count> <item_version>0</item_version> <item>123</item> </second> </item> <item> <first>382</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>388</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>396</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>400</first> <second> <count>1</count> <item_version>0</item_version> <item>81</item> </second> </item> <item> <first>406</first> <second> <count>1</count> <item_version>0</item_version> <item>70</item> </second> </item> <item> <first>409</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>416</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>420</first> <second> <count>1</count> <item_version>0</item_version> <item>76</item> </second> </item> <item> <first>423</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>430</first> <second> <count>1</count> <item_version>0</item_version> <item>78</item> </second> </item> <item> <first>434</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>437</first> <second> <count>1</count> <item_version>0</item_version> <item>82</item> </second> </item> <item> <first>440</first> <second> <count>1</count> <item_version>0</item_version> <item>83</item> </second> </item> <item> <first>446</first> <second> <count>1</count> <item_version>0</item_version> <item>84</item> </second> </item> <item> <first>450</first> <second> <count>1</count> <item_version>0</item_version> <item>85</item> </second> </item> <item> <first>456</first> <second> <count>1</count> <item_version>0</item_version> <item>87</item> </second> </item> <item> <first>459</first> <second> <count>1</count> <item_version>0</item_version> <item>88</item> </second> </item> <item> <first>465</first> <second> <count>1</count> <item_version>0</item_version> <item>89</item> </second> </item> <item> <first>475</first> <second> <count>1</count> <item_version>0</item_version> <item>93</item> </second> </item> <item> <first>482</first> <second> <count>1</count> <item_version>0</item_version> <item>94</item> </second> </item> <item> <first>486</first> <second> <count>1</count> <item_version>0</item_version> <item>95</item> </second> </item> <item> <first>493</first> <second> <count>1</count> <item_version>0</item_version> <item>96</item> </second> </item> <item> <first>497</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>501</first> <second> <count>1</count> <item_version>0</item_version> <item>98</item> </second> </item> <item> <first>507</first> <second> <count>1</count> <item_version>0</item_version> <item>100</item> </second> </item> <item> <first>510</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>516</first> <second> <count>1</count> <item_version>0</item_version> <item>107</item> </second> </item> <item> <first>522</first> <second> <count>1</count> <item_version>0</item_version> <item>108</item> </second> </item> <item> <first>526</first> <second> <count>1</count> <item_version>0</item_version> <item>109</item> </second> </item> <item> <first>533</first> <second> <count>1</count> <item_version>0</item_version> <item>110</item> </second> </item> <item> <first>537</first> <second> <count>1</count> <item_version>0</item_version> <item>111</item> </second> </item> <item> <first>543</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>546</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>555</first> <second> <count>1</count> <item_version>0</item_version> <item>112</item> </second> </item> <item> <first>558</first> <second> <count>1</count> <item_version>0</item_version> <item>114</item> </second> </item> <item> <first>561</first> <second> <count>1</count> <item_version>0</item_version> <item>115</item> </second> </item> <item> <first>567</first> <second> <count>1</count> <item_version>0</item_version> <item>117</item> </second> </item> <item> <first>576</first> <second> <count>1</count> <item_version>0</item_version> <item>90</item> </second> </item> <item> <first>582</first> <second> <count>1</count> <item_version>0</item_version> <item>104</item> </second> </item> <item> <first>588</first> <second> <count>1</count> <item_version>0</item_version> <item>118</item> </second> </item> <item> <first>594</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>600</first> <second> <count>2</count> <item_version>0</item_version> <item>80</item> <item>86</item> </second> </item> <item> <first>609</first> <second> <count>2</count> <item_version>0</item_version> <item>91</item> <item>99</item> </second> </item> <item> <first>618</first> <second> <count>2</count> <item_version>0</item_version> <item>105</item> <item>113</item> </second> </item> <item> <first>626</first> <second> <count>2</count> <item_version>0</item_version> <item>92</item> <item>102</item> </second> </item> <item> <first>634</first> <second> <count>2</count> <item_version>0</item_version> <item>106</item> <item>116</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="48" tracking_level="0" version="0"> <count>68</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>U_fu_582</first> <second> <count>1</count> <item_version>0</item_version> <item>104</item> </second> </item> <item> <first>V_fu_588</first> <second> <count>1</count> <item_version>0</item_version> <item>118</item> </second> </item> <item> <first>Y_fu_576</first> <second> <count>1</count> <item_version>0</item_version> <item>90</item> </second> </item> <item> <first>bound_fu_594</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>cast1_fu_298</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>cast_fu_294</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>exitcond_flatten_fu_302</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>exitcond_i_i_fu_319</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>grp_fu_600</first> <second> <count>2</count> <item_version>0</item_version> <item>80</item> <item>86</item> </second> </item> <item> <first>grp_fu_609</first> <second> <count>2</count> <item_version>0</item_version> <item>91</item> <item>99</item> </second> </item> <item> <first>grp_fu_618</first> <second> <count>2</count> <item_version>0</item_version> <item>105</item> <item>113</item> </second> </item> <item> <first>grp_fu_626</first> <second> <count>2</count> <item_version>0</item_version> <item>92</item> <item>102</item> </second> </item> <item> <first>grp_fu_634</first> <second> <count>2</count> <item_version>0</item_version> <item>106</item> <item>116</item> </second> </item> <item> <first>in_channels_ch1_addr_gep_fu_225</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>in_channels_ch2_addr_gep_fu_232</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>in_channels_ch3_addr_gep_fu_239</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>indvar_flatten_next_fu_307</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>indvar_flatten_phi_fu_265</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>p_neg_cast_i_i_fu_522</first> <second> <count>1</count> <item_version>0</item_version> <item>108</item> </second> </item> <item> <first>p_neg_i_i_fu_516</first> <second> <count>1</count> <item_version>0</item_version> <item>107</item> </second> </item> <item> <first>p_shl1_cast_fu_355</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>p_shl1_cast_i_i_fu_533</first> <second> <count>1</count> <item_version>0</item_version> <item>110</item> </second> </item> <item> <first>p_shl1_i_i_fu_526</first> <second> <count>1</count> <item_version>0</item_version> <item>109</item> </second> </item> <item> <first>p_shl2_cast_i_i_fu_482</first> <second> <count>1</count> <item_version>0</item_version> <item>94</item> </second> </item> <item> <first>p_shl2_i_i_fu_475</first> <second> <count>1</count> <item_version>0</item_version> <item>93</item> </second> </item> <item> <first>p_shl3_cast7_i_i_fu_493</first> <second> <count>1</count> <item_version>0</item_version> <item>96</item> </second> </item> <item> <first>p_shl3_cast_i_i_fu_497</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>p_shl3_i_i_fu_486</first> <second> <count>1</count> <item_version>0</item_version> <item>95</item> </second> </item> <item> <first>p_shl4_cast_i_i_fu_430</first> <second> <count>1</count> <item_version>0</item_version> <item>78</item> </second> </item> <item> <first>p_shl4_i_i_fu_423</first> <second> <count>1</count> <item_version>0</item_version> <item>77</item> </second> </item> <item> <first>p_shl5_cast_i_i_fu_416</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>p_shl5_i_i_fu_409</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>p_shl6_cast_i_i_cast_fu_396</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>p_shl6_i_i_fu_388</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>p_shl_cast_fu_348</first> <second> <count>1</count> <item_version>0</item_version> <item>54</item> </second> </item> <item> <first>tmp1_fu_450</first> <second> <count>1</count> <item_version>0</item_version> <item>85</item> </second> </item> <item> <first>tmp2_cast_fu_456</first> <second> <count>1</count> <item_version>0</item_version> <item>87</item> </second> </item> <item> <first>tmp3_fu_510</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>tmp4_fu_561</first> <second> <count>1</count> <item_version>0</item_version> <item>115</item> </second> </item> <item> <first>tmp_22_fu_340</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>tmp_23_fu_344</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>tmp_24_fu_371</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>tmp_26_cast_fu_382</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>tmp_40_cast14_i_i_fu_406</first> <second> <count>1</count> <item_version>0</item_version> <item>70</item> </second> </item> <item> <first>tmp_42_cast11_i_i_ca_fu_420</first> <second> <count>1</count> <item_version>0</item_version> <item>76</item> </second> </item> <item> <first>tmp_42_cast11_i_i_fu_543</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>tmp_44_cast10_i_i_fu_434</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>tmp_46_cast_i_i_fu_446</first> <second> <count>1</count> <item_version>0</item_version> <item>84</item> </second> </item> <item> <first>tmp_46_i_i_fu_440</first> <second> <count>1</count> <item_version>0</item_version> <item>83</item> </second> </item> <item> <first>tmp_48_i_i_fu_459</first> <second> <count>1</count> <item_version>0</item_version> <item>88</item> </second> </item> <item> <first>tmp_50_i_i_fu_465</first> <second> <count>1</count> <item_version>0</item_version> <item>89</item> </second> </item> <item> <first>tmp_53_i_i_fu_501</first> <second> <count>1</count> <item_version>0</item_version> <item>98</item> </second> </item> <item> <first>tmp_54_cast_i_i_fu_507</first> <second> <count>1</count> <item_version>0</item_version> <item>100</item> </second> </item> <item> <first>tmp_58_i_i_fu_546</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>tmp_61_cast_i_i_fu_555</first> <second> <count>1</count> <item_version>0</item_version> <item>112</item> </second> </item> <item> <first>tmp_61_i_i_fu_537</first> <second> <count>1</count> <item_version>0</item_version> <item>111</item> </second> </item> <item> <first>tmp_62_cast_i_i_fu_558</first> <second> <count>1</count> <item_version>0</item_version> <item>114</item> </second> </item> <item> <first>tmp_66_i_i_fu_567</first> <second> <count>1</count> <item_version>0</item_version> <item>117</item> </second> </item> <item> <first>tmp_cast_fu_437</first> <second> <count>1</count> <item_version>0</item_version> <item>82</item> </second> </item> <item> <first>tmp_fu_400</first> <second> <count>1</count> <item_version>0</item_version> <item>81</item> </second> </item> <item> <first>tmp_i_i_cast_fu_368</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>tmp_i_i_mid2_v_fu_332</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>tmp_s_fu_362</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>x_fu_313</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>x_i_i_phi_fu_276</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>y_fu_377</first> <second> <count>1</count> <item_version>0</item_version> <item>123</item> </second> </item> <item> <first>y_i_i_mid2_fu_324</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>y_i_i_phi_fu_287</first> <second> <count>1</count> <item_version>0</item_version> <item>42</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>13</count> <item_version>0</item_version> <item> <first>StgValue_122_write_fu_204</first> <second> <count>1</count> <item_version>0</item_version> <item>119</item> </second> </item> <item> <first>StgValue_123_write_fu_211</first> <second> <count>1</count> <item_version>0</item_version> <item>120</item> </second> </item> <item> <first>StgValue_124_write_fu_218</first> <second> <count>1</count> <item_version>0</item_version> <item>121</item> </second> </item> <item> <first>StgValue_21_write_fu_152</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>StgValue_23_write_fu_160</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>StgValue_25_write_fu_168</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>StgValue_28_write_fu_188</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>StgValue_29_write_fu_196</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>U_scale_read_read_fu_140</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>V_scale_read_read_fu_134</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>Y_scale_read_read_fu_146</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>height_read_fu_182</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>width_read_fu_176</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> </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>3</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>in_channels_ch1</first> <second>0</second> </first> <second> <count>4</count> <item_version>0</item_version> <item>67</item> <item>67</item> <item>67</item> <item>67</item> </second> </item> <item> <first> <first>in_channels_ch2</first> <second>0</second> </first> <second> <count>4</count> <item_version>0</item_version> <item>68</item> <item>68</item> <item>68</item> <item>68</item> </second> </item> <item> <first> <first>in_channels_ch3</first> <second>0</second> </first> <second> <count>4</count> <item_version>0</item_version> <item>69</item> <item>69</item> <item>69</item> <item>69</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>26</count> <item_version>0</item_version> <item> <first>261</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>272</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>283</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>643</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>648</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>653</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>657</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>662</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>668</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>673</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>678</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>683</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>688</first> <second> <count>1</count> <item_version>0</item_version> <item>123</item> </second> </item> <item> <first>693</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>698</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>703</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>708</first> <second> <count>1</count> <item_version>0</item_version> <item>67</item> </second> </item> <item> <first>714</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>721</first> <second> <count>1</count> <item_version>0</item_version> <item>69</item> </second> </item> <item> <first>729</first> <second> <count>1</count> <item_version>0</item_version> <item>81</item> </second> </item> <item> <first>734</first> <second> <count>1</count> <item_version>0</item_version> <item>89</item> </second> </item> <item> <first>739</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>744</first> <second> <count>1</count> <item_version>0</item_version> <item>111</item> </second> </item> <item> <first>749</first> <second> <count>1</count> <item_version>0</item_version> <item>113</item> </second> </item> <item> <first>754</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>759</first> <second> <count>1</count> <item_version>0</item_version> <item>117</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>26</count> <item_version>0</item_version> <item> <first>B_reg_721</first> <second> <count>1</count> <item_version>0</item_version> <item>69</item> </second> </item> <item> <first>G_reg_714</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>R_reg_708</first> <second> <count>1</count> <item_version>0</item_version> <item>67</item> </second> </item> <item> <first>bound_reg_648</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>exitcond_flatten_reg_653</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>height_reg_643</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>in_channels_ch1_addr_reg_693</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>in_channels_ch2_addr_reg_698</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>in_channels_ch3_addr_reg_703</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>indvar_flatten_next_reg_657</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>indvar_flatten_reg_261</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>tmp3_reg_739</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>tmp_22_reg_673</first> <second> <count>1</count> <item_version>0</item_version> <item>53</item> </second> </item> <item> <first>tmp_23_reg_678</first> <second> <count>1</count> <item_version>0</item_version> <item>55</item> </second> </item> <item> <first>tmp_24_reg_683</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>tmp_50_i_i_reg_734</first> <second> <count>1</count> <item_version>0</item_version> <item>89</item> </second> </item> <item> <first>tmp_58_i_i_reg_754</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>tmp_61_i_i_reg_744</first> <second> <count>1</count> <item_version>0</item_version> <item>111</item> </second> </item> <item> <first>tmp_62_i_i_reg_749</first> <second> <count>1</count> <item_version>0</item_version> <item>113</item> </second> </item> <item> <first>tmp_66_i_i_reg_759</first> <second> <count>1</count> <item_version>0</item_version> <item>117</item> </second> </item> <item> <first>tmp_i_i_mid2_v_reg_668</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>tmp_reg_729</first> <second> <count>1</count> <item_version>0</item_version> <item>81</item> </second> </item> <item> <first>x_i_i_reg_272</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>y_i_i_mid2_reg_662</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>y_i_i_reg_283</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>y_reg_688</first> <second> <count>1</count> <item_version>0</item_version> <item>123</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>3</count> <item_version>0</item_version> <item> <first>261</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>272</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>283</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>3</count> <item_version>0</item_version> <item> <first>indvar_flatten_reg_261</first> <second> <count>1</count> <item_version>0</item_version> <item>40</item> </second> </item> <item> <first>x_i_i_reg_272</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>y_i_i_reg_283</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="53" tracking_level="0" version="0"> <count>16</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>U_scale</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>U_scale_out</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> </second> </item> <item> <first>V_scale</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </second> </item> <item> <first>V_scale_out</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> </second> </item> <item> <first>Y_scale</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> </second> </item> <item> <first>Y_scale_out</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> </second> </item> <item> <first>in_channels_ch1(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>4</count> <item_version>0</item_version> <item>67</item> <item>67</item> <item>67</item> <item>67</item> </second> </item> </second> </item> <item> <first>in_channels_ch2(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>4</count> <item_version>0</item_version> <item>68</item> <item>68</item> <item>68</item> <item>68</item> </second> </item> </second> </item> <item> <first>in_channels_ch3(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>4</count> <item_version>0</item_version> <item>69</item> <item>69</item> <item>69</item> <item>69</item> </second> </item> </second> </item> <item> <first>in_height</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> </second> </item> <item> <first>in_width</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> </second> </item> <item> <first>out_channels_ch1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>119</item> </second> </item> </second> </item> <item> <first>out_channels_ch2</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>120</item> </second> </item> </second> </item> <item> <first>out_channels_ch3</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>121</item> </second> </item> </second> </item> <item> <first>out_height</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> </second> </item> <item> <first>out_width</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="55" tracking_level="0" version="0"> <count>11</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> <item> <first>3</first> <second>RAM</second> </item> <item> <first>6</first> <second>FIFO_LUTRAM</second> </item> <item> <first>7</first> <second>FIFO_LUTRAM</second> </item> <item> <first>8</first> <second>FIFO_LUTRAM</second> </item> <item> <first>9</first> <second>FIFO_LUTRAM</second> </item> <item> <first>10</first> <second>FIFO_LUTRAM</second> </item> <item> <first>14</first> <second>FIFO_LUTRAM</second> </item> <item> <first>15</first> <second>FIFO_LUTRAM</second> </item> <item> <first>16</first> <second>FIFO_LUTRAM</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
-- Copyright 2008-2021 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 procedure Do_Nothing (A : System.Address); end Pck;
pragma Ada_95; pragma Source_File_Name (ada_main, Spec_File_Name => "b__powerof.ads"); pragma Source_File_Name (ada_main, Body_File_Name => "b__powerof.adb"); pragma Suppress (Overflow_Check); with Ada.Exceptions; package body ada_main is pragma Warnings (Off); E074 : Short_Integer; pragma Import (Ada, E074, "system__os_lib_E"); E013 : Short_Integer; pragma Import (Ada, E013, "system__soft_links_E"); E023 : Short_Integer; pragma Import (Ada, E023, "system__exception_table_E"); E048 : Short_Integer; pragma Import (Ada, E048, "ada__io_exceptions_E"); E050 : Short_Integer; pragma Import (Ada, E050, "ada__tags_E"); E047 : Short_Integer; pragma Import (Ada, E047, "ada__streams_E"); E072 : Short_Integer; pragma Import (Ada, E072, "interfaces__c_E"); E025 : Short_Integer; pragma Import (Ada, E025, "system__exceptions_E"); E077 : Short_Integer; pragma Import (Ada, E077, "system__file_control_block_E"); E066 : Short_Integer; pragma Import (Ada, E066, "system__file_io_E"); E070 : Short_Integer; pragma Import (Ada, E070, "system__finalization_root_E"); E068 : Short_Integer; pragma Import (Ada, E068, "ada__finalization_E"); E017 : Short_Integer; pragma Import (Ada, E017, "system__secondary_stack_E"); E045 : Short_Integer; pragma Import (Ada, E045, "ada__text_io_E"); E099 : Short_Integer; pragma Import (Ada, E099, "mat_E"); Local_Priority_Specific_Dispatching : constant String := ""; Local_Interrupt_States : constant String := ""; Is_Elaborated : Boolean := False; procedure finalize_library is begin E045 := E045 - 1; declare procedure F1; pragma Import (Ada, F1, "ada__text_io__finalize_spec"); begin F1; end; declare procedure F2; pragma Import (Ada, F2, "system__file_io__finalize_body"); begin E066 := E066 - 1; F2; end; declare procedure Reraise_Library_Exception_If_Any; pragma Import (Ada, Reraise_Library_Exception_If_Any, "__gnat_reraise_library_exception_if_any"); begin Reraise_Library_Exception_If_Any; end; end finalize_library; procedure adafinal is procedure s_stalib_adafinal; pragma Import (C, s_stalib_adafinal, "system__standard_library__adafinal"); procedure Runtime_Finalize; pragma Import (C, Runtime_Finalize, "__gnat_runtime_finalize"); begin if not Is_Elaborated then return; end if; Is_Elaborated := False; Runtime_Finalize; s_stalib_adafinal; end adafinal; type No_Param_Proc is access procedure; procedure adainit is Main_Priority : Integer; pragma Import (C, Main_Priority, "__gl_main_priority"); Time_Slice_Value : Integer; pragma Import (C, Time_Slice_Value, "__gl_time_slice_val"); WC_Encoding : Character; pragma Import (C, WC_Encoding, "__gl_wc_encoding"); Locking_Policy : Character; pragma Import (C, Locking_Policy, "__gl_locking_policy"); Queuing_Policy : Character; pragma Import (C, Queuing_Policy, "__gl_queuing_policy"); Task_Dispatching_Policy : Character; pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy"); Priority_Specific_Dispatching : System.Address; pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching"); Num_Specific_Dispatching : Integer; pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching"); Main_CPU : Integer; pragma Import (C, Main_CPU, "__gl_main_cpu"); Interrupt_States : System.Address; pragma Import (C, Interrupt_States, "__gl_interrupt_states"); Num_Interrupt_States : Integer; pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states"); Unreserve_All_Interrupts : Integer; pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts"); Detect_Blocking : Integer; pragma Import (C, Detect_Blocking, "__gl_detect_blocking"); Default_Stack_Size : Integer; pragma Import (C, Default_Stack_Size, "__gl_default_stack_size"); Leap_Seconds_Support : Integer; pragma Import (C, Leap_Seconds_Support, "__gl_leap_seconds_support"); procedure Runtime_Initialize (Install_Handler : Integer); pragma Import (C, Runtime_Initialize, "__gnat_runtime_initialize"); Finalize_Library_Objects : No_Param_Proc; pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects"); begin if Is_Elaborated then return; end if; Is_Elaborated := True; Main_Priority := -1; Time_Slice_Value := -1; WC_Encoding := 'b'; Locking_Policy := ' '; Queuing_Policy := ' '; Task_Dispatching_Policy := ' '; Priority_Specific_Dispatching := Local_Priority_Specific_Dispatching'Address; Num_Specific_Dispatching := 0; Main_CPU := -1; Interrupt_States := Local_Interrupt_States'Address; Num_Interrupt_States := 0; Unreserve_All_Interrupts := 0; Detect_Blocking := 0; Default_Stack_Size := -1; Leap_Seconds_Support := 0; Runtime_Initialize (1); Finalize_Library_Objects := finalize_library'access; System.Soft_Links'Elab_Spec; System.Exception_Table'Elab_Body; E023 := E023 + 1; Ada.Io_Exceptions'Elab_Spec; E048 := E048 + 1; Ada.Tags'Elab_Spec; Ada.Streams'Elab_Spec; E047 := E047 + 1; Interfaces.C'Elab_Spec; System.Exceptions'Elab_Spec; E025 := E025 + 1; System.File_Control_Block'Elab_Spec; E077 := E077 + 1; System.Finalization_Root'Elab_Spec; E070 := E070 + 1; Ada.Finalization'Elab_Spec; E068 := E068 + 1; System.File_Io'Elab_Body; E066 := E066 + 1; E072 := E072 + 1; Ada.Tags'Elab_Body; E050 := E050 + 1; System.Soft_Links'Elab_Body; E013 := E013 + 1; System.Os_Lib'Elab_Body; E074 := E074 + 1; System.Secondary_Stack'Elab_Body; E017 := E017 + 1; Ada.Text_Io'Elab_Spec; Ada.Text_Io'Elab_Body; E045 := E045 + 1; E099 := E099 + 1; end adainit; procedure Ada_Main_Program; pragma Import (Ada, Ada_Main_Program, "_ada_powerof"); function main (argc : Integer; argv : System.Address; envp : System.Address) return Integer is procedure Initialize (Addr : System.Address); pragma Import (C, Initialize, "__gnat_initialize"); procedure Finalize; pragma Import (C, Finalize, "__gnat_finalize"); SEH : aliased array (1 .. 2) of Integer; Ensure_Reference : aliased System.Address := Ada_Main_Program_Name'Address; pragma Volatile (Ensure_Reference); begin gnat_argc := argc; gnat_argv := argv; gnat_envp := envp; Initialize (SEH'Address); adainit; Ada_Main_Program; adafinal; Finalize; return (gnat_exit_status); end; -- BEGIN Object file/option list -- C:\Users\Soba95\Desktop\ada\mat.o -- C:\Users\Soba95\Desktop\ada\powerof.o -- -LC:\Users\Soba95\Desktop\ada\ -- -LC:\Users\Soba95\Desktop\ada\ -- -LC:/gnat/2015/lib/gcc/i686-pc-mingw32/4.9.3/adalib/ -- -static -- -lgnat -- -Wl,--stack=0x2000000 -- END Object file/option list end ada_main;
-------------------------------------------------------------------------------- -- Copyright (c) 2013, Felix Krause <contact@flyx.org> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- with CL.Platforms; with Ada.Text_IO; procedure CL_Test.Platform is package IO renames Ada.Text_IO; P_List : constant CL.Platforms.Platform_List := CL.Platforms.List; begin for Index in P_List'Range loop IO.Put_Line("Platform" & Index'Img); IO.Put_Line ("Profile: """ & P_List (Index).Profile & """"); IO.Put_Line ("Version: """ & P_List (Index).Version & """"); IO.Put_Line ("Name: """ & P_List (Index).Name & """"); IO.Put_Line ("Vendor: """ & P_List (Index).Vendor & """"); IO.Put_Line ("Extensions: """ & P_List (Index).Extensions & """"); IO.Put_Line(""); end loop; end CL_Test.Platform;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_float32_iterator_t is -- Item -- type Item is record data : access xcb.xcb_glx_float32_t; 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_glx_float32_iterator_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_float32_iterator_t.Item, Element_Array => xcb.xcb_glx_float32_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_glx_float32_iterator_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_float32_iterator_t.Pointer, Element_Array => xcb.xcb_glx_float32_iterator_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_float32_iterator_t;
------------------------------------------------------------------------------ -- -- -- Giza -- -- -- -- Copyright (C) 2015 Fabien Chouteau (chouteau@adacore.com) -- -- -- -- 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 Ada.Unchecked_Deallocation; with Ada.Real_Time.Timing_Events; use Ada.Real_Time.Timing_Events; with Giza.GUI; use Giza.GUI; with System; package body Giza.Timers is type Wrapper; type Wrapper_Access is access all Wrapper; type Wrapper is record Event : Timer_Event_Not_Null_Ref; Timeout : Time; Next : Wrapper_Access := null; end record; procedure Free is new Ada.Unchecked_Deallocation (Object => Wrapper, Name => Wrapper_Access); TE : Timing_Event; ---------- -- Sync -- ---------- protected Sync is pragma Priority (System.Interrupt_Priority'Last); entry Wait; procedure Wakeup (Event : in out Timing_Event); procedure Insert (Item : Wrapper_Access); function Next_Timeout return Time; procedure Pop (Item : out Wrapper_Access); private Triggered : Boolean := False; List : Wrapper_Access := null; end Sync; ---------- -- Sync -- ---------- protected body Sync is entry Wait when Triggered is begin Triggered := False; end Wait; procedure Wakeup (Event : in out Timing_Event) is pragma Unreferenced (Event); begin Triggered := True; end Wakeup; procedure Insert (Item : Wrapper_Access) is Prev, Curr : Wrapper_Access := null; begin if List = null or else List.Timeout >= Item.Timeout then Item.Next := List; List := Item; Set_Handler (Event => TE, At_Time => List.Timeout, Handler => Sync.Wakeup'Access); else Prev := List; Curr := List; while Curr /= null and then Curr.Timeout < Item.Timeout loop Prev := Curr; Curr := Curr.Next; end loop; Prev.Next := Item; Item.Next := Curr; end if; end Insert; function Next_Timeout return Time is begin return (if List /= null then List.Timeout else Time_Last); end Next_Timeout; procedure Pop (Item : out Wrapper_Access) is begin -- Remove from list Item := List; List := List.Next; end Pop; end Sync; --------------- -- Set_Timer -- --------------- procedure Set_Timer (Timer : Timer_Event_Not_Null_Ref; Timeout : Time) is Item : constant Wrapper_Access := new Wrapper'(Event => Timer, Timeout => Timeout, Next => null); begin Sync.Insert (Item); end Set_Timer; ---------------- -- Timer_Task -- ---------------- task Timer_Task is end Timer_Task; task body Timer_Task is Now : Time; Tmp : Wrapper_Access; begin loop Sync.Wait; -- back from timeout Now := Clock; while Sync.Next_Timeout < Now loop Sync.Pop (Tmp); if Tmp /= null then Emit (Event_Not_Null_Ref (Tmp.Event)); -- Destroy wrapper Free (Tmp); end if; end loop; Set_Handler (Event => TE, At_Time => Sync.Next_Timeout, Handler => Sync.Wakeup'Access); end loop; end Timer_Task; end Giza.Timers;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <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>erode_0_0_2160_3840_0_3_3_1_1_s</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>4</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>imgHelper1_4101</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName>FIFO_SRL</coreName> <coreId>49</coreId> </Obj> <bitwidth>8</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>imgHelper2_4102</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName>FIFO_SRL</coreName> <coreId>49</coreId> </Obj> <bitwidth>8</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> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>p_src_rows</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName>FIFO_SRL</coreName> <coreId>52</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>p_src_cols</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName>FIFO_SRL</coreName> <coreId>49</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</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>6</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>0</type> <id>11</id> <name>p_src_rows_read</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>344</lineNumber> <contextFuncName>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</contextFuncName> <contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</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>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first> <second>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</second> </first> <second>344</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <control>auto</control> <opType>fifo</opType> <implIndex>srl</implIndex> <coreName>FIFO_SRL</coreName> <coreId>81</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>19</item> <item>20</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.24</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>12</id> <name>p_src_cols_read</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>345</lineNumber> <contextFuncName>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</contextFuncName> <contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first> <second>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</second> </first> <second>345</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <control>auto</control> <opType>fifo</opType> <implIndex>srl</implIndex> <coreName>FIFO_SRL</coreName> <coreId>81</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>21</item> <item>22</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.24</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>13</id> <name>trunc_ln344</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>344</lineNumber> <contextFuncName>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</contextFuncName> <contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first> <second>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</second> </first> <second>344</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>trunc_ln344_fu_52_p1</rtlName> <control/> <opType/> <implIndex/> <coreName/> <coreId>49</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>23</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>14</id> <name>trunc_ln345</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>345</lineNumber> <contextFuncName>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</contextFuncName> <contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first> <second>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</second> </first> <second>345</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>trunc_ln345_fu_57_p1</rtlName> <control/> <opType/> <implIndex/> <coreName/> <coreId>225</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>24</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>15</id> <name>_ln365</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>365</lineNumber> <contextFuncName>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</contextFuncName> <contextNormFuncName>erode_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_erosion.hpp</first> <second>erode&amp;lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&amp;gt;</second> </first> <second>365</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42</rtlName> <control/> <opType/> <implIndex/> <coreName/> <coreId>113</coreId> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>16</id> <name>_ln0</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>113</coreId> </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> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </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="_11"> <Value> <Obj> <type>2</type> <id>25</id> <name>xferode_2160_3840_1_0_1_0_3841_3_3_s</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>177</coreId> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:xferode&lt;2160, 3840, 1, 0, 1, 0, 3841, 3, 3&gt;&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="_12"> <Obj> <type>3</type> <id>17</id> <name>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>1768189039</coreId> </Obj> <node_objs> <count>6</count> <item_version>0</item_version> <item>11</item> <item>12</item> <item>13</item> <item>14</item> <item>15</item> <item>16</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_13"> <id>20</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>11</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_14"> <id>22</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>12</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_15"> <id>23</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>13</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_16"> <id>24</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>14</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_17"> <id>26</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_18"> <id>27</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_19"> <id>28</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_20"> <id>29</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_21"> <id>30</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </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="_22"> <mId>1</mId> <mTag>erode&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</mTag> <mNormTag>erode_0_0_2160_3840_0_3_3_1_1_s</mNormTag> <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>17</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>13</mMinLatency> <mMaxLatency>8319373</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_23"> <states class_id="25" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_24"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_25"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_26"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_27"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_28"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_29"> <id>15</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_30"> <id>2</id> <operations> <count>8</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_31"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_32"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_33"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_34"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_35"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_36"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_37"> <id>15</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_38"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_39"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>-1</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> </transitions> </fsm> <res class_id="34" tracking_level="1" version="0" object_id="_40"> <dp_component_resource class_id="35" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="36" tracking_level="0" version="0"> <first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42 (xferode_2160_3840_1_0_1_0_3841_3_3_s)</first> <second class_id="37" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>BRAM</first> <second>6</second> </item> <item> <first>FF</first> <second>611</second> </item> <item> <first>LUT</first> <second>819</second> </item> </second> </item> </dp_component_resource> <dp_expression_resource> <count>1</count> <item_version>0</item_version> <item> <first>ap_block_state1 ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> </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>6</count> <item_version>0</item_version> <item> <first>ap_NS_fsm</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>3</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>3</second> </item> <item> <first>LUT</first> <second>13</second> </item> </second> </item> <item> <first>ap_done</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>imgHelper1_4101_read</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>imgHelper2_4102_write</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>p_src_cols_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>p_src_rows_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> </dp_multiplexer_resource> <dp_register_resource> <count>5</count> <item_version>0</item_version> <item> <first>ap_CS_fsm</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>2</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>2</second> </item> </second> </item> <item> <first>ap_done_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42_ap_start_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>trunc_ln344_reg_62</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> <item> <first>trunc_ln345_reg_67</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> </dp_register_resource> <dp_dsp_resource> <count>1</count> <item_version>0</item_version> <item> <first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> </dp_dsp_resource> <dp_component_map class_id="39" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="40" tracking_level="0" version="0"> <first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42 (xferode_2160_3840_1_0_1_0_3841_3_3_s)</first> <second> <count>1</count> <item_version>0</item_version> <item>15</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="41" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="42" tracking_level="0" version="0"> <first>11</first> <second class_id="43" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>13</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit 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>17</first> <second class_id="46" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="47" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="48" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>30</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>36</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>42</first> <second> <count>2</count> <item_version>0</item_version> <item>15</item> <item>15</item> </second> </item> <item> <first>52</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>57</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="51" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="52" tracking_level="0" version="0"> <first>trunc_ln344_fu_52</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>trunc_ln345_fu_57</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>1</count> <item_version>0</item_version> <item> <first>grp_xferode_2160_3840_1_0_1_0_3841_3_3_s_fu_42</first> <second> <count>2</count> <item_version>0</item_version> <item>15</item> <item>15</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>2</count> <item_version>0</item_version> <item> <first>p_src_cols_read_read_fu_36</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>p_src_rows_read_read_fu_30</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="53" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>2</count> <item_version>0</item_version> <item> <first>62</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>67</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>2</count> <item_version>0</item_version> <item> <first>trunc_ln344_reg_62</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>trunc_ln345_reg_67</first> <second> <count>1</count> <item_version>0</item_version> <item>14</item> </second> </item> </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="54" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>imgHelper1_4101</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> </second> </item> <item> <first>imgHelper2_4102</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> </second> </item> <item> <first>p_src_cols</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> </second> </item> <item> <first>p_src_rows</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core> <count>4</count> <item_version>0</item_version> <item> <first>1</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>2</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>3</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>4</first> <second> <first>1150</first> <second>10</second> </second> </item> </port2core> <node2core> <count>3</count> <item_version>0</item_version> <item> <first>11</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>12</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>15</first> <second> <first>-1</first> <second>-1</second> </second> </item> </node2core> </syndb> </boost_serialization>
----------------------------------------------------------------------- -- awa-modules-reader -- Read module configuration files -- Copyright (C) 2011, 2012, 2015, 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.Serialize.IO.XML; with Util.Serialize.Mappers; with AWA.Applications.Configs; with Security.Policies; -- The <b>AWA.Modules.Reader</b> package reads the module configuration files -- and initializes the module. package body AWA.Modules.Reader is -- ------------------------------ -- Read the module configuration file and configure the components -- ------------------------------ procedure Read_Configuration (Plugin : in out Module'Class; File : in String; Context : in EL.Contexts.Default.Default_Context_Access) is Reader : Util.Serialize.IO.XML.Parser; Mapper : Util.Serialize.Mappers.Processing; package Config is new AWA.Applications.Configs.Reader_Config (Mapper, Plugin.App.all'Unchecked_Access, Context, False); pragma Warnings (Off, Config); Sec : constant Security.Policies.Policy_Manager_Access := Plugin.App.Get_Security_Manager; begin Log.Info ("Reading module configuration file {0}", File); Sec.Prepare_Config (Mapper); if AWA.Modules.Log.Get_Level >= Util.Log.DEBUG_LEVEL then Util.Serialize.Mappers.Dump (Mapper, AWA.Modules.Log); end if; -- Read the configuration file and record managed beans, navigation rules. Reader.Parse (File, Mapper); Sec.Finish_Config (Reader); exception when others => Log.Error ("Error while reading {0}", File); raise; end Read_Configuration; end AWA.Modules.Reader;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . D Y N A M I C _ T A B L E S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2000-2019, AdaCore -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; with GNAT.Heap_Sort_G; with Ada.Unchecked_Deallocation; with System; package body GNAT.Dynamic_Tables is ----------------------- -- Local Subprograms -- ----------------------- function Last_Allocated (T : Instance) return Table_Last_Type; pragma Inline (Last_Allocated); -- Return the index of the last allocated element procedure Grow (T : in out Instance; New_Last : Table_Last_Type); -- This is called when we are about to set the value of Last to a value -- that is larger than Last_Allocated. This reallocates the table to the -- larger size, as indicated by New_Last. At the time this is called, -- Last (T) is still the old value, and this does not modify it. -------------- -- Allocate -- -------------- procedure Allocate (T : in out Instance; Num : Integer := 1) is begin -- Note that Num can be negative pragma Assert (not T.Locked); Set_Last (T, Last (T) + Table_Index_Type'Base (Num)); end Allocate; ------------ -- Append -- ------------ procedure Append (T : in out Instance; New_Val : Table_Component_Type) is pragma Assert (not T.Locked); New_Last : constant Table_Last_Type := Last (T) + 1; begin if New_Last <= Last_Allocated (T) then -- Fast path T.P.Last := New_Last; T.Table (New_Last) := New_Val; else Set_Item (T, New_Last, New_Val); end if; end Append; ---------------- -- Append_All -- ---------------- procedure Append_All (T : in out Instance; New_Vals : Table_Type) is begin for J in New_Vals'Range loop Append (T, New_Vals (J)); end loop; end Append_All; -------------------- -- Decrement_Last -- -------------------- procedure Decrement_Last (T : in out Instance) is begin pragma Assert (not T.Locked); Allocate (T, -1); end Decrement_Last; ----------- -- First -- ----------- function First return Table_Index_Type is begin return Table_Low_Bound; end First; -------------- -- For_Each -- -------------- procedure For_Each (Table : Instance) is Quit : Boolean := False; begin for Index in First .. Last (Table) loop Action (Index, Table.Table (Index), Quit); exit when Quit; end loop; end For_Each; ---------- -- Grow -- ---------- procedure Grow (T : in out Instance; New_Last : Table_Last_Type) is -- Note: Type Alloc_Ptr below needs to be declared locally so we know -- the bounds. That means that the collection is local, so is finalized -- when leaving Grow. That's why this package doesn't support controlled -- types; the table elements would be finalized prematurely. An Ada -- implementation would also be within its rights to reclaim the -- storage. Fortunately, GNAT doesn't do that. pragma Assert (not T.Locked); pragma Assert (New_Last > Last_Allocated (T)); subtype Table_Length_Type is Table_Index_Type'Base range 0 .. Table_Index_Type'Base'Last; Old_Last_Allocated : constant Table_Last_Type := Last_Allocated (T); Old_Allocated_Length : constant Table_Length_Type := Old_Last_Allocated - First + 1; New_Length : constant Table_Length_Type := New_Last - First + 1; New_Allocated_Length : Table_Length_Type; begin if T.Table = Empty_Table_Ptr then New_Allocated_Length := Table_Length_Type (Table_Initial); else New_Allocated_Length := Table_Length_Type (Long_Long_Integer (Old_Allocated_Length) * (100 + Long_Long_Integer (Table_Increment)) / 100); end if; -- Make sure it really did grow if New_Allocated_Length <= Old_Allocated_Length then New_Allocated_Length := Old_Allocated_Length + 10; end if; if New_Allocated_Length <= New_Length then New_Allocated_Length := New_Length + 10; end if; pragma Assert (New_Allocated_Length > Old_Allocated_Length); pragma Assert (New_Allocated_Length > New_Length); T.P.Last_Allocated := First + New_Allocated_Length - 1; declare subtype Old_Alloc_Type is Table_Type (First .. Old_Last_Allocated); type Old_Alloc_Ptr is access all Old_Alloc_Type; procedure Free is new Ada.Unchecked_Deallocation (Old_Alloc_Type, Old_Alloc_Ptr); function To_Old_Alloc_Ptr is new Ada.Unchecked_Conversion (Table_Ptr, Old_Alloc_Ptr); subtype Alloc_Type is Table_Type (First .. First + New_Allocated_Length - 1); type Alloc_Ptr is access all Alloc_Type; function To_Table_Ptr is new Ada.Unchecked_Conversion (Alloc_Ptr, Table_Ptr); Old_Table : Old_Alloc_Ptr := To_Old_Alloc_Ptr (T.Table); New_Table : constant Alloc_Ptr := new Alloc_Type; begin if T.Table /= Empty_Table_Ptr then New_Table (First .. Last (T)) := Old_Table (First .. Last (T)); Free (Old_Table); end if; T.Table := To_Table_Ptr (New_Table); end; pragma Assert (New_Last <= Last_Allocated (T)); pragma Assert (T.Table /= null); pragma Assert (T.Table /= Empty_Table_Ptr); end Grow; -------------------- -- Increment_Last -- -------------------- procedure Increment_Last (T : in out Instance) is begin pragma Assert (not T.Locked); Allocate (T, 1); end Increment_Last; ---------- -- Init -- ---------- procedure Init (T : in out Instance) is pragma Assert (not T.Locked); subtype Alloc_Type is Table_Type (First .. Last_Allocated (T)); type Alloc_Ptr is access all Alloc_Type; procedure Free is new Ada.Unchecked_Deallocation (Alloc_Type, Alloc_Ptr); function To_Alloc_Ptr is new Ada.Unchecked_Conversion (Table_Ptr, Alloc_Ptr); Temp : Alloc_Ptr := To_Alloc_Ptr (T.Table); begin if T.Table = Empty_Table_Ptr then pragma Assert (T.P = (Last_Allocated | Last => First - 1)); null; else Free (Temp); T.Table := Empty_Table_Ptr; T.P := (Last_Allocated | Last => First - 1); end if; end Init; -------------- -- Is_Empty -- -------------- function Is_Empty (T : Instance) return Boolean is begin return Last (T) = First - 1; end Is_Empty; ---------- -- Last -- ---------- function Last (T : Instance) return Table_Last_Type is begin return T.P.Last; end Last; -------------------- -- Last_Allocated -- -------------------- function Last_Allocated (T : Instance) return Table_Last_Type is begin return T.P.Last_Allocated; end Last_Allocated; ---------- -- Move -- ---------- procedure Move (From, To : in out Instance) is begin pragma Assert (not From.Locked); pragma Assert (not To.Locked); pragma Assert (Is_Empty (To)); To := From; From.Table := Empty_Table_Ptr; From.Locked := False; From.P.Last_Allocated := First - 1; From.P.Last := First - 1; pragma Assert (Is_Empty (From)); end Move; ------------- -- Release -- ------------- procedure Release (T : in out Instance) is pragma Assert (not T.Locked); Old_Last_Allocated : constant Table_Last_Type := Last_Allocated (T); function New_Last_Allocated return Table_Last_Type; -- Compute the new value of Last_Allocated. This is normally equal to -- Last, but if Release_Threshold /= 0, then we need to take that into -- account. ------------------------ -- New_Last_Allocated -- ------------------------ function New_Last_Allocated return Table_Last_Type is subtype Table_Length_Type is Table_Index_Type'Base range 0 .. Table_Index_Type'Base'Last; Length : constant Table_Length_Type := Last (T) - First + 1; Comp_Size_In_Bytes : constant Table_Length_Type := Table_Type'Component_Size / System.Storage_Unit; Length_Threshold : constant Table_Length_Type := Table_Length_Type (Release_Threshold) / Comp_Size_In_Bytes; begin if Release_Threshold = 0 or else Length < Length_Threshold then return Last (T); else declare Extra_Length : constant Table_Length_Type := Length / 1000; begin return (Length + Extra_Length) - 1 + First; end; end if; end New_Last_Allocated; -- Local variables New_Last_Alloc : constant Table_Last_Type := New_Last_Allocated; -- Start of processing for Release begin if New_Last_Alloc < Last_Allocated (T) then pragma Assert (Last (T) < Last_Allocated (T)); pragma Assert (T.Table /= Empty_Table_Ptr); declare subtype Old_Alloc_Type is Table_Type (First .. Old_Last_Allocated); type Old_Alloc_Ptr is access all Old_Alloc_Type; procedure Free is new Ada.Unchecked_Deallocation (Old_Alloc_Type, Old_Alloc_Ptr); function To_Old_Alloc_Ptr is new Ada.Unchecked_Conversion (Table_Ptr, Old_Alloc_Ptr); subtype Alloc_Type is Table_Type (First .. New_Last_Alloc); type Alloc_Ptr is access all Alloc_Type; function To_Table_Ptr is new Ada.Unchecked_Conversion (Alloc_Ptr, Table_Ptr); Old_Table : Old_Alloc_Ptr := To_Old_Alloc_Ptr (T.Table); New_Table : constant Alloc_Ptr := new Alloc_Type; begin New_Table (First .. Last (T)) := Old_Table (First .. Last (T)); T.P.Last_Allocated := New_Last_Alloc; Free (Old_Table); T.Table := To_Table_Ptr (New_Table); end; end if; end Release; -------------- -- Set_Item -- -------------- procedure Set_Item (T : in out Instance; Index : Valid_Table_Index_Type; Item : Table_Component_Type) is begin pragma Assert (not T.Locked); -- If Set_Last is going to reallocate the table, we make a copy of Item, -- in case the call was "Set_Item (T, X, T.Table (Y));", and Item is -- passed by reference. Without the copy, we would deallocate the array -- containing Item, leaving a dangling pointer. if Index > Last_Allocated (T) then declare Item_Copy : constant Table_Component_Type := Item; begin Set_Last (T, Index); T.Table (Index) := Item_Copy; end; else if Index > Last (T) then Set_Last (T, Index); end if; T.Table (Index) := Item; end if; end Set_Item; -------------- -- Set_Last -- -------------- procedure Set_Last (T : in out Instance; New_Val : Table_Last_Type) is begin pragma Assert (not T.Locked); if New_Val > Last_Allocated (T) then Grow (T, New_Val); end if; T.P.Last := New_Val; end Set_Last; ---------------- -- Sort_Table -- ---------------- procedure Sort_Table (Table : in out Instance) is Temp : Table_Component_Type; -- A temporary position to simulate index 0 -- Local subprograms function Index_Of (Idx : Natural) return Table_Index_Type'Base; -- Return index of Idx'th element of table function Lower_Than (Op1, Op2 : Natural) return Boolean; -- Compare two components procedure Move (From : Natural; To : Natural); -- Move one component package Heap_Sort is new GNAT.Heap_Sort_G (Move, Lower_Than); -------------- -- Index_Of -- -------------- function Index_Of (Idx : Natural) return Table_Index_Type'Base is J : constant Integer'Base := Table_Index_Type'Base'Pos (First) + Idx - 1; begin return Table_Index_Type'Base'Val (J); end Index_Of; ---------- -- Move -- ---------- procedure Move (From : Natural; To : Natural) is begin if From = 0 then Table.Table (Index_Of (To)) := Temp; elsif To = 0 then Temp := Table.Table (Index_Of (From)); else Table.Table (Index_Of (To)) := Table.Table (Index_Of (From)); end if; end Move; ---------------- -- Lower_Than -- ---------------- function Lower_Than (Op1, Op2 : Natural) return Boolean is begin if Op1 = 0 then return Lt (Temp, Table.Table (Index_Of (Op2))); elsif Op2 = 0 then return Lt (Table.Table (Index_Of (Op1)), Temp); else return Lt (Table.Table (Index_Of (Op1)), Table.Table (Index_Of (Op2))); end if; end Lower_Than; -- Start of processing for Sort_Table begin Heap_Sort.Sort (Natural (Last (Table) - First) + 1); end Sort_Table; end GNAT.Dynamic_Tables;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . B O U N D E D _ S T R I N G S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2016, AdaCore -- -- -- -- 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_Elements; package body System.Bounded_Strings is ------------ -- Append -- ------------ procedure Append (X : in out Bounded_String; C : Character) is begin -- If we have too many characters to fit, simply drop them if X.Length < X.Max_Length then X.Length := X.Length + 1; X.Chars (X.Length) := C; end if; end Append; procedure Append (X : in out Bounded_String; S : String) is begin for C of S loop Append (X, C); end loop; end Append; -------------------- -- Append_Address -- -------------------- procedure Append_Address (X : in out Bounded_String; A : Address) is S : String (1 .. 18); P : Natural; use System.Storage_Elements; N : Integer_Address; H : constant array (Integer range 0 .. 15) of Character := "0123456789abcdef"; begin P := S'Last; N := To_Integer (A); loop S (P) := H (Integer (N mod 16)); P := P - 1; N := N / 16; exit when N = 0; end loop; S (P - 1) := '0'; S (P) := 'x'; Append (X, S (P - 1 .. S'Last)); end Append_Address; ------------- -- Is_Full -- ------------- function Is_Full (X : Bounded_String) return Boolean is begin return X.Length >= X.Max_Length; end Is_Full; --------------- -- To_String -- --------------- function To_String (X : Bounded_String) return String is begin return X.Chars (1 .. X.Length); end To_String; end System.Bounded_Strings;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Web API Definition -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015, 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 WebAPI.DOM.Event_Targets; package WebAPI.UI_Events.Focus is pragma Preelaborate; type Focus_Event is limited interface and WebAPI.UI_Events.UI_Event; not overriding function Get_Related_Target (Self : not null access constant Focus_Event) return WebAPI.DOM.Event_Targets.Event_Target_Access is abstract with Import => True, Convention => JavaScript_Property_Getter, Link_Name => "relatedTarget"; -- Used to identify a secondary EventTarget related to a Focus event, -- depending on the type of event. end WebAPI.UI_Events.Focus;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.BOUNDED_PRIORITY_QUEUES -- -- -- -- S p e c -- -- -- -- Copyright (C) 2011-2019, 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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with System; with Ada.Containers.Synchronized_Queue_Interfaces; with Ada.Containers.Bounded_Doubly_Linked_Lists; generic with package Queue_Interfaces is new Ada.Containers.Synchronized_Queue_Interfaces (<>); type Queue_Priority is private; with function Get_Priority (Element : Queue_Interfaces.Element_Type) return Queue_Priority is <>; with function Before (Left, Right : Queue_Priority) return Boolean is <>; Default_Capacity : Count_Type; Default_Ceiling : System.Any_Priority := System.Priority'Last; package Ada.Containers.Bounded_Priority_Queues is pragma Annotate (CodePeer, Skip_Analysis); pragma Preelaborate; package Implementation is -- All identifiers in this unit are implementation defined pragma Implementation_Defined; type List_Type (Capacity : Count_Type) is tagged limited private; procedure Enqueue (List : in out List_Type; New_Item : Queue_Interfaces.Element_Type); procedure Dequeue (List : in out List_Type; Element : out Queue_Interfaces.Element_Type); procedure Dequeue (List : in out List_Type; At_Least : Queue_Priority; Element : in out Queue_Interfaces.Element_Type; Success : out Boolean); function First_Element (List : List_Type) return Queue_Interfaces.Element_Type; function Length (List : List_Type) return Count_Type; function Max_Length (List : List_Type) return Count_Type; private -- We need a better data structure here, such as a proper heap. ??? pragma Warnings (Off); -- Otherwise, we get warnings for the uninitialized variable in Insert -- in Ada.Containers.Bounded_Doubly_Linked_Lists. package List_Types is new Bounded_Doubly_Linked_Lists (Element_Type => Queue_Interfaces.Element_Type, "=" => Queue_Interfaces."="); pragma Warnings (On); type List_Type (Capacity : Count_Type) is tagged limited record Container : List_Types.List (Capacity); Max_Length : Count_Type := 0; end record; end Implementation; protected type Queue (Capacity : Count_Type := Default_Capacity; Ceiling : System.Any_Priority := Default_Ceiling) with Priority => Ceiling is new Queue_Interfaces.Queue with overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type); overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type); -- The priority queue operation Dequeue_Only_High_Priority had been a -- protected entry in early drafts of AI05-0159, but it was discovered -- that that operation as specified was not in fact implementable. The -- operation was changed from an entry to a protected procedure per the -- ARG meeting in Edinburgh (June 2011), with a different signature and -- semantics. procedure Dequeue_Only_High_Priority (At_Least : Queue_Priority; Element : in out Queue_Interfaces.Element_Type; Success : out Boolean); overriding function Current_Use return Count_Type; overriding function Peak_Use return Count_Type; private List : Implementation.List_Type (Capacity); end Queue; end Ada.Containers.Bounded_Priority_Queues;
-- -- Uwe R. Zimmer, Australia, 2013 -- package body Generic_Protected is protected body Monitor is function Read return Element is (Value); procedure Write (E : Element) is begin Value := E; Touched := True; end Write; entry Wait_for_Update (E : out Element) when Touched is begin E := Value; Touched := Wait_for_Update'Count > 0; end Wait_for_Update; end Monitor; function Allocate (Value : Element := Default_Value) return Monitor_Ptr is New_Monitor : constant Monitor_Ptr := new Monitor; begin New_Monitor.all.Write (Value); return New_Monitor; end Allocate; end Generic_Protected;
-- CE3801B.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: -- CHECK THAT EACH FIXED_IO OPERATION RAISES STATUS_ERROR -- WHEN CALLED WITH A FILE PARAMETER DESIGNATING AN UN-OPEN FILE. -- HISTORY: -- DWC 09/11/87 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; WITH TEXT_IO; USE TEXT_IO; PROCEDURE CE3801B IS BEGIN TEST ("CE3801B", "CHECK THAT EACH FIXED_IO " & "OPERATION RAISES STATUS_ERROR WHEN CALLED " & "WITH A FILE PARAMETER DESIGNATING AN " & "UN-OPEN FILE"); DECLARE TYPE FIX IS DELTA 0.1 RANGE 1.0 .. 10.0; PACKAGE FIX_IO IS NEW FIXED_IO (FIX); USE FIX_IO; X : FIX := FIX'LAST; FT : FILE_TYPE; BEGIN BEGIN GET (FT, X); FAILED ("STATUS_ERROR NOT RAISED - GET FIXED_IO - 1"); EXCEPTION WHEN STATUS_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - GET " & "FIXED_IO - 1"); END; BEGIN PUT (FT, X); FAILED ("STATUS_ERROR NOT RAISED - PUT FIXED_IO - 1"); EXCEPTION WHEN STATUS_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - PUT " & "FIXED_IO - 1"); END; BEGIN CREATE (FT, OUT_FILE); -- THIS IS JUST AN ATTEMPT TO CLOSE (FT); -- CREATE A FILE. OBJECTIVE EXCEPTION -- IS MET EITHER WAY. WHEN USE_ERROR => NULL; END; BEGIN GET (FT, X); FAILED ("STATUS_ERROR NOT RAISED - GET FIXED_IO - 2"); EXCEPTION WHEN STATUS_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - GET " & "FIXED_IO - 2"); END; BEGIN PUT (FT, X); FAILED ("STATUS_ERROR NOT RAISED - PUT FIXED_IO - 2"); EXCEPTION WHEN STATUS_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - PUT " & "FIXED_IO - 2"); END; END; RESULT; END CE3801B;
-- 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_Wide_Bounded.Generic_Bounded_Length (<>); function Ada.Strings.Wide_Wide_Bounded.Wide_Wide_Hash (Key : in Wide_Wide_Bounded.Bounded_Wide_Wide_String) return Containers.Hash_Type; pragma Preelaborate (Wide_Wide_Hash);
-- This package was generated by the Ada_Drivers_Library project wizard script package ADL_Config is Architecture : constant String := "ARM"; -- From board definition Board : constant String := "Crazyflie"; -- From command line CPU_Core : constant String := "ARM Cortex-M4F"; -- From mcu definition Device_Family : constant String := "STM32F4"; -- From board definition Device_Name : constant String := "STM32F405RGTx"; -- From board definition Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition Has_ZFP_Runtime : constant String := "False"; -- From board definition High_Speed_External_Clock : constant := 8000000; -- From board definition Max_Mount_Name_Length : constant := 128; -- From default value Max_Mount_Points : constant := 2; -- From default value Max_Path_Length : constant := 1024; -- From default value Number_Of_Interrupts : constant := 0; -- From default value Runtime_Name : constant String := "ravenscar-sfp-stm32f4"; -- From default value Runtime_Name_Suffix : constant String := "stm32f4"; -- From board definition Runtime_Profile : constant String := "ravenscar-sfp"; -- From command line Use_Startup_Gen : constant Boolean := False; -- From command line Vendor : constant String := "STMicro"; -- From board definition end ADL_Config;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package Slim.Messages.STAT is type STAT_Message is new Message with private; subtype Event_Kind is String (1 .. 4); not overriding function Event (Self : STAT_Message) return Event_Kind; not overriding function WiFi_Level (Self : STAT_Message) return Natural; not overriding function Elapsed_Seconds (Self : STAT_Message) return Natural; private subtype Byte is Ada.Streams.Stream_Element; type STAT_Message is new Base_Message (Max_8 => 4 + 3, Max_16 => 3, Max_32 => 8, Max_64 => 1) with null record; overriding function Read (Data : not null access League.Stream_Element_Vectors.Stream_Element_Vector) return STAT_Message; overriding procedure Write (Self : STAT_Message; Tag : out Message_Tag; Data : out League.Stream_Element_Vectors.Stream_Element_Vector); overriding procedure Visit (Self : not null access STAT_Message; Visiter : in out Slim.Message_Visiters.Visiter'Class); end Slim.Messages.STAT;
with Ada.Text_IO; use Ada.Text_IO; procedure luhn is function luhn_test(num : String) return Boolean is sum : Integer := 0; odd : Boolean := True; int : Integer; begin for p in reverse num'Range loop int := Integer'Value(num(p..p)); if odd then sum := sum + int; else sum := sum + (int*2 mod 10) + (int / 5); end if; odd := not odd; end loop; return (sum mod 10)=0; end luhn_test; begin put_line(Boolean'Image(luhn_test("49927398716"))); put_line(Boolean'Image(luhn_test("49927398717"))); put_line(Boolean'Image(luhn_test("1234567812345678"))); put_line(Boolean'Image(luhn_test("1234567812345670"))); end luhn;
with u1, u3; package u4 is end u4;
----------------------------------------------------------------------- -- AWA.Audits.Models -- AWA.Audits.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 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. ----------------------------------------------------------------------- pragma Warnings (Off); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Basic.Lists; with AWA.Users.Models; pragma Warnings (On); package AWA.Audits.Models is pragma Style_Checks ("-mr"); type Audit_Ref is new ADO.Objects.Object_Ref with null record; type Audit_Field_Ref is new ADO.Objects.Object_Ref with null record; -- -------------------- -- The Audit table records the changes made on database on behalf of a user. -- The record indicates the database table and row, the field being updated, -- the old and new value. The old and new values are converted to a string -- and they truncated if necessary to 256 characters. -- -------------------- -- Create an object key for Audit. function Audit_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Audit from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Audit_Key (Id : in String) return ADO.Objects.Object_Key; Null_Audit : constant Audit_Ref; function "=" (Left, Right : Audit_Ref'Class) return Boolean; -- Set the audit identifier procedure Set_Id (Object : in out Audit_Ref; Value : in ADO.Identifier); -- Get the audit identifier function Get_Id (Object : in Audit_Ref) return ADO.Identifier; -- Set the date when the field was modified. procedure Set_Date (Object : in out Audit_Ref; Value : in Ada.Calendar.Time); -- Get the date when the field was modified. function Get_Date (Object : in Audit_Ref) return Ada.Calendar.Time; -- Set the old field value. procedure Set_Old_Value (Object : in out Audit_Ref; Value : in ADO.Nullable_String); procedure Set_Old_Value (Object : in out Audit_Ref; Value : in String); -- Get the old field value. function Get_Old_Value (Object : in Audit_Ref) return ADO.Nullable_String; function Get_Old_Value (Object : in Audit_Ref) return String; -- Set the new field value. procedure Set_New_Value (Object : in out Audit_Ref; Value : in ADO.Nullable_String); procedure Set_New_Value (Object : in out Audit_Ref; Value : in String); -- Get the new field value. function Get_New_Value (Object : in Audit_Ref) return ADO.Nullable_String; function Get_New_Value (Object : in Audit_Ref) return String; -- Set the database entity identifier to which the audit is associated. procedure Set_Entity_Id (Object : in out Audit_Ref; Value : in ADO.Identifier); -- Get the database entity identifier to which the audit is associated. function Get_Entity_Id (Object : in Audit_Ref) return ADO.Identifier; -- procedure Set_Field (Object : in out Audit_Ref; Value : in Integer); -- function Get_Field (Object : in Audit_Ref) return Integer; -- Set the user session under which the field was modified. procedure Set_Session (Object : in out Audit_Ref; Value : in AWA.Users.Models.Session_Ref'Class); -- Get the user session under which the field was modified. function Get_Session (Object : in Audit_Ref) return AWA.Users.Models.Session_Ref'Class; -- Set the entity type. procedure Set_Entity_Type (Object : in out Audit_Ref; Value : in ADO.Entity_Type); -- Get the entity type. function Get_Entity_Type (Object : in Audit_Ref) return ADO.Entity_Type; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Audit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Audit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Audit_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Audit_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Audit_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Audit_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition AUDIT_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Audit_Ref); -- Copy of the object. procedure Copy (Object : in Audit_Ref; Into : in out Audit_Ref); package Audit_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Audit_Ref, "=" => "="); subtype Audit_Vector is Audit_Vectors.Vector; procedure List (Object : in out Audit_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class); -- -------------------- -- The Audit_Field table describes -- the database field being updated. -- -------------------- -- Create an object key for Audit_Field. function Audit_Field_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Audit_Field from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Audit_Field_Key (Id : in String) return ADO.Objects.Object_Key; Null_Audit_Field : constant Audit_Field_Ref; function "=" (Left, Right : Audit_Field_Ref'Class) return Boolean; -- Set the audit field identifier. procedure Set_Id (Object : in out Audit_Field_Ref; Value : in Integer); -- Get the audit field identifier. function Get_Id (Object : in Audit_Field_Ref) return Integer; -- Set the audit field name. procedure Set_Name (Object : in out Audit_Field_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Audit_Field_Ref; Value : in String); -- Get the audit field name. function Get_Name (Object : in Audit_Field_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Audit_Field_Ref) return String; -- Set the entity type procedure Set_Entity_Type (Object : in out Audit_Field_Ref; Value : in ADO.Entity_Type); -- Get the entity type function Get_Entity_Type (Object : in Audit_Field_Ref) return ADO.Entity_Type; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Audit_Field_Ref; Session : in out ADO.Sessions.Session'Class; Id : in Integer); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Audit_Field_Ref; Session : in out ADO.Sessions.Session'Class; Id : in Integer; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Audit_Field_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Audit_Field_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Audit_Field_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Audit_Field_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition AUDIT_FIELD_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Audit_Field_Ref); -- Copy of the object. procedure Copy (Object : in Audit_Field_Ref; Into : in out Audit_Field_Ref); private AUDIT_NAME : aliased constant String := "awa_audit"; COL_0_1_NAME : aliased constant String := "id"; COL_1_1_NAME : aliased constant String := "date"; COL_2_1_NAME : aliased constant String := "old_value"; COL_3_1_NAME : aliased constant String := "new_value"; COL_4_1_NAME : aliased constant String := "entity_id"; COL_5_1_NAME : aliased constant String := "field"; COL_6_1_NAME : aliased constant String := "session_id"; COL_7_1_NAME : aliased constant String := "entity_type"; AUDIT_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 8, Table => AUDIT_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access, 3 => COL_2_1_NAME'Access, 4 => COL_3_1_NAME'Access, 5 => COL_4_1_NAME'Access, 6 => COL_5_1_NAME'Access, 7 => COL_6_1_NAME'Access, 8 => COL_7_1_NAME'Access) ); AUDIT_TABLE : constant ADO.Schemas.Class_Mapping_Access := AUDIT_DEF'Access; Null_Audit : constant Audit_Ref := Audit_Ref'(ADO.Objects.Object_Ref with null record); type Audit_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => AUDIT_DEF'Access) with record Date : Ada.Calendar.Time; Old_Value : ADO.Nullable_String; New_Value : ADO.Nullable_String; Entity_Id : ADO.Identifier; Field : Integer; Session : AWA.Users.Models.Session_Ref; Entity_Type : ADO.Entity_Type; end record; type Audit_Access is access all Audit_Impl; overriding procedure Destroy (Object : access Audit_Impl); overriding procedure Find (Object : in out Audit_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Audit_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Audit_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Audit_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Audit_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Audit_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Audit_Ref'Class; Impl : out Audit_Access); AUDIT_FIELD_NAME : aliased constant String := "awa_audit_field"; COL_0_2_NAME : aliased constant String := "id"; COL_1_2_NAME : aliased constant String := "name"; COL_2_2_NAME : aliased constant String := "entity_type"; AUDIT_FIELD_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 3, Table => AUDIT_FIELD_NAME'Access, Members => ( 1 => COL_0_2_NAME'Access, 2 => COL_1_2_NAME'Access, 3 => COL_2_2_NAME'Access) ); AUDIT_FIELD_TABLE : constant ADO.Schemas.Class_Mapping_Access := AUDIT_FIELD_DEF'Access; Null_Audit_Field : constant Audit_Field_Ref := Audit_Field_Ref'(ADO.Objects.Object_Ref with null record); type Audit_Field_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_STRING, Of_Class => AUDIT_FIELD_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Entity_Type : ADO.Entity_Type; end record; type Audit_Field_Access is access all Audit_Field_Impl; overriding procedure Destroy (Object : access Audit_Field_Impl); overriding procedure Find (Object : in out Audit_Field_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Audit_Field_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Audit_Field_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Audit_Field_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Audit_Field_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Audit_Field_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Audit_Field_Ref'Class; Impl : out Audit_Field_Access); end AWA.Audits.Models;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . T A S K _ A T T R I B U T E S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2014-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/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ with System.Tasking; with System.Tasking.Initialization; with System.Tasking.Task_Attributes; pragma Elaborate_All (System.Tasking.Task_Attributes); with System.Task_Primitives.Operations; with Ada.Finalization; use Ada.Finalization; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; package body Ada.Task_Attributes is use System, System.Tasking.Initialization, System.Tasking, System.Tasking.Task_Attributes; package STPO renames System.Task_Primitives.Operations; type Attribute_Cleanup is new Limited_Controlled with null record; procedure Finalize (Cleanup : in out Attribute_Cleanup); -- Finalize all tasks' attributes for this package Cleanup : Attribute_Cleanup; pragma Unreferenced (Cleanup); -- Will call Finalize when this instantiation gets out of scope --------------------------- -- Unchecked Conversions -- --------------------------- type Real_Attribute is record Free : Deallocator; Value : Attribute; end record; type Real_Attribute_Access is access all Real_Attribute; pragma No_Strict_Aliasing (Real_Attribute_Access); -- Each value in the task control block's Attributes array is either -- mapped to the attribute value directly if Fast_Path is True, or -- is in effect a Real_Attribute_Access. -- -- Note: the Deallocator field must be first, for compatibility with -- System.Tasking.Task_Attributes.Attribute_Record and to allow unchecked -- conversions between Attribute_Access and Real_Attribute_Access. function New_Attribute (Val : Attribute) return Atomic_Address; -- Create a new Real_Attribute using Val, and return its address. The -- returned value can be converted via To_Real_Attribute. procedure Deallocate (Ptr : Atomic_Address); -- Free memory associated with Ptr, a Real_Attribute_Access in reality function To_Real_Attribute is new Ada.Unchecked_Conversion (Atomic_Address, Real_Attribute_Access); pragma Warnings (Off); -- Kill warning about possible size mismatch function To_Address is new Ada.Unchecked_Conversion (Attribute, Atomic_Address); function To_Attribute is new Ada.Unchecked_Conversion (Atomic_Address, Attribute); function To_Address is new Ada.Unchecked_Conversion (Attribute, System.Address); function To_Int is new Ada.Unchecked_Conversion (Attribute, Integer); pragma Warnings (On); function To_Address is new Ada.Unchecked_Conversion (Real_Attribute_Access, Atomic_Address); pragma Warnings (Off); -- Kill warning about possible aliasing function To_Handle is new Ada.Unchecked_Conversion (System.Address, Attribute_Handle); pragma Warnings (On); function To_Task_Id is new Ada.Unchecked_Conversion (Task_Identification.Task_Id, Task_Id); -- To access TCB of identified task procedure Free is new Ada.Unchecked_Deallocation (Real_Attribute, Real_Attribute_Access); Fast_Path : constant Boolean := (Attribute'Size = Integer'Size and then Attribute'Alignment <= Atomic_Address'Alignment and then To_Int (Initial_Value) = 0) or else (Attribute'Size = System.Address'Size and then Attribute'Alignment <= Atomic_Address'Alignment and then To_Address (Initial_Value) = System.Null_Address); -- If the attribute fits in an Atomic_Address (both size and alignment) -- and Initial_Value is 0 (or null), then we will map the attribute -- directly into ATCB.Attributes (Index), otherwise we will create -- a level of indirection and instead use Attributes (Index) as a -- Real_Attribute_Access. Index : constant Integer := Next_Index (Require_Finalization => not Fast_Path); -- Index in the task control block's Attributes array -------------- -- Finalize -- -------------- procedure Finalize (Cleanup : in out Attribute_Cleanup) is pragma Unreferenced (Cleanup); begin STPO.Lock_RTS; declare C : System.Tasking.Task_Id := System.Tasking.All_Tasks_List; begin while C /= null loop STPO.Write_Lock (C); if C.Attributes (Index) /= 0 and then Require_Finalization (Index) then Deallocate (C.Attributes (Index)); C.Attributes (Index) := 0; end if; STPO.Unlock (C); C := C.Common.All_Tasks_Link; end loop; end; Finalize (Index); STPO.Unlock_RTS; end Finalize; ---------------- -- Deallocate -- ---------------- procedure Deallocate (Ptr : Atomic_Address) is Obj : Real_Attribute_Access := To_Real_Attribute (Ptr); begin Free (Obj); end Deallocate; ------------------- -- New_Attribute -- ------------------- function New_Attribute (Val : Attribute) return Atomic_Address is Tmp : Real_Attribute_Access; begin Tmp := new Real_Attribute'(Free => Deallocate'Unrestricted_Access, Value => Val); return To_Address (Tmp); end New_Attribute; --------------- -- Reference -- --------------- function Reference (T : Task_Identification.Task_Id := Task_Identification.Current_Task) return Attribute_Handle is Self_Id : Task_Id; TT : constant Task_Id := To_Task_Id (T); Error_Message : constant String := "trying to get the reference of a "; Result : Attribute_Handle; begin if TT = null then raise Program_Error with Error_Message & "null task"; end if; if TT.Common.State = Terminated then raise Tasking_Error with Error_Message & "terminated task"; end if; if Fast_Path then -- Kill warning about possible alignment mismatch. If this happens, -- Fast_Path will be False anyway pragma Warnings (Off); return To_Handle (TT.Attributes (Index)'Address); pragma Warnings (On); else Self_Id := STPO.Self; Task_Lock (Self_Id); if TT.Attributes (Index) = 0 then TT.Attributes (Index) := New_Attribute (Initial_Value); end if; Result := To_Handle (To_Real_Attribute (TT.Attributes (Index)).Value'Address); Task_Unlock (Self_Id); return Result; end if; end Reference; ------------------ -- Reinitialize -- ------------------ procedure Reinitialize (T : Task_Identification.Task_Id := Task_Identification.Current_Task) is Self_Id : Task_Id; TT : constant Task_Id := To_Task_Id (T); Error_Message : constant String := "Trying to Reinitialize a "; begin if TT = null then raise Program_Error with Error_Message & "null task"; end if; if TT.Common.State = Terminated then raise Tasking_Error with Error_Message & "terminated task"; end if; if Fast_Path then -- No finalization needed, simply reset to Initial_Value TT.Attributes (Index) := To_Address (Initial_Value); else Self_Id := STPO.Self; Task_Lock (Self_Id); declare Attr : Atomic_Address renames TT.Attributes (Index); begin if Attr /= 0 then Deallocate (Attr); Attr := 0; end if; end; Task_Unlock (Self_Id); end if; end Reinitialize; --------------- -- Set_Value -- --------------- procedure Set_Value (Val : Attribute; T : Task_Identification.Task_Id := Task_Identification.Current_Task) is Self_Id : Task_Id; TT : constant Task_Id := To_Task_Id (T); Error_Message : constant String := "trying to set the value of a "; begin if TT = null then raise Program_Error with Error_Message & "null task"; end if; if TT.Common.State = Terminated then raise Tasking_Error with Error_Message & "terminated task"; end if; if Fast_Path then -- No finalization needed, simply set to Val TT.Attributes (Index) := To_Address (Val); else Self_Id := STPO.Self; Task_Lock (Self_Id); declare Attr : Atomic_Address renames TT.Attributes (Index); begin if Attr /= 0 then Deallocate (Attr); end if; Attr := New_Attribute (Val); end; Task_Unlock (Self_Id); end if; end Set_Value; ----------- -- Value -- ----------- function Value (T : Task_Identification.Task_Id := Task_Identification.Current_Task) return Attribute is Self_Id : Task_Id; TT : constant Task_Id := To_Task_Id (T); Error_Message : constant String := "trying to get the value of a "; begin if TT = null then raise Program_Error with Error_Message & "null task"; end if; if TT.Common.State = Terminated then raise Tasking_Error with Error_Message & "terminated task"; end if; if Fast_Path then return To_Attribute (TT.Attributes (Index)); else Self_Id := STPO.Self; Task_Lock (Self_Id); declare Attr : Atomic_Address renames TT.Attributes (Index); begin if Attr = 0 then Task_Unlock (Self_Id); return Initial_Value; else declare Result : constant Attribute := To_Real_Attribute (Attr).Value; begin Task_Unlock (Self_Id); return Result; end; end if; end; end if; end Value; end Ada.Task_Attributes;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- I M P U N I T -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 2000 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. -- -- -- ------------------------------------------------------------------------------ -- This package contains data and functions used to determine if a given -- unit is an internal unit intended only for use by the implementation -- and which should not be directly WITH'ed by user code. with Types; use Types; package Impunit is function Implementation_Unit (U : Unit_Number_Type) return Boolean; -- Given the unit number of a unit, this function determines if it is a -- unit that is intended to be used only internally by the implementation. -- This is used for posting warnings for improper WITH's of such units -- (such WITH's are allowed without warnings only in GNAT_Mode set by -- the use of -gnatg). True is returned if a warning should be posted. end Impunit;
-- C24003C.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 LEADING ZEROES IN INTEGRAL PARTS AND TRAILING ZEROES IN -- FRACTIONAL PARTS OF FIXED POINT LITERALS ARE IGNORED. -- JRK 12/12/79 -- JRK 12/16/80 -- TBN 10/21/85 RENAMED FROM C24003C.TST AND FIXED LINE LENGTH. -- DTN 11/12/91 DELETED SUBPART (B). CHANGED EXTENSION FROM '.TST' -- TO '.ADA'. WITH REPORT; PROCEDURE C24003C IS USE REPORT; TYPE FIXED IS DELTA 1.0 RANGE 0.0 .. 1000.0; FX : FIXED := 69.0E1; BEGIN TEST ("C24003C", "LEADING/TRAILING ZEROES IN " & "FIXED POINT LITERALS"); IF 000000000000000000000000000000000000000069.0E1 /= FX THEN FAILED ("LEADING ZEROES IN INTEGRAL PART OF FIXED " & "POINT LITERAL NOT IGNORED"); END IF; IF 69.0000000000000000000000000000000000000000E1 /= FX THEN -- MIGHT RAISE NUMERIC_ERROR AT COMPILE-TIME. FAILED ("TRAILING ZEROES IN FRACTIONAL PART OF " & "FIXED POINT LITERAL NOT IGNORED"); END IF; IF 0000000000000000000000000000000000000000690.00000 /= FX THEN FAILED ("LEADING/TRAILING ZEROES IN MANTISSA OF " & "FIXED POINT LITERAL NOT IGNORED"); END IF; IF 69.0E00000000000000000000000000000000000000001 /= FX THEN FAILED ("LEADING ZEROES IN EXPONENT OF FIXED " & "POINT LITERAL NOT IGNORED"); END IF; IF 16#00000000000000000000000000000000000000002B.2#E1 /= FX THEN FAILED ("LEADING ZEROES IN BASED FIXED POINT " & "LITERAL NOT IGNORED"); END IF; IF 16#2B.20000000000000000000000000000000000000000#E1 /= FX THEN FAILED ("TRAILING ZEROES IN BASED FIXED POINT " & "LITERAL NOT IGNORED"); END IF; RESULT; END C24003C;
with openGL.Primitive.indexed, openGL.Geometry.colored; package body openGL.Model.box.colored is --------- --- Forge -- function new_Box (Size : in Vector_3; Faces : in colored.Faces) return View is Self : constant View := new Item; begin Self.Faces := Faces; Self.Size := Size; return Self; end new_Box; -------------- --- 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 (Textures, Fonts); use Geometry; the_Sites : constant box.Sites := Self.vertex_Sites; the_Indices : aliased constant Indices := (1, 2, 3, 4); function new_Face (Vertices : access Geometry.colored.Vertex_array) return Geometry.colored.view is use Geometry.colored, Primitive; the_Geometry : constant Geometry.colored .view := Geometry.colored.new_Geometry; the_Primitive : constant Primitive.indexed.view := Primitive.indexed.new_Primitive (triangle_Fan, the_Indices); begin the_Geometry.Vertices_are (Vertices.all); the_Geometry.add (Primitive.view (the_Primitive)); the_Geometry.is_Transparent (now => False); return the_Geometry; end new_Face; front_Face : Geometry.colored.view; rear_Face : Geometry.colored.view; upper_Face : Geometry.colored.view; lower_Face : Geometry.colored.view; left_Face : Geometry.colored.view; right_Face : Geometry.colored.view; begin -- Front -- declare the_Vertices : aliased Geometry.colored.Vertex_array := (1 => (Site => the_Sites ( Left_Lower_Front), Color => +Self.Faces (Front).Colors (1)), 2 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Front).Colors (2)), 3 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Front).Colors (3)), 4 => (Site => the_Sites ( Left_Upper_Front), Color => +Self.Faces (Front).Colors (4))); begin front_Face := new_Face (Vertices => the_Vertices'Access); end; -- Rear -- declare the_Vertices : aliased Geometry.colored.Vertex_array := (1 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Rear).Colors (1)), 2 => (Site => the_Sites ( Left_Lower_Rear), Color => +Self.Faces (Rear).Colors (2)), 3 => (Site => the_Sites ( Left_Upper_Rear), Color => +Self.Faces (Rear).Colors (3)), 4 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Rear).Colors (4))); begin rear_Face := new_Face (Vertices => the_Vertices'Access); end; -- Upper -- declare the_Vertices : aliased Geometry.colored.Vertex_array := (1 => (Site => the_Sites ( Left_Upper_Front), Color => +Self.Faces (Upper).Colors (1)), 2 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Upper).Colors (2)), 3 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Upper).Colors (3)), 4 => (Site => the_Sites ( Left_Upper_Rear), Color => +Self.Faces (Upper).Colors (4))); begin upper_Face := new_Face (Vertices => the_Vertices'Access); end; -- Lower -- declare the_Vertices : aliased Geometry.colored.Vertex_array := (1 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Lower).Colors (1)), 2 => (Site => the_Sites ( Left_Lower_Front), Color => +Self.Faces (Lower).Colors (2)), 3 => (Site => the_Sites ( Left_Lower_Rear), Color => +Self.Faces (Lower).Colors (3)), 4 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Lower).Colors (4))); begin lower_Face := new_Face (Vertices => the_Vertices'Access); end; -- Left -- declare the_Vertices : aliased Geometry.colored.Vertex_array := (1 => (Site => the_Sites (Left_Lower_Rear), Color => +Self.Faces (Left).Colors (1)), 2 => (Site => the_Sites (Left_Lower_Front), Color => +Self.Faces (Left).Colors (2)), 3 => (Site => the_Sites (Left_Upper_Front), Color => +Self.Faces (Left).Colors (3)), 4 => (Site => the_Sites (Left_Upper_Rear), Color => +Self.Faces (Left).Colors (4))); begin left_Face := new_Face (Vertices => the_Vertices'Access); end; -- Right -- declare the_Vertices : aliased Geometry.colored.Vertex_array := (1 => (Site => the_Sites (Right_Lower_Front), Color => +Self.Faces (Right).Colors (1)), 2 => (Site => the_Sites (Right_Lower_Rear), Color => +Self.Faces (Right).Colors (2)), 3 => (Site => the_Sites (Right_Upper_Rear), Color => +Self.Faces (Right).Colors (3)), 4 => (Site => the_Sites (Right_Upper_Front), Color => +Self.Faces (Right).Colors (4))); begin right_Face := new_Face (Vertices => the_Vertices'Access); end; return (Geometry.view (front_Face), Geometry.view ( rear_Face), Geometry.view (upper_Face), Geometry.view (lower_Face), Geometry.view ( left_Face), Geometry.view (right_Face)); end to_GL_Geometries; end openGL.Model.box.colored;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . T A S K _ L O C K -- -- -- -- B o d y -- -- -- -- Copyright (C) 1997-2019, AdaCore -- -- -- -- 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.Soft_Links; package body System.Task_Lock is ---------- -- Lock -- ---------- procedure Lock is begin System.Soft_Links.Lock_Task.all; end Lock; ------------ -- Unlock -- ------------ procedure Unlock is begin System.Soft_Links.Unlock_Task.all; end Unlock; end System.Task_Lock;
------------------------------------------------------------------------------- -- Package : Cmd_Flags -- -- Description : Manage user provided CLI flags for the program. -- -- Author : Simon Rowe <simon@wiremoons.com> -- -- License : MIT Open Source. -- ------------------------------------------------------------------------------- with Ada.Text_IO; use Ada.Text_IO; with GNAT.Command_Line; use GNAT.Command_Line; -- local packages with Show_Version; package body Cmd_Flags is function Command_Line_Flags_Exist return Boolean is ---------------------------------------------- -- Parse and manage and command line flags -- ---------------------------------------------- -- GNAT.Command_Line variables and config Help_Option : aliased Boolean := False; Version_Option : aliased Boolean := False; Config : Command_Line_Configuration; begin -- define params for the 'help' option Define_Switch (Config, Help_Option'Access, Switch => "-h", Long_Switch => "--help", Help => "Show command line usage for application"); -- define params for the 'version' option Define_Switch (Config, Version_Option'Access, Switch => "-v", Long_Switch => "--version", Help => "Show version details"); -- Additional help message as first line of 'Display_Help()' Set_Usage (Config, Usage => "[switches] [arguments]", Help => "Program to generate passwords from random three letter words."); -- cli flags parse using config and above defined switched Getopt (Config); -- show program 'version' if requested if Version_Option then Show_Version.Show; return True; end if; -- show 'help' if requested if Help_Option then New_Line (1); Display_Help (Config); return True; end if; -- no cli params : so just return --Try_Help; -- alternative one line response return False; exception when Invalid_Switch => New_Line (1); Put_Line (Standard_Error, "Exception caught: caused by the use of an invalid command line switch."); New_Line (1); Display_Help (Config); return True; when Invalid_Parameter => New_Line (1); Put_Line (Standard_Error, "Exception caught: caused by the use of an invalid parameter to a command line switch."); New_Line (1); Display_Help (Config); return True; when Exit_From_Command_Line => New_Line (1); Put_Line (Standard_Error, "Exit following display of help message."); return True; end Command_Line_Flags_Exist; end Cmd_Flags;
-- Copyright 2012-2021 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 procedure Do_Nothing (A : System.Address); end Pck;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017-2018, 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.GPIO; use HAL.GPIO; with Wire_Simulation; use Wire_Simulation; with Ada.Text_IO; use Ada.Text_IO; procedure TC_Virtual_Wire is pragma Assertion_Policy (Assert => Check); No_Pull_Wire : Virtual_Wire (Default_Pull => Floating, Max_Points => 2); Pull_Up_Wire : Virtual_Wire (Default_Pull => Pull_Up, Max_Points => 2); Pull_Down_Wire : Virtual_Wire (Default_Pull => Pull_Down, Max_Points => 2); Unref : Boolean with Unreferenced; begin -- Default mode -- pragma Assert (No_Pull_Wire.Point (1).Mode = Input, "Default point mode should be input"); -- State with only inputs and a wire pull resistor -- pragma Assert (Pull_Up_Wire.Point (1).Set, "Default state of pull up wire should be high"); pragma Assert (not Pull_Down_Wire.Point (1).Set, "Default state of pull down wire should be low"); -- State with only inputs and a point pull resistor -- pragma Assert (No_Pull_Wire.Point (1).Support (Pull_Up), "It should be possible to change the pull resitor"); No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Up); pragma Assert (No_Pull_Wire.Point (1).Set, "State of wire with one pull up point should be high"); No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Down); pragma Assert (not No_Pull_Wire.Point (1).Set, "State of wire with one pull down point should be low"); -- State with one input one output and no pull resistor -- pragma Assert (No_Pull_Wire.Point (1).Support (Input), "It should be possible to change the mode"); No_Pull_Wire.Point (1).Set_Mode (Input); No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Down); No_Pull_Wire.Point (2).Set_Mode (Output); No_Pull_Wire.Point (2).Set_Pull_Resistor (Floating); No_Pull_Wire.Point (2).Set; pragma Assert (No_Pull_Wire.Point (1).Set, "Should be high"); No_Pull_Wire.Point (2).Clear; pragma Assert (not No_Pull_Wire.Point (1).Set, "Should be low"); -- State with one input one output and point pull resistor -- No_Pull_Wire.Point (1).Set_Mode (Input); No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Up); No_Pull_Wire.Point (2).Set_Mode (Output); No_Pull_Wire.Point (2).Set_Pull_Resistor (Floating); No_Pull_Wire.Point (2).Set; pragma Assert (No_Pull_Wire.Point (1).Set, "Should be high"); No_Pull_Wire.Point (2).Clear; pragma Assert (not No_Pull_Wire.Point (1).Set, "Should be low"); No_Pull_Wire.Point (1).Set_Pull_Resistor (Pull_Down); No_Pull_Wire.Point (2).Set; pragma Assert (No_Pull_Wire.Point (1).Set, "Should be high"); No_Pull_Wire.Point (2).Clear; pragma Assert (not No_Pull_Wire.Point (1).Set, "Should be low"); -- Opposite pull on the same wire -- declare begin Pull_Down_Wire.Point (1).Set_Pull_Resistor (Pull_Up); exception when Invalid_Configuration => Put_Line ("Expected exception on oppposite pull (1)"); end; declare begin Pull_Up_Wire.Point (1).Set_Pull_Resistor (Pull_Down); exception when Invalid_Configuration => Put_Line ("Expected exception on oppposite pull (2)"); end; -- Two output point on a wire -- declare begin Pull_Up_Wire.Point (1).Set_Mode (Output); Pull_Up_Wire.Point (2).Set_Mode (Output); exception when Invalid_Configuration => Put_Line ("Expected exception on multiple output points"); end; -- Unknon state -- declare begin No_Pull_Wire.Point (1).Set_Mode (Input); No_Pull_Wire.Point (1).Set_Pull_Resistor (Floating); No_Pull_Wire.Point (2).Set_Mode (Input); No_Pull_Wire.Point (2).Set_Pull_Resistor (Floating); Unref := No_Pull_Wire.Point (2).Set; exception when Unknown_State => Put_Line ("Expected exception on unknown state"); end; end TC_Virtual_Wire;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2015, 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$ ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); -- GNAT: enforce generation of preinitialized data section instead of -- generation of elaboration code. package Matreshka.Internals.Unicode.Ucd.Core_001E is pragma Preelaborate; Group_001E : aliased constant Core_Second_Stage := (16#00# => -- 1E00 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#02# => -- 1E02 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#04# => -- 1E04 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#06# => -- 1E06 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#08# => -- 1E08 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#0A# => -- 1E0A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#0C# => -- 1E0C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#0E# => -- 1E0E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#10# => -- 1E10 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#12# => -- 1E12 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#14# => -- 1E14 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#16# => -- 1E16 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#18# => -- 1E18 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#1A# => -- 1E1A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#1C# => -- 1E1C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#1E# => -- 1E1E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#20# => -- 1E20 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#22# => -- 1E22 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#24# => -- 1E24 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#26# => -- 1E26 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#28# => -- 1E28 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#2A# => -- 1E2A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#2C# => -- 1E2C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#2D# => -- 1E2D (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Soft_Dotted | Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start => True, others => False)), 16#2E# => -- 1E2E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#30# => -- 1E30 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#32# => -- 1E32 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#34# => -- 1E34 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#36# => -- 1E36 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#38# => -- 1E38 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#3A# => -- 1E3A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#3C# => -- 1E3C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#3E# => -- 1E3E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#40# => -- 1E40 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#42# => -- 1E42 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#44# => -- 1E44 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#46# => -- 1E46 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#48# => -- 1E48 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#4A# => -- 1E4A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#4C# => -- 1E4C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#4E# => -- 1E4E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#50# => -- 1E50 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#52# => -- 1E52 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#54# => -- 1E54 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#56# => -- 1E56 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#58# => -- 1E58 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#5A# => -- 1E5A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#5C# => -- 1E5C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#5E# => -- 1E5E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#60# => -- 1E60 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#62# => -- 1E62 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#64# => -- 1E64 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#66# => -- 1E66 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#68# => -- 1E68 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#6A# => -- 1E6A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#6C# => -- 1E6C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#6E# => -- 1E6E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#70# => -- 1E70 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#72# => -- 1E72 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#74# => -- 1E74 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#76# => -- 1E76 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#78# => -- 1E78 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#7A# => -- 1E7A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#7C# => -- 1E7C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#7E# => -- 1E7E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#80# => -- 1E80 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#82# => -- 1E82 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#84# => -- 1E84 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#86# => -- 1E86 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#88# => -- 1E88 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#8A# => -- 1E8A (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#8C# => -- 1E8C (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#8E# => -- 1E8E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#90# => -- 1E90 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#92# => -- 1E92 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#94# => -- 1E94 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#9A# .. 16#9B# => -- 1E9A .. 1E9B (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#9C# .. 16#9D# => -- 1E9C .. 1E9D (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start => True, others => False)), 16#9E# => -- 1E9E (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#9F# => -- 1E9F (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start => True, others => False)), 16#A0# => -- 1EA0 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#A2# => -- 1EA2 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#A4# => -- 1EA4 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#A6# => -- 1EA6 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#A8# => -- 1EA8 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#AA# => -- 1EAA (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#AC# => -- 1EAC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#AE# => -- 1EAE (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B0# => -- 1EB0 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B2# => -- 1EB2 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B4# => -- 1EB4 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B6# => -- 1EB6 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B8# => -- 1EB8 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#BA# => -- 1EBA (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#BC# => -- 1EBC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#BE# => -- 1EBE (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C0# => -- 1EC0 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C2# => -- 1EC2 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C4# => -- 1EC4 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C6# => -- 1EC6 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C8# => -- 1EC8 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#CA# => -- 1ECA (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#CB# => -- 1ECB (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Soft_Dotted | Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start => True, others => False)), 16#CC# => -- 1ECC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#CE# => -- 1ECE (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#D0# => -- 1ED0 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#D2# => -- 1ED2 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#D4# => -- 1ED4 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#D6# => -- 1ED6 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#D8# => -- 1ED8 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#DA# => -- 1EDA (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#DC# => -- 1EDC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#DE# => -- 1EDE (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#E0# => -- 1EE0 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#E2# => -- 1EE2 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#E4# => -- 1EE4 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#E6# => -- 1EE6 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#E8# => -- 1EE8 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#EA# => -- 1EEA (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#EC# => -- 1EEC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#EE# => -- 1EEE (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F0# => -- 1EF0 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F2# => -- 1EF2 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F4# => -- 1EF4 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F6# => -- 1EF6 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F8# => -- 1EF8 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#FA# => -- 1EFA (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#FC# => -- 1EFC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#FE# => -- 1EFE (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), others => (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start => True, others => False))); end Matreshka.Internals.Unicode.Ucd.Core_001E;
----------------------------------------------------------------------- -- awa-wikis-previews -- Wiki preview management -- Copyright (C) 2015, 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.Strings.Unbounded; with Util.Log.Loggers; with Util.Beans.Objects; with Util.Files; with Util.Processes; with Util.Streams.Pipes; with Util.Streams.Texts; with EL.Contexts.TLS; with Servlet.Core; with ASF.Requests.Mockup; with ASF.Responses.Mockup; with AWA.Applications; with AWA.Modules.Get; package body AWA.Wikis.Previews is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Wikis.Preview"); -- ------------------------------ -- The worker procedure that performs the preview job. -- ------------------------------ procedure Preview_Worker (Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class) is Previewer : constant Preview_Module_Access := Get_Preview_Module; begin Previewer.Do_Preview_Job (Job); end Preview_Worker; -- ------------------------------ -- Initialize the wikis module. -- ------------------------------ overriding procedure Initialize (Plugin : in out Preview_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config) is begin Log.Info ("Initializing the wiki preview module"); AWA.Modules.Module (Plugin).Initialize (App, Props); end Initialize; -- ------------------------------ -- Configures the module after its initialization and after having read its XML configuration. -- ------------------------------ overriding procedure Configure (Plugin : in out Preview_Module; Props : in ASF.Applications.Config) is pragma Unreferenced (Props); begin Plugin.Template := Plugin.Get_Config (PARAM_PREVIEW_TEMPLATE); Plugin.Command := Plugin.Get_Config (PARAM_PREVIEW_COMMAND); Plugin.Html := Plugin.Get_Config (PARAM_PREVIEW_HTML); Plugin.Add_Listener (AWA.Wikis.Modules.NAME, Plugin'Unchecked_Access); Plugin.Job_Module := AWA.Jobs.Modules.Get_Job_Module; Plugin.Job_Module.Register (Definition => Preview_Job_Definition.Factory); end Configure; -- ------------------------------ -- Execute the preview job and make the thumbnail preview. The page is first rendered in -- an HTML text file and the preview is rendered by using an external command. -- ------------------------------ procedure Do_Preview_Job (Plugin : in Preview_Module; Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class) is pragma Unreferenced (Job); use Util.Beans.Objects; Ctx : constant EL.Contexts.ELContext_Access := EL.Contexts.TLS.Current; Template : constant String := To_String (Plugin.Template.Get_Value (Ctx.all)); Command : constant String := To_String (Plugin.Command.Get_Value (Ctx.all)); Html_File : constant String := To_String (Plugin.Html.Get_Value (Ctx.all)); begin Log.Info ("Preview {0} with {1}", Template, Command); declare Req : ASF.Requests.Mockup.Request; Reply : ASF.Responses.Mockup.Response; Dispatcher : constant Servlet.Core.Request_Dispatcher := Plugin.Get_Application.Get_Request_Dispatcher (Template); Result : Ada.Strings.Unbounded.Unbounded_String; begin Req.Set_Request_URI (Template); Req.Set_Method ("GET"); Servlet.Core.Forward (Dispatcher, Req, Reply); Reply.Read_Content (Result); Util.Files.Write_File (Html_File, Result); end; declare Pipe : aliased Util.Streams.Pipes.Pipe_Stream; Input : Util.Streams.Texts.Reader_Stream; begin Log.Info ("Running preview command {0}", Command); Pipe.Open (Command, Util.Processes.READ_ALL); Input.Initialize (Pipe'Unchecked_Access, 1024); while not Input.Is_Eof loop declare Line : Ada.Strings.Unbounded.Unbounded_String; begin Input.Read_Line (Line, False); Log.Info ("Received: {0}", Line); end; end loop; Pipe.Close; if Pipe.Get_Exit_Status /= 0 then Log.Error ("Command {0} exited with status {1}", Command, Integer'Image (Pipe.Get_Exit_Status)); end if; end; end Do_Preview_Job; -- ------------------------------ -- Create a preview job and schedule the job to generate a new thumbnail preview for the page. -- ------------------------------ procedure Make_Preview_Job (Plugin : in Preview_Module; Page : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is pragma Unreferenced (Plugin); J : AWA.Jobs.Services.Job_Type; begin J.Set_Parameter ("wiki_space_id", Page.Get_Wiki); J.Set_Parameter ("wiki_page_id", Page); J.Schedule (Preview_Job_Definition.Factory.all); end Make_Preview_Job; -- ------------------------------ -- The `On_Create` procedure is called by `Notify_Create` to notify the creation of the page. -- ------------------------------ overriding procedure On_Create (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is begin Instance.Make_Preview_Job (Item); end On_Create; -- ------------------------------ -- The `On_Update` procedure is called by `Notify_Update` to notify the update of the page. -- ------------------------------ overriding procedure On_Update (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is begin Instance.Make_Preview_Job (Item); end On_Update; -- ------------------------------ -- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion of the page. -- ------------------------------ overriding procedure On_Delete (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class) is begin null; end On_Delete; -- ------------------------------ -- Get the preview module instance associated with the current application. -- ------------------------------ function Get_Preview_Module return Preview_Module_Access is function Get is new AWA.Modules.Get (Preview_Module, Preview_Module_Access, NAME); begin return Get; end Get_Preview_Module; end AWA.Wikis.Previews;
----------------------------------------------------------------------- -- keystore-tools-tests -- Tests for files -- Copyright (C) 2019 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.Test_Caller; with Util.Strings; with Keystore.Files; package body Keystore.Tools.Tests is use Ada.Directories; use type Interfaces.Unsigned_64; package Caller is new Util.Test_Caller (Test, "Keystore.Tools"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Keystore.Files.Create+Open", Test_Store_Directory'Access); end Add_Tests; -- ------------------------------ -- Test storing a directory tree -- ------------------------------ procedure Test_Store_Directory (T : in out Test) is function Filter (Ent : in Directory_Entry_Type) return Boolean; function Filter (Ent : in Directory_Entry_Type) return Boolean is Name : constant String := Ada.Directories.Simple_Name (Ent); Kind : constant File_Kind := Ada.Directories.Kind (Ent); begin if Kind = Ada.Directories.Ordinary_File then return Util.Strings.Ends_With (Name, ".ads"); else return Name /= ".git" and Name /= "result"; end if; end Filter; Path : constant String := Util.Tests.Get_Test_Path ("regtests/result/test-store.akt"); Password : Keystore.Secret_Key := Keystore.Create ("mypassword"); Config : Keystore.Wallet_Config := Unsecure_Config; begin declare W : Keystore.Files.Wallet_File; begin Config.Overwrite := True; W.Create (Path => Path, Password => Password, Config => Config); Keystore.Tools.Store (Wallet => W, Path => ".", Prefix => "store/", Pattern => "*", Filter => Filter'Access); end; declare procedure Check (Name : in String); W : Keystore.Files.Wallet_File; procedure Check (Name : in String) is Item : Keystore.Entry_Info; begin Item := W.Find (Name); T.Assert (Item.Size > 8192, "Invalid item size for " & Name); T.Assert (Item.Size < 128 * 1024, "Invalid item size for " & Name); T.Assert (Item.Block_Count > 2, "Invalid item for " & Name); T.Assert (Item.Kind = T_FILE, "Invalid item type for " & Name); end Check; begin W.Open (Password => Password, Path => Path); Check ("store/src/keystore.ads"); Check ("store/src/keystore-repository.ads"); Check ("store/obj/b__akt-main.ads"); end; end Test_Store_Directory; end Keystore.Tools.Tests;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . I M G _ R E A 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. -- -- -- -- 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.Img_LLU; use System.Img_LLU; with System.Img_Uns; use System.Img_Uns; with System.Powten_Table; use System.Powten_Table; with System.Unsigned_Types; use System.Unsigned_Types; package body System.Img_Real is -- The following defines the maximum number of digits that we can convert -- accurately. This is limited by the precision of Long_Long_Float, and -- also by the number of digits we can hold in Long_Long_Unsigned, which -- is the integer type we use as an intermediate for the result. -- We assume that in practice, the limitation will come from the digits -- value, rather than the integer value. This is true for typical IEEE -- implementations, and at worst, the only loss is for some precision -- in very high precision floating-point output. -- Note that in the following, the "-2" accounts for the sign and one -- extra digits, since we need the maximum number of 9's that can be -- supported, e.g. for the normal 64 bit case, Long_Long_Integer'Width -- is 21, since the maximum value (approx 1.6 * 10**19) has 20 digits, -- but the maximum number of 9's that can be supported is 19. Maxdigs : constant := Natural'Min (Long_Long_Unsigned'Width - 2, Long_Long_Float'Digits); Unsdigs : constant := Unsigned'Width - 2; -- Number of digits that can be converted using type Unsigned -- See above for the explanation of the -2. Maxscaling : constant := 5000; -- Max decimal scaling required during conversion of floating-point -- numbers to decimal. This is used to defend against infinite -- looping in the conversion, as can be caused by erroneous executions. -- The largest exponent used on any current system is 2**16383, which -- is approximately 10**4932, and the highest number of decimal digits -- is about 35 for 128-bit floating-point formats, so 5000 leaves -- enough room for scaling such values function Is_Negative (V : Long_Long_Float) return Boolean; pragma Import (Intrinsic, Is_Negative); -------------------------- -- Image_Floating_Point -- -------------------------- function Image_Floating_Point (V : Long_Long_Float; Digs : Natural) return String is P : Natural := 0; S : String (1 .. Long_Long_Float'Width); begin if not Is_Negative (V) then S (1) := ' '; P := 1; end if; Set_Image_Real (V, S, P, 1, Digs - 1, 3); return S (1 .. P); end Image_Floating_Point; -------------------------------- -- Image_Ordinary_Fixed_Point -- -------------------------------- function Image_Ordinary_Fixed_Point (V : Long_Long_Float; Aft : Natural) return String is P : Natural := 0; S : String (1 .. Long_Long_Float'Width); begin if V >= 0.0 then S (1) := ' '; P := 1; end if; Set_Image_Real (V, S, P, 1, Aft, 0); return S (1 .. P); end Image_Ordinary_Fixed_Point; -------------------- -- Set_Image_Real -- -------------------- procedure Set_Image_Real (V : Long_Long_Float; S : out String; P : in out Natural; Fore : Natural; Aft : Natural; Exp : Natural) is procedure Reset; pragma Import (C, Reset, "__gnat_init_float"); -- We import the floating-point processor reset routine so that we can -- be sure the floating-point processor is properly set for conversion -- calls (see description of Reset in GNAT.Float_Control (g-flocon.ads). -- This is notably need on Windows, where calls to the operating system -- randomly reset the processor into 64-bit mode. NFrac : constant Natural := Natural'Max (Aft, 1); Sign : Character; X : aliased Long_Long_Float; -- This is declared aliased because the expansion of X'Valid passes -- X by access and JGNAT requires all access parameters to be aliased. -- The Valid attribute probably needs to be handled via a different -- expansion for JGNAT, and this use of aliased should be removed -- once Valid is handled properly. ??? Scale : Integer; Expon : Integer; Field_Max : constant := 255; -- This should be the same value as Ada.[Wide_]Text_IO.Field'Last. -- It is not worth dragging in Ada.Text_IO to pick up this value, -- since it really should never be necessary to change it! Digs : String (1 .. 2 * Field_Max + 16); -- Array used to hold digits of converted integer value. This is a -- large enough buffer to accommodate ludicrous values of Fore and Aft. Ndigs : Natural; -- Number of digits stored in Digs (and also subscript of last digit) procedure Adjust_Scale (S : Natural); -- Adjusts the value in X by multiplying or dividing by a power of -- ten so that it is in the range 10**(S-1) <= X < 10**S. Includes -- adding 0.5 to round the result, readjusting if the rounding causes -- the result to wander out of the range. Scale is adjusted to reflect -- the power of ten used to divide the result (i.e. one is added to -- the scale value for each division by 10.0, or one is subtracted -- for each multiplication by 10.0). procedure Convert_Integer; -- Takes the value in X, outputs integer digits into Digs. On return, -- Ndigs is set to the number of digits stored. The digits are stored -- in Digs (1 .. Ndigs), procedure Set (C : Character); -- Sets character C in output buffer procedure Set_Blanks_And_Sign (N : Integer); -- Sets leading blanks and minus sign if needed. N is the number of -- positions to be filled (a minus sign is output even if N is zero -- or negative, but for a positive value, if N is non-positive, then -- the call has no effect). procedure Set_Digs (S, E : Natural); -- Set digits S through E from Digs buffer. No effect if S > E procedure Set_Special_Fill (N : Natural); -- After outputting +Inf, -Inf or NaN, this routine fills out the -- rest of the field with * characters. The argument is the number -- of characters output so far (either 3 or 4) procedure Set_Zeros (N : Integer); -- Set N zeros, no effect if N is negative pragma Inline (Set); pragma Inline (Set_Digs); pragma Inline (Set_Zeros); ------------------ -- Adjust_Scale -- ------------------ procedure Adjust_Scale (S : Natural) is Lo : Natural; Hi : Natural; Mid : Natural; XP : Long_Long_Float; begin -- Cases where scaling up is required if X < Powten (S - 1) then -- What we are looking for is a power of ten to multiply X by -- so that the result lies within the required range. loop XP := X * Powten (Maxpow); exit when XP >= Powten (S - 1) or Scale < -Maxscaling; X := XP; Scale := Scale - Maxpow; end loop; -- The following exception is only raised in case of erroneous -- execution, where a number was considered valid but still -- fails to scale up. One situation where this can happen is -- when a system which is supposed to be IEEE-compliant, but -- has been reconfigured to flush denormals to zero. if Scale < -Maxscaling then raise Constraint_Error; end if; -- Here we know that we must multiply by at least 10**1 and that -- 10**Maxpow takes us too far: binary search to find right one. -- Because of roundoff errors, it is possible for the value -- of XP to be just outside of the interval when Lo >= Hi. In -- that case we adjust explicitly by a factor of 10. This -- can only happen with a value that is very close to an -- exact power of 10. Lo := 1; Hi := Maxpow; loop Mid := (Lo + Hi) / 2; XP := X * Powten (Mid); if XP < Powten (S - 1) then if Lo >= Hi then Mid := Mid + 1; XP := XP * 10.0; exit; else Lo := Mid + 1; end if; elsif XP >= Powten (S) then if Lo >= Hi then Mid := Mid - 1; XP := XP / 10.0; exit; else Hi := Mid - 1; end if; else exit; end if; end loop; X := XP; Scale := Scale - Mid; -- Cases where scaling down is required elsif X >= Powten (S) then -- What we are looking for is a power of ten to divide X by -- so that the result lies within the required range. loop XP := X / Powten (Maxpow); exit when XP < Powten (S) or Scale > Maxscaling; X := XP; Scale := Scale + Maxpow; end loop; -- The following exception is only raised in case of erroneous -- execution, where a number was considered valid but still -- fails to scale up. One situation where this can happen is -- when a system which is supposed to be IEEE-compliant, but -- has been reconfigured to flush denormals to zero. if Scale > Maxscaling then raise Constraint_Error; end if; -- Here we know that we must divide by at least 10**1 and that -- 10**Maxpow takes us too far, binary search to find right one. Lo := 1; Hi := Maxpow; loop Mid := (Lo + Hi) / 2; XP := X / Powten (Mid); if XP < Powten (S - 1) then if Lo >= Hi then XP := XP * 10.0; Mid := Mid - 1; exit; else Hi := Mid - 1; end if; elsif XP >= Powten (S) then if Lo >= Hi then XP := XP / 10.0; Mid := Mid + 1; exit; else Lo := Mid + 1; end if; else exit; end if; end loop; X := XP; Scale := Scale + Mid; -- Here we are already scaled right else null; end if; -- Round, readjusting scale if needed. Note that if a readjustment -- occurs, then it is never necessary to round again, because there -- is no possibility of such a second rounding causing a change. X := X + 0.5; if X >= Powten (S) then X := X / 10.0; Scale := Scale + 1; end if; end Adjust_Scale; --------------------- -- Convert_Integer -- --------------------- procedure Convert_Integer is begin -- Use Unsigned routine if possible, since on many machines it will -- be significantly more efficient than the Long_Long_Unsigned one. if X < Powten (Unsdigs) then Ndigs := 0; Set_Image_Unsigned (Unsigned (Long_Long_Float'Truncation (X)), Digs, Ndigs); -- But if we want more digits than fit in Unsigned, we have to use -- the Long_Long_Unsigned routine after all. else Ndigs := 0; Set_Image_Long_Long_Unsigned (Long_Long_Unsigned (Long_Long_Float'Truncation (X)), Digs, Ndigs); end if; end Convert_Integer; --------- -- Set -- --------- procedure Set (C : Character) is begin P := P + 1; S (P) := C; end Set; ------------------------- -- Set_Blanks_And_Sign -- ------------------------- procedure Set_Blanks_And_Sign (N : Integer) is begin if Sign = '-' then for J in 1 .. N - 1 loop Set (' '); end loop; Set ('-'); else for J in 1 .. N loop Set (' '); end loop; end if; end Set_Blanks_And_Sign; -------------- -- Set_Digs -- -------------- procedure Set_Digs (S, E : Natural) is begin for J in S .. E loop Set (Digs (J)); end loop; end Set_Digs; ---------------------- -- Set_Special_Fill -- ---------------------- procedure Set_Special_Fill (N : Natural) is F : Natural; begin F := Fore + 1 + Aft - N; if Exp /= 0 then F := F + Exp + 1; end if; for J in 1 .. F loop Set ('*'); end loop; end Set_Special_Fill; --------------- -- Set_Zeros -- --------------- procedure Set_Zeros (N : Integer) is begin for J in 1 .. N loop Set ('0'); end loop; end Set_Zeros; -- Start of processing for Set_Image_Real begin Reset; Scale := 0; -- Positive values if V > 0.0 then X := V; Sign := '+'; -- Negative values elsif V < 0.0 then X := -V; Sign := '-'; -- Zero values elsif V = 0.0 then if Long_Long_Float'Signed_Zeros and then Is_Negative (V) then Sign := '-'; else Sign := '+'; end if; Set_Blanks_And_Sign (Fore - 1); Set ('0'); Set ('.'); Set_Zeros (NFrac); if Exp /= 0 then Set ('E'); Set ('+'); Set_Zeros (Natural'Max (1, Exp - 1)); end if; return; end if; -- Deal with invalid values if not X'Valid then -- Note that we're taking our chances here, as X might be -- an invalid bit pattern resulting from erroneous execution -- (caused by using uninitialized variables for example). -- No matter what, we'll at least get reasonable behaviour, -- converting to infinity or some other value, or causing an -- exception to be raised is fine. -- If the following test succeeds, then we definitely have -- an infinite value, so we print Inf. if X > Long_Long_Float'Last then Set (Sign); Set ('I'); Set ('n'); Set ('f'); Set_Special_Fill (4); -- In all other cases we print NaN else Set ('N'); Set ('a'); Set ('N'); Set_Special_Fill (3); end if; return; -- Case of non-zero value with Exp = 0 elsif Exp = 0 then -- First step is to multiply by 10 ** Nfrac to get an integer -- value to be output, an then add 0.5 to round the result. declare NF : Natural := NFrac; begin loop -- If we are larger than Powten (Maxdigs) now, then -- we have too many significant digits, and we have -- not even finished multiplying by NFrac (NF shows -- the number of unaccounted-for digits). if X >= Powten (Maxdigs) then -- In this situation, we only to generate a reasonable -- number of significant digits, and then zeroes after. -- So first we rescale to get: -- 10 ** (Maxdigs - 1) <= X < 10 ** Maxdigs -- and then convert the resulting integer Adjust_Scale (Maxdigs); Convert_Integer; -- If that caused rescaling, then add zeros to the end -- of the number to account for this scaling. Also add -- zeroes to account for the undone multiplications for J in 1 .. Scale + NF loop Ndigs := Ndigs + 1; Digs (Ndigs) := '0'; end loop; exit; -- If multiplication is complete, then convert the resulting -- integer after rounding (note that X is non-negative) elsif NF = 0 then X := X + 0.5; Convert_Integer; exit; -- Otherwise we can go ahead with the multiplication. If it -- can be done in one step, then do it in one step. elsif NF < Maxpow then X := X * Powten (NF); NF := 0; -- If it cannot be done in one step, then do partial scaling else X := X * Powten (Maxpow); NF := NF - Maxpow; end if; end loop; end; -- If number of available digits is less or equal to NFrac, -- then we need an extra zero before the decimal point. if Ndigs <= NFrac then Set_Blanks_And_Sign (Fore - 1); Set ('0'); Set ('.'); Set_Zeros (NFrac - Ndigs); Set_Digs (1, Ndigs); -- Normal case with some digits before the decimal point else Set_Blanks_And_Sign (Fore - (Ndigs - NFrac)); Set_Digs (1, Ndigs - NFrac); Set ('.'); Set_Digs (Ndigs - NFrac + 1, Ndigs); end if; -- Case of non-zero value with non-zero Exp value else -- If NFrac is less than Maxdigs, then all the fraction digits are -- significant, so we can scale the resulting integer accordingly. if NFrac < Maxdigs then Adjust_Scale (NFrac + 1); Convert_Integer; -- Otherwise, we get the maximum number of digits available else Adjust_Scale (Maxdigs); Convert_Integer; for J in 1 .. NFrac - Maxdigs + 1 loop Ndigs := Ndigs + 1; Digs (Ndigs) := '0'; Scale := Scale - 1; end loop; end if; Set_Blanks_And_Sign (Fore - 1); Set (Digs (1)); Set ('.'); Set_Digs (2, Ndigs); -- The exponent is the scaling factor adjusted for the digits -- that we output after the decimal point, since these were -- included in the scaled digits that we output. Expon := Scale + NFrac; Set ('E'); Ndigs := 0; if Expon >= 0 then Set ('+'); Set_Image_Unsigned (Unsigned (Expon), Digs, Ndigs); else Set ('-'); Set_Image_Unsigned (Unsigned (-Expon), Digs, Ndigs); end if; Set_Zeros (Exp - Ndigs - 1); Set_Digs (1, Ndigs); end if; end Set_Image_Real; end System.Img_Real;
with Ada.Unchecked_Conversion; with C.stdlib; package body System.Native_Locales is use type C.char; use type C.char_array; use type C.char_ptr; use type C.size_t; subtype Fixed_char_array is C.char_array (C.size_t); type char_array_const_ptr is access constant Fixed_char_array with Convention => C; function To_char_array_const_ptr is new Ada.Unchecked_Conversion (C.char_ptr, char_array_const_ptr); -- should it use CFLocaleGetValue in OSX ??? LANG : constant C.char_array := "LANG" & C.char'Val (0); -- implementation function Language return ISO_639_Alpha_2 is P : C.char_ptr; begin P := C.stdlib.getenv (LANG (0)'Access); if P /= null then declare Value : constant char_array_const_ptr := To_char_array_const_ptr (P); Len : C.size_t := 0; begin while Value (Len) in 'a' .. 'z' loop Len := Len + 1; end loop; if Len = 2 then return (1 => Character (Value (0)), 2 => Character (Value (1))); end if; end; end if; return Ada.Locales.ISO_639_Alpha_2_Unknown; end Language; function Language return ISO_639_Alpha_3 is begin return Ada.Locales.To_Alpha_3 (Language); end Language; function Country return ISO_3166_1_Alpha_2 is P : C.char_ptr; begin P := C.stdlib.getenv (LANG (0)'Access); if P /= null then declare Value : constant char_array_const_ptr := To_char_array_const_ptr (P); I : C.size_t := 0; begin while Value (I) /= C.char'Val (0) and then Value (I) /= '.' -- codeset and then Value (I) /= '@' -- modifier loop I := I + 1; end loop; if I >= 2 and then Value (I - 1) in 'A' .. 'Z' and then Value (I - 2) in 'A' .. 'Z' and then (I = 2 or else Value (I - 3) = '_') then return ( 1 => Character (Value (I - 2)), 2 => Character (Value (I - 1))); end if; end; end if; return Ada.Locales.ISO_3166_1_Alpha_2_Unknown; end Country; end System.Native_Locales;
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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 ewok.tasks; use ewok.tasks; with ewok.tasks_shared; use ewok.tasks_shared; with ewok.sched; with ewok.sleep; with ewok.exported.sleep; use ewok.exported.sleep; package body ewok.syscalls.sleep with spark_mode => off is procedure svc_sleep (caller_id : in ewok.tasks_shared.t_task_id; params : in out t_parameters; mode : in ewok.tasks_shared.t_task_mode) is sleep_time : unsigned_32 with address => params(1)'address; sleep_mode : t_sleep_mode with address => params(2)'address; begin if mode = TASK_MODE_ISRTHREAD then goto ret_denied; end if; if not sleep_mode'valid then goto ret_inval; end if; if ewok.tasks.is_ipc_waiting (caller_id) then goto ret_busy; end if; ewok.sleep.sleeping (caller_id, milliseconds (sleep_time), sleep_mode); -- Note: state set by ewok.sleep.sleeping procedure set_return_value (caller_id, mode, SYS_E_DONE); ewok.sched.request_schedule; return; <<ret_inval>> set_return_value (caller_id, mode, SYS_E_INVAL); ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE); return; <<ret_busy>> set_return_value (caller_id, mode, SYS_E_BUSY); ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE); return; <<ret_denied>> set_return_value (caller_id, mode, SYS_E_DENIED); ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE); return; end svc_sleep; end ewok.syscalls.sleep;
----------------------------------------------------------------------- -- awa-workspaces-beans -- Beans for module workspaces -- Copyright (C) 2011, 2012 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.Events.Faces.Actions; with ADO.Sessions; with AWA.Workspaces.Models; with AWA.Events.Action_Method; with AWA.Services.Contexts; package body AWA.Workspaces.Beans is -- ------------------------------ -- Example of action method. -- ------------------------------ procedure Action (Bean : in out Workspaces_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is begin null; end Action; -- ------------------------------ -- Event action called to create the workspace when the given event is posted. -- ------------------------------ procedure Create (Bean : in out Workspaces_Bean; Event : in AWA.Events.Module_Event'Class) is pragma Unreferenced (Bean, Event); WS : AWA.Workspaces.Models.Workspace_Ref; Ctx : constant AWA.Services.Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); begin Ctx.Start; AWA.Workspaces.Modules.Get_Workspace (Session => DB, Context => Ctx, Workspace => WS); Ctx.Commit; end Create; package Action_Binding is new ASF.Events.Faces.Actions.Action_Method.Bind (Bean => Workspaces_Bean, Method => Action, Name => "action"); package Create_Binding is new AWA.Events.Action_Method.Bind (Name => "create", Bean => Workspaces_Bean, Method => Create); Workspaces_Bean_Binding : aliased constant Util.Beans.Methods.Method_Binding_Array := (Action_Binding.Proxy'Access, Create_Binding.Proxy'Access); -- ------------------------------ -- Get the value identified by the name. -- ------------------------------ overriding function Get_Value (From : in Workspaces_Bean; Name : in String) return Util.Beans.Objects.Object is begin if Name = "count" then return Util.Beans.Objects.To_Object (From.Count); else return Util.Beans.Objects.Null_Object; end if; end Get_Value; -- ------------------------------ -- Set the value identified by the name. -- ------------------------------ overriding procedure Set_Value (From : in out Workspaces_Bean; Name : in String; Value : in Util.Beans.Objects.Object) is begin if Name = "count" then From.Count := Util.Beans.Objects.To_Integer (Value); end if; end Set_Value; -- ------------------------------ -- This bean provides some methods that can be used in a Method_Expression -- ------------------------------ overriding function Get_Method_Bindings (From : in Workspaces_Bean) return Util.Beans.Methods.Method_Binding_Array_Access is pragma Unreferenced (From); begin return Workspaces_Bean_Binding'Access; end Get_Method_Bindings; -- ------------------------------ -- Create the Workspaces_Bean bean instance. -- ------------------------------ function Create_Workspaces_Bean (Module : in AWA.Workspaces.Modules.Workspace_Module_Access) return Util.Beans.Basic.Readonly_Bean_Access is Object : constant Workspaces_Bean_Access := new Workspaces_Bean; begin Object.Module := Module; return Object.all'Access; end Create_Workspaces_Bean; end AWA.Workspaces.Beans;
-- { dg-compile } -- { dg-options "-g" } with Debug4_Pkg; procedure Debug4 is package P is new Debug4_Pkg (Natural); begin null; end;
pragma License (Unrestricted); -- implementation unit with Ada.IO_Exceptions; with Ada.IO_Modes; with Ada.Streams.Naked_Stream_IO.Standard_Files; with System.Native_IO; with System.Native_Text_IO; package Ada.Naked_Text_IO is -- the parameter Form Default_Form : constant System.Native_Text_IO.Packed_Form := ( Stream_Form => Streams.Naked_Stream_IO.Default_Form, External => IO_Modes.By_Target, New_Line => IO_Modes.By_Target); procedure Set ( Form : in out System.Native_Text_IO.Packed_Form; Keyword : String; Item : String); function Pack (Form : String) return System.Native_Text_IO.Packed_Form; procedure Unpack ( Form : System.Native_Text_IO.Packed_Form; Result : out Streams.Naked_Stream_IO.Form_String; Last : out Natural); -- non-controlled type Text_Type (<>) is limited private; type Non_Controlled_File_Type is access all Text_Type; procedure Create ( File : in out Non_Controlled_File_Type; Mode : IO_Modes.File_Mode := IO_Modes.Out_File; Name : String := ""; Form : System.Native_Text_IO.Packed_Form := Default_Form); procedure Open ( File : in out Non_Controlled_File_Type; Mode : IO_Modes.File_Mode; Name : String; Form : System.Native_Text_IO.Packed_Form := Default_Form); procedure Close ( File : aliased in out Non_Controlled_File_Type; Raise_On_Error : Boolean := True); procedure Delete (File : aliased in out Non_Controlled_File_Type); procedure Reset ( File : aliased in out Non_Controlled_File_Type; Mode : IO_Modes.File_Mode); function Mode (File : Non_Controlled_File_Type) return IO_Modes.File_Mode; function Name (File : Non_Controlled_File_Type) return String; function Form (File : Non_Controlled_File_Type) return System.Native_Text_IO.Packed_Form; function External (File : Non_Controlled_File_Type) return IO_Modes.File_External; pragma Inline (External); function Is_Open (File : Non_Controlled_File_Type) return Boolean; pragma Inline (Is_Open); procedure Flush (File : Non_Controlled_File_Type); procedure Set_Size ( File : Non_Controlled_File_Type; Line_Length, Page_Length : Natural); procedure Set_Line_Length (File : Non_Controlled_File_Type; To : Natural); procedure Set_Page_Length (File : Non_Controlled_File_Type; To : Natural); procedure Size ( File : Non_Controlled_File_Type; Line_Length, Page_Length : out Natural); function Line_Length (File : Non_Controlled_File_Type) return Natural; function Page_Length (File : Non_Controlled_File_Type) return Natural; pragma Inline (Line_Length); pragma Inline (Page_Length); procedure New_Line ( File : Non_Controlled_File_Type; Spacing : Positive := 1); procedure Skip_Line ( File : Non_Controlled_File_Type; Spacing : Positive := 1); function End_Of_Line (File : Non_Controlled_File_Type) return Boolean; procedure New_Page (File : Non_Controlled_File_Type); procedure Skip_Page (File : Non_Controlled_File_Type); function End_Of_Page (File : Non_Controlled_File_Type) return Boolean; function End_Of_File (File : Non_Controlled_File_Type) return Boolean; procedure Set_Col (File : Non_Controlled_File_Type; To : Positive); procedure Set_Line (File : Non_Controlled_File_Type; To : Positive); procedure Position ( File : Non_Controlled_File_Type; Col, Line : out Positive); function Col (File : Non_Controlled_File_Type) return Positive; function Line (File : Non_Controlled_File_Type) return Positive; function Page (File : Non_Controlled_File_Type) return Positive; pragma Inline (Col); pragma Inline (Line); pragma Inline (Page); procedure Get ( File : Non_Controlled_File_Type; Item : out Character); procedure Get ( File : Non_Controlled_File_Type; Item : out Wide_Character); procedure Get ( File : Non_Controlled_File_Type; Item : out Wide_Wide_Character); procedure Put ( File : Non_Controlled_File_Type; Item : Character); procedure Put ( File : Non_Controlled_File_Type; Item : Wide_Character); procedure Put ( File : Non_Controlled_File_Type; Item : Wide_Wide_Character); procedure Look_Ahead ( File : Non_Controlled_File_Type; Item : out Character; End_Of_Line : out Boolean); procedure Look_Ahead ( File : Non_Controlled_File_Type; Item : out Wide_Character; End_Of_Line : out Boolean); procedure Look_Ahead ( File : Non_Controlled_File_Type; Item : out Wide_Wide_Character; End_Of_Line : out Boolean); procedure Skip_Ahead (File : Non_Controlled_File_Type); procedure Get_Immediate ( File : Non_Controlled_File_Type; Item : out Character); procedure Get_Immediate ( File : Non_Controlled_File_Type; Item : out Wide_Character); procedure Get_Immediate ( File : Non_Controlled_File_Type; Item : out Wide_Wide_Character); procedure Get_Immediate ( File : Non_Controlled_File_Type; Item : out Character; Available : out Boolean); procedure Get_Immediate ( File : Non_Controlled_File_Type; Item : out Wide_Character; Available : out Boolean); procedure Get_Immediate ( File : Non_Controlled_File_Type; Item : out Wide_Wide_Character; Available : out Boolean); -- handle of stream for non-controlled procedure Open ( File : in out Non_Controlled_File_Type; Mode : IO_Modes.File_Mode; Stream : not null access Streams.Root_Stream_Type'Class; Name : String := ""; Form : System.Native_Text_IO.Packed_Form := Default_Form); function Stream (File : not null Non_Controlled_File_Type) return not null access Streams.Root_Stream_Type'Class; function Stream_IO (File : Non_Controlled_File_Type) return not null access Streams.Naked_Stream_IO.Non_Controlled_File_Type; pragma Inline (Stream_IO); function Terminal_Handle (File : Non_Controlled_File_Type) return System.Native_IO.Handle_Type; -- standard I/O Standard_Input : constant Non_Controlled_File_Type; Standard_Output : constant Non_Controlled_File_Type; Standard_Error : constant Non_Controlled_File_Type; -- exceptions Status_Error : exception renames IO_Exceptions.Status_Error; Mode_Error : exception renames IO_Exceptions.Mode_Error; Use_Error : exception renames IO_Exceptions.Use_Error; Device_Error : exception renames IO_Exceptions.Device_Error; End_Error : exception renames IO_Exceptions.End_Error; Data_Error : exception renames IO_Exceptions.Data_Error; Layout_Error : exception renames IO_Exceptions.Layout_Error; private type Virtual_Mark_Type is (None, EOP, EOP_EOF, EOF); pragma Discard_Names (Virtual_Mark_Type); type Text_Type is record -- "limited" prevents No_Elaboration_Code Stream : System.Address := -- access Streams.Root_Stream_Type'Class System.Null_Address; File : aliased Streams.Naked_Stream_IO.Non_Controlled_File_Type; Name : System.Native_IO.Name_Pointer; -- used when File is not assigned Line : Natural := 1; Page : Natural := 1; Col : Natural := 1; Line_Length : Natural := 0; Page_Length : Natural := 0; Last : Natural := 0; Ahead_Last : Natural := 0; -- one-character Length, only In_File mode Ahead_Col : Natural := 0; -- one-character Col Looked_Ahead_Last : Natural := 0; Looked_Ahead_Second : String (1 .. 3); -- second of surrogate pair Buffer : System.Native_Text_IO.Buffer_Type; End_Of_File : Boolean := False; Virtual_Mark : Virtual_Mark_Type := None; Mode : IO_Modes.File_Mode; External : IO_Modes.File_External; New_Line : IO_Modes.File_New_Line; end record; pragma Suppress_Initialization (Text_Type); Standard_Input_Text : aliased Text_Type := ( Stream => System.Null_Address, -- be overwritten File => Streams.Naked_Stream_IO.Standard_Files.Standard_Input, Name => null, Line => 1, Page => 1, Col => 1, Line_Length => 0, Page_Length => 0, Last => 0, Ahead_Last => 0, Ahead_Col => 0, Looked_Ahead_Last => 0, Looked_Ahead_Second => (others => Character'Val (0)), Buffer => (others => Character'Val (0)), End_Of_File => False, Virtual_Mark => None, Mode => IO_Modes.In_File, External => System.Native_Text_IO.Default_External, -- be overwritten New_Line => System.Native_Text_IO.Default_New_Line); Standard_Output_Text : aliased Text_Type := ( Stream => System.Null_Address, -- be overwritten File => Streams.Naked_Stream_IO.Standard_Files.Standard_Output, Name => null, Line => 1, Page => 1, Col => 1, Line_Length => 0, Page_Length => 0, Last => 0, Ahead_Last => 0, Ahead_Col => 0, Looked_Ahead_Last => 0, Looked_Ahead_Second => (others => Character'Val (0)), Buffer => (others => Character'Val (0)), End_Of_File => False, Virtual_Mark => None, Mode => IO_Modes.Out_File, External => System.Native_Text_IO.Default_External, -- be overwritten New_Line => System.Native_Text_IO.Default_New_Line); Standard_Error_Text : aliased Text_Type := ( Stream => System.Null_Address, -- be overwritten File => Streams.Naked_Stream_IO.Standard_Files.Standard_Error, Name => null, Line => 1, Page => 1, Col => 1, Line_Length => 0, Page_Length => 0, Last => 0, Ahead_Last => 0, Ahead_Col => 0, Looked_Ahead_Last => 0, Looked_Ahead_Second => (others => Character'Val (0)), Buffer => (others => Character'Val (0)), End_Of_File => False, Virtual_Mark => None, Mode => IO_Modes.Out_File, External => System.Native_Text_IO.Default_External, -- be overwritten New_Line => System.Native_Text_IO.Default_New_Line); Standard_Input : constant Non_Controlled_File_Type := Standard_Input_Text'Access; Standard_Output : constant Non_Controlled_File_Type := Standard_Output_Text'Access; Standard_Error : constant Non_Controlled_File_Type := Standard_Error_Text'Access; end Ada.Naked_Text_IO;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C O M M A N D _ L I N E -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001 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 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. -- -- -- ------------------------------------------------------------------------------ package Ada.Command_Line is pragma Preelaborate (Command_Line); function Argument_Count return Natural; -- If the external execution environment supports passing arguments to a -- program, then Argument_Count returns the number of arguments passed to -- the program invoking the function. Otherwise it return 0. -- -- In GNAT: Corresponds to (argc - 1) in C. function Argument (Number : Positive) return String; -- If the external execution environment supports passing arguments to -- a program, then Argument returns an implementation-defined value -- corresponding to the argument at relative position Number. If Number -- is outside the range 1 .. Argument_Count, then Constraint_Error is -- propagated. -- -- in GNAT: Corresponds to argv [n] (for n > 0) in C. function Command_Name return String; -- If the external execution environment supports passing arguments to -- a program, then Command_Name returns an implementation-defined value -- corresponding to the name of the command invoking the program. -- Otherwise Command_Name returns the null string. -- -- in GNAT: Corresponds to argv [0] in C. type Exit_Status is new Integer; Success : constant Exit_Status; Failure : constant Exit_Status; procedure Set_Exit_Status (Code : Exit_Status); private Success : constant Exit_Status := 0; Failure : constant Exit_Status := 1; -- The following locations support the operation of the package -- Ada.Command_Line_Remove, whih provides facilities for logically -- removing arguments from the command line. If one of the remove -- procedures is called in this unit, then Remove_Args/Remove_Count -- are set to indicate which arguments are removed. If no such calls -- have been made, then Remove_Args is null. Remove_Count : Natural; -- Number of arguments reflecting removals. Not defined unless -- Remove_Args is non-null. type Arg_Nums is array (Positive range <>) of Positive; type Arg_Nums_Ptr is access Arg_Nums; -- An array that maps logical argument numbers (reflecting removal) -- to physical argument numbers (e.g. if the first argument has been -- removed, but not the second, then Arg_Nums (1) will be set to 2. Remove_Args : Arg_Nums_Ptr := null; -- Left set to null if no remove calls have been made, otherwise set -- to point to an appropriate mapping array. Only the first Remove_Count -- elements are relevant. pragma Import (C, Set_Exit_Status, "__gnat_set_exit_status"); end Ada.Command_Line;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S H A 3 8 4 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2009-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/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package implements the SHA-384 secure hash function as described in -- FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at: -- http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf -- See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete -- documentation. with GNAT.Secure_Hashes.SHA2_Common; with GNAT.Secure_Hashes.SHA2_64; with System; package GNAT.SHA384 is new GNAT.Secure_Hashes.H (Block_Words => GNAT.Secure_Hashes.SHA2_Common.Block_Words, State_Words => 8, Hash_Words => 6, Hash_Bit_Order => System.High_Order_First, Hash_State => GNAT.Secure_Hashes.SHA2_64.Hash_State, Initial_State => GNAT.Secure_Hashes.SHA2_64.SHA384_Init_State, Transform => GNAT.Secure_Hashes.SHA2_64.Transform);
-- SPDX-FileCopyrightText: 2020-2021 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Compilation_Units; with Program.Cross_Reference_Updaters; with Program.Elements.Expressions; with Program.Interpretations; with Program.Visibility; private package Program.Type_Resolvers is pragma Preelaborate; procedure Resolve_Type (Element : Program.Elements.Expressions.Expression_Access; Context : not null Program.Visibility.Context_Access; Setter : not null Program.Cross_Reference_Updaters .Cross_Reference_Updater_Access; Sets : not null Program.Interpretations.Context_Access; Value : out Program.Visibility.View); -- The Element is a subtype_mark. Resolve it and return corresponding -- type view. procedure Resolve_Type_Definition (Element : Program.Elements.Element_Access; Context : not null Program.Visibility.Context_Access; Setter : not null Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access; Sets : not null Program.Interpretations.Context_Access; Value : out Program.Visibility.View); -- The Element is a subtype_indication, access_definition or -- array_type_definition. Resolve it and return corresponding type view. end Program.Type_Resolvers;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 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 AUnit.Assertions; with AUnit.Test_Caller; with Orka.SIMD.AVX.Doubles; with Orka.SIMD.AVX2.Doubles.Swizzle; package body Test_SIMD_AVX2_Swizzle is use Orka; use Orka.SIMD; use Orka.SIMD.AVX.Doubles; use Orka.SIMD.AVX2.Doubles.Swizzle; use AUnit.Assertions; package Caller is new AUnit.Test_Caller (Test); Test_Suite : aliased AUnit.Test_Suites.Test_Suite; function Suite return AUnit.Test_Suites.Access_Test_Suite is Name : constant String := "(SIMD - AVX2 - Swizzle) "; begin Test_Suite.Add_Test (Caller.Create (Name & "Test Permute function", Test_Permute'Access)); return Test_Suite'Access; end Suite; procedure Test_Permute (Object : in out Test) is Elements : constant m256d := (1.0, 2.0, 3.0, 4.0); Mask_0_0_0_0 : constant Unsigned_32 := 0 or 0 * 4 or 0 * 16 or 0 * 64; Mask_2_2_2_2 : constant Unsigned_32 := 2 or 2 * 4 or 2 * 16 or 2 * 64; Mask_1_0_3_2 : constant Unsigned_32 := 1 or 0 * 4 or 3 * 16 or 2 * 64; Mask_2_3_0_1 : constant Unsigned_32 := 2 or 3 * 4 or 0 * 16 or 1 * 64; Expected : constant array (Positive range <>) of m256d := ((1.0, 1.0, 1.0, 1.0), (3.0, 3.0, 3.0, 3.0), (2.0, 1.0, 4.0, 3.0), (3.0, 4.0, 1.0, 2.0)); Results : array (Positive range Expected'Range) of m256d; begin Results (1) := Permute (Elements, Mask_0_0_0_0); Results (2) := Permute (Elements, Mask_2_2_2_2); Results (3) := Permute (Elements, Mask_1_0_3_2); Results (4) := Permute (Elements, Mask_2_3_0_1); for I in Expected'Range loop for J in Index_Homogeneous loop declare Message : constant String := "Unexpected Single at " & Index_Homogeneous'Image (J); begin Assert (Expected (I) (J) = Results (I) (J), Message); end; end loop; end loop; end Test_Permute; end Test_SIMD_AVX2_Swizzle;
with Ada.Exception_Identification.From_Here; with Ada.Exceptions.Finally; with System.Address_To_Named_Access_Conversions; with System.Soft_Links; with System.Synchronous_Objects.Abortable; with System.Tasks; package body System.Tasking.Protected_Objects.Operations is use Ada.Exception_Identification.From_Here; use type Ada.Exceptions.Exception_Id; use type Synchronous_Objects.Queue_Node_Access; function Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean; function Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean is begin return Entries.Downcast (The_Node).E = Protected_Entry_Index (Params); end Filter; package Task_Id_Conv is new Address_To_Named_Access_Conversions ( Tasks.Task_Record, Tasks.Task_Id); package QNA_Conv is new Address_To_Named_Access_Conversions ( Synchronous_Objects.Queue_Node, Synchronous_Objects.Queue_Node_Access); function Uncall_Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean; function Uncall_Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean is begin return The_Node = QNA_Conv.To_Pointer (Params); end Uncall_Filter; procedure Uncall ( Object : not null access Entries.Protection_Entries'Class; Item : not null Synchronous_Objects.Queue_Node_Access; Already_Taken : out Boolean); procedure Uncall ( Object : not null access Entries.Protection_Entries'Class; Item : not null Synchronous_Objects.Queue_Node_Access; Already_Taken : out Boolean) is Taken : Synchronous_Objects.Queue_Node_Access; begin Synchronous_Objects.Take ( Object.Calling, Taken, QNA_Conv.To_Address (Item), Uncall_Filter'Access); Already_Taken := Taken = null; pragma Assert (Taken = null or else Taken = Item); end Uncall; function Invoke_Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean; function Invoke_Filter ( The_Node : not null Synchronous_Objects.Queue_Node_Access; Params : Address) return Boolean is -- The_Node to Entries.Node Node : constant not null Entries.Node_Access := Entries.Downcast (The_Node); -- Params to access Entries.Protection_Entries'Class function To_Pointer (Value : Address) return access Entries.Protection_Entries'Class with Import, Convention => Intrinsic; Object : constant not null access Entries.Protection_Entries'Class := To_Pointer (Params); Index : constant Positive_Protected_Entry_Index := Object.Find_Body_Index (Object.Compiler_Info, Node.E); Result : Boolean; begin -- queue is locked in filter Node.Action := False; Node.Requeued := False; begin Result := Object.Entry_Bodies (Index).Barrier (Object.Compiler_Info, Node.E); Node.Action := Result; -- execute the body after removing node exception when others => Object.Raised_On_Barrier := True; Result := True; -- C953001 Ada.Exceptions.Save_Exception (Node.X, Program_Error'Identity); end; return Result; end Invoke_Filter; procedure Invoke ( Object : not null access Entries.Protection_Entries'Class); procedure Invoke ( Object : not null access Entries.Protection_Entries'Class) is function To_Address (Value : access Entries.Protection_Entries'Class) return Address with Import, Convention => Intrinsic; Taken : Synchronous_Objects.Queue_Node_Access; begin pragma Assert (Object.Entry_Bodies'First = 1); loop Synchronous_Objects.Unsynchronized_Take ( Object.Calling, Taken, To_Address (Object), Invoke_Filter'Access); exit when Taken = null; declare Node : constant not null Entries.Node_Access := Entries.Downcast (Taken); begin if Node.Action then declare Index : constant Positive_Protected_Entry_Index := Object.Find_Body_Index (Object.Compiler_Info, Node.E); begin Object.Current_Calling := Node; begin Object.Entry_Bodies (Index).Action ( Object.Compiler_Info, Node.Uninterpreted_Data, Node.E); exception when E : others => Ada.Exceptions.Save_Occurrence (Node.X, E); end; Object.Current_Calling := null; end; end if; if Node.Requeued then -- internal requeue is a part of a single protected operation. declare Canceled : Boolean; begin Synchronous_Objects.Unsynchronized_Prepend ( Object.Calling, Taken, Canceled); if Canceled then -- it does not happen ? Ada.Exceptions.Save_Exception ( Node.X, Tasking_Error'Identity); end if; end; else Synchronous_Objects.Set (Node.Waiting); if Object.Raised_On_Barrier then -- cancel all current callers, RM 9.5.3(7/3) Object.Raised_On_Barrier := False; Entries.Unlock_Entries (Object); Entries.Cancel_Calls (Object.all); Entries.Lock_Entries (Object); end if; end if; end; end loop; end Invoke; -- implementation procedure Service_Entries ( Object : not null access Entries.Protection_Entries'Class) is begin -- already locked Invoke (Object); Entries.Unlock_Entries (Object); end Service_Entries; procedure Complete_Entry_Body ( Object : not null access Entries.Protection_Entries'Class) is begin null; end Complete_Entry_Body; procedure Exceptional_Complete_Entry_Body ( Object : not null access Entries.Protection_Entries'Class; Id : Ada.Exceptions.Exception_Id) is Current_X : constant Ada.Exceptions.Exception_Occurrence_Access := Soft_Links.Get_Current_Excep.all; begin pragma Assert (Ada.Exceptions.Exception_Identity (Current_X.all) = Id); Ada.Exceptions.Save_Occurrence (Object.Current_Calling.X, Current_X.all); end Exceptional_Complete_Entry_Body; procedure Protected_Entry_Call ( Object : not null access Entries.Protection_Entries'Class; E : Protected_Entry_Index; Uninterpreted_Data : Address; Mode : Call_Modes; Block : out Communication_Block) is pragma Unreferenced (Block); begin case Mode is when Simple_Call => declare package Holder is new Ada.Exceptions.Finally.Scoped_Holder ( Synchronous_Objects.Event, Synchronous_Objects.Finalize); The_Node : aliased Entries.Node := ( Super => <>, E => E, Uninterpreted_Data => Uninterpreted_Data, Caller => Task_Id_Conv.To_Address (Tasks.Current_Task_Id), Action => False, Requeued => False, Waiting => <>, -- default initializer X => <>); -- default initializer Canceled : Boolean; Aborted : Boolean; begin Synchronous_Objects.Initialize (The_Node.Waiting); Holder.Assign (The_Node.Waiting); Synchronous_Objects.Add ( Object.Calling, The_Node.Super'Unchecked_Access, Canceled); if Canceled then Raise_Exception (Tasking_Error'Identity); end if; Tasks.Enable_Abort; Entries.Lock_Entries (Object); Invoke (Object); Entries.Unlock_Entries (Object); Synchronous_Objects.Abortable.Wait ( The_Node.Waiting, Aborted => Aborted); if Aborted then declare Already_Taken : Boolean; begin Uncall ( Object, The_Node.Super'Unchecked_Access, Already_Taken => Already_Taken); if Already_Taken then Synchronous_Objects.Wait (The_Node.Waiting); -- without abort checking end if; end; end if; Tasks.Disable_Abort (Aborted); -- if aborted, raise here if Ada.Exceptions.Exception_Identity (The_Node.X) /= Ada.Exceptions.Null_Id then Ada.Exceptions.Reraise_Nonnull_Occurrence (The_Node.X); end if; end; when Conditional_Call => raise Program_Error; when Asynchronous_Call => raise Program_Error; end case; end Protected_Entry_Call; procedure Timed_Protected_Entry_Call ( Object : not null access Entries.Protection_Entries'Class; E : Protected_Entry_Index; Uninterpreted_Data : Address; Timeout : Duration; Mode : Integer; Entry_Call_Successful : out Boolean) is begin raise Program_Error; end Timed_Protected_Entry_Call; function Enqueued (Block : Communication_Block) return Boolean is begin raise Program_Error; return Enqueued (Block); end Enqueued; function Cancelled (Block : Communication_Block) return Boolean is begin raise Program_Error; return Cancelled (Block); end Cancelled; procedure Cancel_Protected_Entry_Call ( Block : in out Communication_Block) is begin raise Program_Error; end Cancel_Protected_Entry_Call; procedure Requeue_Protected_Entry ( Object : not null access Entries.Protection_Entries'Class; New_Object : not null access Entries.Protection_Entries'Class; E : Protected_Entry_Index; With_Abort : Boolean) is begin if With_Abort then raise Program_Error; end if; if Object = New_Object then -- internal requeue Object.Current_Calling.E := E; Object.Current_Calling.Requeued := True; else raise Program_Error; end if; end Requeue_Protected_Entry; procedure Requeue_Task_To_Protected_Entry ( New_Object : not null access Entries.Protection_Entries'Class; E : Protected_Entry_Index; With_Abort : Boolean) is begin raise Program_Error; end Requeue_Task_To_Protected_Entry; function Protected_Entry_Caller ( Object : Entries.Protection_Entries'Class) return Task_Id is begin return Object.Current_Calling.Caller; end Protected_Entry_Caller; function Protected_Count ( Object : Entries.Protection_Entries'Class; E : Protected_Entry_Index) return Natural is begin -- locked because 'Count is called only from barriers or bodies return Synchronous_Objects.Unsynchronized_Count ( Object.Calling, System'To_Address (E), Filter'Access); end Protected_Count; end System.Tasking.Protected_Objects.Operations;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 2 3 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-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/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Handling of packed arrays with Component_Size = 23 package System.Pack_23 is pragma Preelaborate; Bits : constant := 23; type Bits_23 is mod 2 ** Bits; for Bits_23'Size use Bits; -- In all subprograms below, Rev_SSO is set True if the array has the -- non-default scalar storage order. function Get_23 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_23 with Inline; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. procedure Set_23 (Arr : System.Address; N : Natural; E : Bits_23; Rev_SSO : Boolean) with Inline; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. end System.Pack_23;
B : Arr_Type (1 .. 26); begin B(B'First) := 'a'; for I in B'First .. B'Last-1 loop B(I+1) := Lower_Case'Succ(B(I)); end loop; -- now all the B(I) are different
------------------------------------------------------------------------------- -- Copyright 2021, The Trendy Terminal Developers (see AUTHORS file) -- 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.Strings.Fixed; with Ada.Strings.Unbounded; package body Trendy_Terminal.Histories is package ASU renames Ada.Strings.Unbounded; procedure Add (H : in out History; Input : String) is begin H.Entries.Prepend (ASU.To_Unbounded_String (Input)); end Add; procedure Set_Max_Entries (H : in out History; Count : Positive) is begin H.Max_Entries := Count; end Set_Max_Entries; function Num_Entries (H : History) return Natural is begin return Natural (H.Entries.Length); end Num_Entries; function Get_Entry (H : History; Index : Positive) return String is begin return ASU.To_String (H.Entries (Index)); end Get_Entry; function Completions_Matching (H : History; Incomplete : String) return Lines.Line_Vectors.Vector is Result : Lines.Line_Vectors.Vector; begin for Each of H.Entries loop if Ada.Strings.Fixed.Index (Source => Incomplete, Pattern => ASU.To_String (Each)) = 0 then Result.Append (Lines.Make (Each, ASU.Length (Each) + 1)); end if; end loop; return Result; end Completions_Matching; end Trendy_Terminal.Histories;
-- C64104L.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 CONSTRAINT_ERROR IS RAISED UNDER THE APPROPRIATE -- CIRCUMSTANCES FOR ACCESS PARAMETERS, NAMELY WHEN THE -- ACTUAL INDEX BOUNDS OR DISCRIMINANTS ARE NOT EQUAL -- TO THE FORMAL CONSTRAINTS BEFORE THE CALL (FOR IN AND IN OUT -- MODES), AND WHEN THE FORMAL CONSTRAINTS ARE NOT EQUAL TO THE -- ACTUAL CONSTRAINTS UPON RETURN (FOR IN OUT AND OUT MODES). -- (I) AFTER RETURN, OUT MODE, CONSTRAINED FORMAL, STATIC -- PRIVATE DISCRIMINANTS. -- JRK 3/18/81 -- NL 10/13/81 -- SPS 10/26/82 WITH REPORT; PROCEDURE C64104L IS USE REPORT; BEGIN TEST ("C64104L", "CHECK THAT CONSTRAINT_ERROR IS RAISED " & "APPROPRIATELY FOR ACCESS PARAMETERS"); -------------------------------------------------- DECLARE PACKAGE PKG IS TYPE E IS (E1, E2, E3); TYPE T (D : E := E1; B : BOOLEAN := FALSE) IS PRIVATE; PRIVATE TYPE ARR IS ARRAY (E RANGE <>) OF INTEGER; TYPE T (D : E := E1; B : BOOLEAN := FALSE) IS RECORD I : INTEGER; CASE B IS WHEN FALSE => J : INTEGER; WHEN TRUE => A : ARR (E1 .. D); END CASE; END RECORD; END PKG; USE PKG; TYPE A IS ACCESS T; SUBTYPE SA IS A(E2, TRUE); V : A (E2, FALSE) := NEW T (E2, FALSE); ENTERED : BOOLEAN := FALSE; PROCEDURE P (X : OUT SA ) IS BEGIN ENTERED := TRUE; X := NEW T (E2, TRUE); EXCEPTION WHEN OTHERS => FAILED ("EXCEPTION RAISED IN PROCEDURE"); END P; BEGIN P (V); FAILED ("EXCEPTION NOT RAISED AFTER RETURN"); EXCEPTION WHEN CONSTRAINT_ERROR => IF NOT ENTERED THEN FAILED ("CONSTRAINT_ERROR RAISED BEFORE " & "CALL"); END IF; WHEN OTHERS => IF NOT ENTERED THEN FAILED ("OTHER EXCEPTION RAISED BEFORE CALL"); ELSE FAILED ("WRONG EXCEPTION RAISED AFTER " & "RETURN"); END IF; END; ------------------------------------------------ RESULT; END C64104L;
with AUnit.Assertions; use AUnit.Assertions; with ACO.Utils.DS.Generic_Table; package body Generic_Table_Test is pragma Assertion_Policy (Check); type Key_Type is new Character; subtype Test_Keys is Key_Type range 'a' .. 'z'; type Value_Type is new Positive; function Hashit (Key : Key_Type) return Natural is (Key_Type'Pos (Key)); Number_Of_Buckets : constant := 3; Maximum_Size : constant := Test_Keys'Pos(Test_Keys'Last) - Test_Keys'Pos(Test_Keys'First) + 1; package Table_Pack is new ACO.Utils.DS.Generic_Table (Key_Type => Key_Type, "=" => "=", Hash => Hashit, Value_Type => Value_Type); subtype T is Table_Pack.Table (Number_Of_Buckets => Number_Of_Buckets, Maximum_Size => Maximum_Size); function Name (T : Test) return AUnit.Message_String is pragma Unreferenced (T); begin return AUnit.Format ("Data Structures: Generic Table Test"); end Name; procedure Init_Test is Table : T; begin Assert (Table.Is_Empty, "Table is not initially empty"); Assert (Table.Length = 0, "Table has not initially the length zero"); Assert (not Table.Is_Full, "Table is initially full"); for K in Key_Type'Range loop Assert (not Table.Is_Bound (K), "Table has a bound key at init"); end loop; end Init_Test; procedure Asserted_Fill (Table : in out T) is V : Value_Type; L : Natural := 0; begin for K in Test_Keys'Range loop V := Key_Type'Pos(K); Table.Bind (K, V); L := L + 1; Assert (Table.Is_Bound (K), "Key is not bound"); Assert (Table.Value_Of (K) = V, "Value for key incorrect"); Assert (Table.Length = L, "Length is not" & L'Img); end loop; Assert (Table.Is_Full, "Table not full"); Assert (not Table.Is_Empty, "Table is empty"); end Asserted_Fill; procedure Bind is Table : T; begin Asserted_Fill (Table); end Bind; procedure Bind_New_To_Full is Table : T; K : constant Key_Type := Key_Type'Succ (Test_Keys'Last); begin Asserted_Fill (Table); Table.Bind (K, 1337); end Bind_New_To_Full; procedure Bind_Existing_To_Full is Table : T; K : constant Key_Type := Test_Keys'First; V : constant Value_Type := 1337; L : Natural; begin Asserted_Fill (Table); -- Should fill with keys in Test_Keys'Range L := Table.Length; Assert (Table.Value_Of (K) /= V, "Test precondition fail: test value already bound to test key"); Table.Bind (K, V); Assert (Table.Value_Of (K) = V, "Value of existing key not replaced when binding to full table"); Assert (Table.Length = L, "Length has changed"); Assert (Table.Is_Full, "Table shall still be full"); end Bind_Existing_To_Full; procedure Unbind is Table : T; L : Natural; begin Asserted_Fill (Table); L := Table.Length; for K in Test_Keys'Range loop Table.Unbind (K); L := L - 1; Assert (not Table.Is_Bound (K), "Key is bound after unbind"); Assert (Table.Length = L, "Length is not" & L'Img); end loop; Assert (Table.Is_Empty, "Table not empty"); Assert (not Table.Is_Full, "Table is full"); end Unbind; procedure Unbind_Empty is Table : T; K : constant Key_Type := 'X'; begin Table.Unbind (K); Assert (not Table.Is_Bound (K), "Key is bound after unbinding empty table"); Assert (Table.Length = 0, "Length not 0 after unbinding to empty table"); Assert (Table.Is_Empty, "Table not empty after unbinding to empty table"); Assert (not Table.Is_Full, "Table is full after unbinding to empty table"); end Unbind_Empty; procedure Value_Of_Nonexisting is Table : T; V : Value_Type; K : constant Key_Type := Key_Type'Succ (Test_Keys'Last); pragma Unreferenced (V); begin V := Table.Value_Of (K); end Value_Of_Nonexisting; procedure Run_Test (T : in out Test) is pragma Unreferenced (T); begin Init_Test; Bind; Unbind; Unbind_Empty; Bind_Existing_To_Full; Assert_Exception (Bind_New_To_Full'Access, "Expected an exception when binding a new key to an already full table"); Assert_Exception (Value_Of_Nonexisting'Access, "Expected an exception when accessing value of key not bound"); end Run_Test; end Generic_Table_Test;
-- Standard Ada library specification -- 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.Real_Time; with Ada.Task_Identification; package System.Multiprocessors.Dispatching_Domains is Dispatching_Domain_Error : exception; type Dispatching_Domain (<>) is limited private; System_Dispatching_Domain : constant Dispatching_Domain; function Create (First : CPU; Last : CPU_Range) return Dispatching_Domain; function Get_First_CPU (Domain : Dispatching_Domain) return CPU; function Get_Last_CPU (Domain : Dispatching_Domain) return CPU_Range; type CPU_Set is array(CPU range <>) of Boolean; function Create (Set : CPU_Set) return Dispatching_Domain; function Get_CPU_Set (Domain : Dispatching_Domain) return CPU_Set; function Get_Dispatching_Domain (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) return Dispatching_Domain; procedure Assign_Task (Domain : in out Dispatching_Domain; CPU : in CPU_Range := Not_A_Specific_CPU; T : in Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); procedure Set_CPU (CPU : in CPU_Range; T : in Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task); function Get_CPU (T : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) return CPU_Range; procedure Delay_Until_And_Set_CPU (Delay_Until_Time : in Ada.Real_Time.Time; CPU : in CPU_Range); private -- not specified by the language end System.Multiprocessors.Dispatching_Domains;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . I M A G E _ D -- -- -- -- B o d y -- -- -- -- Copyright (C) 2020-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/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Img_Util; use System.Img_Util; package body System.Image_D is ------------------- -- Image_Decimal -- ------------------- procedure Image_Decimal (V : Int; S : in out String; P : out Natural; Scale : Integer) is pragma Assert (S'First = 1); begin -- Add space at start for non-negative numbers if V >= 0 then S (1) := ' '; P := 1; else P := 0; end if; Set_Image_Decimal (V, S, P, Scale, 1, Integer'Max (1, Scale), 0); end Image_Decimal; ----------------------- -- Set_Image_Decimal -- ----------------------- procedure Set_Image_Decimal (V : Int; S : in out String; P : in out Natural; Scale : Integer; Fore : Natural; Aft : Natural; Exp : Natural) is Digs : String := Int'Image (V); -- Sign and digits of decimal value begin Set_Decimal_Digits (Digs, Digs'Length, S, P, Scale, Fore, Aft, Exp); end Set_Image_Decimal; end System.Image_D;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Defining_Character_Literals; with Program.Element_Visitors; package Program.Nodes.Defining_Character_Literals is pragma Preelaborate; type Defining_Character_Literal is new Program.Nodes.Node and Program.Elements.Defining_Character_Literals .Defining_Character_Literal and Program.Elements.Defining_Character_Literals .Defining_Character_Literal_Text with private; function Create (Character_Literal_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Defining_Character_Literal; type Implicit_Defining_Character_Literal is new Program.Nodes.Node and Program.Elements.Defining_Character_Literals .Defining_Character_Literal with private; function Create (Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Defining_Character_Literal with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Defining_Character_Literal is abstract new Program.Nodes.Node and Program.Elements.Defining_Character_Literals .Defining_Character_Literal with null record; procedure Initialize (Self : aliased in out Base_Defining_Character_Literal'Class); overriding procedure Visit (Self : not null access Base_Defining_Character_Literal; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Is_Defining_Character_Literal_Element (Self : Base_Defining_Character_Literal) return Boolean; overriding function Is_Defining_Name_Element (Self : Base_Defining_Character_Literal) return Boolean; type Defining_Character_Literal is new Base_Defining_Character_Literal and Program.Elements.Defining_Character_Literals .Defining_Character_Literal_Text with record Character_Literal_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Defining_Character_Literal_Text (Self : aliased in out Defining_Character_Literal) return Program.Elements.Defining_Character_Literals .Defining_Character_Literal_Text_Access; overriding function Character_Literal_Token (Self : Defining_Character_Literal) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Image (Self : Defining_Character_Literal) return Text; type Implicit_Defining_Character_Literal is new Base_Defining_Character_Literal with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Defining_Character_Literal_Text (Self : aliased in out Implicit_Defining_Character_Literal) return Program.Elements.Defining_Character_Literals .Defining_Character_Literal_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Defining_Character_Literal) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Defining_Character_Literal) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Defining_Character_Literal) return Boolean; overriding function Image (Self : Implicit_Defining_Character_Literal) return Text; end Program.Nodes.Defining_Character_Literals;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000,2004 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.4 $ -- $Date: 2004/08/21 21:37:00 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; with ncurses2.genericPuts; with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Ada.Strings.Unbounded; with Ada.Strings.Fixed; procedure ncurses2.acs_display is use Int_IO; procedure show_upper_chars (first : Integer); function show_1_acs (N : Integer; name : String; code : Attributed_Character) return Integer; procedure show_acs_chars; procedure show_upper_chars (first : Integer) is C1 : constant Boolean := (first = 128); last : constant Integer := first + 31; package p is new ncurses2.genericPuts (200); use p; use p.BS; use Ada.Strings.Unbounded; tmpa : Unbounded_String; tmpb : BS.Bounded_String; begin Erase; Switch_Character_Attribute (Attr => (Bold_Character => True, others => False)); Move_Cursor (Line => 0, Column => 20); tmpa := To_Unbounded_String ("Display of "); if C1 then tmpa := tmpa & "C1"; else tmpa := tmpa & "GR"; end if; tmpa := tmpa & " Character Codes "; myPut (tmpb, first); Append (tmpa, To_String (tmpb)); Append (tmpa, " to "); myPut (tmpb, last); Append (tmpa, To_String (tmpb)); Add (Str => To_String (tmpa)); Switch_Character_Attribute (On => False, Attr => (Bold_Character => True, others => False)); Refresh; for code in first .. last loop declare row : constant Line_Position := Line_Position (4 + ((code - first) mod 16)); col : constant Column_Position := Column_Position (((code - first) / 16) * Integer (Columns) / 2); tmp3 : String (1 .. 3); tmpx : String (1 .. Integer (Columns / 4)); reply : Key_Code; begin Put (tmp3, code); myPut (tmpb, code, 16); tmpa := To_Unbounded_String (tmp3 & " (" & To_String (tmpb) & ')'); Ada.Strings.Fixed.Move (To_String (tmpa), tmpx, Justify => Ada.Strings.Right); Add (Line => row, Column => col, Str => tmpx & ' ' & ':' & ' '); if C1 then Set_NoDelay_Mode (Mode => True); end if; Add_With_Immediate_Echo (Ch => Code_To_Char (Key_Code (code))); -- TODO check this if C1 then reply := Getchar; while reply /= Key_None loop Add (Ch => Code_To_Char (reply)); Nap_Milli_Seconds (10); reply := Getchar; end loop; Set_NoDelay_Mode (Mode => False); end if; end; end loop; end show_upper_chars; function show_1_acs (N : Integer; name : String; code : Attributed_Character) return Integer is height : constant Integer := 16; row : constant Line_Position := Line_Position (4 + (N mod height)); col : constant Column_Position := Column_Position ((N / height) * Integer (Columns) / 2); tmpx : String (1 .. Integer (Columns) / 3); begin Ada.Strings.Fixed.Move (name, tmpx, Justify => Ada.Strings.Right, Drop => Ada.Strings.Left); Add (Line => row, Column => col, Str => tmpx & ' ' & ':' & ' '); -- we need more room than C because our identifiers are longer -- 22 chars actually Add (Ch => code); return N + 1; end show_1_acs; procedure show_acs_chars is n : Integer; begin Erase; Switch_Character_Attribute (Attr => (Bold_Character => True, others => False)); Add (Line => 0, Column => 20, Str => "Display of the ACS Character Set"); Switch_Character_Attribute (On => False, Attr => (Bold_Character => True, others => False)); Refresh; -- the following is useful to generate the below -- grep '^[ ]*ACS_' ../src/terminal_interface-curses.ads | -- awk '{print "n := show_1_acs(n, \""$1"\", ACS_Map("$1"));"}' n := show_1_acs (0, "ACS_Upper_Left_Corner", ACS_Map (ACS_Upper_Left_Corner)); n := show_1_acs (n, "ACS_Lower_Left_Corner", ACS_Map (ACS_Lower_Left_Corner)); n := show_1_acs (n, "ACS_Upper_Right_Corner", ACS_Map (ACS_Upper_Right_Corner)); n := show_1_acs (n, "ACS_Lower_Right_Corner", ACS_Map (ACS_Lower_Right_Corner)); n := show_1_acs (n, "ACS_Left_Tee", ACS_Map (ACS_Left_Tee)); n := show_1_acs (n, "ACS_Right_Tee", ACS_Map (ACS_Right_Tee)); n := show_1_acs (n, "ACS_Bottom_Tee", ACS_Map (ACS_Bottom_Tee)); n := show_1_acs (n, "ACS_Top_Tee", ACS_Map (ACS_Top_Tee)); n := show_1_acs (n, "ACS_Horizontal_Line", ACS_Map (ACS_Horizontal_Line)); n := show_1_acs (n, "ACS_Vertical_Line", ACS_Map (ACS_Vertical_Line)); n := show_1_acs (n, "ACS_Plus_Symbol", ACS_Map (ACS_Plus_Symbol)); n := show_1_acs (n, "ACS_Scan_Line_1", ACS_Map (ACS_Scan_Line_1)); n := show_1_acs (n, "ACS_Scan_Line_9", ACS_Map (ACS_Scan_Line_9)); n := show_1_acs (n, "ACS_Diamond", ACS_Map (ACS_Diamond)); n := show_1_acs (n, "ACS_Checker_Board", ACS_Map (ACS_Checker_Board)); n := show_1_acs (n, "ACS_Degree", ACS_Map (ACS_Degree)); n := show_1_acs (n, "ACS_Plus_Minus", ACS_Map (ACS_Plus_Minus)); n := show_1_acs (n, "ACS_Bullet", ACS_Map (ACS_Bullet)); n := show_1_acs (n, "ACS_Left_Arrow", ACS_Map (ACS_Left_Arrow)); n := show_1_acs (n, "ACS_Right_Arrow", ACS_Map (ACS_Right_Arrow)); n := show_1_acs (n, "ACS_Down_Arrow", ACS_Map (ACS_Down_Arrow)); n := show_1_acs (n, "ACS_Up_Arrow", ACS_Map (ACS_Up_Arrow)); n := show_1_acs (n, "ACS_Board_Of_Squares", ACS_Map (ACS_Board_Of_Squares)); n := show_1_acs (n, "ACS_Lantern", ACS_Map (ACS_Lantern)); n := show_1_acs (n, "ACS_Solid_Block", ACS_Map (ACS_Solid_Block)); n := show_1_acs (n, "ACS_Scan_Line_3", ACS_Map (ACS_Scan_Line_3)); n := show_1_acs (n, "ACS_Scan_Line_7", ACS_Map (ACS_Scan_Line_7)); n := show_1_acs (n, "ACS_Less_Or_Equal", ACS_Map (ACS_Less_Or_Equal)); n := show_1_acs (n, "ACS_Greater_Or_Equal", ACS_Map (ACS_Greater_Or_Equal)); n := show_1_acs (n, "ACS_PI", ACS_Map (ACS_PI)); n := show_1_acs (n, "ACS_Not_Equal", ACS_Map (ACS_Not_Equal)); n := show_1_acs (n, "ACS_Sterling", ACS_Map (ACS_Sterling)); end show_acs_chars; c1 : Key_Code; c : Character := 'a'; begin loop case c is when 'a' => show_acs_chars; when '0' | '1' | '2' | '3' => show_upper_chars (ctoi (c) * 32 + 128); when others => null; end case; Add (Line => Lines - 3, Column => 0, Str => "Note: ANSI terminals may not display C1 characters."); Add (Line => Lines - 2, Column => 0, Str => "Select: a=ACS, 0=C1, 1,2,3=GR characters, q=quit"); Refresh; c1 := Getchar; c := Code_To_Char (c1); exit when c = 'q' or c = 'x'; end loop; Pause; Erase; End_Windows; end ncurses2.acs_display;
----------------------------------------------------------------------- -- Security-policies-tests - Unit tests for Security.Permissions -- Copyright (C) 2011, 2012, 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 Util.Files; with Util.Test_Caller; with Util.Measures; with Security.Contexts; with Security.Policies.Roles; with Security.Permissions.Tests; with Security.Policies.URLs; package body Security.Policies.Tests is use Util.Tests; procedure Configure_Policy (Manager : in out Security.Policies.Policy_Manager; Name : in String); package Caller is new Util.Test_Caller (Test, "Security.Policies"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Security.Permissions.Create_Role", Test_Create_Role'Access); Caller.Add_Test (Suite, "Test Security.Permissions.Has_Permission", Test_Has_Permission'Access); Caller.Add_Test (Suite, "Test Security.Permissions.Read_Policy (empty)", Test_Read_Empty_Policy'Access); Caller.Add_Test (Suite, "Test Security.Policies.Add_Policy", Test_Get_Role_Policy'Access); Caller.Add_Test (Suite, "Test Security.Policies.Get_Policy", Test_Get_Role_Policy'Access); Caller.Add_Test (Suite, "Test Security.Policies.Roles.Get_Role_Policy", Test_Get_Role_Policy'Access); Caller.Add_Test (Suite, "Test Security.Policies.Read_Policy", Test_Read_Policy'Access); Caller.Add_Test (Suite, "Test Security.Policies.Roles.Set_Roles", Test_Set_Roles'Access); Caller.Add_Test (Suite, "Test Security.Policies.Roles.Set_Roles (invalid)", Test_Set_Invalid_Roles'Access); -- These tests are identical but registered under different names -- for the test documentation. Caller.Add_Test (Suite, "Test Security.Contexts.Has_Permission", Test_Role_Policy'Access); Caller.Add_Test (Suite, "Test Security.Controllers.Roles.Has_Permission", Test_Role_Policy'Access); Caller.Add_Test (Suite, "Test Security.Permissions.Role_Policy", Test_Role_Policy'Access); Caller.Add_Test (Suite, "Test Security.Contexts.Has_Permission (all-permission)", Test_Anonymous_Permission'Access); Caller.Add_Test (Suite, "Test Security.Contexts.Has_Permission (auth-permission)", Test_Anonymous_Permission'Access); end Add_Tests; -- ------------------------------ -- Get the roles assigned to the user. -- ------------------------------ function Get_Roles (User : in Test_Principal) return Roles.Role_Map is begin return User.Roles; end Get_Roles; -- ------------------------------ -- Get the principal name. -- ------------------------------ function Get_Name (From : in Test_Principal) return String is begin return Util.Strings.To_String (From.Name); end Get_Name; -- ------------------------------ -- Test Create_Role and Get_Role_Name -- ------------------------------ procedure Test_Create_Role (T : in out Test) is use Security.Policies.Roles; M : Security.Policies.Roles.Role_Policy; Role : Role_Type; begin M.Create_Role (Name => "admin", Role => Role); Assert_Equals (T, "admin", M.Get_Role_Name (Role), "Invalid name"); for I in Role + 1 .. Role_Type'Last loop declare Name : constant String := "admin-" & Role_Type'Image (I); Role2 : Role_Type; begin Role2 := M.Find_Role ("admin"); T.Assert (Role2 = Role, "Find_Role returned an invalid role"); M.Create_Role (Name => Name, Role => Role2); Assert_Equals (T, Name, M.Get_Role_Name (Role2), "Invalid name"); end; end loop; end Test_Create_Role; -- ------------------------------ -- Test Set_Roles -- ------------------------------ procedure Test_Set_Roles (T : in out Test) is use Security.Policies.Roles; M : Security.Policies.Roles.Role_Policy; Admin : Role_Type; Manager : Role_Type; Map : Role_Map := (others => false); begin M.Create_Role (Name => "manager", Role => Manager); M.Create_Role (Name => "admin", Role => Admin); Assert_Equals (T, "admin", M.Get_Role_Name (Admin), "Invalid name"); T.Assert (not Map (Admin), "The admin role must not set in the map"); M.Set_Roles ("admin", Map); T.Assert (Map (Admin), "The admin role is not set in the map"); T.Assert (not Map (Manager), "The manager role must not be set in the map"); M.Set_Roles ("manager,admin", Map); T.Assert (Map (Admin), "The admin role is not set in the map"); T.Assert (Map (Manager), "The manager role is not set in the map"); end Test_Set_Roles; -- ------------------------------ -- Test Set_Roles on an invalid role name -- ------------------------------ procedure Test_Set_Invalid_Roles (T : in out Test) is use Security.Policies.Roles; M : Security.Policies.Roles.Role_Policy; Map : Role_Map := (others => False); begin M.Set_Roles ("manager,admin", Map); T.Assert (False, "No exception was raised"); exception when E : Security.Policies.Roles.Invalid_Name => null; end Test_Set_Invalid_Roles; -- ------------------------------ -- Test Has_Permission -- ------------------------------ procedure Test_Has_Permission (T : in out Test) is M : Security.Policies.Policy_Manager (1); -- Perm : Permissions.Permission_Type; User : Test_Principal; begin -- T.Assert (not M.Has_Permission (User, 1), "User has a non-existing permission"); null; end Test_Has_Permission; procedure Configure_Policy (Manager : in out Security.Policies.Policy_Manager; Name : in String) is Dir : constant String := "regtests/files/permissions/"; Path : constant String := Util.Tests.Get_Path (Dir); R : constant Security.Policies.Roles.Role_Policy_Access := new Roles.Role_Policy; U : constant Security.Policies.URLs.URL_Policy_Access := new URLs.URL_Policy; begin Manager.Add_Policy (R.all'Access); Manager.Add_Policy (U.all'Access); Manager.Read_Policy (Util.Files.Compose (Path, Name)); end Configure_Policy; -- ------------------------------ -- Test the Get_Policy, Get_Role_Policy and Add_Policy operations. -- ------------------------------ procedure Test_Get_Role_Policy (T : in out Test) is use type Roles.Role_Policy_Access; M : aliased Security.Policies.Policy_Manager (Max_Policies => 2); P : Security.Policies.Policy_Access; R : Security.Policies.Roles.Role_Policy_Access; begin P := M.Get_Policy (Security.Policies.Roles.NAME); T.Assert (P = null, "Get_Policy succeeded"); R := Security.Policies.Roles.Get_Role_Policy (M); T.Assert (R = null, "Get_Role_Policy succeeded"); R := new Roles.Role_Policy; M.Add_Policy (R.all'Access); P := M.Get_Policy (Security.Policies.Roles.NAME); T.Assert (P /= null, "Role policy not found"); T.Assert (P.all in Roles.Role_Policy'Class, "Invalid role policy"); R := Security.Policies.Roles.Get_Role_Policy (M); T.Assert (R /= null, "Get_Role_Policy should not return null"); end Test_Get_Role_Policy; -- ------------------------------ -- Test reading an empty policy file -- ------------------------------ procedure Test_Read_Empty_Policy (T : in out Test) is M : aliased Security.Policies.Policy_Manager (Max_Policies => 2); User : aliased Test_Principal; Context : aliased Security.Contexts.Security_Context; R : Security.Policies.Roles.Role_Policy_Access; begin Configure_Policy (M, "empty.xml"); Context.Set_Context (Manager => M'Unchecked_Access, Principal => User'Unchecked_Access); R := Security.Policies.Roles.Get_Role_Policy (M); declare Admin : Policies.Roles.Role_Type; pragma Unreferenced (Admin); begin Admin := R.Find_Role ("admin"); T.Fail ("'admin' role was returned"); exception when Security.Policies.Roles.Invalid_Name => null; end; T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Admin.Permission), "Has_Permission (admin) failed for empty policy"); T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Create.Permission), "Has_Permission (create) failed for empty policy"); T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Update.Permission), "Has_Permission (update) failed for empty policy"); T.Assert (not Contexts.Has_Permission (Permissions.Tests.P_Delete.Permission), "Has_Permission (delete) failed for empty policy"); end Test_Read_Empty_Policy; -- ------------------------------ -- Test reading policy files -- ------------------------------ procedure Test_Read_Policy (T : in out Test) is use Security.Permissions.Tests; M : aliased Security.Policies.Policy_Manager (Max_Policies => 2); User : aliased Test_Principal; Admin : Policies.Roles.Role_Type; Context : aliased Security.Contexts.Security_Context; R : Security.Policies.Roles.Role_Policy_Access; begin Configure_Policy (M, "simple-policy.xml"); Context.Set_Context (Manager => M'Unchecked_Access, Principal => User'Unchecked_Access); R := Security.Policies.Roles.Get_Role_Policy (M); Admin := R.Find_Role ("admin"); T.Assert (not Contexts.Has_Permission (Permission => P_Admin.Permission), "Permission was granted but user has no role"); User.Roles (Admin) := True; T.Assert (Contexts.Has_Permission (Permission => P_Admin.Permission), "Permission was not granted and user has admin role"); declare S : Util.Measures.Stamp; Result : Boolean; begin for I in 1 .. 1_000 loop Result := Contexts.Has_Permission (Permission => P_Admin.Permission); end loop; Util.Measures.Report (S, "Has_Permission role based", 1_000); T.Assert (Result, "Permission not granted"); end; declare S : Util.Measures.Stamp; begin for I in 1 .. 1_000 loop declare URL : constant String := "/admin/list.html"; P : constant URLs.URL_Permission (URL'Length) := URLs.URL_Permission '(Len => URL'Length, URL => URL); begin T.Assert (Contexts.Has_Permission (Permission => P), "Permission not granted"); end; end loop; Util.Measures.Report (S, "Has_Permission (cache hit)", 1_000); end; end Test_Read_Policy; -- ------------------------------ -- Read the policy file <b>File</b> and perform a test on the given URI -- with a user having the given role. -- ------------------------------ procedure Check_Policy (T : in out Test; File : in String; Role : in String; URL : in String; Anonymous : in Boolean := False; Granted : in Boolean := True) is M : aliased Security.Policies.Policy_Manager (2); User : aliased Test_Principal; Admin : Roles.Role_Type; Context : aliased Security.Contexts.Security_Context; R : Security.Policies.Roles.Role_Policy_Access; U : Security.Policies.URLs.URL_Policy_Access; begin Configure_Policy (M, File); if Anonymous then Context.Set_Context (Manager => M'Unchecked_Access, Principal => null); else Context.Set_Context (Manager => M'Unchecked_Access, Principal => User'Unchecked_Access); end if; R := Security.Policies.Roles.Get_Role_Policy (M); U := Security.Policies.URLs.Get_URL_Policy (M); Admin := R.Find_Role (Role); declare P : constant URLs.URL_Permission (URL'Length) := URLs.URL_Permission '(Len => URL'Length, URL => URL); begin if not Anonymous then -- A user without the role should not have the permission. T.Assert (not U.Has_Permission (Context => Context, Permission => P), "Permission was granted for user without role. URL=" & URL); -- Set the role. User.Roles (Admin) := True; end if; if Granted then T.Assert (U.Has_Permission (Context => Context, Permission => P), "Permission was not granted for user with role. URL=" & URL); else T.Assert (not U.Has_Permission (Context => Context, Permission => P), "Permission was granted for user with role. URL=" & URL); end if; end; end Check_Policy; -- ------------------------------ -- Test reading policy files and using the <role-permission> controller -- ------------------------------ procedure Test_Role_Policy (T : in out Test) is begin T.Check_Policy (File => "policy-with-role.xml", Role => "developer", URL => "/developer/user-should-have-developer-role"); T.Check_Policy (File => "policy-with-role.xml", Role => "manager", URL => "/developer/user-should-have-manager-role"); T.Check_Policy (File => "policy-with-role.xml", Role => "manager", URL => "/manager/user-should-have-manager-role"); T.Check_Policy (File => "policy-with-role.xml", Role => "admin", URL => "/manager/user-should-have-admin-role"); T.Check_Policy (File => "policy-with-role.xml", Role => "admin", URL => "/admin/user-should-have-admin-role"); T.Check_Policy (File => "policy-with-role.xml", Role => "developer", URL => "/admin/user-with-developer-role-should-not-access-admin", Granted => False); end Test_Role_Policy; -- ------------------------------ -- Test anonymous users and permissions. -- ------------------------------ procedure Test_Anonymous_Permission (T : in out Test) is begin T.Check_Policy (File => "simple-policy.xml", Role => "admin", URL => "/admin/page.html", Anonymous => True, Granted => False); T.Check_Policy (File => "simple-policy.xml", Role => "admin", URL => "/user/totopage.html", Anonymous => True, Granted => False); -- Anonymous users can access the page. T.Check_Policy (File => "simple-policy.xml", Role => "admin", URL => "/page.html", Anonymous => True, Granted => True); end Test_Anonymous_Permission; end Security.Policies.Tests;
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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 config.applications; use config.applications; with ewok.perm_auto; with ewok.tasks_shared; use ewoK.tasks_shared; package ewok.perm with spark_mode => on is --------------- -- Types -- --------------- type t_perm_name is (PERM_RES_DEV_DMA, PERM_RES_DEV_CRYPTO_USR, PERM_RES_DEV_CRYPTO_CFG, PERM_RES_DEV_CRYPTO_FULL, PERM_RES_DEV_BUSES, PERM_RES_DEV_EXTI, PERM_RES_DEV_TIM, PERM_RES_TIM_GETMILLI, PERM_RES_TIM_GETMICRO, PERM_RES_TIM_GETCYCLE, PERM_RES_TSK_FISR, PERM_RES_TSK_FIPC, PERM_RES_TSK_RESET, PERM_RES_TSK_UPGRADE, PERM_RES_TSK_RNG, PERM_RES_MEM_DYNAMIC_MAP); --------------- -- Functions -- --------------- pragma assertion_policy (pre => IGNORE, post => IGNORE, assert => IGNORE); -- Test if a task is allowed to share a DMA SHM with another task function dmashm_is_granted (from : in t_real_task_id; to : in t_real_task_id) return boolean with Global => null, -- com_dmashm_perm is a constant, not a variable Post => (if (from = to) then dmashm_is_granted'Result = false), Contract_Cases => (ewok.perm_auto.com_dmashm_perm(from,to) => dmashm_is_granted'Result, others => not dmashm_is_granted'Result); -- Test if a task is allowed to send an IPC to another task function ipc_is_granted (from : in t_real_task_id; to : in t_real_task_id) return boolean with Global => null, -- com_ipc_perm is a constant, not a variable Post => (if (from = to) then ipc_is_granted'Result = false), Contract_Cases => (ewok.perm_auto.com_ipc_perm(from,to) => ipc_is_granted'Result, others => not ipc_is_granted'Result); #if CONFIG_KERNEL_DOMAIN function is_same_domain (from : in t_real_task_id; to : in t_real_task_id) return boolean with Global => null, Post => (if (from = to) then is_same_domain'Result = false); #end if; -- Test if a task is allowed to use a resource function ressource_is_granted (perm_name : in t_perm_name; task_id : in config.applications.t_real_task_id) return boolean with Global => null; end ewok.perm;
------------------------------------------------------------------------------ -- -- -- 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.Packages.Collections is pragma Preelaborate; package UML_Package_Collections is new AMF.Generic_Collections (UML_Package, UML_Package_Access); type Set_Of_UML_Package is new UML_Package_Collections.Set with null record; Empty_Set_Of_UML_Package : constant Set_Of_UML_Package; type Ordered_Set_Of_UML_Package is new UML_Package_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Package : constant Ordered_Set_Of_UML_Package; type Bag_Of_UML_Package is new UML_Package_Collections.Bag with null record; Empty_Bag_Of_UML_Package : constant Bag_Of_UML_Package; type Sequence_Of_UML_Package is new UML_Package_Collections.Sequence with null record; Empty_Sequence_Of_UML_Package : constant Sequence_Of_UML_Package; private Empty_Set_Of_UML_Package : constant Set_Of_UML_Package := (UML_Package_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Package : constant Ordered_Set_Of_UML_Package := (UML_Package_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Package : constant Bag_Of_UML_Package := (UML_Package_Collections.Bag with null record); Empty_Sequence_Of_UML_Package : constant Sequence_Of_UML_Package := (UML_Package_Collections.Sequence with null record); end AMF.UML.Packages.Collections;
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. -- with GNAT.Exception_Traces; -- For debugging. with Apsepp_Test_Harness; procedure Apsepp_Test is -- use GNAT.Exception_Traces; -- For debugging. begin -- Trace_On (Every_Raise); -- For debugging. Apsepp_Test_Harness.Apsepp_Test_Procedure; -- Trace_Off; -- For debugging. end Apsepp_Test;
with Ada.Finalization; -- -- The model for a "readable sequence" is a sequential data buffer where -- new data can be only appended and data can be read sequentially, -- although the "cursor" to the current entry can be moved (mainly -- by saving the current position and restoring it) -- generic type Element_Type is private; type Element_Array is array (Positive range <>) of Element_Type; package Readable_Sequences.Generic_Sequences is type Sequence is new Ada.Finalization.Limited_Controlled with private; type Cursor is private; function Empty_Sequence return Sequence; function Create (Init : Element_Array) return Sequence; function Create (End_Of_Sequence_Marker : Element_Type) return Sequence; function Create (Init : Element_Array; End_Of_Sequence_Marker : Element_Type) return Sequence; function Has_End_Of_Sequence_Marker (Item : Sequence) return Boolean; function Dump (Seq : Sequence) return Element_Array with Post => Dump'Result'Length = Seq.Length; function Dump (Seq : Sequence; From : Cursor) return Element_Array; function First (Seq : Sequence) return Cursor with Post => Seq.Is_Valid_Position (First'Result); procedure Clear (Seq : in out Sequence) with Post => Seq.Length = 0 and not Seq.Saved_Position and Seq.Current_Position = Seq.First; function Index (Seq : Sequence) return Positive; procedure Append (Seq : in out Sequence; Elements : Element_Array) with Post => Seq.Length = Seq.Length'Old + Elements'Length and Seq.Remaining = Seq.Remaining'Old + Elements'Length; procedure Append (To : in out Sequence; What : Element_Type) with Post => To.Length = To.Length'Old + 1 and to.Remaining = to.Remaining'Old + 1; procedure Append (To : in out Sequence; What : Sequence) with Post => To.Length = To.Length'Old + What.Length and to.Remaining = to.Remaining'Old + What.Length; procedure Rewind (Seq : in out Sequence) with Post => Seq.Current_Position = Seq.First and Seq.Remaining = Seq.Length; procedure Rewind (Seq : in out Sequence; To : Cursor) with Pre => Seq.Is_Valid_Position (To), Post => Seq.Current_Position = To; function Length (Seq : Sequence) return Natural; -- Total number of data written in the buffer function Remaining (Seq : Sequence) return Natural with Post => Remaining'Result <= Seq.Length; -- Return the number of elements that still need to be read from -- Seq. This includes also the current element function Is_Valid_Position (Seq : Sequence; C : Cursor) return Boolean; function Current_Position (Seq : Sequence) return Cursor with Post => Seq.Is_Valid_Position (Current_Position'Result); function Next_Position (Seq : Sequence) return Cursor with Post => Seq.Is_Valid_Position (Next_Position'Result); -- Return the position will have the reading cursor after a call to Next. -- Funny? It is useful for contracts procedure Set_Position (Seq : in out Sequence; Pos : Cursor) with Pre => Seq.Is_Valid_Position (Pos), Post => Seq.Current_Position = Pos; function Saved_Position (Seq : Sequence) return Boolean; procedure Save_Position (Seq : in out Sequence) with Pre => not Seq.Saved_Position, Post => Seq.Saved_Position; procedure Restore_Position (Seq : in out Sequence) with Pre => Seq.Saved_Position, Post => not Seq.Saved_Position; procedure Clear_Position (Seq : in out Sequence) with Pre => Seq.Saved_Position, Post => not Seq.Saved_Position; function End_Of_Sequence (Seq : Sequence) return Boolean is (Seq.Remaining = 0); function Read (Seq : Sequence; Ahead : Natural := 0) return Element_Type with Pre => Seq.Has_End_Of_Sequence_Marker or Seq.Remaining > Ahead; function Next (Seq : in out Sequence) return Element_Type with Pre => Seq.Has_End_Of_Sequence_Marker or Seq.Remaining > 0, Post => Next'Result = Seq.Read'Old and Seq.Current_Position = Seq.Next_Position'Old; procedure Next (Seq : in out Sequence; Step : Positive := 1) with Post => Seq.Remaining = Integer'Max (Seq.Remaining'Old - Step, 0); procedure Back (Seq : in out Sequence; Step : Positive := 1) with Post => Seq.Remaining = Integer'Min (Seq.Remaining'Old + Step, Seq.Length); procedure Process (Seq : Sequence; Callback : access procedure (Item : Element_Type)); Beyond_End : exception; private type Cursor is range 0 .. Integer'Last; type Buffer_Type is array (Cursor range <>) of Element_Type; type Buffer_Access is not null access Buffer_Type; function Free_Space (Seq : Sequence) return Natural; -- -- A "Sequence" is basically a buffer with two cursors: -- -- * One Cursor Points To The "current" Element That is Returned -- by "reading" functions -- -- * The other cursor points to the first free location that it -- has not been initialized yet. This cursor can point beyond -- the end of the buffer, if the buffer is filled. -- -- "End of Sequence" condition happens when the two cursors are equal -- type Sequence is new Ada.Finalization.Limited_Controlled with record Buffer : Buffer_Access; First_Free : Cursor; Position : Cursor; Old_Position : Cursor; Position_Saved : Boolean := False; Has_End_Marker : Boolean := False; End_Marker : Element_Type; end record with Type_Invariant => Sequence.First_Free <= Sequence.Buffer.all'Last + 1 and then Sequence.Is_Valid_Position (Sequence.Position); overriding procedure Finalize (Object : in out Sequence); function Saved_Position (Seq : Sequence)return Boolean is (Seq.Position_Saved); function Current_Position (Seq : Sequence) return Cursor is (Seq.Position); function Length (Seq : Sequence) return Natural is (Natural (Seq.First_Free - Seq.Buffer'First)); function Read (Seq : Sequence; Ahead : Natural := 0) return Element_Type is (if Seq.Remaining > Ahead then Seq.Buffer (Cursor (Integer (Seq.Position) + Ahead)) elsif Seq.Has_End_Marker then Seq.End_Marker else raise Beyond_End); function Has_End_Of_Sequence_Marker (Item : Sequence) return Boolean is (Item.Has_End_Marker); function Index (Seq : Sequence) return Positive is (Positive (Seq.Position)); function Is_Valid_Position (Seq : Sequence; C : Cursor) return Boolean is (C >= Seq.Buffer'First and C <= Seq.First_Free); function Next_Position (Seq : Sequence) return Cursor is (if Seq.End_Of_Sequence then Seq.Position else Seq.Position + 1); function Free_Space (Seq : Sequence) return Natural is (Integer (Seq.Buffer'Last)-Integer (Seq.First_Free) + 1); function First (Seq : Sequence) return Cursor is (Seq.Buffer'First); end Readable_Sequences.Generic_Sequences;
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Ada.Assertions, Apsepp.Test_Reporter_Class, Apsepp.Test_Node_Class.Private_Test_Reporter; package body Apsepp.Test_Node_Class is ---------------------------------------------------------------------------- function Initial_Routine_State (Routine_Index : Test_Routine_Index := 1) return Routine_State is (Routine_Index => Routine_Index, Assert_Count => Prot_Test_Assert_Count.Create (0), Assert_Outcome => Passed); ---------------------------------------------------------------------------- protected body Routine_State_Map_Handler is ----------------------------------------------------- procedure Switch_Key_If_Needed (Node_Tag : Tag) is use Routine_State_Hashed_Maps; procedure Update_Map_With_Work_Data is C : constant Cursor := M.Find (T); begin if C = No_Element then M.Insert (Key => T, New_Item => S); else M.Replace_Element (Position => C, New_Item => S); end if; end Update_Map_With_Work_Data; procedure Extract_Work_Data is C : constant Cursor := M.Find (Node_Tag); begin T := Node_Tag; S := (if C = No_Element then Initial_Routine_State else Element (C)); end Extract_Work_Data; begin if T /= Node_Tag then if T /= No_Tag then Update_Map_With_Work_Data; end if; Extract_Work_Data; end if; end Switch_Key_If_Needed; ----------------------------------------------------- procedure Reset_Routine_State (Node_Tag : Tag; Routine_Index : Test_Routine_Index) is begin Switch_Key_If_Needed (Node_Tag); S := Initial_Routine_State (Routine_Index); end Reset_Routine_State; ----------------------------------------------------- procedure Increment_Assert_Count (Node_Tag : Tag) is begin Switch_Key_If_Needed (Node_Tag); Prot_Test_Assert_Count.Inc (S.Assert_Count); end Increment_Assert_Count; ----------------------------------------------------- procedure Set_Failed_Outcome (Node_Tag : Tag) is begin Switch_Key_If_Needed (Node_Tag); S.Assert_Outcome := Failed; end Set_Failed_Outcome; ----------------------------------------------------- procedure Get_Assert_Count (Node_Tag : Tag; Routine_Index : out Test_Routine_Index; Count : out O_P_I_Test_Assert_Count) is begin Switch_Key_If_Needed (Node_Tag); Routine_Index := S.Routine_Index; Count := S.Assert_Count; end Get_Assert_Count; ----------------------------------------------------- procedure Get_Assert_Outcome (Node_Tag : Tag; Outcome : out Test_Outcome) is begin Switch_Key_If_Needed (Node_Tag); Outcome := S.Assert_Outcome; end Get_Assert_Outcome; ----------------------------------------------------- procedure Delete (Node_Tag : Tag) is use Routine_State_Hashed_Maps; begin if M.Length = 0 then T := No_Tag; else declare C : Cursor := M.Find (Node_Tag); begin if C /= No_Element then M.Delete (C); end if; if T = Node_Tag and then M.Length > 0 then declare C_First : constant Cursor := M.First; begin T := Key (C_First); S := Element (C_First); end; elsif T = Node_Tag then T := No_Tag; end if; end; end if; end Delete; ----------------------------------------------------- function Invariant return Boolean is ( ( T /= No_Tag or else M.Length = 0 ) and then not M.Contains (No_Tag) ); ----------------------------------------------------- function Count return Count_Type is (M.Length + (if T = No_Tag or else M.Contains (T) then 0 else 1)); ----------------------------------------------------- function To_Array return Tag_Routine_State_Array is use Routine_State_Hashed_Maps; N : constant Count_Type := Count; Ret : Tag_Routine_State_Array (1 .. N); procedure Populate_Current is begin if N /= 0 then Ret(1).T := T; Ret(1).S := S; end if; end Populate_Current; procedure Populate_Others is K : Index_Type := 1; procedure Process (C : Cursor) is Key_C : constant Tag := Key (C); begin if Key_C /= T then K := K + 1; Ret(K).T := Key_C; Ret(K).S := Element (C); end if; end Process; begin M.Iterate (Process'Access); Ada.Assertions.Assert ((N = 0 and then K = 1) or else (N > 0 and then K = N)); end Populate_Others; begin Populate_Current; Populate_Others; return Ret; end To_Array; ----------------------------------------------------- end Routine_State_Map_Handler; ---------------------------------------------------------------------------- procedure Run_Test_Routines (Obj : Test_Node_Interfa'Class; Outcome : out Test_Outcome; Kind : Run_Kind) is use Ada.Assertions, Private_Test_Reporter; pragma Unreferenced (Kind); T : constant Tag := Obj'Tag; K : Test_Routine_Count := 0; R : Test_Routine := Null_Test_Routine'Access; Err : Boolean := False; -- "Unexpected error" flag. ----------------------------------------------------- function Done return Boolean is N : constant Test_Routine_Count := Obj.Routine_Count; Ret : Boolean := K >= N; begin if Err and then not Ret then Ret := True; Outcome := Failed; Test_Reporter.Report_Test_Routines_Cancellation (Obj'Tag, K + 1, N); end if; return Ret; end Done; ----------------------------------------------------- begin Outcome := Passed; while not Done loop K := K + 1; Err := True; Routine_State_Map_Handler.Reset_Routine_State (T, K); Test_Reporter.Report_Test_Routine_Start (T, K); begin R := Obj.Routine (K); begin Obj.Setup_Routine; declare Assert_Outcome : Test_Outcome; begin R.all; Err := False; Routine_State_Map_Handler.Get_Assert_Outcome (T, Assert_Outcome); case Assert_Outcome is when Failed => raise Assertion_Error; -- Causes a jump to -- Assertion_Error handler -- below. Happens when a test -- assertion has failed but has -- been handled in the test -- routine. when Passed => null; end case; Test_Reporter.Report_Passed_Test_Routine (T, K); exception when Run_E : Assertion_Error => Routine_State_Map_Handler.Get_Assert_Outcome (T, Assert_Outcome); Err := False; Outcome := Failed; case Assert_Outcome is when Failed => -- Exception very likely originates in -- a failed test assertion and not in -- an "unexpected error". Test_Reporter.Report_Failed_Test_Routine (T, K); when Passed => -- Exception may originates in a failed -- contract. Test_Reporter.Report_Unexpected_Routine_Exception (T, K, Run_E); end case; when Run_E : others => -- Exception originates in an -- unexpected error. Test_Reporter.Report_Unexpected_Routine_Exception (T, K, Run_E); end; exception when Setup_E : others => Test_Reporter.Report_Failed_Test_Routine_Setup (T, K, Setup_E); end; exception when Access_E : others => Test_Reporter.Report_Failed_Test_Routine_Access (T, K, Access_E); end; end loop; Routine_State_Map_Handler.Delete (T); end Run_Test_Routines; ---------------------------------------------------------------------------- procedure Assert (Node_Tag : Tag; Cond : Boolean; Message : String := "") is use Ada.Assertions, Private_Test_Reporter, Prot_Test_Assert_Count; K : Test_Routine_Index; Count : O_P_I_Test_Assert_Count; begin Routine_State_Map_Handler.Increment_Assert_Count (Node_Tag); Routine_State_Map_Handler.Get_Assert_Count (Node_Tag, K, Count); if Cond then Test_Reporter.Report_Passed_Test_Assert (Node_Tag, K, not Sat (Count), Val (Count)); else Routine_State_Map_Handler.Set_Failed_Outcome (Node_Tag); begin raise Assertion_Error with Message; exception when E : others => Test_Reporter.Report_Failed_Test_Assert (Node_Tag, K, not Sat (Count), Val (Count), E); raise; end; end if; end Assert; ---------------------------------------------------------------------------- begin Ada.Assertions.Assert (Routine_State_Map_Handler.Invariant); end Apsepp.Test_Node_Class;
pragma Ada_95; with System; package ada_main is pragma Warnings (Off); gnat_argc : Integer; gnat_argv : System.Address; gnat_envp : System.Address; pragma Import (C, gnat_argc); pragma Import (C, gnat_argv); pragma Import (C, gnat_envp); gnat_exit_status : Integer; pragma Import (C, gnat_exit_status); GNAT_Version : constant String := "GNAT Version: GPL 2015 (20150428-49)" & ASCII.NUL; pragma Export (C, GNAT_Version, "__gnat_version"); Ada_Main_Program_Name : constant String := "_ada_eukl" & ASCII.NUL; pragma Export (C, Ada_Main_Program_Name, "__gnat_ada_main_program_name"); procedure adainit; pragma Export (C, adainit, "adainit"); procedure adafinal; pragma Export (C, adafinal, "adafinal"); function main (argc : Integer; argv : System.Address; envp : System.Address) return Integer; pragma Export (C, main, "main"); type Version_32 is mod 2 ** 32; u00001 : constant Version_32 := 16#0de222b4#; pragma Export (C, u00001, "euklB"); u00002 : constant Version_32 := 16#fbff4c67#; pragma Export (C, u00002, "system__standard_libraryB"); u00003 : constant Version_32 := 16#f72f352b#; pragma Export (C, u00003, "system__standard_libraryS"); u00004 : constant Version_32 := 16#3ffc8e18#; pragma Export (C, u00004, "adaS"); u00005 : constant Version_32 := 16#f64b89a4#; pragma Export (C, u00005, "ada__integer_text_ioB"); u00006 : constant Version_32 := 16#f1daf268#; pragma Export (C, u00006, "ada__integer_text_ioS"); u00007 : constant Version_32 := 16#b612ca65#; pragma Export (C, u00007, "ada__exceptionsB"); u00008 : constant Version_32 := 16#1d190453#; pragma Export (C, u00008, "ada__exceptionsS"); u00009 : constant Version_32 := 16#a46739c0#; pragma Export (C, u00009, "ada__exceptions__last_chance_handlerB"); u00010 : constant Version_32 := 16#3aac8c92#; pragma Export (C, u00010, "ada__exceptions__last_chance_handlerS"); u00011 : constant Version_32 := 16#f4ce8c3a#; pragma Export (C, u00011, "systemS"); u00012 : constant Version_32 := 16#a207fefe#; pragma Export (C, u00012, "system__soft_linksB"); u00013 : constant Version_32 := 16#af945ded#; pragma Export (C, u00013, "system__soft_linksS"); u00014 : constant Version_32 := 16#b01dad17#; pragma Export (C, u00014, "system__parametersB"); u00015 : constant Version_32 := 16#8ae48145#; pragma Export (C, u00015, "system__parametersS"); u00016 : constant Version_32 := 16#b19b6653#; pragma Export (C, u00016, "system__secondary_stackB"); u00017 : constant Version_32 := 16#5faf4353#; pragma Export (C, u00017, "system__secondary_stackS"); u00018 : constant Version_32 := 16#39a03df9#; pragma Export (C, u00018, "system__storage_elementsB"); u00019 : constant Version_32 := 16#d90dc63e#; pragma Export (C, u00019, "system__storage_elementsS"); u00020 : constant Version_32 := 16#41837d1e#; pragma Export (C, u00020, "system__stack_checkingB"); u00021 : constant Version_32 := 16#7a71e7d2#; pragma Export (C, u00021, "system__stack_checkingS"); u00022 : constant Version_32 := 16#393398c1#; pragma Export (C, u00022, "system__exception_tableB"); u00023 : constant Version_32 := 16#5ad7ea2f#; pragma Export (C, u00023, "system__exception_tableS"); u00024 : constant Version_32 := 16#ce4af020#; pragma Export (C, u00024, "system__exceptionsB"); u00025 : constant Version_32 := 16#9cade1cc#; pragma Export (C, u00025, "system__exceptionsS"); u00026 : constant Version_32 := 16#37d758f1#; pragma Export (C, u00026, "system__exceptions__machineS"); u00027 : constant Version_32 := 16#b895431d#; pragma Export (C, u00027, "system__exceptions_debugB"); u00028 : constant Version_32 := 16#472c9584#; pragma Export (C, u00028, "system__exceptions_debugS"); u00029 : constant Version_32 := 16#570325c8#; pragma Export (C, u00029, "system__img_intB"); u00030 : constant Version_32 := 16#f6156cf8#; pragma Export (C, u00030, "system__img_intS"); u00031 : constant Version_32 := 16#b98c3e16#; pragma Export (C, u00031, "system__tracebackB"); u00032 : constant Version_32 := 16#6af355e1#; pragma Export (C, u00032, "system__tracebackS"); u00033 : constant Version_32 := 16#9ed49525#; pragma Export (C, u00033, "system__traceback_entriesB"); u00034 : constant Version_32 := 16#f4957a4a#; pragma Export (C, u00034, "system__traceback_entriesS"); u00035 : constant Version_32 := 16#8c33a517#; pragma Export (C, u00035, "system__wch_conB"); u00036 : constant Version_32 := 16#efb3aee8#; pragma Export (C, u00036, "system__wch_conS"); u00037 : constant Version_32 := 16#9721e840#; pragma Export (C, u00037, "system__wch_stwB"); u00038 : constant Version_32 := 16#c2a282e9#; pragma Export (C, u00038, "system__wch_stwS"); u00039 : constant Version_32 := 16#92b797cb#; pragma Export (C, u00039, "system__wch_cnvB"); u00040 : constant Version_32 := 16#e004141b#; pragma Export (C, u00040, "system__wch_cnvS"); u00041 : constant Version_32 := 16#6033a23f#; pragma Export (C, u00041, "interfacesS"); u00042 : constant Version_32 := 16#ece6fdb6#; pragma Export (C, u00042, "system__wch_jisB"); u00043 : constant Version_32 := 16#60740d3a#; pragma Export (C, u00043, "system__wch_jisS"); u00044 : constant Version_32 := 16#28f088c2#; pragma Export (C, u00044, "ada__text_ioB"); u00045 : constant Version_32 := 16#1a9b0017#; pragma Export (C, u00045, "ada__text_ioS"); u00046 : constant Version_32 := 16#10558b11#; pragma Export (C, u00046, "ada__streamsB"); u00047 : constant Version_32 := 16#2e6701ab#; pragma Export (C, u00047, "ada__streamsS"); u00048 : constant Version_32 := 16#db5c917c#; pragma Export (C, u00048, "ada__io_exceptionsS"); u00049 : constant Version_32 := 16#12c8cd7d#; pragma Export (C, u00049, "ada__tagsB"); u00050 : constant Version_32 := 16#ce72c228#; pragma Export (C, u00050, "ada__tagsS"); u00051 : constant Version_32 := 16#c3335bfd#; pragma Export (C, u00051, "system__htableB"); u00052 : constant Version_32 := 16#700c3fd0#; pragma Export (C, u00052, "system__htableS"); u00053 : constant Version_32 := 16#089f5cd0#; pragma Export (C, u00053, "system__string_hashB"); u00054 : constant Version_32 := 16#d25254ae#; pragma Export (C, u00054, "system__string_hashS"); u00055 : constant Version_32 := 16#699628fa#; pragma Export (C, u00055, "system__unsigned_typesS"); u00056 : constant Version_32 := 16#b44f9ae7#; pragma Export (C, u00056, "system__val_unsB"); u00057 : constant Version_32 := 16#793ec5c1#; pragma Export (C, u00057, "system__val_unsS"); u00058 : constant Version_32 := 16#27b600b2#; pragma Export (C, u00058, "system__val_utilB"); u00059 : constant Version_32 := 16#586e3ac4#; pragma Export (C, u00059, "system__val_utilS"); u00060 : constant Version_32 := 16#d1060688#; pragma Export (C, u00060, "system__case_utilB"); u00061 : constant Version_32 := 16#d0c7e5ed#; pragma Export (C, u00061, "system__case_utilS"); u00062 : constant Version_32 := 16#84a27f0d#; pragma Export (C, u00062, "interfaces__c_streamsB"); u00063 : constant Version_32 := 16#8bb5f2c0#; pragma Export (C, u00063, "interfaces__c_streamsS"); u00064 : constant Version_32 := 16#845f5a34#; pragma Export (C, u00064, "system__crtlS"); u00065 : constant Version_32 := 16#431faf3c#; pragma Export (C, u00065, "system__file_ioB"); u00066 : constant Version_32 := 16#53bf6d5f#; pragma Export (C, u00066, "system__file_ioS"); u00067 : constant Version_32 := 16#b7ab275c#; pragma Export (C, u00067, "ada__finalizationB"); u00068 : constant Version_32 := 16#19f764ca#; pragma Export (C, u00068, "ada__finalizationS"); u00069 : constant Version_32 := 16#95817ed8#; pragma Export (C, u00069, "system__finalization_rootB"); u00070 : constant Version_32 := 16#bb3cffaa#; pragma Export (C, u00070, "system__finalization_rootS"); u00071 : constant Version_32 := 16#769e25e6#; pragma Export (C, u00071, "interfaces__cB"); u00072 : constant Version_32 := 16#4a38bedb#; pragma Export (C, u00072, "interfaces__cS"); u00073 : constant Version_32 := 16#ee0f26dd#; pragma Export (C, u00073, "system__os_libB"); u00074 : constant Version_32 := 16#d7b69782#; pragma Export (C, u00074, "system__os_libS"); u00075 : constant Version_32 := 16#1a817b8e#; pragma Export (C, u00075, "system__stringsB"); u00076 : constant Version_32 := 16#8a719d5c#; pragma Export (C, u00076, "system__stringsS"); u00077 : constant Version_32 := 16#09511692#; pragma Export (C, u00077, "system__file_control_blockS"); u00078 : constant Version_32 := 16#f6fdca1c#; pragma Export (C, u00078, "ada__text_io__integer_auxB"); u00079 : constant Version_32 := 16#b9793d30#; pragma Export (C, u00079, "ada__text_io__integer_auxS"); u00080 : constant Version_32 := 16#181dc502#; pragma Export (C, u00080, "ada__text_io__generic_auxB"); u00081 : constant Version_32 := 16#a6c327d3#; pragma Export (C, u00081, "ada__text_io__generic_auxS"); u00082 : constant Version_32 := 16#18d57884#; pragma Export (C, u00082, "system__img_biuB"); u00083 : constant Version_32 := 16#afb4a0b7#; pragma Export (C, u00083, "system__img_biuS"); u00084 : constant Version_32 := 16#e7d8734f#; pragma Export (C, u00084, "system__img_llbB"); u00085 : constant Version_32 := 16#ee73b049#; pragma Export (C, u00085, "system__img_llbS"); u00086 : constant Version_32 := 16#9777733a#; pragma Export (C, u00086, "system__img_lliB"); u00087 : constant Version_32 := 16#e581d9eb#; pragma Export (C, u00087, "system__img_lliS"); u00088 : constant Version_32 := 16#0e8808d4#; pragma Export (C, u00088, "system__img_llwB"); u00089 : constant Version_32 := 16#471f93df#; pragma Export (C, u00089, "system__img_llwS"); u00090 : constant Version_32 := 16#428b07f8#; pragma Export (C, u00090, "system__img_wiuB"); u00091 : constant Version_32 := 16#c1f52725#; pragma Export (C, u00091, "system__img_wiuS"); u00092 : constant Version_32 := 16#7ebd8839#; pragma Export (C, u00092, "system__val_intB"); u00093 : constant Version_32 := 16#bc6ba605#; pragma Export (C, u00093, "system__val_intS"); u00094 : constant Version_32 := 16#b3aa7b17#; pragma Export (C, u00094, "system__val_lliB"); u00095 : constant Version_32 := 16#6eea6a9a#; pragma Export (C, u00095, "system__val_lliS"); u00096 : constant Version_32 := 16#06052bd0#; pragma Export (C, u00096, "system__val_lluB"); u00097 : constant Version_32 := 16#13647f88#; pragma Export (C, u00097, "system__val_lluS"); u00098 : constant Version_32 := 16#2bce1226#; pragma Export (C, u00098, "system__memoryB"); u00099 : constant Version_32 := 16#adb3ea0e#; pragma Export (C, u00099, "system__memoryS"); -- BEGIN ELABORATION ORDER -- ada%s -- interfaces%s -- system%s -- system.case_util%s -- system.case_util%b -- system.htable%s -- system.img_int%s -- system.img_int%b -- system.img_lli%s -- system.img_lli%b -- system.parameters%s -- system.parameters%b -- system.crtl%s -- interfaces.c_streams%s -- interfaces.c_streams%b -- system.standard_library%s -- system.exceptions_debug%s -- system.exceptions_debug%b -- system.storage_elements%s -- system.storage_elements%b -- system.stack_checking%s -- system.stack_checking%b -- system.string_hash%s -- system.string_hash%b -- system.htable%b -- system.strings%s -- system.strings%b -- system.os_lib%s -- system.traceback_entries%s -- system.traceback_entries%b -- ada.exceptions%s -- system.soft_links%s -- system.unsigned_types%s -- system.img_biu%s -- system.img_biu%b -- system.img_llb%s -- system.img_llb%b -- system.img_llw%s -- system.img_llw%b -- system.img_wiu%s -- system.img_wiu%b -- system.val_int%s -- system.val_lli%s -- system.val_llu%s -- system.val_uns%s -- system.val_util%s -- system.val_util%b -- system.val_uns%b -- system.val_llu%b -- system.val_lli%b -- system.val_int%b -- system.wch_con%s -- system.wch_con%b -- system.wch_cnv%s -- system.wch_jis%s -- system.wch_jis%b -- system.wch_cnv%b -- system.wch_stw%s -- system.wch_stw%b -- ada.exceptions.last_chance_handler%s -- ada.exceptions.last_chance_handler%b -- system.exception_table%s -- system.exception_table%b -- ada.io_exceptions%s -- ada.tags%s -- ada.streams%s -- ada.streams%b -- interfaces.c%s -- system.exceptions%s -- system.exceptions%b -- system.exceptions.machine%s -- system.file_control_block%s -- system.file_io%s -- system.finalization_root%s -- system.finalization_root%b -- ada.finalization%s -- ada.finalization%b -- system.memory%s -- system.memory%b -- system.standard_library%b -- system.secondary_stack%s -- system.file_io%b -- interfaces.c%b -- ada.tags%b -- system.soft_links%b -- system.os_lib%b -- system.secondary_stack%b -- system.traceback%s -- ada.exceptions%b -- system.traceback%b -- ada.text_io%s -- ada.text_io%b -- ada.text_io.generic_aux%s -- ada.text_io.generic_aux%b -- ada.text_io.integer_aux%s -- ada.text_io.integer_aux%b -- ada.integer_text_io%s -- ada.integer_text_io%b -- eukl%b -- END ELABORATION ORDER end ada_main;
type Person (Gender : Gender_Type) is record Name : Name_String; Age : Natural; Weight : Float; Case Gender is when Male => Beard_Length : Float; when Female => null; end case; end record;
with openGL.Geometry .lit_colored, openGL.Primitive.indexed; package body openGL.Model.sphere.lit_colored is --------- --- Forge -- function new_Sphere (Radius : in Real; lat_Count : in Positive := default_latitude_Count; long_Count : in Positive := default_longitude_Count; Color : in lucid_Color) return View is Self : constant View := new Item; begin Self.Color := Color; Self.lat_Count := lat_Count; Self.long_Count := long_Count; Self.define (Radius); return Self; end new_Sphere; -------------- --- Attributes -- -- NB: - An extra vertex is required at the end of each latitude ring. -- - This last vertex has the same site as the rings initial vertex. -- - The last vertex has 's' texture coord of 1.0, whereas -- the initial vertex has 's' texture coord of 0.0. -- 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 (Textures, Fonts); use Geometry, Geometry.lit_colored; lat_Count : Positive renames Self.lat_Count; long_Count : Positive renames Self.long_Count; Num_lat_strips : constant Positive := lat_Count - 1; lat_Spacing : constant Real := Degrees_180 / Real (lat_Count - 1); long_Spacing : constant Real := Degrees_360 / Real (long_Count); indices_Count : constant long_Index_t := long_Index_t (Num_lat_strips * (long_Count + 1) * 2); vertex_Count : constant Index_t := 1 + 1 -- North and south pole. + Index_t ((long_Count + 1) * (lat_Count - 2)); -- Each latitude ring. the_Vertices : aliased Geometry.lit_colored.Vertex_array := (1 .. vertex_Count => <>); the_Sites : aliased Sites := (1 .. vertex_Count => <>); the_Indices : aliased Indices := (1 .. indices_Count => <>); Color : constant rgba_Color := to_rgba_Color (Self.Color); the_Geometry : constant Geometry.lit_colored.view := Geometry.lit_colored.new_Geometry; begin set_Sites: declare use linear_Algebra, linear_Algebra_3D; north_Pole : constant Site := (0.0, 0.5, 0.0); south_Pole : constant Site := (0.0, -0.5, 0.0); the_Site : Site := north_Pole; vert_Id : Index_t := 1; -- Start at '1' (not '0') to account for the northpole. latitude_line_First : Site; a, b : Real := 0.0; -- Angular 'cursors' used to track lat/long for texture coords. begin the_Sites (the_Vertices'First) := north_Pole; the_Vertices (the_Vertices'First).Site := north_Pole; the_Vertices (the_Vertices'First).Normal := Normalised (north_Pole); the_Vertices (the_Vertices'First).Color := Color; the_Vertices (the_Vertices'First).Shine := 0.5; the_Sites (the_Vertices'Last) := south_Pole; the_Vertices (the_Vertices'Last).Site := south_Pole; the_Vertices (the_Vertices'Last).Normal := Normalised (south_Pole); the_Vertices (the_Vertices'Last).Color := Color; the_Vertices (the_Vertices'Last).Shine := 0.5; for lat_Id in 2 .. lat_Count - 1 loop a := 0.0; b := b + lat_Spacing; the_Site := the_Site * z_Rotation_from (lat_Spacing); latitude_line_First := the_Site; -- Store initial latitude lines 1st point. vert_Id := vert_Id + 1; the_Sites (vert_Id) := the_Site; -- Add 1st point on a line of latitude. the_Vertices (vert_Id).Site := the_Site; the_Vertices (vert_Id).Normal := Normalised (the_Site); the_Vertices (vert_Id).Color := Color; the_Vertices (vert_Id).Shine := 0.5; for long_Id in 1 .. long_Count loop a := a + long_Spacing; if long_Id /= long_Count then the_Site := the_Site * y_Rotation_from (-long_Spacing); else the_Site := latitude_line_First; -- Restore the_Vertex back to initial latitude lines 1st point. end if; vert_Id := vert_Id + 1; the_Sites (vert_Id) := the_Site; -- Add each succesive point on a line of latitude. the_Vertices (vert_Id).Site := the_Site; the_Vertices (vert_Id).Normal := Normalised (the_Site); the_Vertices (vert_Id).Color := Color; the_Vertices (vert_Id).Shine := 0.5; end loop; end loop; end set_Sites; for i in the_Vertices'Range loop the_Vertices (i).Site := the_Vertices (i).Site * Self.Radius * 2.0; end loop; set_Indices: declare strip_Id : long_Index_t := 0; Upper : Index_t; Lower : Index_t; begin upper := 1; lower := 2; for lat_Strip in 1 .. num_lat_Strips loop for Each in 1 .. long_Count + 1 loop strip_Id := strip_Id + 1; the_Indices (strip_Id) := Upper; strip_Id := strip_Id + 1; the_Indices (strip_Id) := Lower; if lat_Strip /= 1 then Upper := Upper + 1; end if; if lat_Strip /= num_lat_Strips then Lower := Lower + 1; end if; end loop; if lat_Strip = 1 then Upper := 2; end if; Lower := Upper + Index_t (long_Count) + 1; end loop; end set_Indices; the_Geometry.is_Transparent (False); the_Geometry.Vertices_are (the_Vertices); declare the_Primitive : constant Primitive.indexed.view := Primitive.indexed.new_Primitive (Primitive.triangle_Strip, the_Indices); begin the_Geometry.add (Primitive.view (the_Primitive)); end; return (1 => Geometry.view (the_Geometry)); end to_GL_Geometries; end openGL.Model.sphere.lit_colored;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- A D A . I N T E R R U P T S . S I G N A L -- -- -- -- S p e c -- -- -- -- Copyright (C) 2000-2005, Free Software Foundation, Inc. -- -- -- -- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This package encapsulates the procedures for generating interrupts -- by user programs and avoids importing low level children of System -- (e.g. System.Interrupt_Management.Operations), or defining an interface -- to complex system calls. package Ada.Interrupts.Signal is procedure Generate_Interrupt (Interrupt : Interrupt_ID); -- Generate interrupt at the process level end Ada.Interrupts.Signal;
-- Copyright 2017 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local json = require("json") name = "ZETAlytics" type = "api" function start() setratelimit(5) end function check() local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c ~= nil and c.key ~= nil and c.key ~= "") then return true end return false end function vertical(ctx, domain) local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c == nil or c.key == nil or c.key == "") then return end local resp local vurl = buildurl(domain, c.key) -- Check if the response data is in the graph database if (cfg.ttl ~= nil and cfg.ttl > 0) then resp = obtain_response(domain, cfg.ttl) end if (resp == nil or resp == "") then local err resp, err = request({ url=vurl, headers={['Content-Type']="application/json"}, }) if (err ~= nil and err ~= "") then return end if (cfg.ttl ~= nil and cfg.ttl > 0) then cache_response(domain, resp) end end local d = json.decode(resp) if (d == nil or #(d.results) == 0) then return end for i, r in pairs(d.results) do sendnames(ctx, r.qname) end end function buildurl(domain, key) return "https://zonecruncher.com/api/v1/subdomains?q=" .. domain .. "&token=" .. key end function sendnames(ctx, content) local names = find(content, subdomainre) if names == nil then return end local found = {} for i, v in pairs(names) do if found[v] == nil then newname(ctx, v) found[v] = true end end end
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Ada.Wide_Wide_Characters.Handling; with Program.Source_Buffers; package body Program.Lexical_Handlers is use all type Program.Scanner_Destinations.Token_Kind; subtype Hash_Value is Positive range 2 + 2 * 6 .. 12 + 3 * 115; function Hash (W : Wide_Wide_String) return Hash_Value; function To_Token (X : Wide_Wide_String) return Program.Scanner_Destinations.Token_Kind; Map : constant array (Program.Scanner_States.Rule_Index range 1 .. 27) of Program.Scanner_Destinations.Token_Kind := (1 => Arrow, 2 => Double_Dot, 3 => Double_Star, 4 => Assignment, 5 => Inequality, 6 => Greater_Or_Equal, 7 => Less_Or_Equal, 8 => Left_Label, 9 => Right_Label, 10 => Box, 11 => Ampersand, 12 => Apostrophe, 13 => Left_Parenthesis, 14 => Right_Parenthesis, 15 => Star, 16 => Plus, 17 => Comma, 18 => Hyphen, 19 => Dot, 20 => Slash, 21 => Colon, 22 => Semicolon, 23 => Less, 24 => Equal, 25 => Greater, 26 => Vertical_Line, 27 => Vertical_Line); Id : constant Program.Scanner_Destinations.Token_Kind := Identifier; -- generated by gperf -m 100 Word_Map : constant array (Hash_Value range 22 .. 114) of Program.Scanner_Destinations.Token_Kind := (Else_Keyword, At_Keyword, Task_Keyword, Then_Keyword, Not_Keyword, Range_Keyword, Abs_Keyword, Renames_Keyword, Return_Keyword, End_Keyword, Terminate_Keyword, Case_Keyword, Xor_Keyword, Abstract_Keyword, Synchronized_Keyword, Reverse_Keyword, And_Keyword, Exception_Keyword, Constant_Keyword, Declare_Keyword, Access_Keyword, Record_Keyword, Accept_Keyword, Is_Keyword, In_Keyword, Type_Keyword, Entry_Keyword, Separate_Keyword, Or_Keyword, Requeue_Keyword, Do_Keyword, Select_Keyword, When_Keyword, Exit_Keyword, Array_Keyword, Raise_Keyword, Out_Keyword, Package_Keyword, Interface_Keyword, Pragma_Keyword, Delta_Keyword, Use_Keyword, Digits_Keyword, Abort_Keyword, Tagged_Keyword, Some_Keyword, Aliased_Keyword, Elsif_Keyword, Subtype_Keyword, Id, Generic_Keyword, For_Keyword, Function_Keyword, Id, Mod_Keyword, Null_Keyword, Delay_Keyword, Private_Keyword, Id, Id, All_Keyword, Procedure_Keyword, New_Keyword, While_Keyword, Id, With_Keyword, Protected_Keyword, Others_Keyword, Id, If_Keyword, Goto_Keyword, Of_Keyword, Until_Keyword, Body_Keyword, Overriding_Keyword, Id, Id, Id, Id, Id, Limited_Keyword, Id, Begin_Keyword, Loop_Keyword, Id, Id, Id, Id, Id, Id, Id, Id, Rem_Keyword); Word_Text : constant Wide_Wide_String := "else" & "at" & "task" & "then" & "not" & "range" & "abs" & "renames" & "return" & "end" & "terminate" & "case" & "xor" & "abstract" & "synchronized" & "reverse" & "and" & "exception" & "constant" & "declare" & "access" & "record" & "accept" & "is" & "in" & "type" & "entry" & "separate" & "or" & "requeue" & "do" & "select" & "when" & "exit" & "array" & "raise" & "out" & "package" & "interface" & "pragma" & "delta" & "use" & "digits" & "abort" & "tagged" & "some" & "aliased" & "elsif" & "subtype" & "generic" & "for" & "function" & "mod" & "null" & "delay" & "private" & "all" & "procedure" & "new" & "while" & "with" & "protected" & "others" & "if" & "goto" & "of" & "until" & "body" & "overriding" & "limited" & "begin" & "loop" & "rem"; Word_From : constant array (Hash_Value range 22 .. 114) of Natural := (1, 5, 7, 11, 15, 18, 23, 26, 33, 39, 42, 51, 55, 58, 66, 78, 85, 88, 97, 105, 112, 118, 124, 130, 132, 134, 138, 143, 151, 153, 160, 162, 168, 172, 176, 181, 186, 189, 196, 205, 211, 216, 219, 225, 230, 236, 240, 247, 252, -- Subtype_Keyword, 0, 259, -- Generic_Keyword, 266, -- For_Keyword, 269, -- Function_Keyword, 0, 277, -- Mod_Keyword, 280, -- Null_Keyword, 284, -- Delay_Keyword, 289, -- Private_Keyword, 0, 0, 296, -- All_Keyword, 299, -- Procedure_Keyw 308, -- New_Keyword, 311, -- While_Keyword, 0, 316, -- With_Keyword, 320, -- Protected_Keywo 329, -- Others_Keyword, 0, 335, -- If_Keyword, 337, -- Goto_Keyword, 341, -- Of_Keyword, 343, -- Until_Keyword, 348, -- Body_Keyword, 352, -- Overriding_Keyword, 0, 0, 0, 0, 0, 362, -- Limited_Keyword, 0, 369, -- Begin_Keyword 374, -- Loop_Keyword, 0, 0, 0, 0, 0, 0, 0, 0, 378); -- Rem_Keyword, Total length 381); ----------------------- -- Character_Literal -- ----------------------- overriding procedure Character_Literal (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Rule); Value : Program.Scanner_Destinations.Token; begin Scanner.Set_Start_Condition (Program.Scanner_States.Allow_Char); Token := Character_Literal; Skip := False; Value := (Kind => Token, Span => Scanner.Get_Span); Self.Output.New_Token (Value); Self.Last_Token := Token; end Character_Literal; ------------- -- Comment -- ------------- overriding procedure Comment (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Self, Scanner, Rule, Token); begin Skip := True; end Comment; --------------- -- Delimiter -- --------------- overriding procedure Delimiter (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is Value : Program.Scanner_Destinations.Token; begin Scanner.Set_Start_Condition (Program.Scanner_States.Allow_Char); Token := Map (Rule); Skip := False; Value := (Kind => Token, Span => Scanner.Get_Span); Self.Output.New_Token (Value); Self.Last_Token := Token; end Delimiter; ----------- -- Error -- ----------- overriding procedure Error (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Rule); Value : Program.Scanner_Destinations.Token; begin Token := Error; Skip := False; Value := (Kind => Token, Span => Scanner.Get_Span); Self.Output.New_Token (Value); Self.Last_Token := Token; end Error; ---------- -- Hash -- ---------- function Hash (W : Wide_Wide_String) return Hash_Value is X : constant array (Wide_Wide_Character range 'a' .. 'y') of Positive := (13, 51, 17, 11, 6, 52, 41, 38, 37, 115, 6, 33, 51, 7, 39, 29, 29, 9, 6, 8, 48, 15, 37, 13, 29); function Y (Val : Wide_Wide_Character) return Positive; function Y (Val : Wide_Wide_Character) return Positive is begin if Val in X'Range then return X (Val); else return 115; end if; end Y; Length : constant Positive := W'Length; Result : Positive := Length; -- 2 .. 12 begin if Length > 2 then Result := Result + Y (W (W'First + 2)); -- 6 .. 115 end if; Result := Result + Y (W (W'First)); -- 6 .. 115 Result := Result + Y (W (Length)); -- 6 .. 115 return Result; end Hash; ---------------- -- Identifier -- ---------------- overriding procedure Identifier (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Rule); Value : Program.Scanner_Destinations.Token; Span : constant Program.Source_Buffers.Span := Scanner.Get_Span; Text : constant Wide_Wide_String := Scanner.Get_Source.Text (Span); Match : constant Wide_Wide_String := Ada.Wide_Wide_Characters.Handling.To_Lower (Text); begin Token := To_Token (Match); Skip := False; if Self.Last_Token = Apostrophe and Token /= Range_Keyword then Token := Id; end if; if Token = Id then Scanner.Set_Start_Condition (Program.Scanner_States.INITIAL); else Scanner.Set_Start_Condition (Program.Scanner_States.Allow_Char); end if; Value := (Kind => Token, Span => Scanner.Get_Span); Self.Output.New_Token (Value); Self.Last_Token := Token; end Identifier; -------------- -- New_Line -- -------------- overriding procedure New_Line (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Scanner, Rule, Token); begin Skip := True; Self.Output.New_Line (Self.Line); Self.Line := Self.Line + 1; end New_Line; --------------------- -- Numeric_Literal -- --------------------- overriding procedure Numeric_Literal (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Rule); Value : Program.Scanner_Destinations.Token; begin Scanner.Set_Start_Condition (Program.Scanner_States.Allow_Char); Token := Numeric_Literal; Skip := False; Value := (Kind => Token, Span => Scanner.Get_Span); Self.Output.New_Token (Value); Self.Last_Token := Token; end Numeric_Literal; --------------------------------- -- Obsolescent_Numeric_Literal -- --------------------------------- overriding procedure Obsolescent_Numeric_Literal (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) renames Numeric_Literal; -------------------------------- -- Obsolescent_String_Literal -- -------------------------------- overriding procedure Obsolescent_String_Literal (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) renames String_Literal; ----------- -- Space -- ----------- overriding procedure Space (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Self, Scanner, Rule, Token); begin Skip := True; end Space; -------------------- -- String_Literal -- -------------------- overriding procedure String_Literal (Self : not null access Handler; Scanner : not null access Program.Scanners.Scanner'Class; Rule : Program.Scanner_States.Rule_Index; Token : out Program.Scanner_Destinations.Token_Kind; Skip : in out Boolean) is pragma Unreferenced (Rule); Value : Program.Scanner_Destinations.Token; begin Scanner.Set_Start_Condition (Program.Scanner_States.Allow_Char); Token := String_Literal; Skip := False; Value := (Kind => Token, Span => Scanner.Get_Span); Self.Output.New_Token (Value); Self.Last_Token := Token; end String_Literal; -------------- -- To_Token -- -------------- function To_Token (X : Wide_Wide_String) return Program.Scanner_Destinations.Token_Kind is H : Hash_Value; begin if X'Length in 2 .. 12 then H := Hash (X); if H in Word_From'Range and then Word_From (H) >= Word_Text'First and then Word_From (H) + X'Length - 1 <= Word_Text'Last and then Word_Text (Word_From (H) .. Word_From (H) + X'Length - 1) = X then return Word_Map (H); end if; end if; return Identifier; end To_Token; end Program.Lexical_Handlers;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with League.Strings; package Writers is pragma Preelaborate; type Writer is tagged private; function Text (Self : Writer) return League.Strings.Universal_String; procedure Clear (Self : in out Writer); procedure P (Self : in out Writer; Text : Wide_Wide_String := ""); procedure N (Self : in out Writer; Text : Wide_Wide_String); procedure P (Self : in out Writer; Text : League.Strings.Universal_String); procedure N (Self : in out Writer; Text : League.Strings.Universal_String); procedure P (Self : in out Writer; Text : Wide_Wide_String := ""; Copy : in out Writer'Class); procedure N (Self : in out Writer; Text : Wide_Wide_String; Copy : in out Writer'Class); procedure P (Self : in out Writer; Text : League.Strings.Universal_String; Copy : in out Writer'Class); procedure N (Self : in out Writer; Text : League.Strings.Universal_String; Copy : in out Writer'Class); procedure N (Self : in out Writer; Value : Natural); procedure N (Self : in out Writer; Value : Writer'Class); private type Writer is tagged record Text : League.Strings.Universal_String; Last_Line : League.Strings.Universal_String; end record; end Writers;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . B B . P A R A M E T E R S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1999-2002 Universidad Politecnica de Madrid -- -- Copyright (C) 2003-2005 The European Space Agency -- -- Copyright (C) 2003-2016, AdaCore -- -- -- -- GNARL 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. GNARL 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/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- -- The port of GNARL to bare board targets was initially developed by the -- -- Real-Time Systems Group at the Technical University of Madrid. -- -- -- ------------------------------------------------------------------------------ -- This package defines basic parameters used by the low level tasking system -- This is the ERC32/LEON/LEON3 version of this package pragma Restrictions (No_Elaboration_Code); with System.BB.Board_Parameters; package System.BB.Parameters is pragma Pure; -------------------- -- Hardware clock -- -------------------- Clock_Frequency : constant := System.BB.Board_Parameters.Clock_Frequency; -- Frequency of the system clock Ticks_Per_Second : constant := Clock_Frequency / (Board_Parameters.Prescaler_Min + 1); -- The prescaler is clocked by the system clock. When it underflows, it -- is reloaded from the prescaler reload register and a timer tick is -- generated. The effective division rate is therefore equal to the -- prescaler reload register value plus 1. ---------------- -- Interrupts -- ---------------- -- The following are ERC32/LEON/LEON3 definitions and they cannot be -- modified. -- These definitions are in this package in order to isolate target -- dependencies. Interrupt_Range_Last : constant := (if Board_Parameters.Extended_Interrupts_Level /= 0 then 31 else 15); subtype Interrupt_Range is Natural range 1 .. Interrupt_Range_Last; -- Number of interrupts in the SPARC architecture Trap_Vectors : constant := 256; -- The SPARC arquitecture supports 256 vectors ------------------------ -- Context Management -- ------------------------ -- The SPARC processor needs to save: -- -- * 18 integer registers of 32 bits (7 global, 8 output, PSR, Y, and WIM) -- for normal processing -- -- * 33 floating point registers of 32 bits -- -- * the number of register windows saved to the stack -- (the input and local registers are saved to the stack). -- -- * interrupt nesting level corresponding to the task -- -- * for LEON, to slots for the Cache Control Register -- -- This would be 55 slots for LEON/LEON3 and 53 otherwise, but -- this need to be rounded up to an even number to allow more -- efficient access. -- -- For LEON, we store the Cache Control Register to be able to keep the -- cache status per task. We keep the base Cache Control Register (which -- is not affected by automatic changes related to the freeze-on-interrupt -- capability) and the actual Cache Control Register (the one directly -- extracted from the hardware). Base_CCR_Context_Index : constant := 53; CCR_Context_Index : constant := 54; Context_Buffer_Capacity : constant := 56; ------------ -- Stacks -- ------------ Interrupt_Stack_Size : constant := 8 * 1024; -- bytes -- Size of each of the interrupt stacks ---------- -- CPUS -- ---------- Max_Number_Of_CPUs : constant := Board_Parameters.Max_Number_Of_CPUs; -- Maximum number of CPUs Multiprocessor : constant Boolean := Max_Number_Of_CPUs /= 1; -- Are we on a multiprocessor board? end System.BB.Parameters;
procedure Very_Large_Value is begin if 16#2B.20000000000000000000000000000000000000000#E1 > 0.1 then null; end if; end Very_Large_Value;
--////////////////////////////////////////////////////////// -- // -- // 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. -- // --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// -- SFML - Simple and Fast Multimedia Library -- Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org) -- 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. --////////////////////////////////////////////////////////// --////////////////////////////////////////////////////////// with Interfaces.C; with System; with Ada.Strings.Unbounded; --/ @image ASFML_Logo.svg --/ @summary --/ ASFML: Ada binding to the SFML library --/ --/ @description --/ Root package of all the packages provided by SFML. Direct children are the --/ SFML modules: Audio, Graphics, Network, System and Window. package Sf is --////////////////////////////////////////////////////////// -- // Define the CSFML version --////////////////////////////////////////////////////////// Version_Major : constant := 2; Version_Minor : constant := 5; Version_Patch : constant := 0; --////////////////////////////////////////////////////////// -- // Define a portable boolean type --////////////////////////////////////////////////////////// type sfBool is new Boolean; for sfBool'Size use Interfaces.C.Int'Size; for sfBool use (False => 0, True => 1); sfFalse : sfBool renames False; sfTrue : sfBool renames True; --////////////////////////////////////////////////////////// -- // Define portable types --////////////////////////////////////////////////////////// -- // 8 bits integer types type sfInt8 is range -128 .. 127; for sfInt8'SIZE use 8; type sfInt8_Ptr is access all sfInt8; pragma Convention (C, sfInt8); pragma Convention (C, sfInt8_Ptr); type sfUint8 is mod 256; for sfUint8'SIZE use 8; type sfUint8_Ptr is access all sfUint8; pragma Convention (C, sfUint8); pragma Convention (C, sfUint8_Ptr); -- // 16 bits integer types type sfInt16 is new Interfaces.Integer_16; type sfInt16_Ptr is access all sfInt16; pragma Convention (C, sfInt16); pragma Convention (C, sfInt16_Ptr); type sfUint16 is mod 2 ** sfInt16'SIZE; type sfUint16_Ptr is access all sfUint16; pragma Convention (C, sfUint16); pragma Convention (C, sfUint16_Ptr); -- // 32 bits integer types type sfInt32 is new Integer; type sfInt32_Ptr is access all sfInt32; pragma Convention (C, sfInt32); pragma Convention (C, sfInt32_Ptr); type sfUint32 is mod 2 ** sfInt32'SIZE; type sfUint32_Ptr is access all sfUint32; pragma Convention (C, sfUint32); pragma Convention (C, sfUint32_Ptr); -- // 64 bits integer types type sfInt64 is new Interfaces.Integer_64; type sfInt64_Ptr is access all sfInt64; pragma Convention (C, sfInt64); pragma Convention (C, sfInt64_Ptr); type sfUint64 is new Interfaces.Unsigned_64; type sfUint64_Ptr is access all sfUint64; pragma Convention (C, sfUint64_Ptr); -- // size_t type sfSize_t is mod 2 ** Standard'ADDRESS_SIZE; type sfSize_t_Ptr is access all sfSize_t; pragma Convention (C, sfSize_t); pragma Convention (C, sfSize_t_Ptr); type sfArrayOfStrings is array (sfSize_t range <>) of Ada.Strings.Unbounded.Unbounded_String; end Sf;
with AdaBase; with Connect; with Ada.Text_IO; with Ada.Exceptions; procedure MultiQuery is package CON renames Connect; package TIO renames Ada.Text_IO; package EX renames Ada.Exceptions; numrows : AdaBase.Affected_Rows; setting : Boolean; nextone : Boolean; SQL : constant String := "DELETE FROM fruits WHERE color = 'red'; " & "DELETE FROM fruits WHERE color = 'orange'"; begin CON.connect_database; TIO.Put_Line ("This demonstration shows how multiple queries in the " & "same SQL string are handled."); TIO.Put_Line ("SQL string used: " & SQL); TIO.Put_Line (""); setting := CON.DR.trait_multiquery_enabled; nextone := not setting; TIO.Put_Line ("Testing query with MultiQuery option set to " & setting'Img); TIO.Put_Line ("-- Execution attempt #1 --"); begin numrows := CON.DR.execute (SQL); TIO.Put_Line ("Query succeeded"); CON.DR.rollback; exception when ouch : others => TIO.Put_Line ("Exception: " & EX.Exception_Message (ouch)); TIO.Put_Line ("Failed to test this setting"); end; TIO.Put_Line (""); TIO.Put_Line ("Attempt to toggle MultiQuery setting to " & nextone'Img); begin CON.DR.set_trait_multiquery_enabled (nextone); TIO.Put_Line ("-- Execution attempt #2 --"); numrows := CON.DR.execute (SQL); TIO.Put_Line ("Query succeeded"); CON.DR.rollback; exception when ouch : others => TIO.Put_Line ("Exception: " & EX.Exception_Message (ouch)); TIO.Put_Line ("Failed to test this setting"); end; CON.DR.disconnect; end MultiQuery;
----------------------------------------------------------------------- -- bean - A simple bean example -- Copyright (C) 2009, 2010 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.Beans.Factory; with EL.Methods.Func_String; with EL.Methods.Func_Unbounded; with Ada.Unchecked_Deallocation; package body Bean is use EL.Objects; use Util.Beans.Methods; use EL.Methods; FIRST_NAME : constant String := "firstName"; LAST_NAME : constant String := "lastName"; AGE : constant String := "age"; Null_Object : Object; function Create_Person (First_Name, Last_Name : String; Age : Natural) return Person_Access is begin return new Person '(First_Name => To_Unbounded_String (First_Name), Last_Name => To_Unbounded_String (Last_Name), Age => Age); end Create_Person; -- Get the value identified by the name. function Get_Value (From : Person; Name : String) return EL.Objects.Object is begin if Name = FIRST_NAME then return To_Object (From.First_Name); elsif Name = LAST_NAME then return To_Object (From.Last_Name); elsif Name = AGE then return To_Object (From.Age); else return Null_Object; end if; end Get_Value; -- Set the value identified by the name. procedure Set_Value (From : in out Person; Name : in String; Value : in EL.Objects.Object) is begin if Name = FIRST_NAME then From.First_Name := To_Unbounded_String (Value); elsif Name = LAST_NAME then From.Last_Name := To_Unbounded_String (Value); elsif Name = AGE then From.Age := Natural (To_Integer (Value)); end if; end Set_Value; -- function Save (P : in Person; Name : in Unbounded_String) return Unbounded_String is Result : Unbounded_String; begin Result := P.Last_Name & Name; return Result; end Save; function Compute (B : Util.Beans.Basic.Bean'Class; P1 : EL.Objects.Object) return EL.Objects.Object is P : Person := Person (B); begin return P1; end Compute; -- Function to format a string function Format (Arg : EL.Objects.Object) return EL.Objects.Object is S : constant String := To_String (Arg); begin return To_Object ("[" & S & "]"); end Format; function Print (P : in Person; Title : in String) return String is begin return Title & " [" & "Name=" & To_String (P.First_Name) & ", " & "Last_name=" & To_String (P.Last_Name) & "]"; end Print; package Save_Binding is new Func_Unbounded.Bind (Bean => Person, Method => Save, Name => "save"); package Print_Binding is new Func_String.Bind (Bean => Person, Method => Print, Name => "print"); type Bean_Definition is new Util.Beans.Factory.Bean_Definition with null record; -- Create a bean. overriding function Create (Def : in Bean_Definition) return Util.Beans.Basic.Readonly_Bean_Access; -- Free the bean instance. overriding procedure Destroy (Def : in Bean_Definition; Bean : in out Util.Beans.Basic.Readonly_Bean_Access); -- Create a bean. overriding function Create (Def : in Bean_Definition) return Util.Beans.Basic.Readonly_Bean_Access is Result : Person_Access := new Person; begin return Result.all'Access; end Create; -- Free the bean instance. overriding procedure Destroy (Def : in Bean_Definition; Bean : in out Util.Beans.Basic.Readonly_Bean_Access) is begin null; end Destroy; B : aliased Bean_Definition := Bean_Definition '(Method_Count => 2, Methods => (Save_Binding.Proxy'Access, null) ); Binding_Array : aliased constant Util.Beans.Methods.Method_Binding_Array := (Save_Binding.Proxy'Access, Print_Binding.Proxy'Access); function Get_Method_Bindings (From : in Person) return Util.Beans.Methods.Method_Binding_Array_Access is begin return Binding_Array'Access; end Get_Method_Bindings; procedure Free (Object : in out Person_Access) is procedure Free is new Ada.Unchecked_Deallocation (Object => Person'Class, Name => Person_Access); begin Free (Object); end Free; end Bean;
-- Copyright (c) 2017 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with League.Strings; with WebDriver.Drivers; package WebDriver.Remote is function Create (URL : League.Strings.Universal_String) return WebDriver.Drivers.Driver'Class; -- Connect to server ("Remote end") end WebDriver.Remote;
with OpenAL.Context.Error; with OpenAL.Context; with OpenAL.Extension.EFX; with Test; procedure efx_001 is package ALC renames OpenAL.Context; package ALC_Error renames OpenAL.Context.Error; package AL_EFX renames OpenAL.Extension.EFX; Device : ALC.Device_t; Context : ALC.Context_t; OK : Boolean; Loaded : Boolean; EFX : AL_EFX.Extension_t; TC : Test.Context_t; use type ALC.Device_t; use type ALC.Context_t; use type ALC_Error.Error_t; procedure Finish is begin ALC.Destroy_Context (Context); ALC.Close_Device (Device); end Finish; procedure Init is begin Device := ALC.Open_Default_Device; pragma Assert (Device /= ALC.Invalid_Device); Context := ALC.Create_Context (Device); pragma Assert (Context /= ALC.Invalid_Context); OK := ALC.Make_Context_Current (Context); pragma Assert (OK); end Init; begin Test.Initialize (Test_Context => TC, Program => "efx_001", Test_DB => "TEST_DB", Test_Results => "TEST_RESULTS"); Init; Loaded := True; if AL_EFX.Is_Present (Device) then begin EFX := AL_EFX.Load_Extension; pragma Assert (EFX'Size > 0); exception when others => Loaded := False; end; Test.Check (TC, 55, Loaded, "Loaded"); else Test.Satisfy (TC, 55, Test.Unsupported); end if; Finish; end efx_001;
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K I N G . I N I T I A L I Z A T I O N -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1991-2001, Florida State University -- -- -- -- GNARL 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. GNARL 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 GNARL; 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. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. It is -- -- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- -- State University (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ pragma Style_Checks (All_Checks); -- Turn off subprogram alpha ordering check, since we group soft link -- bodies and dummy soft link bodies together separately in this unit. pragma Polling (Off); -- Turn polling off for this package. We don't need polling during any -- of the routines in this package, and more to the point, if we try -- to poll it can cause infinite loops. -- This package provides overall initialization of the tasking portion -- of the RTS. This package must be elaborated before any tasking -- features are used. It also contains initialization for -- Ada Task Control Block (ATCB) records. with Ada.Exceptions; -- used for Exception_Occurrence_Access. with System.Tasking; pragma Elaborate_All (System.Tasking); -- ensure that the first step initializations have been performed with System.Task_Primitives; -- used for Lock with System.Task_Primitives.Operations; -- used for Set_Priority -- Write_Lock -- Unlock -- Initialize_Lock with System.Soft_Links; -- used for the non-tasking routines (*_NT) that refer to global data. -- They are needed here before the tasking run time has been elaborated. with System.Tasking.Debug; -- used for Trace with System.Tasking.Task_Attributes; -- used for All_Attrs_L with System.Stack_Checking; package body System.Tasking.Initialization is package STPO renames System.Task_Primitives.Operations; package SSL renames System.Soft_Links; package AE renames Ada.Exceptions; use System.Task_Primitives.Operations; Global_Task_Lock : aliased System.Task_Primitives.RTS_Lock; -- This is a global lock; it is used to execute in mutual exclusion -- from all other tasks. It is only used by Task_Lock, -- Task_Unlock, and Final_Task_Unlock. function Current_Target_Exception return AE.Exception_Occurrence; pragma Import (Ada, Current_Target_Exception, "__gnat_current_target_exception"); -- Import this subprogram from the private part of Ada.Exceptions. ----------------------------------------------------------------- -- Tasking versions of services needed by non-tasking programs -- ----------------------------------------------------------------- procedure Task_Lock; -- Locks out other tasks. Preceding a section of code by Task_Lock and -- following it by Task_Unlock creates a critical region. This is used -- for ensuring that a region of non-tasking code (such as code used to -- allocate memory) is tasking safe. Note that it is valid for calls to -- Task_Lock/Task_Unlock to be nested, and this must work properly, i.e. -- only the corresponding outer level Task_Unlock will actually unlock. procedure Task_Unlock; -- Releases lock previously set by call to Task_Lock. In the nested case, -- all nested locks must be released before other tasks competing for the -- tasking lock are released. function Get_Jmpbuf_Address return Address; procedure Set_Jmpbuf_Address (Addr : Address); -- Get/Set Jmpbuf_Address for current task function Get_Sec_Stack_Addr return Address; procedure Set_Sec_Stack_Addr (Addr : Address); -- Get/Set location of current task's secondary stack function Get_Exc_Stack_Addr return Address; -- Get the exception stack for the current task procedure Set_Exc_Stack_Addr (Self_ID : Address; Addr : Address); -- Self_ID is the Task_ID of the task that gets the exception stack. -- For Self_ID = Null_Address, the current task gets the exception stack. function Get_Machine_State_Addr return Address; procedure Set_Machine_State_Addr (Addr : Address); -- Get/Set the address for storing the current task's machine state function Get_Current_Excep return SSL.EOA; -- Comments needed??? procedure Timed_Delay_T (Time : Duration; Mode : Integer); -- Comments needed??? function Get_Stack_Info return Stack_Checking.Stack_Access; -- Get access to the current task's Stack_Info procedure Update_Exception (X : AE.Exception_Occurrence := Current_Target_Exception); -- Handle exception setting and check for pending actions ------------------------ -- Local Subprograms -- ------------------------ procedure Do_Pending_Action (Self_ID : Task_ID); -- This is introduced to allow more efficient -- in-line expansion of Undefer_Abort. ---------------------------- -- Tasking Initialization -- ---------------------------- procedure Init_RTS; -- This procedure completes the initialization of the GNARL. The first -- part of the initialization is done in the body of System.Tasking. -- It consists of initializing global locks, and installing tasking -- versions of certain operations used by the compiler. Init_RTS is called -- during elaboration. -------------------------- -- Change_Base_Priority -- -------------------------- -- Call only with abort deferred and holding Self_ID locked. procedure Change_Base_Priority (T : Task_ID) is begin if T.Common.Base_Priority /= T.New_Base_Priority then T.Common.Base_Priority := T.New_Base_Priority; Set_Priority (T, T.Common.Base_Priority); end if; end Change_Base_Priority; ------------------------ -- Check_Abort_Status -- ------------------------ function Check_Abort_Status return Integer is Self_ID : Task_ID := Self; begin if Self_ID /= null and then Self_ID.Deferral_Level = 0 and then Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level then return 1; else return 0; end if; end Check_Abort_Status; ----------------- -- Defer_Abort -- ----------------- procedure Defer_Abort (Self_ID : Task_ID) is begin pragma Assert (Self_ID.Deferral_Level = 0); -- pragma Assert -- (Self_ID.Pending_ATC_Level >= Self_ID.ATC_Nesting_Level); -- The above check has been useful in detecting mismatched -- defer/undefer pairs. You may uncomment it when testing on -- systems that support preemptive abort. -- If the OS supports preemptive abort (e.g. pthread_kill), -- it should have happened already. A problem is with systems -- that do not support preemptive abort, and so rely on polling. -- On such systems we may get false failures of the assertion, -- since polling for pending abort does no occur until the abort -- undefer operation. -- Even on systems that only poll for abort, the assertion may -- be useful for catching missed abort completion polling points. -- The operations that undefer abort poll for pending aborts. -- This covers most of the places where the core Ada semantics -- require abort to be caught, without any special attention. -- However, this generally happens on exit from runtime system -- call, which means a pending abort will not be noticed on the -- way into the runtime system. We considered adding a check -- for pending aborts at this point, but chose not to, because -- of the overhead. Instead, we searched for RTS calls that -- where abort completion is required and a task could go -- farther than Ada allows before undeferring abort; we then -- modified the code to ensure the abort would be detected. Self_ID.Deferral_Level := Self_ID.Deferral_Level + 1; end Defer_Abort; -------------------------- -- Defer_Abort_Nestable -- -------------------------- procedure Defer_Abort_Nestable (Self_ID : Task_ID) is begin -- pragma Assert -- ((Self_ID.Pending_ATC_Level >= Self_ID.ATC_Nesting_Level or else -- Self_ID.Deferral_Level > 0)); -- See comment in Defer_Abort on the situations in which it may -- be useful to uncomment the above assertion. Self_ID.Deferral_Level := Self_ID.Deferral_Level + 1; end Defer_Abort_Nestable; -------------------- -- Defer_Abortion -- -------------------- -- ?????? -- Phase out Defer_Abortion without Self_ID -- to reduce overhead due to multiple calls to Self procedure Defer_Abortion is Self_ID : constant Task_ID := STPO.Self; begin Self_ID.Deferral_Level := Self_ID.Deferral_Level + 1; end Defer_Abortion; ----------------------- -- Do_Pending_Action -- ----------------------- -- Call only when holding no locks procedure Do_Pending_Action (Self_ID : Task_ID) is use type Ada.Exceptions.Exception_Id; begin pragma Assert (Self_ID = Self and then Self_ID.Deferral_Level = 0); -- Needs loop to recheck for pending action in case a new one occurred -- while we had abort deferred below. loop -- Temporarily defer abortion so that we can lock Self_ID. Self_ID.Deferral_Level := Self_ID.Deferral_Level + 1; Write_Lock (Self_ID); Self_ID.Pending_Action := False; Poll_Base_Priority_Change (Self_ID); Unlock (Self_ID); -- Restore the original Deferral value. Self_ID.Deferral_Level := Self_ID.Deferral_Level - 1; if not Self_ID.Pending_Action then if Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level then if not Self_ID.Aborting then Self_ID.Aborting := True; pragma Debug (Debug.Trace (Self_ID, "raise Abort_Signal", 'B')); raise Standard'Abort_Signal; pragma Assert (not Self_ID.ATC_Hack); elsif Self_ID.ATC_Hack then -- The solution really belongs in the Abort_Signal handler -- for async. entry calls. The present hack is very -- fragile. It relies that the very next point after -- Exit_One_ATC_Level at which the task becomes abortable -- will be the call to Undefer_Abort in the -- Abort_Signal handler. Self_ID.ATC_Hack := False; pragma Debug (Debug.Trace (Self_ID, "raise Abort_Signal (ATC hack)", 'B')); raise Standard'Abort_Signal; end if; end if; return; end if; end loop; end Do_Pending_Action; ----------------------- -- Final_Task_Unlock -- ----------------------- -- This version is only for use in Terminate_Task, when the task -- is relinquishing further rights to its own ATCB. -- There is a very interesting potential race condition there, where -- the old task may run concurrently with a new task that is allocated -- the old tasks (now reused) ATCB. The critical thing here is to -- not make any reference to the ATCB after the lock is released. -- See also comments on Terminate_Task and Unlock. procedure Final_Task_Unlock (Self_ID : Task_ID) is begin pragma Assert (Self_ID.Global_Task_Lock_Nesting = 1); Unlock (Global_Task_Lock'Access); end Final_Task_Unlock; -------------- -- Init_RTS -- -------------- procedure Init_RTS is Self_Id : Task_ID; begin -- Terminate run time (regular vs restricted) specific initialization -- of the environment task. Self_Id := Environment_Task; Self_Id.Master_of_Task := Environment_Task_Level; Self_Id.Master_Within := Self_Id.Master_of_Task + 1; for L in Self_Id.Entry_Calls'Range loop Self_Id.Entry_Calls (L).Self := Self_Id; Self_Id.Entry_Calls (L).Level := L; end loop; Self_Id.Awake_Count := 1; Self_Id.Alive_Count := 1; Self_Id.Master_Within := Library_Task_Level; -- Normally, a task starts out with internal master nesting level -- one larger than external master nesting level. It is incremented -- to one by Enter_Master, which is called in the task body only if -- the compiler thinks the task may have dependent tasks. There is no -- corresponding call to Enter_Master for the environment task, so we -- would need to increment it to 2 here. Instead, we set it to 3. -- By doing this we reserve the level 2 for server tasks of the runtime -- system. The environment task does not need to wait for these server -- Initialize lock used to implement mutual exclusion between all tasks Initialize_Lock (Global_Task_Lock'Access, STPO.Global_Task_Level); -- Initialize lock used to implement mutual exclusion in the package -- System.Task_Attributes. Initialize_Lock (System.Tasking.Task_Attributes.All_Attrs_L'Access, All_Attrs_Level); -- Notify that the tasking run time has been elaborated so that -- the tasking version of the soft links can be used. SSL.Abort_Defer := Defer_Abortion'Access; SSL.Abort_Undefer := Undefer_Abortion'Access; SSL.Update_Exception := Update_Exception'Access; SSL.Lock_Task := Task_Lock'Access; SSL.Unlock_Task := Task_Unlock'Access; SSL.Get_Jmpbuf_Address := Get_Jmpbuf_Address'Access; SSL.Set_Jmpbuf_Address := Set_Jmpbuf_Address'Access; SSL.Get_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access; SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access; SSL.Get_Exc_Stack_Addr := Get_Exc_Stack_Addr'Access; SSL.Set_Exc_Stack_Addr := Set_Exc_Stack_Addr'Access; SSL.Get_Machine_State_Addr := Get_Machine_State_Addr'Access; SSL.Set_Machine_State_Addr := Set_Machine_State_Addr'Access; SSL.Get_Current_Excep := Get_Current_Excep'Access; SSL.Timed_Delay := Timed_Delay_T'Access; SSL.Check_Abort_Status := Check_Abort_Status'Access; SSL.Get_Stack_Info := Get_Stack_Info'Access; -- No need to create a new Secondary Stack, since we will use the -- default one created in s-secsta.adb SSL.Set_Sec_Stack_Addr (SSL.Get_Sec_Stack_Addr_NT); SSL.Set_Exc_Stack_Addr (Null_Address, SSL.Get_Exc_Stack_Addr_NT); SSL.Set_Jmpbuf_Address (SSL.Get_Jmpbuf_Address_NT); SSL.Set_Machine_State_Addr (SSL.Get_Machine_State_Addr_NT); -- Abortion is deferred in a new ATCB, so we need to undefer abortion -- at this stage to make the environment task abortable. Undefer_Abort (Environment_Task); end Init_RTS; --------------------------- -- Locked_Abort_To_Level-- --------------------------- -- Abort a task to the specified ATC nesting level. -- Call this only with T locked. -- An earlier version of this code contained a call to Wakeup. That -- should not be necessary here, if Abort_Task is implemented correctly, -- since Abort_Task should include the effect of Wakeup. However, the -- above call was in earlier versions of this file, and at least for -- some targets Abort_Task has not beek doing Wakeup. It should not -- hurt to uncomment the above call, until the error is corrected for -- all targets. -- See extended comments in package body System.Tasking.Abortion -- for the overall design of the implementation of task abort. -- If the task is sleeping it will be in an abort-deferred region, -- and will not have Abort_Signal raised by Abort_Task. -- Such an "abort deferral" is just to protect the RTS internals, -- and not necessarily required to enforce Ada semantics. -- Abort_Task should wake the task up and let it decide if it wants -- to complete the aborted construct immediately. -- Note that the effect of the lowl-level Abort_Task is not persistent. -- If the target task is not blocked, this wakeup will be missed. -- We don't bother calling Abort_Task if this task is aborting itself, -- since we are inside the RTS and have abort deferred. Similarly, We -- don't bother to call Abort_Task if T is terminated, since there is -- no need to abort a terminated task, and it could be dangerous to try -- if the task has stopped executing. -- Note that an earlier version of this code had some false reasoning -- about being able to reliably wake up a task that had suspended on -- a blocking system call that does not atomically relase the task's -- lock (e.g., UNIX nanosleep, which we once thought could be used to -- implement delays). That still left the possibility of missed -- wakeups. -- We cannot safely call Vulnerable_Complete_Activation here, -- since that requires locking Self_ID.Parent. The anti-deadlock -- lock ordering rules would then require us to release the lock -- on Self_ID first, which would create a timing window for other -- tasks to lock Self_ID. This is significant for tasks that may be -- aborted before their execution can enter the task body, and so -- they do not get a chance to call Complete_Task. The actual work -- for this case is done in Terminate_Task. procedure Locked_Abort_To_Level (Self_ID : Task_ID; T : Task_ID; L : ATC_Level) is begin if not T.Aborting and then T /= Self_ID then case T.Common.State is when Unactivated | Terminated => pragma Assert (False); null; when Runnable => -- This is needed to cancel an asynchronous protected entry -- call during a requeue with abort. T.Entry_Calls (T.ATC_Nesting_Level).Cancellation_Attempted := True; when Interrupt_Server_Blocked_On_Event_Flag => null; when Delay_Sleep | Async_Select_Sleep | Interrupt_Server_Idle_Sleep | Interrupt_Server_Blocked_Interrupt_Sleep | Timer_Server_Sleep | AST_Server_Sleep => Wakeup (T, T.Common.State); when Acceptor_Sleep => T.Open_Accepts := null; Wakeup (T, T.Common.State); when Entry_Caller_Sleep => T.Entry_Calls (T.ATC_Nesting_Level).Cancellation_Attempted := True; Wakeup (T, T.Common.State); when Activator_Sleep | Master_Completion_Sleep | Master_Phase_2_Sleep | Asynchronous_Hold => null; end case; end if; if T.Pending_ATC_Level > L then T.Pending_ATC_Level := L; T.Pending_Action := True; if L = 0 then T.Callable := False; end if; -- This prevents aborted task from accepting calls if T.Aborting then -- The test above is just a heuristic, to reduce wasteful -- calls to Abort_Task. We are holding T locked, and this -- value will not be set to False except with T also locked, -- inside Exit_One_ATC_Level, so we should not miss wakeups. if T.Common.State = Acceptor_Sleep then T.Open_Accepts := null; end if; elsif T /= Self_ID and then (T.Common.State = Runnable or else T.Common.State = Interrupt_Server_Blocked_On_Event_Flag) -- The task is blocked on a system call waiting for the -- completion event. In this case Abort_Task may need to take -- special action in order to succeed. Example system: VMS. then Abort_Task (T); end if; end if; end Locked_Abort_To_Level; ------------------------------- -- Poll_Base_Priority_Change -- ------------------------------- -- Poll for pending base priority change and for held tasks. -- This should always be called with (only) Self_ID locked. -- It may temporarily release Self_ID's lock. -- The call to Yield is to force enqueuing at the -- tail of the dispatching queue. -- We must unlock Self_ID for this to take effect, -- since we are inheriting high active priority from the lock. -- See also Poll_Base_Priority_Change_At_Entry_Call, -- in package System.Tasking.Entry_Calls. -- In this version, we check if the task is held too because -- doing this only in Do_Pending_Action is not enough. procedure Poll_Base_Priority_Change (Self_ID : Task_ID) is begin if Dynamic_Priority_Support and then Self_ID.Pending_Priority_Change then -- Check for ceiling violations ??? Self_ID.Pending_Priority_Change := False; if Self_ID.Common.Base_Priority = Self_ID.New_Base_Priority then Unlock (Self_ID); Yield; Write_Lock (Self_ID); elsif Self_ID.Common.Base_Priority < Self_ID.New_Base_Priority then Self_ID.Common.Base_Priority := Self_ID.New_Base_Priority; Set_Priority (Self_ID, Self_ID.Common.Base_Priority); else -- Lowering priority Self_ID.Common.Base_Priority := Self_ID.New_Base_Priority; Set_Priority (Self_ID, Self_ID.Common.Base_Priority); Unlock (Self_ID); Yield; Write_Lock (Self_ID); end if; end if; end Poll_Base_Priority_Change; -------------------------------- -- Remove_From_All_Tasks_List -- -------------------------------- procedure Remove_From_All_Tasks_List (T : Task_ID) is C : Task_ID; Previous : Task_ID; begin pragma Debug (Debug.Trace ("Remove_From_All_Tasks_List", 'C')); Lock_All_Tasks_List; Previous := Null_Task; C := All_Tasks_List; while C /= Null_Task loop if C = T then if Previous = Null_Task then All_Tasks_List := All_Tasks_List.Common.All_Tasks_Link; else Previous.Common.All_Tasks_Link := C.Common.All_Tasks_Link; end if; Unlock_All_Tasks_List; return; end if; Previous := C; C := C.Common.All_Tasks_Link; end loop; pragma Assert (False); end Remove_From_All_Tasks_List; --------------- -- Task_Lock -- --------------- procedure Task_Lock is T : Task_ID := STPO.Self; begin T.Global_Task_Lock_Nesting := T.Global_Task_Lock_Nesting + 1; if T.Global_Task_Lock_Nesting = 1 then Defer_Abort_Nestable (T); Write_Lock (Global_Task_Lock'Access); end if; end Task_Lock; procedure Task_Lock (Self_ID : Task_ID) is begin Self_ID.Global_Task_Lock_Nesting := Self_ID.Global_Task_Lock_Nesting + 1; if Self_ID.Global_Task_Lock_Nesting = 1 then Defer_Abort_Nestable (Self_ID); Write_Lock (Global_Task_Lock'Access); end if; end Task_Lock; ----------------- -- Task_Unlock -- ----------------- procedure Task_Unlock is T : Task_ID := STPO.Self; begin pragma Assert (T.Global_Task_Lock_Nesting > 0); T.Global_Task_Lock_Nesting := T.Global_Task_Lock_Nesting - 1; if T.Global_Task_Lock_Nesting = 0 then Unlock (Global_Task_Lock'Access); Undefer_Abort_Nestable (T); end if; end Task_Unlock; procedure Task_Unlock (Self_ID : Task_ID) is begin Self_ID.Global_Task_Lock_Nesting := Self_ID.Global_Task_Lock_Nesting - 1; if Self_ID.Global_Task_Lock_Nesting = 0 then Unlock (Global_Task_Lock'Access); Undefer_Abort_Nestable (Self_ID); end if; end Task_Unlock; ------------------- -- Undefer_Abort -- ------------------- -- Precondition : Self does not hold any locks! -- Undefer_Abort is called on any abortion completion point (aka. -- synchronization point). It performs the following actions if they -- are pending: (1) change the base priority, (2) abort the task, -- (3) raise a pending exception. -- The priority change has to occur before abortion. Otherwise, it would -- take effect no earlier than the next abortion completion point. procedure Undefer_Abort (Self_ID : Task_ID) is begin pragma Assert (Self_ID.Deferral_Level = 1); Self_ID.Deferral_Level := Self_ID.Deferral_Level - 1; if Self_ID.Deferral_Level = 0 then pragma Assert (Check_No_Locks (Self_ID)); if Self_ID.Pending_Action then Do_Pending_Action (Self_ID); end if; end if; end Undefer_Abort; ---------------------------- -- Undefer_Abort_Nestable -- ---------------------------- -- An earlier version would re-defer abort if an abort is -- in progress. Then, we modified the effect of the raise -- statement so that it defers abort until control reaches a -- handler. That was done to prevent "skipping over" a -- handler if another asynchronous abort occurs during the -- propagation of the abort to the handler. -- There has been talk of reversing that decision, based on -- a newer implementation of exception propagation. Care must -- be taken to evaluate how such a change would interact with -- the above code and all the places where abort-deferral is -- used to bridge over critical transitions, such as entry to -- the scope of a region with a finalizer and entry into the -- body of an accept-procedure. procedure Undefer_Abort_Nestable (Self_ID : Task_ID) is begin pragma Assert (Self_ID.Deferral_Level > 0); Self_ID.Deferral_Level := Self_ID.Deferral_Level - 1; if Self_ID.Deferral_Level = 0 then pragma Assert (Check_No_Locks (Self_ID)); if Self_ID.Pending_Action then Do_Pending_Action (Self_ID); end if; end if; end Undefer_Abort_Nestable; ---------------------- -- Undefer_Abortion -- ---------------------- -- Phase out RTS-internal use of Undefer_Abortion -- to reduce overhead due to multiple calls to Self. procedure Undefer_Abortion is Self_ID : constant Task_ID := STPO.Self; begin pragma Assert (Self_ID.Deferral_Level > 0); Self_ID.Deferral_Level := Self_ID.Deferral_Level - 1; if Self_ID.Deferral_Level = 0 then pragma Assert (Check_No_Locks (Self_ID)); if Self_ID.Pending_Action then Do_Pending_Action (Self_ID); end if; end if; end Undefer_Abortion; ---------------------- -- Update_Exception -- ---------------------- -- Call only when holding no locks. procedure Update_Exception (X : AE.Exception_Occurrence := Current_Target_Exception) is Self_Id : constant Task_ID := Self; use Ada.Exceptions; begin Save_Occurrence (Self_Id.Common.Compiler_Data.Current_Excep, X); if Self_Id.Deferral_Level = 0 then if Self_Id.Pending_Action then Self_Id.Pending_Action := False; Self_Id.Deferral_Level := Self_Id.Deferral_Level + 1; Write_Lock (Self_Id); Self_Id.Pending_Action := False; Poll_Base_Priority_Change (Self_Id); Unlock (Self_Id); Self_Id.Deferral_Level := Self_Id.Deferral_Level - 1; if Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level then if not Self_Id.Aborting then Self_Id.Aborting := True; raise Standard'Abort_Signal; end if; end if; end if; end if; end Update_Exception; -------------------------- -- Wakeup_Entry_Caller -- -------------------------- -- This is called at the end of service of an entry call, to abort the -- caller if he is in an abortable part, and to wake up the caller if it -- is on Entry_Caller_Sleep. It assumes that the call is already off-queue. -- (This enforces the rule that a task must be off-queue if its state is -- Done or Cancelled.) Call it holding the lock of Entry_Call.Self. -- Timed_Call or Simple_Call: -- The caller is waiting on Entry_Caller_Sleep, in -- Wait_For_Completion, or Wait_For_Completion_With_Timeout. -- Conditional_Call: -- The caller might be in Wait_For_Completion, -- waiting for a rendezvous (possibly requeued without abort) -- to complete. -- Asynchronous_Call: -- The caller may be executing in the abortable part o -- an async. select, or on a time delay, -- if Entry_Call.State >= Was_Abortable. procedure Wakeup_Entry_Caller (Self_ID : Task_ID; Entry_Call : Entry_Call_Link; New_State : Entry_Call_State) is Caller : constant Task_ID := Entry_Call.Self; begin pragma Debug (Debug.Trace (Self_ID, "Wakeup_Entry_Caller", Caller, 'E')); pragma Assert (New_State = Done or else New_State = Cancelled); pragma Assert (Caller.Common.State /= Terminated and then Caller.Common.State /= Unactivated); Entry_Call.State := New_State; if Entry_Call.Mode = Asynchronous_Call then -- Abort the caller in his abortable part, -- but do so only if call has been queued abortably if Entry_Call.State >= Was_Abortable or else New_State = Done then Locked_Abort_To_Level (Self_ID, Caller, Entry_Call.Level - 1); end if; elsif Caller.Common.State = Entry_Caller_Sleep then Wakeup (Caller, Entry_Caller_Sleep); end if; end Wakeup_Entry_Caller; ---------------------- -- Soft-Link Bodies -- ---------------------- function Get_Current_Excep return SSL.EOA is Me : constant Task_ID := STPO.Self; begin return Me.Common.Compiler_Data.Current_Excep'Access; end Get_Current_Excep; function Get_Exc_Stack_Addr return Address is Me : constant Task_ID := STPO.Self; begin return Me.Common.Compiler_Data.Exc_Stack_Addr; end Get_Exc_Stack_Addr; function Get_Jmpbuf_Address return Address is Me : constant Task_ID := STPO.Self; begin return Me.Common.Compiler_Data.Jmpbuf_Address; end Get_Jmpbuf_Address; function Get_Machine_State_Addr return Address is Me : constant Task_ID := STPO.Self; begin return Me.Common.Compiler_Data.Machine_State_Addr; end Get_Machine_State_Addr; function Get_Sec_Stack_Addr return Address is Me : constant Task_ID := STPO.Self; begin return Me.Common.Compiler_Data.Sec_Stack_Addr; end Get_Sec_Stack_Addr; function Get_Stack_Info return Stack_Checking.Stack_Access is Me : constant Task_ID := STPO.Self; begin return Me.Common.Compiler_Data.Pri_Stack_Info'Access; end Get_Stack_Info; procedure Set_Exc_Stack_Addr (Self_ID : Address; Addr : Address) is Me : Task_ID := To_Task_Id (Self_ID); begin if Me = Null_Task then Me := STPO.Self; end if; Me.Common.Compiler_Data.Exc_Stack_Addr := Addr; end Set_Exc_Stack_Addr; procedure Set_Jmpbuf_Address (Addr : Address) is Me : Task_ID := STPO.Self; begin Me.Common.Compiler_Data.Jmpbuf_Address := Addr; end Set_Jmpbuf_Address; procedure Set_Machine_State_Addr (Addr : Address) is Me : Task_ID := STPO.Self; begin Me.Common.Compiler_Data.Machine_State_Addr := Addr; end Set_Machine_State_Addr; procedure Set_Sec_Stack_Addr (Addr : Address) is Me : Task_ID := STPO.Self; begin Me.Common.Compiler_Data.Sec_Stack_Addr := Addr; end Set_Sec_Stack_Addr; procedure Timed_Delay_T (Time : Duration; Mode : Integer) is Self_ID : constant Task_ID := Self; begin STPO.Timed_Delay (Self_ID, Time, Mode); end Timed_Delay_T; ------------------------ -- Soft-Link Dummies -- ------------------------ -- These are dummies for subprograms that are only needed by certain -- optional run-time system packages. If they are needed, the soft -- links will be redirected to the real subprogram by elaboration of -- the subprogram body where the real subprogram is declared. procedure Finalize_Attributes (T : Task_ID) is begin null; end Finalize_Attributes; procedure Initialize_Attributes (T : Task_ID) is begin null; end Initialize_Attributes; begin Init_RTS; end System.Tasking.Initialization;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . T E X T _ I O . C O M P L E X _ I O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2009, 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. -- -- -- ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Complex_Types; generic with package Complex_Types is new Ada.Numerics.Generic_Complex_Types (<>); package Ada.Text_IO.Complex_IO is Default_Fore : Field := 2; Default_Aft : Field := Complex_Types.Real'Digits - 1; Default_Exp : Field := 3; procedure Get (File : File_Type; Item : out Complex_Types.Complex; Width : Field := 0); procedure Get (Item : out Complex_Types.Complex; Width : Field := 0); procedure Put (File : File_Type; Item : Complex_Types.Complex; Fore : Field := Default_Fore; Aft : Field := Default_Aft; Exp : Field := Default_Exp); procedure Put (Item : Complex_Types.Complex; Fore : Field := Default_Fore; Aft : Field := Default_Aft; Exp : Field := Default_Exp); procedure Get (From : String; Item : out Complex_Types.Complex; Last : out Positive); procedure Put (To : out String; Item : Complex_Types.Complex; Aft : Field := Default_Aft; Exp : Field := Default_Exp); private pragma Inline (Get); pragma Inline (Put); end Ada.Text_IO.Complex_IO;
------------------------------------------------------------------------------ -- -- -- 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.Elements; with AMF.Internals.Helpers; with AMF.Internals.Tables.UML_Attributes; with AMF.UML.Components; with AMF.Visitors.Standard_Profile_L3_Iterators; with AMF.Visitors.Standard_Profile_L3_Visitors; package body AMF.Internals.Standard_Profile_L3_Build_Components is ------------------------ -- Get_Base_Component -- ------------------------ overriding function Get_Base_Component (Self : not null access constant Standard_Profile_L3_Build_Component_Proxy) return AMF.UML.Components.UML_Component_Access is begin return AMF.UML.Components.UML_Component_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Base_Component (Self.Element))); end Get_Base_Component; ------------------------ -- Set_Base_Component -- ------------------------ overriding procedure Set_Base_Component (Self : not null access Standard_Profile_L3_Build_Component_Proxy; To : AMF.UML.Components.UML_Component_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Base_Component (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Base_Component; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant Standard_Profile_L3_Build_Component_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Standard_Profile_L3_Visitors.Standard_Profile_L3_Visitor'Class then AMF.Visitors.Standard_Profile_L3_Visitors.Standard_Profile_L3_Visitor'Class (Visitor).Enter_Build_Component (AMF.Standard_Profile_L3.Build_Components.Standard_Profile_L3_Build_Component_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant Standard_Profile_L3_Build_Component_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Standard_Profile_L3_Visitors.Standard_Profile_L3_Visitor'Class then AMF.Visitors.Standard_Profile_L3_Visitors.Standard_Profile_L3_Visitor'Class (Visitor).Leave_Build_Component (AMF.Standard_Profile_L3.Build_Components.Standard_Profile_L3_Build_Component_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant Standard_Profile_L3_Build_Component_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.Standard_Profile_L3_Iterators.Standard_Profile_L3_Iterator'Class then AMF.Visitors.Standard_Profile_L3_Iterators.Standard_Profile_L3_Iterator'Class (Iterator).Visit_Build_Component (Visitor, AMF.Standard_Profile_L3.Build_Components.Standard_Profile_L3_Build_Component_Access (Self), Control); end if; end Visit_Element; end AMF.Internals.Standard_Profile_L3_Build_Components;