repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
reznikmm/matreshka
Ada
5,649
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.XML_Schema.Visitors; package body Matreshka.XML_Schema.AST.Wildcards is ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Wildcard_Node; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin Visitor.Enter_Wildcard (Matreshka.XML_Schema.AST.Wildcard_Access (Self), Control); end Enter_Node; -------------- -- Get_Name -- -------------- overriding function Get_Name (Self : not null access Wildcard_Node) return League.Strings.Universal_String is begin return League.Strings.Empty_Universal_String; end Get_Name; -------------------------- -- Get_Target_Namespace -- -------------------------- overriding function Get_Target_Namespace (Self : not null access Wildcard_Node) return League.Strings.Universal_String is begin return League.Strings.Empty_Universal_String; end Get_Target_Namespace; -------------- -- Get_Type -- -------------- overriding function Get_Type (Self : not null access Wildcard_Node) return XML.Schema.Component_Type is pragma Unreferenced (Self); begin return XML.Schema.Wildcard; end Get_Type; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Wildcard_Node; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin Visitor.Leave_Wildcard (Matreshka.XML_Schema.AST.Wildcard_Access (Self), Control); end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Wildcard_Node; Iterator : in out Matreshka.XML_Schema.Visitors.Abstract_Iterator'Class; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin Iterator.Visit_Wildcard (Visitor, Matreshka.XML_Schema.AST.Wildcard_Access (Self), Control); end Visit_Node; end Matreshka.XML_Schema.AST.Wildcards;
DrenfongWong/tkm-rpc
Ada
4,902
adb
package body Tkmrpc.Contexts.isa is pragma Warnings (Off, "* already use-visible through previous use type clause"); use type Types.isa_id_type; use type Types.ae_id_type; use type Types.ia_id_type; use type Types.key_type; use type Types.rel_time_type; use type Types.duration_type; pragma Warnings (On, "* already use-visible through previous use type clause"); type isa_FSM_Type is record State : isa_State_Type; ae_id : Types.ae_id_type; ia_id : Types.ia_id_type; sk_d : Types.key_type; creation_time : Types.rel_time_type; max_rekey_age : Types.duration_type; end record; -- IKE SA Context Null_isa_FSM : constant isa_FSM_Type := isa_FSM_Type' (State => clean, ae_id => Types.ae_id_type'First, ia_id => Types.ia_id_type'First, sk_d => Types.Null_key_type, creation_time => Types.rel_time_type'First, max_rekey_age => Types.duration_type'First); type Context_Array_Type is array (Types.isa_id_type) of isa_FSM_Type; Context_Array : Context_Array_Type := Context_Array_Type' (others => (Null_isa_FSM)); ------------------------------------------------------------------------- function Get_State (Id : Types.isa_id_type) return isa_State_Type is begin return Context_Array (Id).State; end Get_State; ------------------------------------------------------------------------- function Has_ae_id (Id : Types.isa_id_type; ae_id : Types.ae_id_type) return Boolean is (Context_Array (Id).ae_id = ae_id); ------------------------------------------------------------------------- function Has_creation_time (Id : Types.isa_id_type; creation_time : Types.rel_time_type) return Boolean is (Context_Array (Id).creation_time = creation_time); ------------------------------------------------------------------------- function Has_ia_id (Id : Types.isa_id_type; ia_id : Types.ia_id_type) return Boolean is (Context_Array (Id).ia_id = ia_id); ------------------------------------------------------------------------- function Has_max_rekey_age (Id : Types.isa_id_type; max_rekey_age : Types.duration_type) return Boolean is (Context_Array (Id).max_rekey_age = max_rekey_age); ------------------------------------------------------------------------- function Has_sk_d (Id : Types.isa_id_type; sk_d : Types.key_type) return Boolean is (Context_Array (Id).sk_d = sk_d); ------------------------------------------------------------------------- function Has_State (Id : Types.isa_id_type; State : isa_State_Type) return Boolean is (Context_Array (Id).State = State); ------------------------------------------------------------------------- pragma Warnings (Off, "condition can only be False if invalid values present"); function Is_Valid (Id : Types.isa_id_type) return Boolean is (Context_Array'First <= Id and Id <= Context_Array'Last); pragma Warnings (On, "condition can only be False if invalid values present"); ------------------------------------------------------------------------- procedure create (Id : Types.isa_id_type; ae_id : Types.ae_id_type; ia_id : Types.ia_id_type; sk_d : Types.key_type; creation_time : Types.rel_time_type) is begin Context_Array (Id).ae_id := ae_id; Context_Array (Id).ia_id := ia_id; Context_Array (Id).sk_d := sk_d; Context_Array (Id).creation_time := creation_time; Context_Array (Id).State := active; end create; ------------------------------------------------------------------------- function get_ae_id (Id : Types.isa_id_type) return Types.ae_id_type is begin return Context_Array (Id).ae_id; end get_ae_id; ------------------------------------------------------------------------- function get_sk_d (Id : Types.isa_id_type) return Types.key_type is begin return Context_Array (Id).sk_d; end get_sk_d; ------------------------------------------------------------------------- procedure invalidate (Id : Types.isa_id_type) is begin Context_Array (Id).State := invalid; end invalidate; ------------------------------------------------------------------------- procedure reset (Id : Types.isa_id_type) is begin Context_Array (Id).ae_id := Types.ae_id_type'First; Context_Array (Id).ia_id := Types.ia_id_type'First; Context_Array (Id).sk_d := Types.Null_key_type; Context_Array (Id).creation_time := Types.rel_time_type'First; Context_Array (Id).max_rekey_age := Types.duration_type'First; Context_Array (Id).State := clean; end reset; end Tkmrpc.Contexts.isa;
reznikmm/matreshka
Ada
9,669
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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.Characters.Wide_Wide_Latin_1; with League.Strings; package body Matreshka.CLDR.Collation_Rules_Parser is -- function Is_Collation_Syntax_Character -- (Item : Wide_Wide_Character) return Boolean; -- -- Returns True when given character is reserved for collation syntax. procedure Skip_Spaces (Buffer : Wide_Wide_String; Index : in out Positive; Last : Natural); procedure Parse_String (Buffer : Wide_Wide_String; Index : in out Positive; Last : Natural; Value : out League.Strings.Universal_String; Success : out Boolean); -- Parses string. procedure Parse_Relation_Operator (Buffer : Wide_Wide_String; Index : in out Positive; Last : Natural; Value : out Matreshka.CLDR.Collation_Data.Collation_Operator; Success : out Boolean); -- Parses string. -- ----------------------------------- -- -- Is_Collation_Syntax_Character -- -- ----------------------------------- -- function Is_Collation_Syntax_Character -- (Item : Wide_Wide_Character) return Boolean; --------------------------- -- Parse_Collation_Rules -- --------------------------- procedure Parse_Collation_Rules (Data : in out Matreshka.CLDR.Collation_Data.Collation_Information; Buffer : Wide_Wide_String) is Index : Positive := Buffer'First; Reset : League.Strings.Universal_String; Next : League.Strings.Universal_String; Operator : Matreshka.CLDR.Collation_Data.Collation_Operator; Success : Boolean; begin Skip_Spaces (Buffer, Index, Buffer'Last); while Index <= Buffer'Last loop if Buffer (Index) /= '&' then raise Program_Error; end if; Index := Index + 1; Parse_String (Buffer, Index, Buffer'Last, Reset, Success); if not Success then raise Program_Error; end if; while Index <= Buffer'Last loop Skip_Spaces (Buffer, Index, Buffer'Last); exit when Index > Buffer'Last; exit when Buffer (Index) = '&'; Parse_Relation_Operator (Buffer, Index, Buffer'Last, Operator, Success); if not Success then raise Program_Error; end if; Parse_String (Buffer, Index, Buffer'Last, Next, Success); if not Success then raise Program_Error; end if; if Reset.Length /= 1 then raise Program_Error; elsif Next.Length /= 1 then raise Program_Error; else Matreshka.CLDR.Collation_Data.Reorder (Data, Wide_Wide_Character'Pos (Reset (1).To_Wide_Wide_Character), Operator, Wide_Wide_Character'Pos (Next (1).To_Wide_Wide_Character)); end if; Reset := Next; end loop; end loop; end Parse_Collation_Rules; ----------------------------- -- Parse_Relation_Operator -- ----------------------------- procedure Parse_Relation_Operator (Buffer : Wide_Wide_String; Index : in out Positive; Last : Natural; Value : out Matreshka.CLDR.Collation_Data.Collation_Operator; Success : out Boolean) is begin Value := Matreshka.CLDR.Collation_Data.Identically; Success := False; Skip_Spaces (Buffer, Index, Last); if Index > Last then return; end if; while Index <= Last loop case Buffer (Index) is when '<' => case Value is when Matreshka.CLDR.Collation_Data.Identically => Success := True; Value := Matreshka.CLDR.Collation_Data.Primary; when Matreshka.CLDR.Collation_Data.Primary => Success := True; Value := Matreshka.CLDR.Collation_Data.Secondary; when Matreshka.CLDR.Collation_Data.Secondary => Success := True; Value := Matreshka.CLDR.Collation_Data.Trinary; when Matreshka.CLDR.Collation_Data.Trinary => Success := True; raise Program_Error; end case; when others => return; end case; Index := Index + 1; end loop; end Parse_Relation_Operator; ------------------ -- Parse_String -- ------------------ procedure Parse_String (Buffer : Wide_Wide_String; Index : in out Positive; Last : Natural; Value : out League.Strings.Universal_String; Success : out Boolean) is begin Value.Clear; Success := False; Skip_Spaces (Buffer, Index, Last); if Index > Last then return; end if; while Index <= Last loop case Buffer (Index) is when '<' => return; when ' ' => return; when Ada.Characters.Wide_Wide_Latin_1.LF => return; when others => Success := True; Value.Append (Buffer (Index)); end case; Index := Index + 1; end loop; end Parse_String; ----------------- -- Skip_Spaces -- ----------------- procedure Skip_Spaces (Buffer : Wide_Wide_String; Index : in out Positive; Last : Natural) is begin while Index <= Last loop case Buffer (Index) is when ' ' | Ada.Characters.Wide_Wide_Latin_1.HT | Ada.Characters.Wide_Wide_Latin_1.LF => Index := Index + 1; when '#' => Index := Index + 1; while Index <= Last loop case Buffer (Index) is when Ada.Characters.Wide_Wide_Latin_1.LF => Index := Index + 1; exit; when others => Index := Index + 1; end case; end loop; when others => exit; end case; end loop; end Skip_Spaces; end Matreshka.CLDR.Collation_Rules_Parser;
reznikmm/matreshka
Ada
4,672
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Chart.Right_Angled_Axes_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Chart_Right_Angled_Axes_Attribute_Node is begin return Self : Chart_Right_Angled_Axes_Attribute_Node do Matreshka.ODF_Chart.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Chart_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Chart_Right_Angled_Axes_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Right_Angled_Axes_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Chart_URI, Matreshka.ODF_String_Constants.Right_Angled_Axes_Attribute, Chart_Right_Angled_Axes_Attribute_Node'Tag); end Matreshka.ODF_Chart.Right_Angled_Axes_Attributes;
houey/Amass
Ada
722
ads
-- 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 url = require("url") name = "Ask" type = "scrape" function start() setratelimit(1) end function vertical(ctx, domain) for i=1,10 do local ok = scrape(ctx, {['url']=buildurl(domain, i)}) if not ok then break end checkratelimit() end end function buildurl(domain, pagenum) local params = { q="site:" .. domain .. " -www." .. domain, o="0", l="dir", qo="pagination", page=pagenum, } return "https://www.ask.com/web?" .. url.build_query_string(params) end
datacomo-dm/DMCloud
Ada
3,341
adb
---------------------------------------------------------------- -- ZLib for Ada thick binding. -- -- -- -- Copyright (C) 2002-2003 Dmitriy Anisimkov -- -- -- -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- -- $Id: zlib-thin.adb,v 1.1.1.1 2003/12/15 10:52:36 Administrator Exp $ package body ZLib.Thin is ZLIB_VERSION : constant Chars_Ptr := zlibVersion; Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit; -------------- -- Avail_In -- -------------- function Avail_In (Strm : in Z_Stream) return UInt is begin return Strm.Avail_In; end Avail_In; --------------- -- Avail_Out -- --------------- function Avail_Out (Strm : in Z_Stream) return UInt is begin return Strm.Avail_Out; end Avail_Out; ------------------ -- Deflate_Init -- ------------------ function Deflate_Init (strm : Z_Streamp; level : Int; method : Int; windowBits : Int; memLevel : Int; strategy : Int) return Int is begin return deflateInit2 (strm, level, method, windowBits, memLevel, strategy, ZLIB_VERSION, Z_Stream_Size); end Deflate_Init; ------------------ -- Inflate_Init -- ------------------ function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is begin return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size); end Inflate_Init; ------------------------ -- Last_Error_Message -- ------------------------ function Last_Error_Message (Strm : in Z_Stream) return String is use Interfaces.C.Strings; begin if Strm.msg = Null_Ptr then return ""; else return Value (Strm.msg); end if; end Last_Error_Message; ------------ -- Set_In -- ------------ procedure Set_In (Strm : in out Z_Stream; Buffer : in Voidp; Size : in UInt) is begin Strm.Next_In := Buffer; Strm.Avail_In := Size; end Set_In; ------------------ -- Set_Mem_Func -- ------------------ procedure Set_Mem_Func (Strm : in out Z_Stream; Opaque : in Voidp; Alloc : in alloc_func; Free : in free_func) is begin Strm.opaque := Opaque; Strm.zalloc := Alloc; Strm.zfree := Free; end Set_Mem_Func; ------------- -- Set_Out -- ------------- procedure Set_Out (Strm : in out Z_Stream; Buffer : in Voidp; Size : in UInt) is begin Strm.Next_Out := Buffer; Strm.Avail_Out := Size; end Set_Out; -------------- -- Total_In -- -------------- function Total_In (Strm : in Z_Stream) return ULong is begin return Strm.Total_In; end Total_In; --------------- -- Total_Out -- --------------- function Total_Out (Strm : in Z_Stream) return ULong is begin return Strm.Total_Out; end Total_Out; end ZLib.Thin;
AdaCore/libadalang
Ada
156,819
adb
------------------------------------------------------------------------------ -- -- -- GNATcoverage -- -- -- -- Copyright (C) 2008-2013, AdaCore -- -- -- -- GNATcoverage 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 3, or (at your option) any later -- -- version. This software is distributed in the hope that it will be useful -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- -- TABILITY 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 this software; see file -- -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- -- of the license. -- ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with Ada.Strings.Fixed; with Ada.Text_IO; use Ada.Text_IO; with System.Storage_Elements; use System.Storage_Elements; with Coff; with Coverage; use Coverage; with Coverage.Object; use Coverage.Object; with Coverage.Source; with Coverage.Tags; use Coverage.Tags; with Diagnostics; with Disa_Ppc; with Disassemblers; use Disassemblers; with Dwarf; with Dwarf_Handling; use Dwarf_Handling; with Execs_Dbase; use Execs_Dbase; with Files_Table; use Files_Table; with Hex_Images; use Hex_Images; with Inputs; with Outputs; with Perf_Counters; use Perf_Counters; with Qemu_Traces; with Traces_Disa; with Traces_Lines; use Traces_Lines; with Traces_Names; with Types; use Types; package body Traces_Elf is procedure Free is new Ada.Unchecked_Deallocation (Exe_File_Type'Class, Exe_File_Acc); function Convert is new Ada.Unchecked_Conversion (Str_Access, System.Address); No_Stmt_List : constant Unsigned_32 := Unsigned_32'Last; -- Value indicating there is no AT_stmt_list No_Ranges : constant Unsigned_32 := Unsigned_32'Last; -- Value indicating there is no AT_ranges type Mapping_Symbol is record Address : Pc_Type; Insn_Set : Insn_Set_Type; end record; -- Temporary data structure created when reading mapping symbols (in ARM -- ELF, these tell us whether code is ARM or Thumb). We use these symbols -- to fill Insn_Set_Ranges data structures. function "<" (L, R : Mapping_Symbol) return Boolean is (L.Address < R.Address); package Mapping_Symbol_Sets is new Ada.Containers.Ordered_Sets (Element_Type => Mapping_Symbol); procedure Build_Insn_Set_Ranges (Exec : in out Exe_File_Type'Class; Mapping_Symbols : Mapping_Symbol_Sets.Set; Section : Address_Info_Acc); -- Turn Mapping_Symbol_Vectors in to the Insn_Set_Range corresponding to -- Section_Index in Exec. function Get_Strtab_Idx (Exec : Elf_Exe_File_Type) return Elf_Half; -- Get the section index of the symtab string table. -- Return SHN_UNDEF if not found (or in case of error). procedure Read_Word8 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Res : out Unsigned_64); procedure Read_Word4 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Res : out Unsigned_32); procedure Read_Word2 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Res : out Unsigned_16); procedure Write_Word8 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Val : Unsigned_64); procedure Write_Word4 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Val : Unsigned_32); procedure Write_Word4 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Val : Integer_32); pragma Unreferenced (Write_Word4); procedure Read_Address (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Sz : Natural; Res : out Pc_Type); procedure Read_Dwarf_Form_U64 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32; Res : out Unsigned_64); procedure Read_Dwarf_Form_U32 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32; Res : out Unsigned_32); procedure Read_Dwarf_Form_String (Exec : in out Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32; Res : out Address); procedure Skip_Dwarf_Form (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32); procedure Read_Debug_Lines (Exec : in out Exe_File_Type'Class; Stmt_List_Offset : Unsigned_32; Compilation_Directory : String_Access); -- Read the debug lines of a compilation unit. -- Stmt_List_Offset is the offset of a stmt list from the beginning of the -- .debug_line section of Exec; Compilation_Directory is the value of -- DW_AT_comp_dir for the compilation unit, or null if this attribute is -- not specified. procedure Alloc_And_Load_Section (Exec : Exe_File_Type'Class; Sec : Section_Index; Len : out Elf_Addr; Content : out Binary_Content; Region : out Mapped_Region); -- Allocate memory for section SEC of EXEC and read it. LEN is the length -- of the section. Loaded bytes will be stored in CONTENT, and the mapped -- region it comes from is stored in REGION. It is up to the caller to free -- it after use. The low bound of CONTENT is 0. procedure Load_Symtab (Exec : in out Elf_Exe_File_Type); -- Load the symbol table (but not the string table) if not already -- loaded. Empty_String_Acc : constant String_Access := new String'(""); function Get_Desc_Set (Exec : Exe_File_Type; Kind : Address_Info_Kind; PC : Pc_Type) return access constant Address_Info_Sets.Set; pragma Inline (Get_Desc_Set); -- Return the Address_Info_Set of type Kind in Exec containing PC procedure Open_Exec_Fd (File_Name : String; Actual_File_Name : out String_Access; Fd : out GNAT.OS_Lib.File_Descriptor); -- Try to open the File_Name executable. This makes multiple attempts: it -- may try to append ".exe" (for instance of Windows) to the file name, or -- if not found it may look at the current directory. -- -- If successful, put the corresponding file descriptor in Fd and the -- file name used in Actual_File_Name (to be free'd by the caller). If -- unsuccessful, raise a Binary_Files.Error exception. --------- -- "<" -- --------- function "<" (L, R : Address_Info_Acc) return Boolean is pragma Assert (L.Kind = R.Kind); function Names_Lt (LN, RN : String_Access) return Boolean; -- Compare desginated strings, null is higher than any non-null string -------------- -- Names_Lt -- -------------- function Names_Lt (LN, RN : String_Access) return Boolean is begin if LN = null then return False; elsif RN = null then return True; else return LN.all < RN.all; end if; end Names_Lt; -- Start of processing for "<" begin -- Lower start PC sorts lower if L.First < R.First then return True; elsif R.First < L.First then return False; end if; -- Shorter range sorts higher. Note that we use a modular subtraction -- instead of a comparison on Last to account for empty ranges with -- First = 0 (and Last = all-ones). declare L_Len : constant Pc_Type := L.Last - L.First + 1; R_Len : constant Pc_Type := R.Last - R.First + 1; begin if R_Len < L_Len then return True; elsif L_Len < R_Len then return False; end if; end; -- Here if L.First = R.First and L.Last = R.Last case L.Kind is when Compilation_Unit_Addresses => return L.DIE_CU < R.DIE_CU; when Section_Addresses => return Names_Lt (L.Section_Name, R.Section_Name); when Subprogram_Addresses => return Names_Lt (L.Subprogram_Name, R.Subprogram_Name); when Symbol_Addresses => return Names_Lt (L.Symbol_Name, R.Symbol_Name); when Line_Addresses => return L.Sloc < R.Sloc; end case; end "<"; ----------- -- Image -- ----------- function Image (El : Address_Info_Acc) return String is Range_Img : constant String := Hex_Image (El.First) & '-' & Hex_Image (El.Last); function Sloc_Image (Line, Column : Natural) return String; -- Return the image of the given sloc. Column info is included only -- if Column > 0. ---------------- -- Sloc_Image -- ---------------- function Sloc_Image (Line, Column : Natural) return String is Line_Img : constant String := Line'Img; Column_Img : constant String := Column'Img; begin if Column = 0 then return Line_Img (Line_Img'First + 1 .. Line_Img'Last); else return Line_Img (Line_Img'First + 1 .. Line_Img'Last) & ':' & Column_Img (Column_Img'First + 1 .. Column_Img'Last); end if; end Sloc_Image; -- Start of processing for Image begin case El.Kind is when Compilation_Unit_Addresses => return Range_Img & " compilation unit"; when Section_Addresses => return Range_Img & " section " & El.Section_Name.all; when Subprogram_Addresses => return Range_Img & " subprogram " & El.Subprogram_Name.all; when Symbol_Addresses => return Range_Img & " symbol for " & El.Symbol_Name.all; when Line_Addresses => return Range_Img & " line " & Get_Full_Name (El.Sloc.Source_File) & ':' & Sloc_Image (Line => El.Sloc.L.Line, Column => El.Sloc.L.Column) & (if El.Disc /= 0 then " discriminator" & El.Disc'Img else ""); end case; end Image; ------------------ -- Disp_Address -- ------------------ procedure Disp_Address (El : Address_Info_Acc) is begin Put_Line (Image (El)); end Disp_Address; -------------------- -- Disp_Addresses -- -------------------- procedure Disp_Addresses (Exe : Exe_File_Type; Kind : Address_Info_Kind) is use Address_Info_Sets; procedure Disp_Address (Cur : Cursor); -- Display item at Cur ------------------ -- Disp_Address -- ------------------ procedure Disp_Address (Cur : Cursor) is begin Disp_Address (Element (Cur)); end Disp_Address; -- Start of processing for Disp_Addresses begin if Kind = Line_Addresses then for Subp of Exe.Desc_Sets (Subprogram_Addresses) loop Subp.Lines.Iterate (Disp_Address'Access); end loop; else Exe.Desc_Sets (Kind).Iterate (Disp_Address'Access); end if; end Disp_Addresses; ---------------------------- -- Disp_Compilation_Units -- ---------------------------- procedure Disp_Compilation_Units (Exec : Exe_File_Type) is use Compile_Unit_Vectors; Cu : Compile_Unit_Desc; Cur : Cursor; begin Cur := Exec.Compile_Units.First; while Has_Element (Cur) loop Cu := Element (Cur); Put_Line (Cu.Compile_Unit_Filename.all); Next (Cur); end loop; end Disp_Compilation_Units; procedure Insert (Set : in out Address_Info_Sets.Set; El : Address_Info_Acc) renames Address_Info_Sets.Insert; ------------------ -- Open_Exec_Fd -- ------------------ procedure Open_Exec_Fd (File_Name : String; Actual_File_Name : out String_Access; Fd : out GNAT.OS_Lib.File_Descriptor) is use GNAT.OS_Lib; Path : constant String := Lookup_Exec (File_Name); begin if Path'Length = 0 then raise Binary_Files.Error with File_Name & ": File not found"; end if; Fd := Open_Read (Path, Binary); if Fd = Invalid_FD then raise Binary_Files.Error with "Could not open " & Path; end if; Actual_File_Name := new String'(Path); end Open_Exec_Fd; --------------- -- Open_File -- --------------- function Open_File (Filename : String; Text_Start : Pc_Type) return Exe_File_Acc is procedure Merge_Architecture (Arch : Unsigned_16; Is_Big_Endian : Boolean); -- Set Machine or check it. procedure Set_Debug_Section (File : in out Exe_File_Type'Class; Index : Section_Index; Name : String); -- If NAME is the name of a known dwarf debug section, save index. ------------------------ -- Merge_Architecture -- ------------------------ procedure Merge_Architecture (Arch : Unsigned_16; Is_Big_Endian : Boolean) is begin if ELF_Machine = 0 then ELF_Machine := Arch; Machine := Decode_EM (Arch); Big_Endian_ELF := Is_Big_Endian; Big_Endian_ELF_Initialized := True; return; elsif ELF_Machine /= Arch then -- Mixing different architectures. Outputs.Fatal_Error ("unexpected architecture for " & Filename); elsif Big_Endian_ELF_Initialized and then Big_Endian_ELF /= Is_Big_Endian then Outputs.Fatal_Error ("unexpected endianness for " & Filename); else Big_Endian_ELF := Is_Big_Endian; Big_Endian_ELF_Initialized := True; end if; end Merge_Architecture; ----------------------- -- Set_Debug_Section -- ----------------------- procedure Set_Debug_Section (File : in out Exe_File_Type'Class; Index : Section_Index; Name : String) is begin if Name = ".debug_abbrev" then File.Sec_Debug_Abbrev := Index; elsif Name = ".debug_info" then File.Sec_Debug_Info := Index; elsif Name = ".debug_line" then File.Sec_Debug_Line := Index; elsif Name = ".debug_str" then File.Sec_Debug_Str := Index; elsif Name = ".debug_ranges" then File.Sec_Debug_Ranges := Index; end if; end Set_Debug_Section; use GNAT.OS_Lib; Fd : File_Descriptor; Name : GNAT.Strings.String_Access; Ehdr : Elf_Ehdr; -- Start of processing for Open_File begin Open_Exec_Fd (Filename, Name, Fd); Inputs.Log_File_Open (Name.all); if Is_ELF_File (Fd) then declare -- Because of a bug in GNAT (see O602-042), we should not invoke -- Create_File from an aggregate, so store its result in a local -- variable first. E_File : constant Elf_File := Create_File (Fd, Name); Exec_Acc : constant Exe_File_Acc := new Elf_Exe_File_Type' (Elf_File => E_File, others => <>); Exec : Elf_Exe_File_Type renames Elf_Exe_File_Type (Exec_Acc.all); begin Exec.File := Exec.Elf_File'Unchecked_Access; Exec.Exe_Text_Start := Text_Start; Ehdr := Get_Ehdr (Exec.Elf_File); Exec.Is_Big_Endian := Ehdr.E_Ident (EI_DATA) = ELFDATA2MSB; Exec.Exe_Machine := Ehdr.E_Machine; Merge_Architecture (Exec.Exe_Machine, Exec.Is_Big_Endian); case Get_Ehdr (Exec.Elf_File).E_Type is when ET_EXEC => Exec.Kind := File_Executable; when ET_REL => Exec.Kind := File_Object; when others => Exec.Kind := File_Others; end case; for I in 0 .. Get_Shdr_Num (Exec.Elf_File) - 1 loop declare Name : constant String := Get_Shdr_Name (Exec.Elf_File, I); begin if Name = ".symtab" then Exec.Sec_Symtab := I; elsif Exec.Exe_Machine = EM_PPC and then Name = ".PPC.EMB.apuinfo" then declare Len : Elf_Addr; Content : Binary_Content; Region : Mapped_Region; begin Alloc_And_Load_Section (Exec, Section_Index (I), Len, Content, Region); Machine := Disa_Ppc.Extract_APU_Info (Filename, Big_Endian_ELF, Content); Free (Region); end; else Set_Debug_Section (Exec, Section_Index (I), Name); end if; end; end loop; return Exec_Acc; end; elsif Is_PE_File (Fd) then declare Exec_Acc : constant Exe_File_Acc := new PE_Exe_File_Type' (PE_File => Create_File (Fd, Name), others => <>); Exec : PE_Exe_File_Type renames PE_Exe_File_Type (Exec_Acc.all); begin Exec.File := Exec.PE_File'Unchecked_Access; Exec.Exe_Text_Start := Text_Start; -- Ehdr := Get_Ehdr (Exec.Elf_File); Exec.Is_Big_Endian := False; case Get_Hdr (Exec.PE_File).F_Machine is when Coff.I386magic => Exec.Exe_Machine := EM_386; when Coff.AMD64magic => Exec.Exe_Machine := EM_X86_64; when others => Outputs.Fatal_Error ("unhandled PE architecture for " & Filename); end case; Merge_Architecture (Exec.Exe_Machine, Exec.Is_Big_Endian); if (Get_Hdr (Exec.PE_File).F_Flags and Coff.F_Exec) /= 0 then Exec.Kind := File_Executable; else Exec.Kind := File_Others; end if; for I in 0 .. Get_Nbr_Sections (Exec.PE_File) - 1 loop declare Name : constant String := Get_Section_Name (Exec.PE_File, I); begin Set_Debug_Section (Exec, I, Name); end; end loop; return Exec_Acc; end; else Outputs.Fatal_Error ("unknown binary format for " & Filename); end if; end Open_File; -------------------- -- Close_Exe_File -- -------------------- procedure Close_Exe_File (Exec : in out Exe_File_Type) is begin if Exec.Lines_Region /= Invalid_Mapped_Region then Free (Exec.Lines_Region); end if; Exec.Lines_Len := 0; if Exec.Symtab_Region /= Invalid_Mapped_Region then Free (Exec.Symtab_Region); end if; Exec.Nbr_Symbols := 0; if Exec.Debug_Strs_Region /= Invalid_Mapped_Region then Free (Exec.Debug_Strs_Region); end if; Exec.Sec_Debug_Abbrev := No_Section; Exec.Sec_Debug_Info := No_Section; Exec.Sec_Debug_Line := No_Section; Exec.Sec_Debug_Str := No_Section; Exec.Sec_Debug_Ranges := No_Section; Exec.Debug_Str_Base := Null_Address; Exec.Debug_Str_Len := 0; for I_Ranges of Exec.Insn_Set_Ranges loop Free (I_Ranges); end loop; end Close_Exe_File; procedure Close_Exe_File (Exec : in out Elf_Exe_File_Type) is begin Close_File (Exec.Elf_File); Close_Exe_File (Exe_File_Type (Exec)); Exec.Sec_Symtab := SHN_UNDEF; end Close_Exe_File; procedure Close_Exe_File (Exec : in out PE_Exe_File_Type) is begin Close_File (Exec.PE_File); Close_Exe_File (Exe_File_Type (Exec)); end Close_Exe_File; ---------------- -- Close_File -- ---------------- procedure Close_File (Exec : in out Exe_File_Acc) is begin Close_Exe_File (Exec.all); -- FIXME: free contents for J in Exec.Desc_Sets'Range loop Exec.Desc_Sets (J).Clear; end loop; Free (Exec); end Close_File; ----------------------- -- Find_Address_Info -- ----------------------- function Find_Address_Info (Set : Address_Info_Sets.Set; Kind : Address_Info_Kind; PC : Pc_Type) return Address_Info_Sets.Cursor is PC_Addr : aliased Address_Info (Kind); begin -- Empty range with default values sorts higher than any empty range -- with non-default values, and higher than any non-empty range, -- starting at PC. PC_Addr.First := PC; PC_Addr.Last := PC - 1; return Set.Floor (PC_Addr'Unchecked_Access); end Find_Address_Info; ----------------------- -- Find_Address_Info -- ----------------------- function Find_Address_Info (Exec : Exe_File_Type; Kind : Address_Info_Kind; PC : Pc_Type) return Address_Info_Sets.Cursor is Set : Address_Info_Sets.Set renames Get_Desc_Set (Exec, Kind, PC).all; begin return Find_Address_Info (Set, Kind, PC); end Find_Address_Info; ------------------ -- Get_Filename -- ------------------ function Get_Filename (Exec : Exe_File_Type) return String is begin return Filename (Exec.File.all); end Get_Filename; ----------------- -- Get_Machine -- ----------------- function Get_Machine (Exec : Exe_File_Type) return Unsigned_16 is begin return Exec.Exe_Machine; end Get_Machine; -------------- -- Get_Size -- -------------- function Get_Size (Exec : Exe_File_Type) return Long_Integer is begin return Get_Size (Exec.File.all); end Get_Size; -------------------- -- Get_Time_Stamp -- -------------------- function Get_Time_Stamp (Exec : Exe_File_Type) return GNAT.OS_Lib.OS_Time is begin return Get_Time_Stamp (Exec.File.all); end Get_Time_Stamp; --------------- -- Get_CRC32 -- --------------- function Get_CRC32 (Exec : Exe_File_Type) return Unsigned_32 is begin return Get_CRC32 (Exec.File.all); end Get_CRC32; ------------------ -- Get_Desc_Set -- ------------------ function Get_Desc_Set (Exec : Exe_File_Type; Kind : Address_Info_Kind; PC : Pc_Type) return access constant Address_Info_Sets.Set is begin if Kind in Exec.Desc_Sets'Range then return Exec.Desc_Sets (Kind)'Unchecked_Access; else pragma Assert (Kind = Line_Addresses); return Get_Address_Info (Exec, Subprogram_Addresses, PC).Lines'Access; end if; end Get_Desc_Set; ---------------------- -- Time_Stamp_Image -- ---------------------- function Time_Stamp_Image (TS : GNAT.OS_Lib.OS_Time) return String is use GNAT.OS_Lib; function Pad (N, Length : Natural) return String; -- Pad the given number with zeros on the left until the given length of -- the image is reached. --------- -- Pad -- --------- function Pad (N, Length : Natural) return String is Raw_Image : constant String := Natural'Image (N); First_Idx : constant Natural := (if Raw_Image (1) = ' ' then 2 else 1); Digits_Number : constant Natural := Raw_Image'Length - First_Idx + 1; Padding_Len : constant Natural := (if Length > Digits_Number then Length - Digits_Number else 0); Padding : constant String (1 .. Padding_Len) := (others => '0'); begin return Padding & Raw_Image (First_Idx .. Raw_Image'Last); end Pad; begin return Pad (Integer (GM_Year (TS)), 0) & "-" & Pad (Natural (GM_Month (TS)), 2) & "-" & Pad (Natural (GM_Day (TS)), 2) & " " & Pad (Natural (GM_Hour (TS)), 2) & ":" & Pad (Natural (GM_Minute (TS)), 2) & ":" & Pad (Natural (GM_Second (TS)), 2); end Time_Stamp_Image; ---------------------------- -- Match_Trace_Executable -- ---------------------------- function Match_Trace_Executable (Exec : Exe_File_Type'Class; Trace_File : Trace_File_Type) return String is use Qemu_Traces; Trace_Exe_Size : constant String := Get_Info (Trace_File, Exec_File_Size); Trace_Exe_TS : constant String := Get_Info (Trace_File, Exec_File_Time_Stamp); Trace_Exe_CRC32 : constant String := Get_Info (Trace_File, Exec_File_CRC32); File_Size : constant String := Long_Integer'Image (Get_Size (Exec)); File_TS : constant String := Time_Stamp_Image (Get_Time_Stamp (Exec)); File_CRC32 : constant String := Unsigned_32'Image (Get_CRC32 (Exec)); begin if Trace_Exe_Size /= "" and then Trace_Exe_Size /= File_Size then return "ELF file is" & File_Size & " bytes long, but trace indicates" & Trace_Exe_Size; elsif Trace_Exe_TS /= "" and then Trace_Exe_TS /= File_TS then return "ELF file created on " & File_TS & " but trace indicates " & Trace_Exe_TS; elsif Trace_Exe_CRC32 /= "" and then Trace_Exe_CRC32 /= File_CRC32 then return "ELF file CRC32 checksum is " & File_CRC32 & " but trace indicates " & Trace_Exe_CRC32; else return ""; end if; end Match_Trace_Executable; -------------------- -- Get_Strtab_Idx -- -------------------- function Get_Strtab_Idx (Exec : Elf_Exe_File_Type) return Elf_Half is Symtab_Shdr : Elf_Shdr_Acc; begin if Exec.Sec_Symtab = SHN_UNDEF then return SHN_UNDEF; end if; Symtab_Shdr := Get_Shdr (Exec.Elf_File, Exec.Sec_Symtab); if Symtab_Shdr.Sh_Type /= SHT_SYMTAB or else Symtab_Shdr.Sh_Link = 0 or else Natural (Symtab_Shdr.Sh_Entsize) /= Elf_Sym_Size then return SHN_UNDEF; else return Elf_Half (Symtab_Shdr.Sh_Link); end if; end Get_Strtab_Idx; ---------------- -- Read_Word8 -- ---------------- procedure Read_Word8 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Res : out Unsigned_64) is begin if Exec.Is_Big_Endian then Read_Word8_Be (Base, Off, Res); else Read_Word8_Le (Base, Off, Res); end if; end Read_Word8; ---------------- -- Read_Word4 -- ---------------- procedure Read_Word4 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Res : out Unsigned_32) is begin if Exec.Is_Big_Endian then Read_Word4_Be (Base, Off, Res); else Read_Word4_Le (Base, Off, Res); end if; end Read_Word4; ---------------- -- Read_Word2 -- ---------------- procedure Read_Word2 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Res : out Unsigned_16) is begin if Exec.Is_Big_Endian then Read_Word2_Be (Base, Off, Res); else Read_Word2_Le (Base, Off, Res); end if; end Read_Word2; ----------------- -- Write_Word8 -- ----------------- procedure Write_Word8 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Val : Unsigned_64) is begin if Exec.Is_Big_Endian then Write_Word8_Be (Base, Off, Val); else Write_Word8_Le (Base, Off, Val); end if; end Write_Word8; ----------------- -- Write_Word4 -- ----------------- procedure Write_Word4 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Val : Unsigned_32) is begin if Exec.Is_Big_Endian then Write_Word4_Be (Base, Off, Val); else Write_Word4_Le (Base, Off, Val); end if; end Write_Word4; ----------------- -- Write_Word4 -- ----------------- procedure Write_Word4 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Val : Integer_32) is function To_Unsigned_32 is new Ada.Unchecked_Conversion (Integer_32, Unsigned_32); begin Write_Word4 (Exec, Base, Off, To_Unsigned_32 (Val)); end Write_Word4; ------------------ -- Read_Address -- ------------------ procedure Read_Address (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Sz : Natural; Res : out Pc_Type) is begin if Sz /= Natural (Pc_Type_Size) then raise Program_Error with "address size mismatch"; end if; if Sz = 4 then declare V : Unsigned_32; begin Read_Word4 (Exec, Base, Off, V); Res := Pc_Type (V); end; elsif Sz = 8 then declare V : Unsigned_64; begin Read_Word8 (Exec, Base, Off, V); Res := Pc_Type (V); end; else raise Program_Error with "unhandled address length"; end if; end Read_Address; ------------------------- -- Read_Dwarf_Form_U64 -- ------------------------- procedure Read_Dwarf_Form_U64 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32; Res : out Unsigned_64) is use Dwarf; begin case Form is when DW_FORM_addr => declare V : Pc_Type; begin Read_Address (Exec, Base, Off, Exec.Addr_Size, V); Res := Unsigned_64 (V); end; when DW_FORM_flag => declare V : Unsigned_8; begin Read_Byte (Base, Off, V); Res := Unsigned_64 (V); end; when DW_FORM_data1 => declare V : Unsigned_8; begin Read_Byte (Base, Off, V); Res := Unsigned_64 (V); end; when DW_FORM_data2 => declare V : Unsigned_16; begin Read_Word2 (Exec, Base, Off, V); Res := Unsigned_64 (V); end; when DW_FORM_data4 | DW_FORM_ref4 | DW_FORM_sec_offset => declare V : Unsigned_32; begin Read_Word4 (Exec, Base, Off, V); Res := Unsigned_64 (V); end; when DW_FORM_data8 => Read_Word8 (Exec, Base, Off, Res); when DW_FORM_sdata => declare V : Unsigned_32; begin Read_SLEB128 (Base, Off, V); Res := Unsigned_64 (V); end; when DW_FORM_udata => declare V : Unsigned_32; begin Read_ULEB128 (Base, Off, V); Res := Unsigned_64 (V); end; when DW_FORM_strp | DW_FORM_string | DW_FORM_block1 => raise Program_Error; when others => raise Program_Error; end case; end Read_Dwarf_Form_U64; ------------------------- -- Read_Dwarf_Form_U32 -- ------------------------- procedure Read_Dwarf_Form_U32 (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32; Res : out Unsigned_32) is R : Unsigned_64; begin Read_Dwarf_Form_U64 (Exec, Base, Off, Form, R); Res := Unsigned_32 (R); end Read_Dwarf_Form_U32; ---------------------------- -- Read_Dwarf_Form_String -- ---------------------------- procedure Read_Dwarf_Form_String (Exec : in out Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32; Res : out Address) is use Dwarf; begin case Form is when DW_FORM_strp => declare V : Unsigned_32; begin Read_Word4 (Exec, Base, Off, V); if Exec.Debug_Str_Base = Null_Address then if Exec.Sec_Debug_Str = No_Section then return; end if; Alloc_And_Load_Section (Exec, Exec.Sec_Debug_Str, Exec.Debug_Str_Len, Exec.Debug_Strs, Exec.Debug_Strs_Region); Exec.Debug_Str_Base := Address_Of (Exec.Debug_Strs, 0); end if; Res := Exec.Debug_Str_Base + Storage_Offset (V); end; when DW_FORM_string => Res := Base + Off; declare C : Unsigned_8; begin loop Read_Byte (Base, Off, C); exit when C = 0; end loop; end; when others => Put ("???"); raise Program_Error; end case; end Read_Dwarf_Form_String; --------------------- -- Skip_Dwarf_Form -- --------------------- procedure Skip_Dwarf_Form (Exec : Exe_File_Type'Class; Base : Address; Off : in out Storage_Offset; Form : Unsigned_32) is use Dwarf; begin case Form is when DW_FORM_addr => Off := Off + Storage_Offset (Exec.Addr_Size); when DW_FORM_block1 => declare V : Unsigned_8; begin Read_Byte (Base, Off, V); Off := Off + Storage_Offset (V); end; when DW_FORM_block2 => declare V : Unsigned_16; begin Read_Word2 (Exec, Base, Off, V); Off := Off + Storage_Offset (V); end; when DW_FORM_block4 => declare V : Unsigned_32; begin Read_Word4 (Exec, Base, Off, V); Off := Off + Storage_Offset (V); end; when DW_FORM_flag | DW_FORM_data1 => Off := Off + 1; when DW_FORM_data2 => Off := Off + 2; when DW_FORM_data4 | DW_FORM_ref4 | DW_FORM_strp | DW_FORM_sec_offset => Off := Off + 4; when DW_FORM_data8 => Off := Off + 8; when DW_FORM_sdata => declare V : Unsigned_32; begin Read_SLEB128 (Base, Off, V); end; when DW_FORM_udata => declare V : Unsigned_32; begin Read_ULEB128 (Base, Off, V); end; when DW_FORM_string => declare C : Unsigned_8; begin loop Read_Byte (Base, Off, C); exit when C = 0; end loop; end; when DW_FORM_exprloc => -- Skip the bytes count, then "count" bytes declare Size : Unsigned_32; begin Read_ULEB128 (Base, Off, Size); Off := Off + Storage_Offset (Size); end; when DW_FORM_flag_present => -- This flag is implicitely present, so it is not materialized -- outside abbreviations. null; when others => Put_Line ("Unhandled dwarf form #" & Unsigned_32'Image (Form)); raise Program_Error; end case; end Skip_Dwarf_Form; ----------------------- -- Apply_Relocations -- ----------------------- procedure Apply_Relocations (Exec : in out Elf_Exe_File_Type; Sec_Idx : Section_Index; Region : in out Mapped_Region; Data : in out Binary_Content) is Sec_Rel : Elf_Half; Relocs_Len : Elf_Addr; Relocs : Binary_Content; Relocs_Region : Mapped_Region; Sym_Num : Unsigned_32; Sym : Elf_Sym; Shdr : Elf_Shdr_Acc; Off : Storage_Offset; Offset : Elf_Addr; R : Elf_Rela; begin -- The only sections on which we have to apply relocations are the -- .debug_info and the .debug_line sections. These sections seem to have -- relocations in object code files only (before linking). In these, -- sections do not have their address assigned yet, and thus we can -- consider that they are located at 0x0. -- We noticed that in these cases (relocations for debug sections in -- object code files), the symbols targetted by the relocations are -- sections themselves, and they do not have any addend (.rel.* -- relocation sections). -- So in this particular configuration, there is no need to relocate -- debug sections since it would only add section addresses (= 0) to -- the offsets already present in the debug sections. Thus, we do not -- handle relocation sections without addend. -- Find relocation section Sec_Rel := 0; for I in 0 .. Get_Nbr_Sections (Exec.Elf_File) - 1 loop Shdr := Get_Shdr (Exec.Elf_File, Elf_Half (I)); if Shdr.Sh_Type = SHT_RELA and then Shdr.Sh_Info = Elf_Word (Sec_Idx) then Sec_Rel := Elf_Half (I); exit; end if; end loop; if Sec_Rel = 0 then return; end if; if Shdr.Sh_Type /= SHT_RELA then raise Program_Error; end if; if Natural (Shdr.Sh_Entsize) /= Elf_Rela_Size then raise Program_Error; end if; if Shdr.Sh_Size mod Pc_Type (Elf_Rela_Size) /= 0 then raise Program_Error; end if; Make_Mutable (Exec.Elf_File, Region); Alloc_And_Load_Section (Exec, Section_Index (Sec_Rel), Relocs_Len, Relocs, Relocs_Region); if Relocs_Len /= Shdr.Sh_Size then raise Program_Error; end if; Load_Symtab (Exec); Off := 0; while Off < Storage_Offset (Relocs_Len) loop -- Read relocation entry R := Get_Rela (Exec.Elf_File, Address_Of (Relocs, Elf_Addr (Off))); Off := Off + Storage_Offset (Elf_Rela_Size); if R.R_Offset > Data.Last then raise Program_Error with "relocation offset beyond section size"; end if; Sym_Num := Elf_R_Sym (R.R_Info); if Sym_Num > Unsigned_32 (Exec.Nbr_Symbols) then raise Program_Error with "invalid symbol number in relocation"; end if; Sym := Get_Sym (Exec.Elf_File, Address_Of (Exec.Symtab, Elf_Addr (Sym_Num) * Elf_Addr (Elf_Sym_Size))); if Elf_St_Type (Sym.St_Info) = STT_SECTION then Offset := Get_Shdr (Exec.Elf_File, Sym.St_Shndx).Sh_Addr; else -- Also relocate global/local symbols ??? Offset := 0; end if; case Exec.Exe_Machine is when EM_X86_64 => case Elf_R_Type (R.R_Info) is when R_X86_64_NONE => null; when R_X86_64_64 => -- When compiled in 64-bit mode, Elf_Addr is a subtype of -- Unsigned_64, so the following conversion is redundant. -- However, is is needed when compiling in 32-bit mode, -- in which Elf_Addr is a subtype of Unsigned_32. pragma Warnings (Off); Write_Word8 (Exec, Address_Of (Data, 0), Storage_Offset (R.R_Offset), Unsigned_64 (Offset + Elf_Addr (R.R_Addend))); pragma Warnings (On); when R_X86_64_32 => -- There is no need to disable the warnings for the -- following conversion to Unsigned_32 even in 32-bit -- mode since it is considered by the compiler as a -- "disambiguation mean" between the unsigned/signed -- Write_Word4 functions. Write_Word4 (Exec, Address_Of (Data, 0), Storage_Offset (R.R_Offset), Unsigned_32 (Offset + Elf_Addr (R.R_Addend))); when others => raise Program_Error with ("unhandled x86_64 relocation, reloc is " & Elf_Word'Image (Elf_R_Type (R.R_Info))); end case; when EM_PPC => case Elf_R_Type (R.R_Info) is when R_PPC_ADDR32 => Write_Word4 (Exec, Address_Of (Data, 0), Storage_Offset (R.R_Offset), Unsigned_32 (Offset + Elf_Addr (R.R_Addend))); when R_PPC_NONE => null; when others => raise Program_Error with "unhandled PPC relocation"; end case; when EM_SPARC => case Elf_R_Type (R.R_Info) is when R_SPARC_UA32 => Write_Word4 (Exec, Address_Of (Data, 0), Storage_Offset (R.R_Offset), Unsigned_32 (Offset + Elf_Addr (R.R_Addend))); when others => raise Program_Error with "unhandled SPARC relocation"; end case; when EM_LMP => case Elf_R_Type (R.R_Info) is when R_LMP_32 => Write_Word4 (Exec, Address_Of (Data, 0), Storage_Offset (R.R_Offset), Unsigned_32 (Offset + Elf_Addr (R.R_Addend))); when others => raise Program_Error with "unhandled LMP relocation"; end case; when others => Outputs.Fatal_Error ("Relocs unhandled for this machine, reloc is" & Elf_Word'Image (Elf_R_Type (R.R_Info))); raise Program_Error; end case; end loop; Free (Relocs_Region); end Apply_Relocations; procedure Apply_Relocations (Exec : in out PE_Exe_File_Type; Sec_Idx : Section_Index; Region : in out Mapped_Region; Data : in out Binary_Content) is begin -- Not handled for PE Coff null; end Apply_Relocations; ---------------------------- -- Alloc_And_Load_Section -- ---------------------------- procedure Alloc_And_Load_Section (Exec : Exe_File_Type'Class; Sec : Section_Index; Len : out Elf_Addr; Content : out Binary_Content; Region : out Mapped_Region) is Sec_Len : Arch_Addr; begin if Sec /= No_Section then Sec_Len := Get_Section_Length (Exec.File.all, Sec); pragma Assert (Sec_Len > 0); Len := Sec_Len; Region := Load_Section (Exec.File.all, Sec); Content := (if Sec_Len > 0 then Wrap (Convert (Data (Region)), 0, Sec_Len - 1) else Wrap (Convert (Data (Region)), 1, 0)); else Content := Invalid_Binary_Content; Len := 0; end if; end Alloc_And_Load_Section; -- Extract lang, subprogram name and stmt_list (offset in .debug_line). -- What does this comment apply to??? ------------------------------- -- Build_Debug_Compile_Units -- ------------------------------- procedure Build_Debug_Compile_Units (Exec : in out Exe_File_Type'Class) is use Dwarf; use Compile_Unit_Vectors; function Symbol_Exists (Low : Pc_Type; Name : Address) return Boolean; -- Return whether there exists a symbol at Low whose name is Name. -- Return False if Name is Null_Address. ------------------- -- Symbol_Exists -- ------------------- function Symbol_Exists (Low : Pc_Type; Name : Address) return Boolean is Sym : Address_Info_Acc; begin if Name = Null_Address then return False; end if; Sym := Get_Address_Info (Exec, Symbol_Addresses, Low); if Sym = null then return False; end if; declare Name_Str : constant String := Read_String (Name); begin return Name_Str = Sym.Symbol_Name.all; end; end Symbol_Exists; Abbrev_Len : Elf_Addr; Abbrevs : Binary_Content; Abbrevs_Region : Mapped_Region; Abbrev_Base : Address; Map : Abbrev_Map_Acc; Abbrev : Address; Info_Len : Elf_Addr; Infos : Binary_Content; Infos_Region : Mapped_Region; Base : Address; Off, Sec_Off, Tag_Off : Storage_Offset; Aoff : Storage_Offset; Len : Unsigned_32; Ver : Unsigned_16; Abbrev_Off : Unsigned_32; Ptr_Sz : Unsigned_8; Last : Storage_Offset; Num : Unsigned_32; Tag : Unsigned_32; Name : Unsigned_32; Form : Unsigned_32; Level : Unsigned_8; At_Sib : Unsigned_64 := 0; At_Stmt_List : Unsigned_32 := No_Stmt_List; At_Ranges : Unsigned_32 := No_Ranges; At_Low_Pc : Unsigned_64 := 0; At_High_Pc : Unsigned_64 := 0; At_Lang : Unsigned_64 := 0; At_Name : Address := Null_Address; At_Comp_Dir : Address := Null_Address; At_Linkage_Name : Address := Null_Address; At_Abstract_Origin : Unsigned_64 := 0; Current_Sec : Address_Info_Acc; Current_Subprg : Address_Info_Acc; Current_CU : CU_Id := No_CU_Id; Current_DIE_CU : DIE_CU_Id := No_DIE_CU_Id; Compilation_Dir : String_Access; Unit_Filename : String_Access; Subprg_Low : Pc_Type; Is_High_Pc_Offset : Boolean := False; -- The DWARF standard defines two ways to interpret DW_AT_high_pc -- attributes: it can be encoded as an address or as a constant, -- in which case it represents the offset from the low PC. -- The generation of the mapping: call site -> target function (for -- indirect calls) is done in two steps: first accumulate information as -- tags and attributes comes from the debug information, then bind data -- into Exec. package Subprg_DIE_To_PC_Maps is new Ada.Containers.Ordered_Maps (Key_Type => Storage_Offset, Element_Type => Pc_Type); type Call_Target is record To_PC : Pc_Type; Target_Subprg_Tag : Storage_Offset; end record; package Call_Site_To_Target_Maps is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Call_Target); Subprg_To_PC : Subprg_DIE_To_PC_Maps.Map; Call_Site_To_Target : Call_Site_To_Target_Maps.Vector; -- Start of processing for Build_Debug_Compile_Units begin -- Return now if already loaded if not Exec.Compile_Units.Is_Empty then return; end if; if Exec.Desc_Sets (Section_Addresses).Is_Empty then -- The file may have no code return; end if; -- Load .debug_abbrev Alloc_And_Load_Section (Exec, Exec.Sec_Debug_Abbrev, Abbrev_Len, Abbrevs, Abbrevs_Region); Abbrev_Base := Address_Of (Abbrevs, 0); Map := null; -- Load .debug_info Alloc_And_Load_Section (Exec, Exec.Sec_Debug_Info, Info_Len, Infos, Infos_Region); Base := Address_Of (Infos, 0); -- Load symbols Build_Symbols (Exec); Apply_Relocations (Exec, Exec.Sec_Debug_Info, Infos_Region, Infos); Off := 0; while Off < Storage_Offset (Info_Len) loop -- Read .debug_info header: -- Length, version, offset in .debug_abbrev, pointer size. Sec_Off := Off; Read_Word4 (Exec, Base, Off, Len); if Len >= 16#ffff_fff0# then -- It looks like GCC never produces such sections, so they are not -- supported at the moment. raise Program_Error with "Unsupported 64-bit DWARF section"; end if; Last := Off + Storage_Offset (Len); Read_Word2 (Exec, Base, Off, Ver); Read_Word4 (Exec, Base, Off, Abbrev_Off); Read_Byte (Base, Off, Ptr_Sz); if Ver not in 2 .. 4 then Put_Line ("!! DWARF version not supported: " & Ver'Img); end if; Level := 0; Exec.Addr_Size := Natural (Ptr_Sz); Build_Abbrev_Map (Abbrev_Base + Storage_Offset (Abbrev_Off), Map); -- Read DIEs loop <<Again>> exit when Off >= Last; Tag_Off := Off; Read_ULEB128 (Base, Off, Num); if Num = 0 then Level := Level - 1; goto Again; end if; if Num <= Map.all'Last then Abbrev := Map (Num); else Abbrev := Null_Address; end if; if Abbrev = Null_Address then Put ("!! abbrev #" & Hex_Image (Num) & " does not exist !!"); New_Line; return; end if; -- Read tag Aoff := 0; Read_ULEB128 (Abbrev, Aoff, Tag); if Read_Byte (Abbrev + Aoff) /= 0 then Level := Level + 1; end if; -- Skip child Aoff := Aoff + 1; -- Read attributes loop Read_ULEB128 (Abbrev, Aoff, Name); Read_ULEB128 (Abbrev, Aoff, Form); exit when Name = 0 and Form = 0; case Name is when DW_AT_sibling => Read_Dwarf_Form_U64 (Exec, Base, Off, Form, At_Sib); when DW_AT_name => Read_Dwarf_Form_String (Exec, Base, Off, Form, At_Name); when DW_AT_comp_dir => Read_Dwarf_Form_String (Exec, Base, Off, Form, At_Comp_Dir); when DW_AT_MIPS_linkage_name | DW_AT_linkage_name => Read_Dwarf_Form_String (Exec, Base, Off, Form, At_Linkage_Name); when DW_AT_stmt_list => Read_Dwarf_Form_U32 (Exec, Base, Off, Form, At_Stmt_List); when DW_AT_ranges => Read_Dwarf_Form_U32 (Exec, Base, Off, Form, At_Ranges); when DW_AT_low_pc => Read_Dwarf_Form_U64 (Exec, Base, Off, Form, At_Low_Pc); when DW_AT_high_pc => Read_Dwarf_Form_U64 (Exec, Base, Off, Form, At_High_Pc); Is_High_Pc_Offset := Form /= DW_FORM_addr; when DW_AT_language => Read_Dwarf_Form_U64 (Exec, Base, Off, Form, At_Lang); when DW_AT_abstract_origin => Read_Dwarf_Form_U64 (Exec, Base, Off, Form, At_Abstract_Origin); -- References to other DIEs are relative to the beginning -- of the current compile unit. At_Abstract_Origin := Unsigned_64 (Sec_Off) + At_Abstract_Origin; when others => Skip_Dwarf_Form (Exec, Base, Off, Form); end case; end loop; -- Patch the high PC only now, since it may need the value for the -- DW_AT_low_pc attribute and we cannot assume that DW_AT_low_pc -- appears before DW_AT_high_pc. if Is_High_Pc_Offset then At_High_Pc := At_Low_Pc + At_High_Pc; end if; case Tag is when DW_TAG_compile_unit => if At_Comp_Dir /= Null_Address then Compilation_Dir := new String'(Read_String (At_Comp_Dir)); else Compilation_Dir := null; end if; Unit_Filename := Canonicalize_Filename (Read_String (At_Name)); -- If we have an entry for the unit in the files table at -- this point, we know it is for an unit of interest and it -- might be that only the file simple name is registered. -- Update the tables with the possibly full path name we -- have at hand from DW_AT_name. -- -- Don't touch the tables otherwise. The path we have might -- then be for an unit not of interest and trigger -- consolidation conflicts later on. declare Unit_File : Source_File_Index := Get_Index_From_Generic_Name (Name => Unit_Filename.all, Kind => Source_File, Insert => False); begin if Unit_File /= No_Source_File then Unit_File := Get_Index_From_Generic_Name (Name => Unit_Filename.all, Kind => Source_File, Insert => True); Current_CU := Comp_Unit (Unit_File); else Current_CU := No_CU_Id; end if; end; -- Mark unit as having code in the executable, to silence -- warning about unit of interest not present in test cases. -- Note: there might be no sloc referring to any source -- file of this unit, for example if it is a library level -- generic instance. if Current_CU /= No_CU_Id then Set_Unit_Has_Code (Current_CU); end if; Exec.Compile_Units.Append (Compile_Unit_Desc'(Unit_Filename, Compilation_Dir, At_Stmt_List, Pc_Type (At_Low_Pc), Pc_Type (At_High_Pc))); Current_DIE_CU := DIE_CU_Id (Exec.Compile_Units.Length); if At_High_Pc > At_Low_Pc then Exec.Desc_Sets (Compilation_Unit_Addresses).Insert (new Address_Info' (Kind => Compilation_Unit_Addresses, First => Exec.Exe_Text_Start + Pc_Type (At_Low_Pc), Last => Pc_Type (At_High_Pc - 1), Parent => null, DIE_CU => Current_DIE_CU)); end if; At_Lang := 0; At_Stmt_List := No_Stmt_List; when DW_TAG_subprogram => if At_High_Pc > At_Low_Pc then -- It looks like this subprogram is present in this -- compile unit. Subprg_Low := Exec.Exe_Text_Start + Pc_Type (At_Low_Pc); if Current_Sec = null or else Subprg_Low not in Current_Sec.First .. Current_Sec.Last then Current_Sec := Get_Address_Info (Exec, Section_Addresses, Subprg_Low); end if; if Current_Sec = null then -- When the linker eliminate a subprogram (this can -- happen when compiling with -ffunction-sections), -- the debug info for it may remain unrelocated in -- the output ELF. -- In DWARFv4, DW_AT_high_pc may contain an offset, so -- it may be greater than DW_AT_low_pc (which is then -- 0) even in this case. That's why we must handle -- this particular case here: these subprograms have -- no matching code section. if At_Low_Pc /= Unsigned_64 (No_PC) then raise Program_Error with "no section for subprogram"; end if; -- On ARM, we have seen runtime code at 0x0 so the above -- guard isn't useful there for the -ffunction-sections -- case. For this special case, use another heuristic -- to discard eliminated programs: see if we can find a -- symbol with the same name. If there is no such symbol, -- then the subprogram was very likely eliminated. elsif At_Low_Pc /= Unsigned_64 (No_PC) or else Symbol_Exists (Subprg_Low, (if At_Linkage_Name = Null_Address then At_Name else At_Linkage_Name)) then Current_Subprg := new Address_Info' (Kind => Subprogram_Addresses, First => Subprg_Low, Last => Exec.Exe_Text_Start + Pc_Type (At_High_Pc - 1), Parent => Current_Sec, Subprogram_Name => new String'(Read_String (At_Name)), Subprogram_CU => Current_CU, Subprogram_DIE_CU => Current_DIE_CU, Lines => Address_Info_Sets.Empty_Set); Exec.Desc_Sets (Subprogram_Addresses). Insert (Current_Subprg); Subprg_To_PC.Insert (Tag_Off, Pc_Type (At_Low_Pc)); end if; elsif At_Linkage_Name /= Null_Address or else At_Name /= Null_Address then -- Missing subprograms can be referenced by call sites: -- collect their addresses. if At_Linkage_Name = Null_Address then At_Linkage_Name := At_Name; end if; -- We assume that the symbol referenced by the name -- attribute is present in the symbol table as a -- STB_GLOBAL symbol. declare use Symbol_To_PC_Maps; Subprg_Sym : constant Symbol := To_Symbol (Read_String (At_Linkage_Name)); Cur : constant Symbol_To_PC_Maps.Cursor := Exec.Symbol_To_PC.Find (Subprg_Sym); begin -- Sometimes, subprogram DIEs references a symbol that -- is not present. In these case, just ignore them. if Cur /= Symbol_To_PC_Maps.No_Element then Subprg_To_PC.Insert (Tag_Off, Symbol_To_PC_Maps.Element (Cur)); end if; end; end if; when DW_TAG_GNU_call_site => if At_Low_Pc /= 0 and then At_Abstract_Origin /= 0 then Call_Site_To_Target.Append ((Pc_Type (At_Low_Pc), Storage_Offset (At_Abstract_Origin))); end if; when others => null; end case; At_Low_Pc := 0; At_High_Pc := 0; At_Ranges := No_Ranges; At_Abstract_Origin := 0; At_Name := Null_Address; At_Comp_Dir := Null_Address; At_Linkage_Name := Null_Address; Is_High_Pc_Offset := False; end loop; Free (Map); end loop; -- If there is no debug information in this binary, the following -- sections may not have been loaded. if Infos_Region /= Invalid_Mapped_Region then Free (Infos_Region); end if; if Abbrevs_Region /= Invalid_Mapped_Region then Free (Abbrevs_Region); end if; -- Fill the map: call site -> target function, using accumulated -- information. for Call_To_Target of Call_Site_To_Target loop declare use Subprg_DIE_To_PC_Maps; Cur : constant Subprg_DIE_To_PC_Maps.Cursor := Subprg_To_PC.Find (Call_To_Target.Target_Subprg_Tag); begin if Cur /= Subprg_DIE_To_PC_Maps.No_Element then Exec.Call_Site_To_Target.Insert (Call_To_Target.To_PC, Subprg_DIE_To_PC_Maps.Element (Cur)); end if; end; end loop; end Build_Debug_Compile_Units; ----------------- -- Load_Symtab -- ----------------- procedure Load_Symtab (Exec : in out Elf_Exe_File_Type) is Symtab_Shdr : Elf_Shdr_Acc; Symtab_Len : Elf_Addr; begin if Exec.Nbr_Symbols /= 0 then -- Already loaded. return; end if; if Exec.Sec_Symtab = SHN_UNDEF then raise Program_Error with "no symbol table"; end if; Alloc_And_Load_Section (Exec, Section_Index (Exec.Sec_Symtab), Symtab_Len, Exec.Symtab, Exec.Symtab_Region); Symtab_Shdr := Get_Shdr (Exec.Elf_File, Exec.Sec_Symtab); if Symtab_Shdr.Sh_Type /= SHT_SYMTAB or else Symtab_Shdr.Sh_Link = 0 or else Natural (Symtab_Shdr.Sh_Entsize) /= Elf_Sym_Size then raise Program_Error with "invalid symbol table section"; end if; if Symtab_Shdr.Sh_Size /= Symtab_Len or else Symtab_Shdr.Sh_Size mod Elf_Addr (Elf_Sym_Size) /= 0 then raise Program_Error with "invalid symtab size"; end if; Exec.Nbr_Symbols := Natural (Symtab_Len) / Elf_Sym_Size; end Load_Symtab; package Filenames_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => String_Access, "=" => "="); package File_Indices_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Source_File_Index); ---------------------- -- Read_Debug_Lines -- ---------------------- procedure Read_Debug_Lines (Exec : in out Exe_File_Type'Class; Stmt_List_Offset : Unsigned_32; Compilation_Directory : String_Access) is use Dwarf; Base : Address; Off : Storage_Offset; type Opc_Length_Type is array (Unsigned_8 range <>) of Unsigned_8; type Opc_Length_Acc is access Opc_Length_Type; Opc_Length : Opc_Length_Acc; procedure Free is new Ada.Unchecked_Deallocation (Opc_Length_Type, Opc_Length_Acc); Total_Len : Unsigned_32; Version : Unsigned_16; Prolog_Len : Unsigned_32; Min_Insn_Len : Unsigned_8; Dflt_Is_Stmt : Unsigned_8; Line_Base : Unsigned_8; Line_Range : Unsigned_8; Opc_Base : Unsigned_8; B : Unsigned_8; Arg : Unsigned_32; Old_Off : Storage_Offset; File_Dir : Unsigned_32; File_Time : Unsigned_32; File_Len : Unsigned_32; Ext_Len : Unsigned_32; Ext_Opc : Unsigned_8; Last : Storage_Offset; -- Base_Pc is there to memorize the PC at which a sequence starts, per -- DW_LNE_set_address statements. This is null at the start of ranges -- discarded by gc-section and we need to discard the relative entries -- that follow as well. Pc, Base_Pc : Pc_Type; File : Natural; Line, Column : Unsigned_32; Line_Base2 : Unsigned_32; Disc : Unsigned_32; Nbr_Dirnames : Unsigned_32; Nbr_Filenames : Unsigned_32; Dirnames : Filenames_Vectors.Vector; Filenames : Filenames_Vectors.Vector; File_Indices : File_Indices_Vectors.Vector; -- Cached file indices for Filenames. Contains No_Source_File for source -- files that are not considered for coverage and thus that do not -- require debug line information. Cur_Subprg, Cur_Sec : Address_Info_Sets.Cursor; Subprg, Sec : Address_Info_Acc; -- Current subprogram and section procedure Set_Parents (PC : Pc_Type; Sloc : Source_Location); -- Set the current subprogram and section for PC, which is mapped to -- Sloc. Create a subprogram and append it to the database if there -- is none. Last_Line : Address_Info_Acc := null; procedure Reset_Lines; procedure New_Source_Line; procedure Close_Source_Line; -- Need comments??? ----------------------- -- Close_Source_Line -- ----------------------- procedure Close_Source_Line is begin if Last_Line = null then return; end if; -- Set the last PC for this line Last_Line.Last := Exec.Exe_Text_Start + Pc - 1; -- Note: if previous entry is at offset 0 and has an empty range, -- this will set its Last to PC_Type'Last, so care must be taken -- downstream to not interpret it as covering the whole executable. -- If this entry has a non-empty range, mark it as such using the -- Is_Non_Empty flag, and propagate the range to all entries with -- the same start address and an empty range. if not Empty_Range (Last_Line.all) then Last_Line.Is_Non_Empty := True; for Info of Get_Address_Infos (Subprg.Lines, Line_Addresses, Last_Line.First) loop if Empty_Range (Info.all) then pragma Assert (not Info.Is_Non_Empty); Info.Last := Last_Line.Last; end if; end loop; end if; Last_Line := null; end Close_Source_Line; --------------------- -- New_Source_Line -- --------------------- procedure New_Source_Line is use Address_Info_Sets; Pos : Cursor; Inserted : Boolean; File_Index : Source_File_Index; Sloc : Source_Location; Saved_Line : constant Address_Info_Acc := Last_Line; begin -- Discard 0-relative entries in exec files, corresponding to -- regions garbage collected by gc-section. if Base_Pc = 0 and then Exec.Kind = File_Executable then return; end if; Close_Source_Line; -- Note: Last will be updated by Close_Source_Line File_Index := File_Indices.Element (File); if File_Index /= No_Source_File then Sloc := (Source_File => File_Index, L => (Natural (Line), Natural (Column))); Set_Parents (Exec.Exe_Text_Start + Pc, Sloc); if Subprg /= null then Last_Line := new Address_Info' (Kind => Line_Addresses, First => Exec.Exe_Text_Start + Pc, Last => Exec.Exe_Text_Start + Pc, Parent => (if Subprg /= null then Subprg else Sec), Sloc => Sloc, Disc => Disc, Is_Non_Empty => False); Subprg.Lines.Insert (Last_Line, Pos, Inserted); if not Inserted then -- An empty line has already been inserted at PC. Merge it -- with current line. Last_Line := Element (Pos); end if; end if; else -- If this line is filtered out, restore the previous Last_Line Last_Line := Saved_Line; end if; Disc := 0; end New_Source_Line; ----------------- -- Reset_Lines -- ----------------- procedure Reset_Lines is begin Base_Pc := 0; Pc := 0; File := 1; Line := 1; Column := 0; Disc := 0; end Reset_Lines; ----------------- -- Set_Parents -- ----------------- procedure Set_Parents (PC : Pc_Type; Sloc : Source_Location) is use Address_Info_Sets; procedure Set_Parent (Kind : Address_Info_Kind; Cur : in out Cursor; Cache : in out Address_Info_Acc); ---------------- -- Set_Parent -- ---------------- procedure Set_Parent (Kind : Address_Info_Kind; Cur : in out Cursor; Cache : in out Address_Info_Acc) is begin if Cache = null or else PC < Cache.First then Cur := Find_Address_Info (Exec.Desc_Sets (Kind), Kind, PC); end if; if Cur = No_Element then Cache := null; else while Cur /= No_Element loop Cache := Element (Cur); -- Stop when we are sure we won't meet a matching -- subprogram. if PC < Cache.First then exit; -- Or stop when me met it elsif PC <= Cache.Last then return; end if; Next (Cur); end loop; -- If we reach here, we haven't found any matching subprogram Cache := null; end if; end Set_Parent; begin Set_Parent (Section_Addresses, Cur_Sec, Sec); Set_Parent (Subprogram_Addresses, Cur_Subprg, Subprg); if Subprg = null then -- Create a subprogram if there is none for PC declare use Traces_Names; Symbol : constant Address_Info_Acc := Get_Address_Info (Exec.Desc_Sets (Symbol_Addresses), Symbol_Addresses, PC); Inserted : Boolean; SCO : SCO_Id := No_SCO_Id; Complain : Boolean := False; begin if Symbol = null then -- The code at PC has debug line information, but no -- associated symbol: there must be something wrong. -- Try to avoid complaining when the code is not considered -- for coverage. if Source_Coverage_Enabled then SCO := SC_Obligations.Enclosing_Statement (Sloc_To_SCO (Sloc)); Complain := SCO /= No_SCO_Id; else -- If the user provided explicitely the routines of -- interest, then code that has no corresponding -- symbol is not considered for coverage. Complain := Routines_Of_Interest_Origin /= From_Command_Line; end if; if Complain then Diagnostics.Report (Exec'Unrestricted_Access, PC, "code has debug line information, but no symbol", Diagnostics.Warning); -- If the code maps to source code targetted by SCOs, -- tag the SCOs as having code so that we will emit a -- coverage violation for it. We have no symbol and no -- subprogram, thus we cannot get a tag for this code. if SCO /= No_SCO_Id then Coverage.Source.Set_Basic_Block_Has_Code (SCO, No_SC_Tag); end if; end if; else Subprg := new Address_Info' (Kind => Subprogram_Addresses, First => Symbol.First, Last => Symbol.Last, Parent => Sec, Subprogram_Name => new String'("<None@" & Symbol.Symbol_Name.all & ">"), Subprogram_CU => No_CU_Id, Subprogram_DIE_CU => No_DIE_CU_Id, Lines => Address_Info_Sets.Empty_Set); -- And insert it to the database. This subprogram is create -- because there was none for this PC, so inserting must -- work. Exec.Desc_Sets (Subprogram_Addresses).Insert (Subprg, Cur_Subprg, Inserted); pragma Assert (Inserted); end if; end; end if; end Set_Parents; No_File_Of_Interest : Boolean := True; -- Start of processing for Read_Debug_Lines begin -- Load .debug_line if not Is_Loaded (Exec.Lines) then Alloc_And_Load_Section (Exec, Exec.Sec_Debug_Line, Exec.Lines_Len, Exec.Lines, Exec.Lines_Region); Base := Address_Of (Exec.Lines, 0); Apply_Relocations (Exec, Exec.Sec_Debug_Line, Exec.Lines_Region, Exec.Lines); end if; Off := Storage_Offset (Stmt_List_Offset); if Off >= Storage_Offset (Exec.Lines_Len) then return; end if; Base := Address_Of (Exec.Lines, 0); -- Read header Read_Word4 (Exec, Base, Off, Total_Len); Last := Off + Storage_Offset (Total_Len); Read_Word2 (Exec, Base, Off, Version); Read_Word4 (Exec, Base, Off, Prolog_Len); Read_Byte (Base, Off, Min_Insn_Len); Read_Byte (Base, Off, Dflt_Is_Stmt); Read_Byte (Base, Off, Line_Base); Read_Byte (Base, Off, Line_Range); Read_Byte (Base, Off, Opc_Base); -- Initial state registers Reset_Lines; Line_Base2 := Unsigned_32 (Line_Base); if (Line_Base and 16#80#) /= 0 then Line_Base2 := Line_Base2 or 16#Ff_Ff_Ff_00#; end if; Opc_Length := new Opc_Length_Type (1 .. Opc_Base - 1); for I in 1 .. Opc_Base - 1 loop Read_Byte (Base, Off, Opc_Length (I)); end loop; -- Include directories Nbr_Dirnames := 0; Filenames_Vectors.Clear (Dirnames); loop B := Read_Byte (Base + Off); exit when B = 0; Filenames_Vectors.Append (Dirnames, new String'(Read_String (Base + Off))); Read_String (Base, Off); Nbr_Dirnames := Nbr_Dirnames + 1; end loop; Off := Off + 1; -- File names Nbr_Filenames := 0; Filenames_Vectors.Clear (Filenames); File_Indices.Clear; loop B := Read_Byte (Base + Off); exit when B = 0; Old_Off := Off; Read_String (Base, Off); Read_ULEB128 (Base, Off, File_Dir); declare Filename : constant String := Read_String (Base + Old_Off); Dir : String_Access; File_Index : Source_File_Index; Filter_Lines : constant Boolean := Source_Coverage_Enabled; Kind : constant Files_Table.File_Kind := (if Source_Coverage_Enabled then Stub_File else Source_File); -- For source coverage, it's the coverage obligations that -- determine which source files are relevant for coverage -- analysis. In this case, consider that other source files are -- stubs to reduce simple name collisions. begin if File_Dir /= 0 and then File_Dir <= Nbr_Dirnames then Dir := Filenames_Vectors.Element (Dirnames, Integer (File_Dir)); elsif Compilation_Directory /= null and then not GNAT.OS_Lib.Is_Absolute_Path (Filename) then Dir := Compilation_Directory; else Dir := Empty_String_Acc; end if; Filenames_Vectors.Append (Filenames, Build_Filename (Dir.all, Filename)); -- Optimization: in source coverage, we do not want to add new -- files to the files table: the ones added when loading SCOs are -- enough. Do not even load debug line information for files that -- don't have statement SCOs. File_Index := Get_Index_From_Full_Name (Full_Name => Filenames.Last_Element.all, Kind => Kind, Insert => not Filter_Lines); if Filter_Lines and then File_Index /= No_Source_File then declare FI : constant File_Info_Access := Get_File (File_Index); begin if FI.Kind /= Source_File or else not FI.Has_Source_Coverage_Info then File_Index := No_Source_File; end if; end; end if; if File_Index /= No_Source_File then -- This file is of interest. If not already done thanks to the -- first call to Get_Index_From_Full_Name, give a chance to the -- file table entry to get a full path. No_File_Of_Interest := False; if Filter_Lines then File_Index := Get_Index_From_Full_Name (Filenames.Last_Element.all, Kind, Insert => True); end if; end if; File_Indices.Append (File_Index); end; Read_ULEB128 (Base, Off, File_Time); Read_ULEB128 (Base, Off, File_Len); Nbr_Filenames := Nbr_Filenames + 1; end loop; Off := Off + 1; -- If there is no source file of interest in this debug information, -- do nothing. if No_File_Of_Interest then Free (Opc_Length); return; end if; while Off < Last loop -- Read code Read_Byte (Base, Off, B); Old_Off := Off; if B = 0 then -- Extended opcode Read_ULEB128 (Base, Off, Ext_Len); Old_Off := Off; Read_Byte (Base, Off, Ext_Opc); case Ext_Opc is when DW_LNE_end_sequence => Close_Source_Line; Reset_Lines; when DW_LNE_set_address => Read_Address (Exec, Base, Off, Arch.Arch_Addr'Size / 8, Pc); Base_Pc := Pc; when DW_LNE_define_file => raise Program_Error with "DW_LNE_define_file unhandled"; when DW_LNE_set_discriminator => Read_ULEB128 (Base, Off, Disc); when others => raise Program_Error with "unhandled DW_LNE" & Unsigned_8'Image (Ext_Opc); end case; Off := Old_Off + Storage_Offset (Ext_Len); elsif B < Opc_Base then -- Standard opcode case B is when DW_LNS_copy => New_Source_Line; when DW_LNS_advance_pc => Read_ULEB128 (Base, Off, Arg); Pc := Pc + Pc_Type (Arg * Unsigned_32 (Min_Insn_Len)); when DW_LNS_advance_line => Read_SLEB128 (Base, Off, Arg); Line := Line + Arg; when DW_LNS_set_file => Read_ULEB128 (Base, Off, Arg); File := Natural (Arg); when DW_LNS_set_column => Read_ULEB128 (Base, Off, Column); when DW_LNS_negate_stmt | DW_LNS_set_basic_block => null; when DW_LNS_const_add_pc => Pc := Pc + Pc_Type (Unsigned_32 ((255 - Opc_Base) / Line_Range) * Unsigned_32 (Min_Insn_Len)); when DW_LNS_fixed_advance_pc => raise Program_Error with "DW_LNS_fixed_advance_pc unhandled"; when DW_LNS_set_prologue_end | DW_LNS_set_epilogue_begin | DW_LNS_set_isa => null; when others => -- Instruction length for J in 1 .. Opc_Length (B) loop Read_ULEB128 (Base, Off, Arg); end loop; end case; else -- Special opcode B := B - Opc_Base; Pc := Pc + Pc_Type (Unsigned_32 (B / Line_Range) * Unsigned_32 (Min_Insn_Len)); Line := Line + Line_Base2 + Unsigned_32 (B mod Line_Range); New_Source_Line; end if; end loop; if Last_Line /= null then raise Program_Error with "missing end_of_sequence"; end if; Free (Opc_Length); end Read_Debug_Lines; ----------------------- -- Build_Debug_Lines -- ----------------------- procedure Build_Debug_Lines (Exec : in out Exe_File_Type'Class) is begin -- Return now if already loaded if Exec.Lines_Region /= Invalid_Mapped_Region then return; end if; -- Be sure compile units are loaded Build_Debug_Compile_Units (Exec); -- Read all .debug_line for Cu of Exec.Compile_Units loop Read_Debug_Lines (Exec, Cu.Stmt_List, Cu.Compilation_Directory); end loop; end Build_Debug_Lines; --------------------- -- Build_Sections -- --------------------- procedure Build_Sections (Exec : in out Elf_Exe_File_Type) is Shdr : Elf_Shdr_Acc; Addr : Pc_Type; Last : Pc_Type; Offset : Pc_Type; Do_Reloc : Boolean; begin -- Return now if already built if not Exec.Desc_Sets (Section_Addresses).Is_Empty then return; end if; -- Iterate over all section headers Offset := 0; Do_Reloc := Get_Ehdr (Exec.Elf_File).E_Type = ET_REL; if Do_Reloc then Enable_Section_Relocation (Exec.Elf_File); end if; for Idx in 0 .. Get_Shdr_Num (Exec.Elf_File) - 1 loop Shdr := Get_Shdr (Exec.Elf_File, Idx); -- Only A+X sections are interesting. if (Shdr.Sh_Flags and (SHF_ALLOC or SHF_EXECINSTR)) = (SHF_ALLOC or SHF_EXECINSTR) and then (Shdr.Sh_Type = SHT_PROGBITS) and then Shdr.Sh_Size > 0 then Addr := Pc_Type (Shdr.Sh_Addr + Offset); Last := Pc_Type (Shdr.Sh_Addr + Offset + Shdr.Sh_Size - 1); if Do_Reloc then -- Relocate the sections, so that they won't overlap. -- This is when the executable is a partially linked -- with section per function binary (such as VxWorks DKM). -- -- Note that section are not slided by Exe_Text_Start ??? Shdr.Sh_Addr := Shdr.Sh_Addr + Offset; Offset := (Last + Shdr.Sh_Addralign - 1) and not (Shdr.Sh_Addralign - 1); end if; Insert (Exec.Desc_Sets (Section_Addresses), new Address_Info' (Kind => Section_Addresses, First => Addr, Last => Last, Parent => null, Section_Name => new String'( Get_Shdr_Name (Exec.Elf_File, Idx)), Section_Sec_Idx => Section_Index (Idx), Section_Content => Invalid_Binary_Content, Section_Region => Invalid_Mapped_Region)); end if; end loop; end Build_Sections; procedure Build_Sections (Exec : in out PE_Exe_File_Type) is use Coff; Scn : Scnhdr; Addr : Pc_Type; Last : Pc_Type; begin -- Return now if already built if not Exec.Desc_Sets (Section_Addresses).Is_Empty then return; end if; -- Iterate over all section headers for Idx in 0 .. Get_Nbr_Sections (Exec.PE_File) - 1 loop Scn := Get_Scnhdr (Exec.PE_File, Idx); -- Only TEXT sections are interesting. if (Scn.S_Flags and STYP_TEXT) /= 0 and then Scn.S_Size > 0 then Addr := Pc_Type (Scn.S_Vaddr) + Get_Image_Base (Exec.PE_File); Last := Addr + Get_Section_Length (Exec.PE_File, Idx) - 1; Insert (Exec.Desc_Sets (Section_Addresses), new Address_Info' (Kind => Section_Addresses, First => Addr, Last => Last, Parent => null, Section_Name => new String'( Get_Section_Name (Exec.PE_File, Idx)), Section_Sec_Idx => Section_Index (Idx), Section_Content => Invalid_Binary_Content, Section_Region => Invalid_Mapped_Region)); end if; end loop; end Build_Sections; -------------- -- Get_Sloc -- -------------- function Get_Sloc (Set : Address_Info_Sets.Set; PC : Pc_Type) return Source_Location is SL : constant Source_Locations := Get_Slocs (Set, PC, Non_Empty_Only => True); begin if SL'Length = 0 then return Slocs.No_Location; else pragma Assert (SL'Length = 1); return SL (1); end if; end Get_Sloc; --------------- -- Get_Slocs -- --------------- function Get_Slocs (Set : Address_Info_Sets.Set; PC : Pc_Type; Non_Empty_Only : Boolean := False) return Source_Locations is use Address_Info_Sets; Line_Infos : constant Address_Info_Arr := Get_Address_Infos (Set, Line_Addresses, PC); Result : Source_Locations (1 .. Natural (Line_Infos'Length)); Last : Natural := Result'First - 1; begin for Addr_Info of Line_Infos loop if not Empty_Range (Addr_Info.all) and then (Addr_Info.Is_Non_Empty or else not Non_Empty_Only) then Last := Last + 1; Result (Last) := Addr_Info.Sloc; end if; end loop; return Result (Result'First .. Last); end Get_Slocs; --------------------- -- Get_Call_Target -- --------------------- function Get_Call_Target (Exec : Exe_File_Type; PC : Pc_Type; Call_Len : Pc_Type) return Pc_Type is use Call_Site_To_Target_Maps; Cur : constant Cursor := Exec.Call_Site_To_Target.Find (PC + Call_Len); begin if Cur = No_Element then return No_PC; else return Element (Cur); end if; end Get_Call_Target; ---------------------- -- Get_Compile_Unit -- ---------------------- procedure Get_Compile_Unit (Exec : Exe_File_Type; PC : Pc_Type; CU_Filename, CU_Directory : out String_Access) is use Compile_Unit_Vectors; CU_Info : constant Address_Info_Acc := Get_Address_Info (Exec, Compilation_Unit_Addresses, PC); CU_Id : DIE_CU_Id := No_DIE_CU_Id; begin -- See if we match a compile unit first, then fallback on searching at -- the subprogram level. if CU_Info = null then declare Subp_Info : constant Address_Info_Acc := Get_Address_Info (Exec, Subprogram_Addresses, PC); begin CU_Id := (if Subp_Info = null then No_DIE_CU_Id else Subp_Info.Subprogram_DIE_CU); end; else CU_Id := CU_Info.DIE_CU; end if; if CU_Id = No_DIE_CU_Id then CU_Filename := null; CU_Directory := null; else declare CU : Compile_Unit_Desc renames Exec.Compile_Units.Element (CU_Id); begin CU_Filename := CU.Compile_Unit_Filename; CU_Directory := CU.Compilation_Directory; end; end if; end Get_Compile_Unit; -------------------------- -- Load_Section_Content -- -------------------------- procedure Load_Section_Content (Exec : Exe_File_Type; Sec : Address_Info_Acc) is Len : Elf_Addr; begin if not Is_Loaded (Sec.Section_Content) then Alloc_And_Load_Section (Exec, Sec.Section_Sec_Idx, Len, Sec.Section_Content, Sec.Section_Region); Relocate (Sec.Section_Content, Sec.First); end if; end Load_Section_Content; -------------------------- -- Load_Code_And_Traces -- -------------------------- procedure Load_Code_And_Traces (Exec : Exe_File_Acc; Base : access Traces_Base) is use Address_Info_Sets; Cur : Cursor; Sym : Address_Info_Acc; Sec : Address_Info_Acc; Subp_Key : Traces_Names.Subprogram_Key; begin if Is_Empty (Exec.Desc_Sets (Symbol_Addresses)) then return; end if; -- Iterate on symbols Cur := Exec.Desc_Sets (Symbol_Addresses).First; while Cur /= No_Element loop Sym := Element (Cur); -- If the symbol is not to be covered, skip it if Traces_Names.Is_Routine_Of_Interest (Sym.Symbol_Name.all) then -- Be sure the section is loaded Sec := Sym.Parent; Load_Section_Content (Exec.all, Sec); -- Add the code and trace information to the symbol's entry in the -- routines database. Traces_Names.Key_From_Symbol (Exec, Sym, Subp_Key); Traces_Names.Add_Routine (Subp_Key, Exec, Sec.Section_Sec_Idx); begin Traces_Names.Add_Code_And_Traces (Subp_Key, Exec, Slice (Sec.Section_Content, Sym.First, Sym.Last), Base); exception when others => Disp_Address (Sym); raise; end; end if; Next (Cur); end loop; end Load_Code_And_Traces; ------------------------------------ -- Build_Source_Lines_For_Section -- ------------------------------------ procedure Build_Source_Lines_For_Section (Exec : Exe_File_Acc; Base : Traces_Base_Acc; Section : Binary_Content) is use Address_Info_Sets; First_Subp : constant Cursor := Find_Address_Info (Exec.Desc_Sets (Subprogram_Addresses), Subprogram_Addresses, Section.First); -- First subprogram to iterate on, used in Iterate_On_Lines. This is the -- subprogram with lowest start address that is strictly greater than -- Section.First - 1. Line_Counts : array (Source_File_Index range Files_Table.First_File .. Files_Table.Last_File) of Natural := (others => 0); -- For each source file, used to store the index of the last referenced -- line. procedure Iterate_On_Lines (Process : not null access procedure (Line_Info : Address_Info_Acc)); -- Call Process on all lines from all subprograms in Section procedure Prealloc_Lines (Line_Info : Address_Info_Acc); -- Helper used to fill Line_Counts. Set the line count for corresponding -- file to the greatest one seen. procedure Build_Source_Line (Line_Info : Address_Info_Acc); -- Helper used to actually build source lines in internal data -- structures. ---------------------- -- Iterate_On_Lines -- ---------------------- procedure Iterate_On_Lines (Process : not null access procedure (Line_Info : Address_Info_Acc)) is Subprg_Cur : Cursor := First_Subp; Subprg : Address_Info_Acc; begin -- If Find_Address_Info returned a cursor to an element that is -- before Section, then the first subprogram we are interested in -- (if any) is just after. if Has_Element (Subprg_Cur) and then Element (Subprg_Cur).First < Section.First then Next (Subprg_Cur); end if; while Has_Element (Subprg_Cur) loop Subprg := Element (Subprg_Cur); pragma Assert (Subprg.First >= Section.First); -- Stop on the first subprogram that is past Section (i.e. whose -- First address is in Section'Range). exit when Subprg.First > Section.Last; for Line of Subprg.Lines loop Process (Line); end loop; Next (Subprg_Cur); end loop; end Iterate_On_Lines; -------------------- -- Prealloc_Lines -- -------------------- procedure Prealloc_Lines (Line_Info : Address_Info_Acc) is Sloc : Source_Location renames Line_Info.Sloc; begin Line_Counts (Sloc.Source_File) := Natural'Max (Line_Counts (Sloc.Source_File), Sloc.L.Line); end Prealloc_Lines; ----------------------- -- Build_Source_Line -- ----------------------- procedure Build_Source_Line (Line_Info : Address_Info_Acc) is Init_Line_State : constant Line_State := (if Base = null then No_Code else Get_Line_State (Base.all, Line_Info.First, Line_Info.Last)); begin Add_Line_For_Object_Coverage (Line_Info.Sloc.Source_File, Init_Line_State, Line_Info.Sloc.L.Line, Line_Info, Base, Exec); end Build_Source_Line; -- Start of processing for Build_Source_Lines_For_Section begin if Object_Coverage_Enabled then -- Optimisation: first preallocate line tables Iterate_On_Lines (Prealloc_Lines'Access); for File_Index in Line_Counts'Range loop if Line_Counts (File_Index) > 0 then Expand_Line_Table (File_Index, Line_Counts (File_Index)); end if; end loop; -- Then actually build source lines Iterate_On_Lines (Build_Source_Line'Access); end if; end Build_Source_Lines_For_Section; -------------------- -- Set_Insn_State -- -------------------- procedure Set_Insn_State (Base : in out Traces_Base; Section : Binary_Content; I_Ranges : Insn_Set_Ranges; Last_Executed : out Pc_Type) is use Address_Info_Sets; function Coverage_State (State : Insn_State) return Insn_State; -- Given the branch coverage state of an instruction, return the state -- that corresponds to the actual coverage action xcov is performing. -------------------- -- Coverage_State -- -------------------- function Coverage_State (State : Insn_State) return Insn_State is begin if Enabled (Insn) then -- Instruction coverage; no need to trace which ways a branch -- has been covered. if State = Branch_Taken or else State = Both_Taken or else State = Fallthrough_Taken then return Covered; else return State; end if; else -- Branch coverage; nothing to do. -- In any other case (source coverage), the actual state will be -- computed later, based on the branch coverage results and -- the source coverage obligations. -- Later = where??? return State; end if; end Coverage_State; It : Entry_Iterator; Trace : Trace_Entry; Last_Pc_1, Last_Pc_2 : Pc_Type; Last_Insn_1_Len, Last_Insn_2_Len : Pc_Type; -- Addresses and length of the (respectively) penultimate and last -- instructions of the current trace entry. Is_Cond : Boolean; First_Cond_Pc : Pc_Type; First_Cond_Len : Pc_Type; Cond_State : Insn_State; Cache : Insn_Set_Cache := Empty_Cache; Next_Pc : Pc_Type; -- Temporary instruction address, used only when looking for last -- instructions. Branch : Branch_Kind; Flag_Indir : Boolean; Branch_Dest, FT_Dest : Dest; -- Unused, but mandatory arguments when getting instructions properties Disa : access Disassembler'Class; -- Start of processing for Set_Insn_State begin Last_Executed := No_PC; Init_Post (Base, It, Section.First); Get_Next_Trace (Trace, It); while Trace /= Bad_Trace loop Last_Executed := Trace.Last; -- First, search the two last instructions (two to handle the delay -- slot if needed). Last_Pc_1 := No_PC; Last_Pc_2 := Trace.First; loop Disa := Disa_For_Machine (Machine, I_Ranges, Cache, Last_Pc_2); Last_Insn_2_Len := Pc_Type (Disa.Get_Insn_Length (Slice (Section, Last_Pc_2, Trace.Last))); Next_Pc := Last_Pc_2 + Last_Insn_2_Len; exit when Next_Pc = Trace.Last + 1; -- Crash if something got wrong... We should arrive right after -- the end of the trace entry instructions range. if Next_Pc > Trace.Last then raise Program_Error; end if; Last_Pc_1 := Last_Pc_2; Last_Insn_1_Len := Last_Insn_2_Len; Last_Pc_2 := Next_Pc; end loop; -- Then take (into First_Cond_Pc and First_Cond_Len) the first -- conditionally executed instruction of these two. -- Note: if there is no delay slot (like in x86* or in PowerPC), the -- penultimate instruction will not be a conditionnal one anyway: -- traces are basic blocks or splitted ones, so there is at most one -- conditionnal expression per trace, and if there is one, it is at -- the end of the trace. First_Cond_Pc := No_PC; if Last_Pc_1 /= No_PC then Disa.Get_Insn_Properties (Slice (Section, Last_Pc_1, Last_Pc_1 + Last_Insn_1_Len - 1), Last_Pc_1, Branch, Flag_Indir, Is_Cond, Branch_Dest, FT_Dest); if Is_Cond then First_Cond_Pc := Last_Pc_1; First_Cond_Len := Last_Insn_1_Len; end if; end if; if First_Cond_Pc = No_PC then Disa.Get_Insn_Properties (Slice (Section, Last_Pc_2, Last_Pc_2 + Last_Insn_2_Len - 1), Last_Pc_2, Branch, Flag_Indir, Is_Cond, Branch_Dest, FT_Dest); First_Cond_Pc := Last_Pc_2; First_Cond_Len := Last_Insn_2_Len; end if; -- Tag the code before the first branch as covered, and split the -- condition away if needed: unconditionnal and conditionnal -- instructions can have a different coverage states. if Is_Cond and then First_Cond_Pc > Trace.First then Split_Trace (Base, It, First_Cond_Pc - 1, Coverage_State (Covered)); else Update_State (Base, It, Coverage_State (Covered)); end if; -- If there is a conditionnal instruction at all, compute its state if Is_Cond then case Trace.Op and 2#111# is when 0 => Cond_State := Covered; when 1 => Cond_State := Branch_Taken; when 2 => Cond_State := Fallthrough_Taken; when 3 => Cond_State := Both_Taken; when others => raise Program_Error with ("Invalid flags combination: " & Unsigned_8'Image (Trace.Op)); end case; Update_State (Base, It, Coverage_State (Cond_State)); -- And if the conditionnal was the penultimate instruction of the -- original trace, split it again to tag the last instruction as -- covered: when there is a delay slot, there cannot be two -- consecutive branch instructions. if First_Cond_Pc = Last_Pc_1 then Split_Trace (Base, It, First_Cond_Pc + First_Cond_Len - 1, Coverage_State (Cond_State)); Update_State (Base, It, Coverage_State (Covered)); end if; end if; Get_Next_Trace (Trace, It); end loop; end Set_Insn_State; --------------------------- -- Build_Insn_Set_Ranges -- --------------------------- procedure Build_Insn_Set_Ranges (Exec : in out Exe_File_Type'Class; Mapping_Symbols : Mapping_Symbol_Sets.Set; Section : Address_Info_Acc) is Sec_Idx : constant Section_Index := Section.Section_Sec_Idx; I_Ranges : constant Insn_Set_Ranges_Acc := new Insn_Set_Ranges; Current_Insn_Set : Insn_Set_Type := Default; First_Addr : Pc_Type := Section.First; begin Exec.Insn_Set_Ranges.Insert (Sec_Idx, I_Ranges); for Sym of Mapping_Symbols loop if Sym.Insn_Set /= Current_Insn_Set then if Current_Insn_Set /= Default and then Sym.Address /= First_Addr then Add_Range (I_Ranges.all, First_Addr, Sym.Address - 1, Current_Insn_Set); end if; First_Addr := Sym.Address; Current_Insn_Set := Sym.Insn_Set; end if; end loop; if Current_Insn_Set /= Default then Add_Range (I_Ranges.all, First_Addr, Section.Last, Current_Insn_Set); end if; end Build_Insn_Set_Ranges; ------------------- -- Build_Symbols -- ------------------- procedure Build_Symbols (Exec : in out Elf_Exe_File_Type) is use Address_Info_Sets; type Addr_Info_Acc_Arr is array (0 .. Get_Shdr_Num (Exec.Elf_File)) of Address_Info_Acc; Sections_Info : Addr_Info_Acc_Arr := (others => null); Sec : Address_Info_Acc; type Mapping_Symbols_Arr is array (0 .. Get_Shdr_Num (Exec.Elf_File)) of Mapping_Symbol_Sets.Set; Mapping_Symbols : Mapping_Symbols_Arr; Symtab_Base : Address; Do_Reloc : Boolean; Strtab_Idx : Elf_Half; Strtab_Len : Elf_Addr; Strtabs : Binary_Content; Strtabs_Region : Mapped_Region; ESym : Elf_Sym; Offset : Pc_Type; Sym_Type : Unsigned_8; Sym : Address_Info_Acc; Cur : Cursor; Ok : Boolean; -- Start of processing for Build_Symbols begin -- Build_Sections must be called before if Exec.Desc_Sets (Section_Addresses).Is_Empty then return; end if; if not Exec.Desc_Sets (Symbol_Addresses).Is_Empty then return; end if; -- Fill the Sections_Info array Cur := First (Exec.Desc_Sets (Section_Addresses)); while Has_Element (Cur) loop Sec := Element (Cur); Sections_Info (Elf_Half (Sec.Section_Sec_Idx)) := Sec; Next (Cur); end loop; -- Load symtab and strtab if Exec.Sec_Symtab = SHN_UNDEF then return; end if; Load_Symtab (Exec); Symtab_Base := Address_Of (Exec.Symtab, 0); Strtab_Idx := Get_Strtab_Idx (Exec); if Strtab_Idx = SHN_UNDEF then return; end if; Alloc_And_Load_Section (Exec, Section_Index (Strtab_Idx), Strtab_Len, Strtabs, Strtabs_Region); Do_Reloc := Get_Ehdr (Exec.Elf_File).E_Type = ET_REL; Offset := Exec.Exe_Text_Start; for I in 1 .. Exec.Nbr_Symbols loop ESym := Get_Sym (Exec.Elf_File, Symtab_Base + Storage_Offset ((I - 1) * Elf_Sym_Size)); Sym_Type := Elf_St_Type (ESym.St_Info); if (Sym_Type = STT_FUNC or else Sym_Type = STT_NOTYPE) and then ESym.St_Shndx in Sections_Info'Range and then Sections_Info (ESym.St_Shndx) /= null and then ESym.St_Size > 0 then if Do_Reloc then -- Relocate symbols Offset := Exec.Exe_Text_Start + Sections_Info (ESym.St_Shndx).First; end if; Sym := new Address_Info' (Kind => Symbol_Addresses, First => Offset + Pc_Type (ESym.St_Value), Last => Offset + Pc_Type (ESym.St_Value + Elf_Addr (ESym.St_Size) - 1), Parent => Sections_Info (ESym.St_Shndx), Symbol_Name => new String' (Read_String (Address_Of (Strtabs, Elf_Addr (ESym.St_Name)))), others => <>); -- On ARM, the low address bit is used to distinguish ARM and -- Thumb instructions but it must be discarded when dealing -- with memory. if Get_Machine (Exec) = EM_ARM and (Sym.First and 1) = 1 then Sym.First := Sym.First - 1; Sym.Last := Sym.Last - 1; end if; Address_Info_Sets.Insert (Exec.Desc_Sets (Symbol_Addresses), Sym, Cur, Ok); end if; -- We might need to resolve function symbols even when they belong to -- no section (external) in the current compile unit. if (Sym_Type = STT_FUNC or else Sym_Type = STT_NOTYPE) and then Elf_St_Bind (ESym.St_Info) = STB_GLOBAL then declare use Ada.Strings.Fixed; Name : constant String := Read_String (Address_Of (Strtabs, Elf_Addr (ESym.St_Name))); At_Index : Natural := Index (Name, "@@", Name'First); begin -- If there is a "@@" pattern and if it does not start the -- symbol name, strip it and the right part of the symbol name. if At_Index = 1 or else At_Index = 0 then At_Index := Name'Last + 1; end if; Exec.Symbol_To_PC.Insert (To_Symbol (Name (1 .. At_Index - 1)), Offset + Pc_Type (ESym.St_Value)); end; end if; if ELF_Machine = EM_ARM and then Sym_Type = STT_NOTYPE and then Elf_St_Bind (ESym.St_Info) = STB_LOCAL then declare Name : constant String := Read_String (Address_Of (Strtabs, Elf_Addr (ESym.St_Name))); begin if Name'Length >= 2 and then Name (1) = '$' then if ESym.St_Size /= 0 then raise Program_Error with "Illegal mapping symbol (size not null)"; elsif not (Name (2) in 'a' | 'd' | 't') or else (Name'Length > 2 and then Name (3) /= '.') then raise Program_Error with "Illegal mapping symbol (invalid name)"; end if; declare Mapping : Mapping_Symbol_Sets.Set renames Mapping_Symbols (ESym.St_Shndx); Symbol : constant Mapping_Symbol := ((Address => ESym.St_Value, Insn_Set => (case Name (2) is when 'a' => ARM, when 'd' => Data, when 't' => Thumb, when others => raise Program_Error))); Position : Mapping_Symbol_Sets.Cursor; Inserted : Boolean; begin Mapping.Insert (Symbol, Position, Inserted); -- Having multiple mapping symbols at the same address -- can happen: just check that they are not inconsistent. if not Inserted and then (Mapping_Symbol_Sets.Element (Position).Insn_Set /= Symbol.Insn_Set) then raise Program_Error with ("Inconsistent mapping symbols at " & Hex_Image (ESym.St_Value)); end if; end; end if; end; end if; end loop; for Section_Index in Mapping_Symbols_Arr'Range loop if Sections_Info (Section_Index) /= null then Build_Insn_Set_Ranges (Exec, Mapping_Symbols (Section_Index), Sections_Info (Section_Index)); end if; end loop; Free (Strtabs_Region); end Build_Symbols; ------------------- -- Build_Symbols -- ------------------- procedure Build_Symbols (Exec : in out PE_Exe_File_Type) is use Address_Info_Sets; type Addr_Info_Acc_Arr is array (0 .. Get_Nbr_Sections (Exec.File.all)) of Address_Info_Acc; Sections_Info : Addr_Info_Acc_Arr := (others => null); Sec : Address_Info_Acc; Sym : Address_Info_Acc; Cur : Cursor; Ok : Boolean; begin -- Build_Sections must be called before if Exec.Desc_Sets (Section_Addresses).Is_Empty then return; end if; if not Exec.Desc_Sets (Symbol_Addresses).Is_Empty then return; end if; -- Fill Sections_Info Cur := First (Exec.Desc_Sets (Section_Addresses)); while Has_Element (Cur) loop Sec := Element (Cur); Sections_Info (Sec.Section_Sec_Idx + 1) := Sec; Next (Cur); end loop; declare function To_Address is new Ada.Unchecked_Conversion (Str_Access, Address); Syms : constant Mapped_Region := Get_Symbols (Exec.PE_File); Syms_Base : constant Address := To_Address (Data (Syms)); Nbr_Syms : constant Unsigned_32 := Get_Hdr (Exec.PE_File).F_Nsyms; I : Unsigned_32; begin I := 0; while I < Nbr_Syms loop declare use Coff; S : Syment; for S'Address use Syms_Base + Storage_Offset (I * Symesz); pragma Import (Ada, S); begin if S.E_Type = 16#20# then -- A function Sec := Sections_Info (Section_Index (S.E_Scnum)); if Sec /= null then Sym := new Address_Info' (Kind => Symbol_Addresses, First => Sec.First + Pc_Type (S.E_Value), Last => Sec.First + Pc_Type (S.E_Value + 1), Parent => Sec, Symbol_Name => new String' (Get_Symbol_Name (Exec.PE_File, S)), others => <>); Address_Info_Sets.Insert (Exec.Desc_Sets (Symbol_Addresses), Sym, Cur, Ok); end if; end if; I := I + 1 + Unsigned_32 (S.E_Numaux); end; end loop; end; -- Set range on symbols. We assume there is no hole: additional -- instructions are there for padding. Padding is an issue for -- consolidation, but we have a dedicated machinery to deal with it in -- Traces_Names. declare Prev : Address_Info_Acc; Prev_Cur : Cursor; begin Cur := First (Exec.Desc_Sets (Symbol_Addresses)); if Has_Element (Cur) then Prev := Element (Cur); Prev_Cur := Cur; Next (Cur); while Has_Element (Cur) loop Sym := Element (Cur); if Prev.First = Sym.First then -- Symbol is empty. Remove it. Address_Info_Sets.Delete (Exec.Desc_Sets (Symbol_Addresses), Prev_Cur); else Prev.Last := Sym.First - 1; end if; Prev := Sym; Prev_Cur := Cur; Next (Cur); end loop; end if; -- Don't forget the range for last symbol: span it until the end of -- the corresponding section. Cur := Last (Exec.Desc_Sets (Symbol_Addresses)); if Has_Element (Cur) then Sym := Element (Cur); Sym.Last := Sym.Parent.Last; end if; end; end Build_Symbols; ---------------------- -- Get_Address_Info -- ---------------------- function Get_Address_Info (Set : Address_Info_Sets.Set; Kind : Address_Info_Kind; PC : Pc_Type) return Address_Info_Acc is Addr_Infos : constant Address_Info_Arr := Get_Address_Infos (Set, Kind, PC); begin if Addr_Infos'Length = 0 then return null; else return Addr_Infos (Addr_Infos'First); end if; end Get_Address_Info; function Get_Address_Info (Exec : Exe_File_Type; Kind : Address_Info_Kind; PC : Pc_Type) return Address_Info_Acc is (Get_Address_Info (Get_Desc_Set (Exec, Kind, PC).all, Kind, PC)); ----------------------- -- Get_Address_Infos -- ----------------------- type AI_Cache_Entry is record Last : Address_Info_Sets.Cursor; Last_Set : access constant Address_Info_Sets.Set; Last_Info : Address_Info_Acc; end record; AI_Cache : array (Address_Info_Kind) of AI_Cache_Entry; function Get_Address_Infos (Set : Address_Info_Sets.Set; Kind : Address_Info_Kind; PC : Pc_Type) return Address_Info_Arr is use Address_Info_Sets; Cache : AI_Cache_Entry renames AI_Cache (Kind); Prev, Last : Cursor; Count : Natural := 0; begin -- First check whether results for the last lookup still match if Cache.Last /= No_Element and then Set'Unchecked_Access = Cache.Last_Set and then (PC in Cache.Last_Info.First .. Cache.Last_Info.Last or else PC = Cache.Last_Info.First) then -- Cache hit Bump (Addr_Map_Cache_Hit); pragma Assert (Cache.Last = Find_Address_Info (Set, Kind, PC)); else -- Cache miss Bump (Addr_Map_Cache_Miss); Cache.Last := No_Element; end if; if Cache.Last = No_Element then -- Cache entry is stale, perform lookup again (note: the call to -- Floor is costly). Cache.Last := Find_Address_Info (Set, Kind, PC); if Cache.Last /= No_Element then Cache.Last_Info := Element (Cache.Last); Cache.Last_Set := Set'Unchecked_Access; end if; end if; Last := Cache.Last; Prev := Last; loop exit when Prev = No_Element; declare Prev_Info : constant Address_Info_Acc := Element (Prev); begin exit when not (Prev_Info.First <= PC and then (Prev_Info.First > Prev_Info.Last or else Prev_Info.Last >= PC)); end; Count := Count + 1; Previous (Prev); end loop; return Result : Address_Info_Arr (1 .. Count) do while Count > 0 loop Result (Count) := Element (Last); Previous (Last); Count := Count - 1; end loop; end return; end Get_Address_Infos; function Get_Address_Infos (Exec : Exe_File_Type; Kind : Address_Info_Kind; PC : Pc_Type) return Address_Info_Arr is (Get_Address_Infos (Get_Desc_Set (Exec, Kind, PC).all, Kind, PC)); ---------------- -- Get_Symbol -- ---------------- function Get_Symbol (Exec : Exe_File_Type; PC : Pc_Type) return Address_Info_Acc is begin return Get_Address_Info (Exec, Symbol_Addresses, PC); end Get_Symbol; --------------- -- Symbolize -- --------------- overriding function Symbolize (Sym : Exe_File_Type; Pc : Pc_Type) return String is Info : constant Address_Info_Acc := Get_Symbol (Sym, Pc); begin if Info = null or else Info.Symbol_Name = null then return ""; else return Info.Symbol_Name.all; end if; end Symbolize; procedure Symbolize (Sym : Exe_File_Type; Pc : Traces.Pc_Type; Buffer : in out Highlighting.Buffer_Type) is use Highlighting; Symbol : constant Address_Info_Acc := Get_Symbol (Sym, Pc); -- Start of processing for Symbolize begin if Symbol = null then return; end if; Buffer.Start_Token (Text); Buffer.Put (' '); Buffer.Start_Token (Punctuation); Buffer.Put ('<'); Buffer.Start_Token (Highlighting.Name); Buffer.Put (Symbol.Symbol_Name.all); if Pc /= Symbol.First then Buffer.Start_Token (Punctuation); Buffer.Put ('+'); Buffer.Start_Token (Literal); Buffer.Put (Hex_Image (Pc - Symbol.First)); end if; Buffer.Start_Token (Punctuation); Buffer.Put ('>'); end Symbolize; ------------------- -- Init_Iterator -- ------------------- procedure Init_Iterator (Exe : Exe_File_Type; Kind : Address_Info_Kind; It : out Addresses_Iterator) is use Address_Info_Sets; begin It.Cur := Exe.Desc_Sets (Kind).First; end Init_Iterator; ------------------- -- Next_Iterator -- ------------------- procedure Next_Iterator (It : in out Addresses_Iterator; Addr : out Address_Info_Acc) is use Address_Info_Sets; begin if It.Cur = No_Element then Addr := null; else Addr := Element (It.Cur); Next (It.Cur); end if; end Next_Iterator; ------------------------ -- Build_Source_Lines -- ------------------------ procedure Build_Source_Lines is use Traces_Names; procedure Build_Source_Lines_For_Routine (Key : Subprogram_Key; Info : in out Subprogram_Info); -- Build source line information from debug information for the given -- routine. ------------------------------------ -- Build_Source_Lines_For_Routine -- ------------------------------------ procedure Build_Source_Lines_For_Routine (Key : Subprogram_Key; Info : in out Subprogram_Info) is pragma Unreferenced (Key); begin if Info.Exec /= null and then Is_Loaded (Info.Insns) then Tag_Provider.Enter_Routine (Info); Build_Debug_Lines (Info.Exec.all); Build_Source_Lines_For_Section (Info.Exec, Info.Traces, Info.Insns); end if; end Build_Source_Lines_For_Routine; -- Start of processing for Build_Source_Lines begin Iterate (Build_Source_Lines_For_Routine'Access); end Build_Source_Lines; ------------------------------- -- Build_Routines_Insn_State -- ------------------------------- procedure Build_Routines_Insn_State is use Traces_Names; procedure Build_Routine_Insn_State (Key : Subprogram_Key; Info : in out Subprogram_Info); -- Set trace state for the given routine procedure Do_Set_Insn_State (Info : in out Subprogram_Info; Last_Executed : out Pc_Type); -- Helper to invoke Set_Insn_Trace in Build_Routine_Insn_State ------------------------------ -- Build_Routine_Insn_State -- ------------------------------ procedure Build_Routine_Insn_State (Key : Subprogram_Key; Info : in out Subprogram_Info) is pragma Unreferenced (Key); Last_Executed : Pc_Type; Padding_Found : Boolean; begin if not Is_Loaded (Info.Insns) then return; end if; Do_Set_Insn_State (Info, Last_Executed); -- If there's a chance that padding NOPs yield pessimistic object -- coverage results (because they are never executed) for this -- subprogram, try to strip them (if not already done) and recompute -- the object coverage for it. if Last_Executed < Info.Insns.Last and then not Info.Padding_Stripped and then not Has_Precise_Symbol_Size (Info.Exec.all) then Strip_Padding (Info.Exec, Info.Section, Info.Insns, Padding_Found); Info.Padding_Stripped := True; if Padding_Found then Do_Set_Insn_State (Info, Last_Executed); end if; end if; end Build_Routine_Insn_State; ----------------------- -- Do_Set_Insn_State -- ----------------------- procedure Do_Set_Insn_State (Info : in out Subprogram_Info; Last_Executed : out Pc_Type) is begin Set_Insn_State (Info.Traces.all, Info.Insns, Get_Insn_Set_Ranges (Info.Exec.all, Info.Section).all, Last_Executed); end Do_Set_Insn_State; -- Start of processing for Build_Routines_Insn_State begin Iterate (Build_Routine_Insn_State'Access); end Build_Routines_Insn_State; -------------------------- -- Disassemble_File_Raw -- -------------------------- procedure Disassemble_File_Raw (File : in out Exe_File_Type'Class) is use Address_Info_Sets; procedure Local_Disassembler (Cur : Cursor); -- Comment needed??? ------------------------ -- Local_Disassembler -- ------------------------ procedure Local_Disassembler (Cur : Cursor) is Pc : Pc_Type; Insn_Len : Natural := 0; Sec : constant Address_Info_Acc := Element (Cur); I_Ranges : Insn_Set_Ranges renames Get_Insn_Set_Ranges (File, Sec.Section_Sec_Idx).all; Cache : Insn_Set_Cache := Empty_Cache; Insns : Binary_Content; Buffer : Highlighting.Buffer_Type (128); begin Load_Section_Content (File, Sec); Put_Line ("section " & Sec.Section_Name.all); Insns := Sec.Section_Content; Pc := Insns.First; while Pc <= Insns.Last loop Put (Hex_Image (Pc)); Put (":"); Put (ASCII.HT); Buffer.Reset; Disa_For_Machine (Machine, I_Ranges, Cache, Pc). Disassemble_Insn (Slice (Insns, Pc, Insns.Last), Pc, Buffer, Insn_Len, File); for I in Pc .. Pc + Pc_Type (Insn_Len - 1) loop Put (Hex_Image (Get (Insns, I))); Put (' '); end loop; for I in Insn_Len .. 3 loop Put (" "); end loop; Put (" "); Put (Buffer.Get_Raw); New_Line; Pc := Pc + Pc_Type (Insn_Len); exit when Pc = 0; end loop; end Local_Disassembler; -- Start of processing for Disassemble_File_Raw begin Build_Sections (File); Build_Symbols (File); File.Desc_Sets (Section_Addresses).Iterate (Local_Disassembler'Access); end Disassemble_File_Raw; ---------------------- -- Disassemble_File -- ---------------------- procedure Disassemble_File (File : in out Exe_File_Type) is use Address_Info_Sets; Cur : Cursor; Sec : Address_Info_Acc; I_Ranges : Insn_Set_Ranges_Cst_Acc; Addr : Pc_Type; Cur_Subprg : Cursor; Subprg : Address_Info_Acc; Cur_Symbol : Cursor; Symbol : Address_Info_Acc; Last_Addr : Pc_Type; begin Cur := First (File.Desc_Sets (Section_Addresses)); if not Is_Empty (File.Desc_Sets (Subprogram_Addresses)) then Cur_Subprg := First (File.Desc_Sets (Subprogram_Addresses)); Subprg := Element (Cur_Subprg); else Subprg := null; end if; if not Is_Empty (File.Desc_Sets (Symbol_Addresses)) then Cur_Symbol := First (File.Desc_Sets (Symbol_Addresses)); Symbol := Element (Cur_Symbol); else Symbol := null; end if; while Cur /= No_Element loop Sec := Element (Cur); Load_Section_Content (File, Sec); I_Ranges := Get_Insn_Set_Ranges (File, Sec.Section_Sec_Idx); -- Display section name Put ("Section "); Put (Sec.Section_Name.all); Put (':'); if Sec.Section_Name'Length < 16 then Put ((1 .. 16 - Sec.Section_Name'Length => ' ')); end if; Put (' '); Put (Hex_Image (Sec.First)); Put ('-'); Put (Hex_Image (Sec.Last)); New_Line; Addr := Sec.First; Last_Addr := Sec.Last; -- Search next matching symbol while Symbol /= null and then Addr > Symbol.First loop Next (Cur_Symbol); if Cur_Symbol = No_Element then Symbol := null; exit; end if; Symbol := Element (Cur_Symbol); end loop; -- Iterate on addresses range for this section while Addr <= Sec.Last loop Last_Addr := Sec.Last; -- Look for the next subprogram while Subprg /= null and then Addr > Subprg.Last loop Next (Cur_Subprg); if Cur_Subprg = No_Element then Subprg := null; exit; end if; Subprg := Element (Cur_Subprg); end loop; -- Display subprogram name if Subprg /= null then if Addr = Subprg.First then New_Line; Put ('<'); Put (Subprg.Subprogram_Name.all); Put ('>'); end if; if Last_Addr > Subprg.Last then Last_Addr := Subprg.Last; end if; end if; -- Display Symbol if Symbol /= null then if Addr = Symbol.First and then (Subprg = null or else (Subprg.Subprogram_Name.all /= Symbol.Symbol_Name.all)) then Put ('<'); Put (Symbol.Symbol_Name.all); Put ('>'); if Subprg = null or else Subprg.First /= Addr then Put (':'); New_Line; end if; end if; while Symbol /= null and then Addr >= Symbol.First loop Next (Cur_Symbol); if Cur_Symbol = No_Element then Symbol := null; exit; end if; Symbol := Element (Cur_Symbol); end loop; if Symbol /= null and then Symbol.First < Last_Addr then Last_Addr := Symbol.First - 1; end if; end if; if Subprg /= null and then Addr = Subprg.First then Put (':'); New_Line; end if; Traces_Disa.For_Each_Insn (Slice (Sec.Section_Content, Addr, Last_Addr), I_Ranges.all, Not_Covered, Traces_Disa.Textio_Disassemble_Cb'Access, File); Addr := Last_Addr; exit when Addr = Pc_Type'Last; Addr := Addr + 1; end loop; Next (Cur); end loop; end Disassemble_File; procedure On_Elf_From (Filename : String; Cb : access procedure (Exec : in out Exe_File_Type'Class)); -- Call CB with an open executable file descriptor for FILE, -- closed on return. ----------------- -- On_Elf_From -- ----------------- procedure On_Elf_From (Filename : String; Cb : access procedure (Exec : in out Exe_File_Type'Class)) is Exec : Exe_File_Acc; begin Open_Exec (Filename, 0, Exec); -- ??? Text_Start Cb (Exec.all); Close_Exec (Filename); exception when Binary_Files.Error => Put_Line (Standard_Error, "cannot open: " & Filename); raise; end On_Elf_From; ----------------------- -- Scan_Symbols_From -- ----------------------- procedure Scan_Symbols_From (File : in out Exe_File_Type; Sym_Cb : access procedure (Sym : Address_Info_Acc); Strict : Boolean) is pragma Unreferenced (Strict); It : Addresses_Iterator; Sym : Address_Info_Acc; Sym_Copy : Address_Info (Symbol_Addresses); begin Build_Symbols (Exe_File_Type'Class (File)); Init_Iterator (File, Symbol_Addresses, It); loop Next_Iterator (It, Sym); exit when Sym = null; Sym_Copy := Sym.all; Sym_Cb (Sym_Copy'Unrestricted_Access); end loop; end Scan_Symbols_From; procedure Scan_Symbols_From (File : in out Elf_Exe_File_Type; Sym_Cb : access procedure (Sym : Address_Info_Acc); Strict : Boolean) is use Address_Info_Sets; Efile : Elf_File renames File.Elf_File; -- Corresponding Elf_File - as we do low level accesses Nbr_Shdr : constant Elf_Half := Get_Shdr_Num (Efile); type Set_Acc is access Address_Info_Sets.Set; procedure Unchecked_Deallocation is new Ada.Unchecked_Deallocation (Address_Info_Sets.Set, Set_Acc); type Set_Acc_Array is array (0 .. Nbr_Shdr) of Set_Acc; Shdr_Sets : Set_Acc_Array := (others => null); -- Addresses container for each relevant sections procedure Unchecked_Deallocation is new Ada.Unchecked_Deallocation (Address_Info, Address_Info_Acc); Shdr : Elf_Shdr_Acc; Last : Pc_Type; Addr : Pc_Type; Offset : Pc_Type; Sym : Address_Info_Acc; Cur_Sym : Address_Info_Sets.Cursor; Symtab_Len : Elf_Addr; Symtabs : Binary_Content; Symtabs_Region : Mapped_Region; Symtab_Base : Address; Strtab_Idx : Elf_Half; Strtab_Len : Elf_Addr; Strtabs : Binary_Content; Strtabs_Region : Mapped_Region; A_Sym : Elf_Sym; Sym_Name : String_Access; Sym_Type : Unsigned_8; Cur : Address_Info_Sets.Cursor; Ok : Boolean; Do_Reloc : Boolean; begin -- Search symtab and strtab, exit in case of failure if File.Sec_Symtab = SHN_UNDEF then Put_Line ("# No symbol table - file stripped ?"); return; end if; Strtab_Idx := Get_Strtab_Idx (File); if Strtab_Idx = SHN_UNDEF then Put_Line ("# no strtab for .symtab - ill formed ELF file ?"); return; end if; -- Build sets for A+X sections -- FIXME: this somewhat duplicates the logic of Build_Sections. for Idx in 0 .. Nbr_Shdr - 1 loop Shdr := Get_Shdr (Efile, Idx); -- Only A+X sections are interesting if (Shdr.Sh_Flags and (SHF_ALLOC or SHF_EXECINSTR)) = (SHF_ALLOC or SHF_EXECINSTR) and then (Shdr.Sh_Type = SHT_PROGBITS) and then Shdr.Sh_Size > 0 then Shdr_Sets (Idx) := new Address_Info_Sets.Set; end if; end loop; -- Load symtab and strtab Alloc_And_Load_Section (File, Section_Index (File.Sec_Symtab), Symtab_Len, Symtabs, Symtabs_Region); Symtab_Base := Address_Of (Symtabs, 0); Alloc_And_Load_Section (File, Section_Index (Strtab_Idx), Strtab_Len, Strtabs, Strtabs_Region); -- Walk the symtab and put interesting symbols into the containers. -- Except for warnings in strict mode, leave empty symbols alone. We'd -- need to be extra careful with the beginning or end of sections and -- we wouldn't be able to analyze much about the symbols anyway. -- FIXME: this somewhat duplicates the logic of Build_Symbols. for I in 1 .. Natural (Symtab_Len) / Elf_Sym_Size loop A_Sym := Get_Sym (Efile, Symtab_Base + Storage_Offset ((I - 1) * Elf_Sym_Size)); Sym_Type := Elf_St_Type (A_Sym.St_Info); if (Sym_Type = STT_FUNC or Sym_Type = STT_NOTYPE) and then A_Sym.St_Shndx in Shdr_Sets'Range and then Shdr_Sets (A_Sym.St_Shndx) /= null then Sym_Name := new String' (Read_String (Address_Of (Strtabs, Elf_Addr (A_Sym.St_Name)))); if A_Sym.St_Size = 0 then -- Empty symbol. Warn if requested to do so, then just release -- what we have allocated for the symbol already. if Strict then Put_Line (Standard_Error, "warning: empty symbol " & Sym_Name.all & " at " & Hex_Image (A_Sym.St_Value) & " in section " & Get_Shdr_Name (Efile, A_Sym.St_Shndx)); end if; Free (Sym_Name); else declare Sym_First : Pc_Type := Pc_Type (A_Sym.St_Value); Sym_Last : Pc_Type := Sym_First + Pc_Type (A_Sym.St_Size) - 1; begin -- On ARM, the low address bit is used to distinguish ARM -- and Thumb instructions but it must be discarded when -- dealing with memory. if Get_Machine (File) = EM_ARM and (Sym_First and 1) = 1 then Sym_First := Sym_First - 1; Sym_Last := Sym_Last - 1; end if; -- Non-empy symbol. Latch into our local container for -- processing downstream. Address_Info_Sets.Insert (Shdr_Sets (A_Sym.St_Shndx).all, new Address_Info' (Kind => Symbol_Addresses, First => Sym_First, Last => Sym_Last, Parent => null, Symbol_Name => Sym_Name, others => <>), Cur, Ok); end; if not Ok then Put_Line (Standard_Error, "symbol " & Sym_Name.all & " is an alias at " & Hex_Image (A_Sym.St_Value)); end if; end if; end if; end loop; Free (Strtabs_Region); Free (Symtabs_Region); -- Walk the sections, invoking callback or warning for symbols of -- interest as we go along. Do_Reloc := Get_Ehdr (Efile).E_Type = ET_REL; Offset := 0; for I in Shdr_Sets'Range loop if Shdr_Sets (I) /= null then Shdr := Get_Shdr (Efile, I); -- Section range Addr := Pc_Type (Shdr.Sh_Addr); Last := Pc_Type (Shdr.Sh_Addr + Shdr.Sh_Size - 1); Cur_Sym := First (Shdr_Sets (I).all); Sym := (if Has_Element (Cur_Sym) then Element (Cur_Sym) else null); -- Get the first symbol in the section if Do_Reloc then Offset := Addr; end if; while Sym /= null and then Sym.First + Offset < Addr loop -- Can this happen ? Put_Line (Standard_Error, "symbol " & Sym.Symbol_Name.all & " doesn't belong to its section " & Get_Shdr_Name (Efile, I) & " [" & Unsigned_16'Image (I) & " ]"); Free (Sym.Symbol_Name); Unchecked_Deallocation (Sym); Next (Cur_Sym); Sym := (if Has_Element (Cur_Sym) then Element (Cur_Sym) else null); end loop; -- Now, process the symbols that are in the section's range. -- We expect empty symbols to have been filtered out already. while Sym /= null and then Sym.Last + Offset <= Last loop pragma Assert (Sym.Last >= Sym.First); if Strict and then Sym.First + Offset > Addr then Put_Line (Standard_Error, "warning: no symbols for " & Hex_Image (Addr) & "-" & Hex_Image (Sym.First + Offset - 1) & " in section " & Get_Shdr_Name (Efile, I) & " [" & Unsigned_16'Image (I) & " ]"); end if; if Sym_Cb /= null then Sym_Cb.all (Sym); end if; Addr := Sym.Last + Offset; exit when Addr = Pc_Type'Last; Addr := Addr + 1; Free (Sym.Symbol_Name); Unchecked_Deallocation (Sym); Next (Cur_Sym); Sym := (if Has_Element (Cur_Sym) then Element (Cur_Sym) else null); end loop; if Strict and then Addr < Last then Put_Line (Standard_Error, "warning: no symbols for " & Hex_Image (Addr) & "-" & Hex_Image (Last) & " in section " & Get_Shdr_Name (Efile, I) & " [" & Unsigned_16'Image (I) & " ]"); end if; Unchecked_Deallocation (Shdr_Sets (I)); end if; end loop; end Scan_Symbols_From; ----------------------- -- Scan_Symbols_From -- ----------------------- procedure Scan_Symbols_From (Filename : String; Sym_Cb : access procedure (Sym : Address_Info_Acc); Strict : Boolean) is -- Bridge to the version working from an executable file descriptor procedure Process (Exec : in out Exe_File_Type'Class); procedure Process (Exec : in out Exe_File_Type'Class) is begin Scan_Symbols_From (Exec, Sym_Cb, Strict); end Process; begin On_Elf_From (Filename, Process'Access); end Scan_Symbols_From; ------------------------ -- Read_Routine_Names -- ------------------------ procedure Read_Routine_Names (File : in out Exe_File_Type'Class; Exclude : Boolean; Strict : Boolean := False) is procedure Add_Symbol (Sym : Address_Info_Acc); -- Acknowledge one SYMbol from scan on FILE, adding to or -- removing from the routines database depending on EXCLUDE. ---------------- -- Add_Symbol -- ---------------- procedure Add_Symbol (Sym : Address_Info_Acc) is begin if Exclude then Traces_Names.Remove_Routine_Of_Interest (Sym.Symbol_Name.all); else -- Read_Routine_Names is called only when the following two -- conditions are met: -- - there is only one executable -- - no list of symbols is provided -- In this specific situation (when reading the list of symbols -- from the executable), we *have to* avoid adding the same symbol -- name twice. -- if not Traces_Names.Is_Routine_Of_Interest (Sym.Symbol_Name.all) then Traces_Names.Add_Routine_Of_Interest (Sym.Symbol_Name.all); end if; -- Scan_Symbols_From is going to free this instance of Sym, so -- take the ownership of the Symbol_Name string. -- Sym.Symbol_Name := null; end if; end Add_Symbol; -- Start of processing for Read_Routine_Names begin Scan_Symbols_From (File => File, Sym_Cb => Add_Symbol'Access, Strict => Strict); end Read_Routine_Names; ------------------------ -- Read_Routine_Names -- ------------------------ procedure Read_Routine_Names (Filename : String; Exclude : Boolean; Strict : Boolean) is -- Wrapper for the version working from an executable file descriptor procedure Process (Exec : in out Exe_File_Type'Class); -- Needs comment??? ------------- -- Process -- ------------- procedure Process (Exec : in out Exe_File_Type'Class) is begin Read_Routine_Names (Exec, Exclude, Strict); end Process; -- Start of processing for Read_Routine_Names begin On_Elf_From (Filename, Process'Access); end Read_Routine_Names; ------------------------------ -- Routine_Names_From_Lines -- ------------------------------ procedure Routine_Names_From_Lines (Exec : Exe_File_Acc; Selected : not null access function (Sloc_Begin : Source_Location; Sloc_End : Source_Location) return Boolean) is use Address_Info_Sets; use Traces_Names; Symbol_Cursor : Cursor := Exec.Desc_Sets (Symbol_Addresses).First; -- The closest symbol that matches the current line address. function Get_Symbol (Line : Address_Info_Acc) return Address_Info_Acc; -- Use Symbol to get efficiently the first symbol that matches Line. -- Return this symbol, or null if there is none. ---------------- -- Get_Symbol -- ---------------- function Get_Symbol (Line : Address_Info_Acc) return Address_Info_Acc is Cur : Cursor := Symbol_Cursor; Sym : Address_Info_Acc; begin while Has_Element (Cur) loop Sym := Element (Cur); if Line.First < Sym.First then Diagnostics.Report (Exec, Line.First, "Source line belongs to no symbol", Kind => Diagnostics.Warning); exit; elsif Line.First > Sym.Last then Next (Cur); else return Sym; end if; end loop; -- No symbol was found return null; end Get_Symbol; Line_Cursor : Cursor; Sym_End_Addr : aliased Address_Info (Line_Addresses); Cached_Symbol : Address_Info_Acc; Cached_Line : Address_Info_Acc; -- Cached values for Element (Line_Cursor / Symbol_Cursor) to avoid -- costly calls to Address_Info_Sets.Element (Set, Cursor); Subp_Key : Subprogram_Key; begin for Subprg of Exec.Desc_Sets (Subprogram_Addresses) loop Line_Cursor := First (Subprg.Lines); while Has_Element (Line_Cursor) loop Cached_Line := Element (Line_Cursor); -- Find the first symbol that matches this line address, if any. -- Get the first one that is just after otherwise. while Has_Element (Symbol_Cursor) loop Cached_Symbol := Element (Symbol_Cursor); exit when Cached_Line.First <= Cached_Symbol.Last; Next (Symbol_Cursor); end loop; declare Line_Addr : constant Address_Info_Acc := Cached_Line; Sloc_Begin : constant Source_Location := Line_Addr.Sloc; Sloc_End : Source_Location; Next_Line_Cursor : Cursor; Next_Line_Addr : Address_Info_Acc; Symbol : constant Address_Info_Acc := Get_Symbol (Line_Addr); Select_Symbol : Boolean; begin -- Because of code elimination, we may have lines that -- correspond to no code; in which case Symbol can be null. In -- such a case, we just want to skip all lines that that are -- associated to this null symbol. if Symbol /= null then Next_Line_Cursor := Next (Line_Cursor); if Has_Element (Next_Line_Cursor) then -- Consider line range up to next line info if -- remaining within the same symbol. Next_Line_Addr := Element (Next_Line_Cursor); if Get_Symbol (Next_Line_Addr) = Symbol then Sloc_End := Next_Line_Addr.Sloc; else Sloc_End := Sloc_Begin; end if; else Sloc_End := Sloc_Begin; end if; -- Two different cases: -- -- * if the two consecutive slocs are in the same source -- file, we check if there is a SCO in this range. Not -- strictly correct: consider the case when a function -- declared in a package is inlined in an other function -- inside this same package; in this case, the range defined -- by two consecutive debug slocs may not correspond to -- anything relevant in the source code. This should not -- matter much though. Inlining causes other problems to -- statement coverage anyway. Plus, the consequence of this -- error will just be to include a routine in a package that -- contains SCO; that's certainly fine as, in the source -- coverage case, the routine list is mostly a way to select -- the source files to handle; if we have some SCOs in -- the file in which a routine is defined, it is certainly -- appropriate to add it to trace name database. -- -- * if the two consecutive slocs are in a different source -- file. in this case, it is never a good idea to consider -- the range of these two slocs. Deal with them separately. -- -- In any case, the whole last line is included in its range -- by taking the maximum column number. if Sloc_Begin.Source_File = Sloc_End.Source_File and then Sloc_Begin < Sloc_End then Sloc_End.L.Column := Natural'Last; Select_Symbol := Selected (Sloc_Begin, Sloc_End); else declare Sloc_End : Source_Location := Sloc_Begin; begin Sloc_End.L.Column := Natural'Last; Select_Symbol := Selected (Sloc_Begin, Sloc_End); end; declare Sloc_Begin : constant Source_Location := Sloc_End; begin Sloc_End.L.Column := Natural'Last; Select_Symbol := Select_Symbol or else Selected (Sloc_Begin, Sloc_End); end; end if; -- Now, include the symbol to the routine table if it -- is selected and not already included: if Select_Symbol then -- There can be symbols that have the same name, but that -- are different anyway. if not Is_Routine_Of_Interest (Symbol.Symbol_Name.all) then Add_Routine_Of_Interest (Symbol.Symbol_Name.all); end if; Key_From_Symbol (Exec, Symbol, Subp_Key); if not Is_In (Subp_Key) then Add_Routine (Subp_Key, Exec, Symbol.Parent.Section_Sec_Idx); Symbol.Symbol_Origin := Subp_Key.Origin; end if; -- Fast-forward to end of symbol Sym_End_Addr.First := Symbol.Last; Sym_End_Addr.Last := Symbol.Last; Line_Cursor := Subprg.Lines.Ceiling (Sym_End_Addr'Unchecked_Access); exit when not Has_Element (Line_Cursor); end if; end if; end; Next (Line_Cursor); end loop; end loop; end Routine_Names_From_Lines; ------------------------- -- Get_Insn_Set_Ranges -- ------------------------- function Get_Insn_Set_Ranges (File : Exe_File_Type; Section : Section_Index) return Insn_Set_Ranges_Cst_Acc is use Insn_Set_Ranges_Per_Section; Cur : constant Cursor := File.Insn_Set_Ranges.Find (Section); begin if Cur = No_Element then return No_Insn_Set_Ranges'Access; else return Insn_Set_Ranges_Cst_Acc (Element (Cur)); end if; end Get_Insn_Set_Ranges; ----------------------------- -- Has_Precise_Symbol_Size -- ----------------------------- function Has_Precise_Symbol_Size (File : Exe_File_Type) return Boolean is begin return File.File.all not in PE_File'Class; end Has_Precise_Symbol_Size; ------------------------ -- Find_Padding_First -- ------------------------ function Find_Padding_First (Exec : Exe_File_Acc; Section : Section_Index; Insns : Binary_Content) return Pc_Type is Disas : access Disassembler'Class; I_Ranges : Insn_Set_Ranges_Cst_Acc; Cache : Insn_Set_Cache := Empty_Cache; Insn_Set : Insn_Set_Type; First_Padding : Pc_Type := Insns.Last + 1; PC : Pc_Type := Insns.First; Insns_Slice : Binary_Content; Insn_Len : Pc_Type; begin I_Ranges := Get_Insn_Set_Ranges (Exec.all, Section); while Iterate_Over_Insns (I_Ranges.all, Cache, Insns.Last, PC, Insn_Set) loop Disas := Disa_For_Machine (Machine, Insn_Set); Insns_Slice := Slice (Insns, PC, Insns.Last); Insn_Len := Pc_Type (Disas.Get_Insn_Length (Insns_Slice)); -- Invalid code may get us past the last byte available in Insns, -- without the above function to raise an error. Do complain if it's -- the case. if Insn_Len > Insns.Last - PC + 1 then Abort_Disassembler_Error (PC, Insns_Slice, "suspicious instruction is out of bounds"); end if; -- As soon as we meet a non-padding instruction, pretend that the -- padding ones start right after. As we are going through all of -- them, we wil get the real first one in the end. if not Disas.Is_Padding (Insns, PC) then First_Padding := PC + Insn_Len; end if; PC := PC + Insn_Len; end loop; return First_Padding; end Find_Padding_First; ------------------- -- Strip_Padding -- ------------------- procedure Strip_Padding (Exec : Exe_File_Acc; Section : Section_Index; Insns : in out Binary_Content; Padding_Found : out Boolean) is Padding_First : constant Pc_Type := Find_Padding_First (Exec, Section, Insns) - 1; begin if Padding_First /= Insns.Last then Padding_Found := True; Insns.Last := Find_Padding_First (Exec, Section, Insns) - 1; else Padding_Found := False; end if; end Strip_Padding; --------------------------------- -- Platform_Independent_Symbol -- --------------------------------- function Platform_Independent_Symbol (Name : String; File : Exe_File_Type) return String is begin if File.File.all in PE_File'Class and then Name'Length > 0 and then Name (Name'First) = '_' then return Name (Name'First + 1 .. Name'Last); else return Name; end if; end Platform_Independent_Symbol; end Traces_Elf;
mirror/ncurses
Ada
6,188
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.User -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright 2020 Thomas E. Dickey -- -- Copyright 1999-2011,2014 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: Juergen Pfeifer, 1996 -- Version Control: -- $Revision: 1.24 $ -- $Date: 2020/02/02 23:34:34 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with System.Address_To_Access_Conversions; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; package body Terminal_Interface.Curses.Forms.Field_Types.User is procedure Set_Field_Type (Fld : Field; Typ : User_Defined_Field_Type) is function Allocate_Arg (T : User_Defined_Field_Type'Class) return Argument_Access; function Set_Fld_Type (F : Field := Fld; Cft : C_Field_Type := C_Generic_Type; Arg1 : Argument_Access) return Eti_Error; pragma Import (C, Set_Fld_Type, "set_field_type_user"); function Allocate_Arg (T : User_Defined_Field_Type'Class) return Argument_Access is Ptr : constant Field_Type_Access := new User_Defined_Field_Type'Class'(T); begin return new Argument'(Usr => System.Null_Address, Typ => Ptr, Cft => Null_Field_Type); end Allocate_Arg; begin Eti_Exception (Set_Fld_Type (Arg1 => Allocate_Arg (Typ))); end Set_Field_Type; package Argument_Conversions is new System.Address_To_Access_Conversions (Argument); function Generic_Field_Check (Fld : Field; Usr : System.Address) return Curses_Bool is Result : Boolean; Udf : constant User_Defined_Field_Type_Access := User_Defined_Field_Type_Access (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ); begin Result := Field_Check (Fld, Udf.all); return Curses_Bool (Boolean'Pos (Result)); end Generic_Field_Check; function Generic_Char_Check (Ch : C_Int; Usr : System.Address) return Curses_Bool is Result : Boolean; Udf : constant User_Defined_Field_Type_Access := User_Defined_Field_Type_Access (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ); begin Result := Character_Check (Character'Val (Ch), Udf.all); return Curses_Bool (Boolean'Pos (Result)); end Generic_Char_Check; -- ----------------------------------------------------------------------- -- function C_Generic_Type return C_Field_Type is Res : Eti_Error; T : C_Field_Type; begin if M_Generic_Type = Null_Field_Type then T := New_Fieldtype (Generic_Field_Check'Access, Generic_Char_Check'Access); if T = Null_Field_Type then raise Form_Exception; else Res := Set_Fieldtype_Arg (T, Make_Arg'Access, Copy_Arg'Access, Free_Arg'Access); Eti_Exception (Res); end if; M_Generic_Type := T; end if; pragma Assert (M_Generic_Type /= Null_Field_Type); return M_Generic_Type; end C_Generic_Type; end Terminal_Interface.Curses.Forms.Field_Types.User;
dshadrin/AProxy
Ada
3,269
ads
---------------------------------------- -- Copyright (C) 2019 Dmitriy Shadrin -- -- All rights reserved. -- ---------------------------------------- with Pal; use Pal; with TimeStamp; with Ada.Strings.Unbounded; with Formatted_Output; use Formatted_Output; with Formatted_Output.Integer_Output; with Formatted_Output.Enumeration_Output; -------------------------------------------------------------------------------- package Logging_Message is type ESeverity is ( eTrace, eDebug, eInfo, eTest, eWarn, eError, eCrit ); for ESeverity'Size use int8_t'Size; ----------------------------------------------------------------------------- type LogChannel is new Pal.int8_t; package Formatter_Channel is new Formatted_Output.Integer_Output (LogChannel); LOG_UNKNOWN_CHANNEL : constant LogChannel := -1; LOG_INTERNAL_CHANNEL : constant LogChannel := 0; LOG_UART_FILTERED_CHANNEL : constant LogChannel := 1; LOG_UART_RAW_CHANNEL : constant LogChannel := 2; LOG_CLIENT_CHANNEL : constant LogChannel := 3; G_TagSize : constant uint32_t := 4; G_MaxMessageSize : constant uint32_t := 4096; ----------------------------------------------------------------------------- type ELoggingMode is ( eLoggingToServer, eNoLogging ); type ELogCommand is ( eMessage, eChangeFile, eStop ); ----------------------------------------------------------------------------- type SLogPackage is record message : Ada.Strings.Unbounded.Unbounded_String; tag : String (1 .. G_TagSize); tm_stamp : TimeStamp.timespec; command : ELogCommand; severity : ESeverity; lchannel : LogChannel; end record; type SLogPackagePtr is access all SLogPackage; function "<" (lhd : access constant SLogPackage; rhd : access constant SLogPackage) return bool with inline; function "=" (lhd : access constant SLogPackage; rhd : access constant SLogPackage) return bool with inline; ----------------------------------------------------------------------------- package SP is new Smart_Ptr (TypeName => SLogPackage, SharedObject => SLogPackagePtr); subtype LogMessage is SP.Shared_Ptr; function "<" (lhd : in LogMessage; rhd : in LogMessage) return bool with inline; function "=" (lhd : in LogMessage; rhd : in LogMessage) return bool with inline; ----------------------------------------------------------------------------- procedure LOG_TRACE (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_DEBUG (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_INFO (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_TEST (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_WARN (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_ERR (tag : String; str : String; ch : LogChannel := 0) with inline; procedure LOG_CRIT (tag : String; str : String; ch : LogChannel := 0) with inline; private procedure Log (sev : ESeverity; tag : String; str : String; ch : LogChannel); end Logging_Message;
reznikmm/matreshka
Ada
294,901
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2017, Vadim Godunko <[email protected]> -- -- 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 Matreshka.Internals.Strings; package AMF.Internals.Tables.UML_String_Data_03 is -- "input_output_parameter" MS_0300 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#005F#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#005F#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "References behavior specifications owned by a classifier." MS_0301 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 57, Length => 57, Value => (16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "isLeaf" MS_0302 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 6, Length => 6, Value => (16#0069#, 16#0073#, 16#004C#, 16#0065#, 16#0061#, 16#0066#, others => 16#0000#), others => <>); -- "fork_vertex" MS_0303 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0066#, 16#006F#, 16#0072#, 16#006B#, 16#005F#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, others => 16#0000#), others => <>); -- "no_occurrence_specifications_below" MS_0304 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#006E#, 16#006F#, 16#005F#, 16#006F#, 16#0063#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#005F#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#005F#, 16#0062#, 16#0065#, 16#006C#, 16#006F#, 16#0077#, others => 16#0000#), others => <>); -- "relatedElement" MS_0305 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "Operation" MS_0306 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A class may be designated as active (i.e., each of its instances having its own thread of control) or passive (i.e., each of its instances executing within the context of some other object). A class may also specify which signals the instances of this class handle." MS_0307 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 279, Unused => 265, Length => 265, Value => (16#0041#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0028#, 16#0069#, 16#002E#, 16#0065#, 16#002E#, 16#002C#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0072#, 16#0065#, 16#0061#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#006F#, 16#006C#, 16#0029#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0070#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0028#, 16#0069#, 16#002E#, 16#0065#, 16#002E#, 16#002C#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 16#0065#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0029#, 16#002E#, 16#0020#, 16#0041#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#006C#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0068#, 16#0061#, 16#006E#, 16#0064#, 16#006C#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "collaborationUse" MS_0308 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0063#, 16#006F#, 16#006C#, 16#006C#, 16#0061#, 16#0062#, 16#006F#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0055#, 16#0073#, 16#0065#, others => 16#0000#), others => <>); -- "sending_receiving_message_event" MS_0309 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 31, Length => 31, Value => (16#0073#, 16#0065#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#0072#, 16#0065#, 16#0063#, 16#0065#, 16#0069#, 16#0076#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#006D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#005F#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "bodyCondition" MS_030A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 13, Length => 13, Value => (16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#0043#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Indicates that parameter values are passed as return values from a behavioral element back to the caller." MS_030B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 105, Length => 105, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0073#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0061#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0062#, 16#0061#, 16#0063#, 16#006B#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "derived_union_is_derived" MS_030C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0065#, 16#0064#, 16#005F#, 16#0075#, 16#006E#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0069#, 16#0073#, 16#005F#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0065#, 16#0064#, others => 16#0000#), others => <>); -- "result_is_boolean" MS_030D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#005F#, 16#0069#, 16#0073#, 16#005F#, 16#0062#, 16#006F#, 16#006F#, 16#006C#, 16#0065#, 16#0061#, 16#006E#, others => 16#0000#), others => <>); -- "The name of the NamedElement." MS_030E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 29, Length => 29, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "A send object action is an action that transmits an object to the target object, where it may invoke behavior such as the firing of state machine transitions or the execution of an activity. The value of the object is available to the execution of invoked behaviors. The requestor continues execution immediately. Any reply message is ignored and is not transmitted to the requestor." MS_030F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 399, Unused => 383, Length => 383, Value => (16#0041#, 16#0020#, 16#0073#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#006D#, 16#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#002C#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0069#, 16#006E#, 16#0076#, 16#006F#, 16#006B#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0073#, 16#0075#, 16#0063#, 16#0068#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0076#, 16#0061#, 16#0069#, 16#006C#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0069#, 16#006E#, 16#0076#, 16#006F#, 16#006B#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0073#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0071#, 16#0075#, 16#0065#, 16#0073#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0069#, 16#006E#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#006D#, 16#006D#, 16#0065#, 16#0064#, 16#0069#, 16#0061#, 16#0074#, 16#0065#, 16#006C#, 16#0079#, 16#002E#, 16#0020#, 16#0041#, 16#006E#, 16#0079#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#006C#, 16#0079#, 16#0020#, 16#006D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0069#, 16#0067#, 16#006E#, 16#006F#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#006D#, 16#0069#, 16#0074#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0071#, 16#0075#, 16#0065#, 16#0073#, 16#0074#, 16#006F#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "Control flows may not have object nodes at either end, except for object nodes with control type." MS_0310 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 97, Length => 97, Value => (16#0043#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#006F#, 16#006C#, 16#0020#, 16#0066#, 16#006C#, 16#006F#, 16#0077#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#0065#, 16#0069#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#002C#, 16#0020#, 16#0065#, 16#0078#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#006F#, 16#006C#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "has_constraining_classifier" MS_0311 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0068#, 16#0061#, 16#0073#, 16#005F#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "maximum_two_parameter_nodes" MS_0312 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#006D#, 16#0061#, 16#0078#, 16#0069#, 16#006D#, 16#0075#, 16#006D#, 16#005F#, 16#0074#, 16#0077#, 16#006F#, 16#005F#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#005F#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, others => 16#0000#), others => <>); -- "removeStructuralFeatureValueAction" MS_0313 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#0072#, 16#0065#, 16#006D#, 16#006F#, 16#0076#, 16#0065#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0046#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0056#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The multiplicity of the result output pin is 1..1." MS_0314 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 50, Length => 50, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0031#, 16#002E#, 16#002E#, 16#0031#, 16#002E#, others => 16#0000#), others => <>); -- "mustIsolate" MS_0315 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0049#, 16#0073#, 16#006F#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, others => 16#0000#), others => <>); -- "An AssociationClass cannot be defined between itself and something else." MS_0316 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 72, Length => 72, Value => (16#0041#, 16#006E#, 16#0020#, 16#0041#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0065#, 16#006C#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 16#0065#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0065#, 16#006C#, 16#0073#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A_group_inActivity" MS_0317 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#0041#, 16#005F#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#005F#, 16#0069#, 16#006E#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, others => 16#0000#), others => <>); -- "choice_vertex" MS_0318 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 13, Length => 13, Value => (16#0063#, 16#0068#, 16#006F#, 16#0069#, 16#0063#, 16#0065#, 16#005F#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, others => 16#0000#), others => <>); -- "DestroyLinkAction" MS_0319 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0044#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#004C#, 16#0069#, 16#006E#, 16#006B#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "state_is_internal" MS_031A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#005F#, 16#0069#, 16#0073#, 16#005F#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#006E#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "The query parameterableElements() returns the set of elements that may be used as the parametered elements for a template parameter of this templateable element. By default, this set includes all the owned elements. Subclasses may override this operation if they choose to restrict the set of parameterable elements." MS_031B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 327, Unused => 316, Length => 316, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0028#, 16#0029#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0042#, 16#0079#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0061#, 16#0075#, 16#006C#, 16#0074#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0063#, 16#006C#, 16#0075#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, 16#0020#, 16#0053#, 16#0075#, 16#0062#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0065#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0072#, 16#0069#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0079#, 16#0020#, 16#0063#, 16#0068#, 16#006F#, 16#006F#, 16#0073#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#0069#, 16#0063#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "The contract with which the substituting classifier complies." MS_031C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 61, Length => 61, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0074#, 16#0069#, 16#0074#, 16#0075#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0069#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "A message defines a particular communication between lifelines of an interaction." MS_031D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 87, Unused => 81, Length => 81, Value => (16#0041#, 16#0020#, 16#006D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0063#, 16#0075#, 16#006C#, 16#0061#, 16#0072#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0075#, 16#006E#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#006C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "Gate" MS_031E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 4, Length => 4, Value => (16#0047#, 16#0061#, 16#0074#, 16#0065#, others => 16#0000#), others => <>); -- "preContext" MS_031F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0070#, 16#0072#, 16#0065#, 16#0043#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, others => 16#0000#), others => <>); -- "An object node is an abstract activity node that is part of defining object flow in an activity." MS_0320 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 96, Length => 96, Value => (16#0041#, 16#006E#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0062#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0066#, 16#006C#, 16#006F#, 16#0077#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "classifier" MS_0321 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "If a connector end references a partWithPort, then the role must be a port that is defined by the type of the partWithPort." MS_0322 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 123, Length => 123, Value => (16#0049#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0057#, 16#0069#, 16#0074#, 16#0068#, 16#0050#, 16#006F#, 16#0072#, 16#0074#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#006F#, 16#006C#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0057#, 16#0069#, 16#0074#, 16#0068#, 16#0050#, 16#006F#, 16#0072#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "clientDependency" MS_0323 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0063#, 16#006C#, 16#0069#, 16#0065#, 16#006E#, 16#0074#, 16#0044#, 16#0065#, 16#0070#, 16#0065#, 16#006E#, 16#0064#, 16#0065#, 16#006E#, 16#0063#, 16#0079#, others => 16#0000#), others => <>); -- "actualGate" MS_0324 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0061#, 16#0063#, 16#0074#, 16#0075#, 16#0061#, 16#006C#, 16#0047#, 16#0061#, 16#0074#, 16#0065#, others => 16#0000#), others => <>); -- "isStrict" MS_0325 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 8, Length => 8, Value => (16#0069#, 16#0073#, 16#0053#, 16#0074#, 16#0072#, 16#0069#, 16#0063#, 16#0074#, others => 16#0000#), others => <>); -- "Classifier is defined to be a kind of templateable element so that a classifier can be parameterized. It is also defined to be a kind of parameterable element so that a classifier can be a formal template parameter." MS_0326 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 223, Unused => 215, Length => 215, Value => (16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0073#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0069#, 16#007A#, 16#0065#, 16#0064#, 16#002E#, 16#0020#, 16#0049#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0073#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#006C#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "Indicates that the behavior creates values." MS_0327 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 43, Length => 43, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0063#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "References the Classifiers that are redefined by this Classifier." MS_0328 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 65, Length => 65, Value => (16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "isQuery" MS_0329 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#0069#, 16#0073#, 16#0051#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, others => 16#0000#), others => <>); -- "InteractionFragment" MS_032A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0046#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "owningParameter" MS_032B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 15, Length => 15, Value => (16#006F#, 16#0077#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0050#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "A comment is a textual annotation that can be attached to a set of elements." MS_032C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 76, Length => 76, Value => (16#0041#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#0075#, 16#0061#, 16#006C#, 16#0020#, 16#0061#, 16#006E#, 16#006E#, 16#006F#, 16#0074#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0061#, 16#0063#, 16#0068#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Parameters have support for streaming, exceptions, and parameter sets." MS_032D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 70, Length => 70, Value => (16#0050#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0070#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0065#, 16#0061#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#002C#, 16#0020#, 16#0065#, 16#0078#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "The Artifacts that are defined (nested) within the Artifact. The association is a specialization of the ownedMember association from Namespace to NamedElement." MS_032E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 167, Unused => 159, Length => 159, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0041#, 16#0072#, 16#0074#, 16#0069#, 16#0066#, 16#0061#, 16#0063#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0028#, 16#006E#, 16#0065#, 16#0073#, 16#0074#, 16#0065#, 16#0064#, 16#0029#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0041#, 16#0072#, 16#0074#, 16#0069#, 16#0066#, 16#0061#, 16#0063#, 16#0074#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#004D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "References a Message." MS_032F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "redefinition_consistent" MS_0330 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 23, Length => 23, Value => (16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0069#, 16#0073#, 16#0074#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "Fork vertices serve to split an incoming transition into two or more transitions terminating on orthogonal target vertices (i.e. vertices in different regions of a composite state). The segments outgoing from a fork vertex must not have guards or triggers." MS_0331 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 271, Unused => 256, Length => 256, Value => (16#0046#, 16#006F#, 16#0072#, 16#006B#, 16#0020#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0069#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0073#, 16#0070#, 16#006C#, 16#0069#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0065#, 16#0072#, 16#006D#, 16#0069#, 16#006E#, 16#0061#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0074#, 16#0068#, 16#006F#, 16#0067#, 16#006F#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0020#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0069#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0028#, 16#0069#, 16#002E#, 16#0065#, 16#002E#, 16#0020#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0069#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0064#, 16#0069#, 16#0066#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0069#, 16#0074#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0029#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0067#, 16#006F#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0061#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#006B#, 16#0020#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0067#, 16#0075#, 16#0061#, 16#0072#, 16#0064#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "PartDecompositions apply only to Parts that are Parts of Internal Structures not to Parts of Collaborations." MS_0332 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 108, Length => 108, Value => (16#0050#, 16#0061#, 16#0072#, 16#0074#, 16#0044#, 16#0065#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0061#, 16#0070#, 16#0070#, 16#006C#, 16#0079#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0050#, 16#0061#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0050#, 16#0061#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0050#, 16#0061#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0043#, 16#006F#, 16#006C#, 16#006C#, 16#0061#, 16#0062#, 16#006F#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "inout" MS_0333 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 5, Length => 5, Value => (16#0069#, 16#006E#, 16#006F#, 16#0075#, 16#0074#, others => 16#0000#), others => <>); -- "Enumeration" MS_0334 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0045#, 16#006E#, 16#0075#, 16#006D#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The type of the target pin must be the same as the type that owns the operation." MS_0335 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 87, Unused => 80, Length => 80, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "Specifies the state machine which conforms to the general state machine." MS_0336 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 72, Length => 72, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "isException" MS_0337 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0069#, 16#0073#, 16#0045#, 16#0078#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The multiplicity of the structural feature must be compatible with the multiplicity of the output pin." MS_0338 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 102, Length => 102, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#0061#, 16#0074#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "A_realizingMessage_informationFlow" MS_0339 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#0041#, 16#005F#, 16#0072#, 16#0065#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0069#, 16#006E#, 16#0067#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#005F#, 16#0069#, 16#006E#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0046#, 16#006C#, 16#006F#, 16#0077#, others => 16#0000#), others => <>); -- "A special kind of state signifying that the enclosing region is completed. If the enclosing region is directly contained in a state machine and all other regions in the state machine also are completed, then it means that the entire state machine is completed." MS_033A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 271, Unused => 260, Length => 260, Value => (16#0041#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0069#, 16#0066#, 16#0079#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0063#, 16#006C#, 16#006F#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0074#, 16#0065#, 16#0064#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0063#, 16#006C#, 16#006F#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0074#, 16#0065#, 16#0064#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#006D#, 16#0065#, 16#0061#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0069#, 16#0072#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0074#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "Specifies the semantics of concurrent calls to the same passive instance (i.e., an instance originating from a class with isActive being false). Active instances control access to their own behavioral features." MS_033B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 223, Unused => 210, Length => 210, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#006D#, 16#0061#, 16#006E#, 16#0074#, 16#0069#, 16#0063#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#0028#, 16#0069#, 16#002E#, 16#0065#, 16#002E#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0069#, 16#0067#, 16#0069#, 16#006E#, 16#0061#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#0029#, 16#002E#, 16#0020#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#006F#, 16#006C#, 16#0020#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0069#, 16#0072#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "A classifier template parameter exposes a classifier as a formal template parameter." MS_033C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 87, Unused => 84, Length => 84, Value => (16#0041#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#006F#, 16#0073#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#006C#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "cannot_reference_submachine" MS_033D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0063#, 16#0061#, 16#006E#, 16#006E#, 16#006F#, 16#0074#, 16#005F#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#005F#, 16#0073#, 16#0075#, 16#0062#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, others => 16#0000#), others => <>); -- "sources_and_targets_kind" MS_033E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0073#, 16#005F#, 16#0061#, 16#006E#, 16#0064#, 16#005F#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0073#, 16#005F#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, others => 16#0000#), others => <>); -- "local" MS_033F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 5, Length => 5, Value => (16#006C#, 16#006F#, 16#0063#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "The ConnectableElement for this template parameter." MS_0340 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 51, Length => 51, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0043#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "A_actualGate_interactionUse" MS_0341 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0041#, 16#005F#, 16#0061#, 16#0063#, 16#0074#, 16#0075#, 16#0061#, 16#006C#, 16#0047#, 16#0061#, 16#0074#, 16#0065#, 16#005F#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0055#, 16#0073#, 16#0065#, others => 16#0000#), others => <>); -- "A_ownedElement_owner" MS_0342 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0041#, 16#005F#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#005F#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "The multiplicity of the object input pin must be [1..1]." MS_0343 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 56, Length => 56, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#005B#, 16#0031#, 16#002E#, 16#002E#, 16#0031#, 16#005D#, 16#002E#, others => 16#0000#), others => <>); -- "isAssured" MS_0344 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0069#, 16#0073#, 16#0041#, 16#0073#, 16#0073#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, others => 16#0000#), others => <>); -- "The string expression of which this expression is a substring." MS_0345 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 62, Length => 62, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0074#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#002E#, others => 16#0000#), others => <>); -- "The event shows the time point at which the action begins execution." MS_0346 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 68, Length => 68, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0073#, 16#0068#, 16#006F#, 16#0077#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0067#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "no_edges" MS_0347 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 8, Length => 8, Value => (16#006E#, 16#006F#, 16#005F#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, others => 16#0000#), others => <>); -- "The reducer behavior must have two input parameters and one output parameter, of types compatible with the types of elements of the input collection." MS_0348 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 159, Unused => 149, Length => 149, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0075#, 16#0063#, 16#0065#, 16#0072#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#002C#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#0061#, 16#0074#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006C#, 16#006C#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "extension_points" MS_0349 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, others => 16#0000#), others => <>); -- "A_finish_executionSpecification" MS_034A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 31, Length => 31, Value => (16#0041#, 16#005F#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0073#, 16#0068#, 16#005F#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "ReclassifyObjectAction" MS_034B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0052#, 16#0065#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0079#, 16#004F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The executions are independent. They may be executed concurrently." MS_034C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 66, Length => 66, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0064#, 16#0065#, 16#0070#, 16#0065#, 16#006E#, 16#0064#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0079#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#006C#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "Indicates the dependencies that reference the client." MS_034D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 53, Length => 53, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0070#, 16#0065#, 16#006E#, 16#0064#, 16#0065#, 16#006E#, 16#0063#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0069#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "The multiplicity of firstEvent must be 2 if the multiplicity of event is 2. Otherwise the multiplicity of firstEvent is 0." MS_034E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 122, Length => 122, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0032#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0032#, 16#002E#, 16#0020#, 16#004F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0077#, 16#0069#, 16#0073#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0030#, 16#002E#, others => 16#0000#), others => <>); -- "Determines whether an object specified by this class is active or not. If true, then the owning class is referred to as an active class. If false, then such a class is referred to as a passive class." MS_034F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 207, Unused => 199, Length => 199, Value => (16#0044#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#006D#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0073#, 16#0075#, 16#0063#, 16#0068#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "templateSignature" MS_0350 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0053#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, others => 16#0000#), others => <>); -- "coveredBy" MS_0351 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0063#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#0042#, 16#0079#, others => 16#0000#), others => <>); -- "InteractionOperatorKind is an enumeration designating the different kinds of operators of combined fragments. The interaction operand defines the type of operator of a combined fragment." MS_0352 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 191, Unused => 186, Length => 186, Value => (16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#006F#, 16#0072#, 16#004B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006E#, 16#0075#, 16#006D#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0066#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#006F#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0062#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0062#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "The query containingStateMachine() returns the state machine that contains the state either directly or transitively." MS_0353 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 117, Length => 117, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0053#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#004D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0028#, 16#0029#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0065#, 16#0069#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#006C#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "nameExpression" MS_0354 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0045#, 16#0078#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A_covered_events" MS_0355 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0041#, 16#005F#, 16#0063#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#005F#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, others => 16#0000#), others => <>); -- "The number of result pins and the number of owned parameters of the operation of type return, out, and in-out must be equal." MS_0356 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 124, Length => 124, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0075#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0075#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#002C#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#002D#, 16#006F#, 16#0075#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0065#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#002E#, others => 16#0000#), others => <>); -- "shallow_history_vertex" MS_0357 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0073#, 16#0068#, 16#0061#, 16#006C#, 16#006C#, 16#006F#, 16#0077#, 16#005F#, 16#0068#, 16#0069#, 16#0073#, 16#0074#, 16#006F#, 16#0072#, 16#0079#, 16#005F#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, others => 16#0000#), others => <>); -- "inherited_parameters" MS_0358 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0069#, 16#006E#, 16#0068#, 16#0065#, 16#0072#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#005F#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, others => 16#0000#), others => <>); -- "clause" MS_0359 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 6, Length => 6, Value => (16#0063#, 16#006C#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, others => 16#0000#), others => <>); -- "A_cfragmentGate_combinedFragment" MS_035A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 32, Length => 32, Value => (16#0041#, 16#005F#, 16#0063#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0047#, 16#0061#, 16#0074#, 16#0065#, 16#005F#, 16#0063#, 16#006F#, 16#006D#, 16#0062#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0046#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "no_exit_behavior" MS_035B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#006E#, 16#006F#, 16#005F#, 16#0065#, 16#0078#, 16#0069#, 16#0074#, 16#005F#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, others => 16#0000#), others => <>); -- "A_selection_objectNode" MS_035C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0041#, 16#005F#, 16#0073#, 16#0065#, 16#006C#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "CreateLinkAction" MS_035D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0043#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#004C#, 16#0069#, 16#006E#, 16#006B#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Specifies the upper multiplicity of the return parameter, if present." MS_035E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 69, Length => 69, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0075#, 16#0070#, 16#0070#, 16#0065#, 16#0072#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#002C#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "ActivityParameterNode" MS_035F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0050#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "WriteStructuralFeatureAction" MS_0360 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 28, Length => 28, Value => (16#0057#, 16#0072#, 16#0069#, 16#0074#, 16#0065#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0046#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Generalization hierarchies must be directed and acyclical. A classifier can not be both a transitively general and transitively specific classifier of the same classifier." MS_0361 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 183, Unused => 171, Length => 171, Value => (16#0047#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0068#, 16#0069#, 16#0065#, 16#0072#, 16#0061#, 16#0072#, 16#0063#, 16#0068#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0061#, 16#0063#, 16#0079#, 16#0063#, 16#006C#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#002E#, 16#0020#, 16#0041#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0062#, 16#006F#, 16#0074#, 16#0068#, 16#0020#, 16#0061#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#006C#, 16#0079#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#006C#, 16#0079#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "defaultValue" MS_0362 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0064#, 16#0065#, 16#0066#, 16#0061#, 16#0075#, 16#006C#, 16#0074#, 16#0056#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, others => 16#0000#), others => <>); -- "Only submachine states can have connection point references." MS_0363 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 60, Length => 60, Value => (16#004F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "reclassifyObjectAction" MS_0364 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0072#, 16#0065#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0079#, 16#004F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "no_regions" MS_0365 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#006E#, 16#006F#, 16#005F#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, others => 16#0000#), others => <>); -- "subsettedProperty" MS_0366 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0065#, 16#0074#, 16#0074#, 16#0065#, 16#0064#, 16#0050#, 16#0072#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0074#, 16#0079#, others => 16#0000#), others => <>); -- "A_trigger_acceptEventAction" MS_0367 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0041#, 16#005F#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#005F#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The value of firstEvent is related to constrainedElement. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters constrainedElement. If firstEvent is false, then the corresponding observation event is the last time instant the execution is within constrainedElement." MS_0368 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 335, Unused => 322, Length => 322, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0062#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0062#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#0061#, 16#0073#, 16#0074#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "A time constraint is a constraint that refers to a time interval." MS_0369 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 65, Length => 65, Value => (16#0041#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#006C#, 16#002E#, others => 16#0000#), others => <>); -- "Gives the pin on which an object is placed." MS_036A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 43, Length => 43, Value => (16#0047#, 16#0069#, 16#0076#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#006C#, 16#0061#, 16#0063#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "redefinitionContext" MS_036B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0043#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, others => 16#0000#), others => <>); -- "ExecutionSpecification" MS_036C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0045#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The node protected by the handler. The handler is examined if an exception propagates to the outside of the node." MS_036D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 119, Unused => 113, Length => 113, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0074#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0068#, 16#0061#, 16#006E#, 16#0064#, 16#006C#, 16#0065#, 16#0072#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0068#, 16#0061#, 16#006E#, 16#0064#, 16#006C#, 16#0065#, 16#0072#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0061#, 16#006D#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#0078#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0070#, 16#0061#, 16#0067#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0073#, 16#0069#, 16#0064#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A_behavior_callBehaviorAction" MS_036E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 29, Length => 29, Value => (16#0041#, 16#005F#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#005F#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0042#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "hasVisibilityOf" MS_036F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 15, Length => 15, Value => (16#0068#, 16#0061#, 16#0073#, 16#0056#, 16#0069#, 16#0073#, 16#0069#, 16#0062#, 16#0069#, 16#006C#, 16#0069#, 16#0074#, 16#0079#, 16#004F#, 16#0066#, others => 16#0000#), others => <>); -- "The specified UnlimitedNatural value." MS_0370 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 37, Length => 37, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0055#, 16#006E#, 16#006C#, 16#0069#, 16#006D#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#004E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A port has an associated protocol state machine." MS_0371 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 48, Length => 48, Value => (16#0041#, 16#0020#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0074#, 16#006F#, 16#0063#, 16#006F#, 16#006C#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "Groups immediately contained in the group." MS_0372 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 42, Length => 42, Value => (16#0047#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0073#, 16#0020#, 16#0069#, 16#006D#, 16#006D#, 16#0065#, 16#0064#, 16#0069#, 16#0061#, 16#0074#, 16#0065#, 16#006C#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#002E#, others => 16#0000#), others => <>); -- "1" MS_0373 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 1, Length => 1, Value => (16#0031#, others => 16#0000#), others => <>); -- "A_result_unmarshallAction" MS_0374 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 25, Length => 25, Value => (16#0041#, 16#005F#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#005F#, 16#0075#, 16#006E#, 16#006D#, 16#0061#, 16#0072#, 16#0073#, 16#0068#, 16#0061#, 16#006C#, 16#006C#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A manifestation is the concrete physical rendering of one or more model elements by an artifact." MS_0375 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 96, Length => 96, Value => (16#0041#, 16#0020#, 16#006D#, 16#0061#, 16#006E#, 16#0069#, 16#0066#, 16#0065#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0072#, 16#0065#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0068#, 16#0079#, 16#0073#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#0020#, 16#0072#, 16#0065#, 16#006E#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#006D#, 16#006F#, 16#0064#, 16#0065#, 16#006C#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0066#, 16#0061#, 16#0063#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "reduceAction" MS_0376 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0072#, 16#0065#, 16#0064#, 16#0075#, 16#0063#, 16#0065#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A_redefinitionContext_redefinableElement" MS_0377 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 40, Length => 40, Value => (16#0041#, 16#005F#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0043#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#005F#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "The query isAttribute() is true if the Property is defined as an attribute of some classifier." MS_0378 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 94, Length => 94, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0069#, 16#0073#, 16#0041#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0028#, 16#0029#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0050#, 16#0072#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0074#, 16#0079#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "expr" MS_0379 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 4, Length => 4, Value => (16#0065#, 16#0078#, 16#0070#, 16#0072#, others => 16#0000#), others => <>); -- "The defining feature of each slot is a structural feature (directly or inherited) of a classifier of the instance specification." MS_037A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 128, Length => 128, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0020#, 16#0073#, 16#006C#, 16#006F#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0020#, 16#0028#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0069#, 16#006E#, 16#0068#, 16#0065#, 16#0072#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#0029#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The number of argument pins and the number of owned parameters of the operation of type in and in-out must be equal." MS_037B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 119, Unused => 116, Length => 116, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0075#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0072#, 16#0067#, 16#0075#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0075#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#002D#, 16#006F#, 16#0075#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0065#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#002E#, others => 16#0000#), others => <>); -- "realizingConnector" MS_037C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#0072#, 16#0065#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0069#, 16#006E#, 16#0067#, 16#0043#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, others => 16#0000#), others => <>); -- "A_outgoing_source_vertex" MS_037D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#0041#, 16#005F#, 16#006F#, 16#0075#, 16#0074#, 16#0067#, 16#006F#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#005F#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, others => 16#0000#), others => <>); -- "A join segment must not have guards or triggers." MS_037E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 48, Length => 48, Value => (16#0041#, 16#0020#, 16#006A#, 16#006F#, 16#0069#, 16#006E#, 16#0020#, 16#0073#, 16#0065#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0067#, 16#0075#, 16#0061#, 16#0072#, 16#0064#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "References the PackageMerges that are owned by this Package." MS_037F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 60, Length => 60, Value => (16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0050#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#004D#, 16#0065#, 16#0072#, 16#0067#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0050#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "Classifier to be instantiated." MS_0380 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 30, Length => 30, Value => (16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0074#, 16#0069#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "A trigger relates an event to a behavior that may affect an instance of the classifier." MS_0381 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 87, Length => 87, Value => (16#0041#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0061#, 16#0066#, 16#0066#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "par" MS_0382 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 3, Length => 3, Value => (16#0070#, 16#0061#, 16#0072#, others => 16#0000#), others => <>); -- "When an association specializes another association, every end of the specific association corresponds to an end of the general association, and the specific end reaches the same type or a subtype of the more general end." MS_0383 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 231, Unused => 221, Length => 221, Value => (16#0057#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002C#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "toAfter" MS_0384 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#0074#, 16#006F#, 16#0041#, 16#0066#, 16#0074#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "owningElement" MS_0385 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 13, Length => 13, Value => (16#006F#, 16#0077#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "exit_pseudostates" MS_0386 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0065#, 16#0078#, 16#0069#, 16#0074#, 16#005F#, 16#0070#, 16#0073#, 16#0065#, 16#0075#, 16#0064#, 16#006F#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, others => 16#0000#), others => <>); -- "DecisionNode" MS_0387 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0044#, 16#0065#, 16#0063#, 16#0069#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "Because of the concurrent nature of the execution of actions within and across activities, it can be difficult to guarantee the consistent access and modification of object memory. In order to avoid race conditions or other concurrency-related problems, it is sometimes necessary to isolate the effects of a group of actions from the effects of actions outside the group. This may be indicated by setting the mustIsolate attribute to true on a structured activity node. If a structured activity node is 'isolated,' then any object used by an action within the node cannot be accessed by any action outside the node until the structured activity node as a whole completes. Any concurrent actions that would result in accessing such objects are required to have their execution deferred until the completion of the node." MS_0388 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 847, Unused => 818, Length => 818, Value => (16#0042#, 16#0065#, 16#0063#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0061#, 16#0063#, 16#0072#, 16#006F#, 16#0073#, 16#0073#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0069#, 16#0065#, 16#0073#, 16#002C#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0066#, 16#0066#, 16#0069#, 16#0063#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0067#, 16#0075#, 16#0061#, 16#0072#, 16#0061#, 16#006E#, 16#0074#, 16#0065#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0069#, 16#0073#, 16#0074#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006D#, 16#006F#, 16#0064#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#006D#, 16#0065#, 16#006D#, 16#006F#, 16#0072#, 16#0079#, 16#002E#, 16#0020#, 16#0049#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0076#, 16#006F#, 16#0069#, 16#0064#, 16#0020#, 16#0072#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0079#, 16#002D#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0062#, 16#006C#, 16#0065#, 16#006D#, 16#0073#, 16#002C#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 16#0065#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0073#, 16#0020#, 16#006E#, 16#0065#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0072#, 16#0079#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0069#, 16#0073#, 16#006F#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0066#, 16#0066#, 16#0065#, 16#0063#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0066#, 16#0066#, 16#0065#, 16#0063#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0073#, 16#0069#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0049#, 16#0073#, 16#006F#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#0020#, 16#006F#, 16#006E#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0027#, 16#0069#, 16#0073#, 16#006F#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#002C#, 16#0027#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0073#, 16#0069#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0075#, 16#006E#, 16#0074#, 16#0069#, 16#006C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0077#, 16#0068#, 16#006F#, 16#006C#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0074#, 16#0065#, 16#0073#, 16#002E#, 16#0020#, 16#0041#, 16#006E#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0077#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0073#, 16#0075#, 16#0063#, 16#0068#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0071#, 16#0075#, 16#0069#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0069#, 16#0072#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0075#, 16#006E#, 16#0074#, 16#0069#, 16#006C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A_slot_owningInstance" MS_0389 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0041#, 16#005F#, 16#0073#, 16#006C#, 16#006F#, 16#0074#, 16#005F#, 16#006F#, 16#0077#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0049#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, others => 16#0000#), others => <>); -- "A_min_timeInterval" MS_038A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#0041#, 16#005F#, 16#006D#, 16#0069#, 16#006E#, 16#005F#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "Specifies the name that should be added to the namespace of the importing package in lieu of the name of the imported packagable element. The aliased name must not clash with any other member name in the importing package. By default, no alias is used." MS_038B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 263, Unused => 252, Length => 252, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0073#, 16#0068#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0064#, 16#0064#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#006C#, 16#0069#, 16#0065#, 16#0075#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#006C#, 16#0069#, 16#0061#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0068#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#006D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#002E#, 16#0020#, 16#0042#, 16#0079#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0061#, 16#0075#, 16#006C#, 16#0074#, 16#002C#, 16#0020#, 16#006E#, 16#006F#, 16#0020#, 16#0061#, 16#006C#, 16#0069#, 16#0061#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "durationConstraint" MS_038C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#0064#, 16#0075#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0043#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "A generalization relates a specific classifier to a more general classifier, and is owned by the specific classifier." MS_038D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 117, Length => 117, Value => (16#0041#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "bodyOutput" MS_038E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#004F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, others => 16#0000#), others => <>); -- "In case of more than one trigger, the signatures of these must be compatible in case the parameters of the signal are assigned to local variables/attributes." MS_038F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 167, Unused => 157, Length => 157, Value => (16#0049#, 16#006E#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0073#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#0061#, 16#0074#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#006C#, 16#006F#, 16#0063#, 16#0061#, 16#006C#, 16#0020#, 16#0076#, 16#0061#, 16#0072#, 16#0069#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0073#, 16#002F#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Set of clauses composing the conditional." MS_0390 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 41, Length => 41, Value => (16#0053#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0061#, 16#006C#, 16#002E#, others => 16#0000#), others => <>); -- "The type of the object to be unmarshalled." MS_0391 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 42, Length => 42, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0075#, 16#006E#, 16#006D#, 16#0061#, 16#0072#, 16#0073#, 16#0068#, 16#0061#, 16#006C#, 16#006C#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "A_inState_objectNode" MS_0392 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0041#, 16#005F#, 16#0069#, 16#006E#, 16#0053#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#005F#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "timeInterval" MS_0393 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "Specifies the namespace in which the protocol state machine is defined." MS_0394 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 71, Length => 71, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0074#, 16#006F#, 16#0063#, 16#006F#, 16#006C#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element." MS_0395 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 175, Unused => 165, Length => 165, Value => (16#0041#, 16#0074#, 16#0020#, 16#006C#, 16#0065#, 16#0061#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#006C#, 16#0065#, 16#0061#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#0073#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "The type, ordering, and multiplicity of an argument or result pin is derived from the corresponding owned parameter of the operation." MS_0396 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 143, Unused => 133, Length => 133, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#002C#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0072#, 16#0067#, 16#0075#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "isTemplateParameter" MS_0397 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0069#, 16#0073#, 16#0054#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0050#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "An initial vertex can have at most one outgoing transition." MS_0398 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 59, Length => 59, Value => (16#0041#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#0061#, 16#006C#, 16#0020#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#006D#, 16#006F#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0067#, 16#006F#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The sort of communication reflected by the Message" MS_0399 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 50, Length => 50, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0075#, 16#006E#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#006C#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, others => 16#0000#), others => <>); -- "References a set of ports that an encapsulated classifier owns." MS_039A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 63, Length => 63, Value => (16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006E#, 16#0063#, 16#0061#, 16#0070#, 16#0073#, 16#0075#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "expression" MS_039B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0065#, 16#0078#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "SendSignalAction" MS_039C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0053#, 16#0065#, 16#006E#, 16#0064#, 16#0053#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#006C#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Specifies the lower bound of the multiplicity interval." MS_039D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 55, Length => 55, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#006F#, 16#0077#, 16#0065#, 16#0072#, 16#0020#, 16#0062#, 16#006F#, 16#0075#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#006C#, 16#002E#, others => 16#0000#), others => <>); -- "one_output_pin" MS_039E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#006F#, 16#006E#, 16#0065#, 16#005F#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#005F#, 16#0070#, 16#0069#, 16#006E#, others => 16#0000#), others => <>); -- "isDerived" MS_039F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0069#, 16#0073#, 16#0044#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0065#, 16#0064#, others => 16#0000#), others => <>); -- "transitions_incoming" MS_03A0 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#005F#, 16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, others => 16#0000#), others => <>); -- "The incoming edges of the input pins of a StructuredActivityNode must have sources that are not within the StructuredActivityNode." MS_03A1 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 130, Length => 130, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "unlimited_natural" MS_03A2 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0075#, 16#006E#, 16#006C#, 16#0069#, 16#006D#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#005F#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "Receptions that objects of this class are willing to accept." MS_03A3 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 60, Length => 60, Value => (16#0052#, 16#0065#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "A_event_durationObservation" MS_03A4 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0041#, 16#005F#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#005F#, 16#0064#, 16#0075#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#004F#, 16#0062#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A_endType_association" MS_03A5 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0041#, 16#005F#, 16#0065#, 16#006E#, 16#0064#, 16#0054#, 16#0079#, 16#0070#, 16#0065#, 16#005F#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "qualifier" MS_03A6 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "A_conformance_specificMachine" MS_03A7 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 29, Length => 29, Value => (16#0041#, 16#005F#, 16#0063#, 16#006F#, 16#006E#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#005F#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#004D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, others => 16#0000#), others => <>); -- "Indicates whether it is possible to further redefine a RedefinableElement. If the value is true, then it is not possible to further redefine the RedefinableElement. Note that this property is preserved through package merge operations; that is, the capability to redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in the resulting RedefinableElement of a package merge operation where a RedefinableElement with isLeaf=false is merged with a matching RedefinableElement with isLeaf=true: the resulting RedefinableElement will have isLeaf=false. Default value is false." MS_03A8 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 607, Unused => 585, Length => 585, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0066#, 16#0075#, 16#0072#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0066#, 16#0075#, 16#0072#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#004E#, 16#006F#, 16#0074#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0074#, 16#0079#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0072#, 16#006F#, 16#0075#, 16#0067#, 16#0068#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#006D#, 16#0065#, 16#0072#, 16#0067#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#003B#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0070#, 16#0061#, 16#0062#, 16#0069#, 16#006C#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0028#, 16#0069#, 16#002E#, 16#0065#, 16#002E#, 16#002C#, 16#0020#, 16#0069#, 16#0073#, 16#004C#, 16#0065#, 16#0061#, 16#0066#, 16#003D#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#0029#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#006D#, 16#0065#, 16#0072#, 16#0067#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#004C#, 16#0065#, 16#0061#, 16#0066#, 16#003D#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006D#, 16#0065#, 16#0072#, 16#0067#, 16#0065#, 16#0064#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0061#, 16#0020#, 16#006D#, 16#0061#, 16#0074#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#004C#, 16#0065#, 16#0061#, 16#0066#, 16#003D#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#003A#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0052#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#004C#, 16#0065#, 16#0061#, 16#0066#, 16#003D#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#002E#, 16#0020#, 16#0044#, 16#0065#, 16#0066#, 16#0061#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "Interrupting edges of a region must have their source node in the region and their target node outside the region in the same activity containing the region." MS_03A9 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 167, Unused => 157, Length => 157, Value => (16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0072#, 16#0075#, 16#0070#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0069#, 16#0072#, 16#0020#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0069#, 16#0072#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0073#, 16#0069#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "Determines which Connectors will realize the specified flow." MS_03AA : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 60, Length => 60, Value => (16#0044#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#006D#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0043#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#006C#, 16#006F#, 16#0077#, 16#002E#, others => 16#0000#), others => <>); -- "booleanValue" MS_03AB : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0062#, 16#006F#, 16#006F#, 16#006C#, 16#0065#, 16#0061#, 16#006E#, 16#0056#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, others => 16#0000#), others => <>); -- "ownedType" MS_03AC : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0054#, 16#0079#, 16#0070#, 16#0065#, others => 16#0000#), others => <>); -- "deployment" MS_03AD : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0064#, 16#0065#, 16#0070#, 16#006C#, 16#006F#, 16#0079#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "incoming_object_flow" MS_03AE : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#005F#, 16#0066#, 16#006C#, 16#006F#, 16#0077#, others => 16#0000#), others => <>); -- "Arguments of a Message must only be: i) attributes of the sending lifeline ii) constants iii) symbolic values (which are wildcard values representing any legal value) iv) explicit parameters of the enclosing Interaction v) attributes of the class owning the Interaction" MS_03AF : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 279, Unused => 269, Length => 269, Value => (16#0041#, 16#0072#, 16#0067#, 16#0075#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#003A#, 16#0020#, 16#0069#, 16#0029#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0069#, 16#0069#, 16#0029#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0069#, 16#0069#, 16#0069#, 16#0029#, 16#0020#, 16#0073#, 16#0079#, 16#006D#, 16#0062#, 16#006F#, 16#006C#, 16#0069#, 16#0063#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#0028#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#0064#, 16#0063#, 16#0061#, 16#0072#, 16#0064#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#006C#, 16#0065#, 16#0067#, 16#0061#, 16#006C#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0029#, 16#0020#, 16#0069#, 16#0076#, 16#0029#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0063#, 16#006C#, 16#006F#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0076#, 16#0029#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "ExpansionKind" MS_03B0 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 13, Length => 13, Value => (16#0045#, 16#0078#, 16#0070#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#004B#, 16#0069#, 16#006E#, 16#0064#, others => 16#0000#), others => <>); -- "Continuation" MS_03B1 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0043#, 16#006F#, 16#006E#, 16#0074#, 16#0069#, 16#006E#, 16#0075#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The redefinition context of a region is the nearest containing statemachine" MS_03B2 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 75, Length => 75, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0065#, 16#0061#, 16#0072#, 16#0065#, 16#0073#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, others => 16#0000#), others => <>); -- "An unmarshall action is an action that breaks an object of a known type into outputs each of which is equal to a value from a structural feature of the object." MS_03B3 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 167, Unused => 159, Length => 159, Value => (16#0041#, 16#006E#, 16#0020#, 16#0075#, 16#006E#, 16#006D#, 16#0061#, 16#0072#, 16#0073#, 16#0068#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0062#, 16#0072#, 16#0065#, 16#0061#, 16#006B#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#006B#, 16#006E#, 16#006F#, 16#0077#, 16#006E#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#006F#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0073#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "If the language attribute is not empty, then the size of the body and language arrays must be the same." MS_03B4 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 103, Length => 103, Value => (16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#0061#, 16#006E#, 16#0067#, 16#0075#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0065#, 16#006D#, 16#0070#, 16#0074#, 16#0079#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0069#, 16#007A#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006C#, 16#0061#, 16#006E#, 16#0067#, 16#0075#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0061#, 16#0072#, 16#0072#, 16#0061#, 16#0079#, 16#0073#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A_profile_stereotype" MS_03B5 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0041#, 16#005F#, 16#0070#, 16#0072#, 16#006F#, 16#0066#, 16#0069#, 16#006C#, 16#0065#, 16#005F#, 16#0073#, 16#0074#, 16#0065#, 16#0072#, 16#0065#, 16#006F#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, others => 16#0000#), others => <>); -- "References the connectors owned by the classifier." MS_03B6 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 50, Length => 50, Value => (16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "A bodyCondition can only be specified for a query operation." MS_03B7 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 60, Length => 60, Value => (16#0041#, 16#0020#, 16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#0043#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "Missing derivation for EncapsulatedClassifier::/ownedPort : Port" MS_03B8 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 64, Length => 64, Value => (16#004D#, 16#0069#, 16#0073#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0045#, 16#006E#, 16#0063#, 16#0061#, 16#0070#, 16#0073#, 16#0075#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#003A#, 16#003A#, 16#002F#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0050#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#003A#, 16#0020#, 16#0050#, 16#006F#, 16#0072#, 16#0074#, others => 16#0000#), others => <>); -- "Duration defines a value specification that specifies the temporal distance between two time instants." MS_03B9 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 102, Length => 102, Value => (16#0044#, 16#0075#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0064#, 16#0069#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "createLinkObjectAction" MS_03BA : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0063#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#004C#, 16#0069#, 16#006E#, 16#006B#, 16#004F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Inherited nodes replaced by this node in a specialization of the activity." MS_03BB : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 74, Length => 74, Value => (16#0049#, 16#006E#, 16#0068#, 16#0065#, 16#0072#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#006C#, 16#0061#, 16#0063#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "Missing derivation for Property::/default : String" MS_03BC : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 50, Length => 50, Value => (16#004D#, 16#0069#, 16#0073#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0050#, 16#0072#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0074#, 16#0079#, 16#003A#, 16#003A#, 16#002F#, 16#0064#, 16#0065#, 16#0066#, 16#0061#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#003A#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, others => 16#0000#), others => <>); -- "LinkEndDestructionData can only be end data for DestroyLinkAction or one of its specializations." MS_03BD : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 96, Length => 96, Value => (16#004C#, 16#0069#, 16#006E#, 16#006B#, 16#0045#, 16#006E#, 16#0064#, 16#0044#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0044#, 16#0061#, 16#0074#, 16#0061#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#0064#, 16#0061#, 16#0074#, 16#0061#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0044#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#004C#, 16#0069#, 16#006E#, 16#006B#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected." MS_03BE : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 123, Length => 123, Value => (16#0049#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0074#, 16#0069#, 16#0074#, 16#0075#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0072#, 16#0075#, 16#006E#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0074#, 16#0069#, 16#0074#, 16#0075#, 16#0074#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "ConnectorKind is an enumeration type." MS_03BF : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 37, Length => 37, Value => (16#0043#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#004B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006E#, 16#0075#, 16#006D#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "package" MS_03C0 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, others => 16#0000#), others => <>); -- "A_before_toAfter" MS_03C1 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0041#, 16#005F#, 16#0062#, 16#0065#, 16#0066#, 16#006F#, 16#0072#, 16#0065#, 16#005F#, 16#0074#, 16#006F#, 16#0041#, 16#0066#, 16#0074#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "A_redefinedClassifier_classifier" MS_03C2 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 32, Length => 32, Value => (16#0041#, 16#005F#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#005F#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "removeAt" MS_03C3 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 8, Length => 8, Value => (16#0072#, 16#0065#, 16#006D#, 16#006F#, 16#0076#, 16#0065#, 16#0041#, 16#0074#, others => 16#0000#), others => <>); -- "An orthogonal state is a composite state with at least 2 regions" MS_03C4 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 64, Length => 64, Value => (16#0041#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0074#, 16#0068#, 16#006F#, 16#0067#, 16#006F#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0069#, 16#0074#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#006C#, 16#0065#, 16#0061#, 16#0073#, 16#0074#, 16#0020#, 16#0032#, 16#0020#, 16#0072#, 16#0065#, 16#0067#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, others => 16#0000#), others => <>); -- "Holds the object which is either a behavior to be started or has a classifier behavior to be started." MS_03C5 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 101, Length => 101, Value => (16#0048#, 16#006F#, 16#006C#, 16#0064#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#0069#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0072#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0068#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0072#, 16#0074#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "ownerFormalParam" MS_03C6 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0072#, 16#0046#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#006C#, 16#0050#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, others => 16#0000#), others => <>); -- "ComponentRealization" MS_03C7 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0043#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#006E#, 16#0065#, 16#006E#, 16#0074#, 16#0052#, 16#0065#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "ConnectorEnd" MS_03C8 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0043#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0045#, 16#006E#, 16#0064#, others => 16#0000#), others => <>); -- "BroadcastSignalAction" MS_03C9 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0042#, 16#0072#, 16#006F#, 16#0061#, 16#0064#, 16#0063#, 16#0061#, 16#0073#, 16#0074#, 16#0053#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#006C#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "arguments_correspond_to_parameters" MS_03CA : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#0061#, 16#0072#, 16#0067#, 16#0075#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#005F#, 16#0063#, 16#006F#, 16#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#005F#, 16#0074#, 16#006F#, 16#005F#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, others => 16#0000#), others => <>); -- "same_name" MS_03CB : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#005F#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, others => 16#0000#), others => <>); -- "The union of the ExecutabledNodes in the test and body parts of all clauses must be the same as the subset of nodes contained in the ConditionalNode (considered as a StructuredActivityNode) that are ExecutableNodes." MS_03CC : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 223, Unused => 215, Length => 215, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0075#, 16#006E#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0045#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0064#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0065#, 16#0073#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, 16#0073#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0043#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0061#, 16#006C#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0028#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0069#, 16#0064#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0029#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0045#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "isComputable" MS_03CD : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0069#, 16#0073#, 16#0043#, 16#006F#, 16#006D#, 16#0070#, 16#0075#, 16#0074#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, others => 16#0000#), others => <>); -- "The state machine that is to be inserted in place of the (submachine) state." MS_03CE : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 76, Length => 76, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0070#, 16#006C#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0028#, 16#0073#, 16#0075#, 16#0062#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0029#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "association_of_association" MS_03CF : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 26, Length => 26, Value => (16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#006F#, 16#0066#, 16#005F#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Specifies the Namespace that imports a PackageableElement from another Package." MS_03D0 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 87, Unused => 79, Length => 79, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0050#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0061#, 16#006E#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0050#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "The query isNull() returns true." MS_03D1 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 32, Length => 32, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0069#, 16#0073#, 16#004E#, 16#0075#, 16#006C#, 16#006C#, 16#0028#, 16#0029#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "ReadLinkAction" MS_03D2 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0052#, 16#0065#, 16#0061#, 16#0064#, 16#004C#, 16#0069#, 16#006E#, 16#006B#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A_insertAt_addStructuralFeatureValueAction" MS_03D3 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 42, Length => 42, Value => (16#0041#, 16#005F#, 16#0069#, 16#006E#, 16#0073#, 16#0065#, 16#0072#, 16#0074#, 16#0041#, 16#0074#, 16#005F#, 16#0061#, 16#0064#, 16#0064#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0061#, 16#006C#, 16#0046#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0056#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Indicates the kind of connector. This is derived: a connector with one or more ends connected to a Port which is not on a Part and which is not a behavior port is a delegation; otherwise it is an assembly." MS_03D4 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 215, Unused => 205, Length => 205, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#0076#, 16#0065#, 16#0064#, 16#003A#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0050#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#0020#, 16#0061#, 16#0020#, 16#0050#, 16#0061#, 16#0072#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0061#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0064#, 16#0065#, 16#006C#, 16#0065#, 16#0067#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#003B#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0077#, 16#0069#, 16#0073#, 16#0065#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#0065#, 16#006D#, 16#0062#, 16#006C#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "The outgoing edges of the output pins of a StructuredActivityNode must have targets that are not within the StructuredActivityNode." MS_03D5 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 131, Length => 131, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0067#, 16#006F#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "replyToCall" MS_03D6 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0072#, 16#0065#, 16#0070#, 16#006C#, 16#0079#, 16#0054#, 16#006F#, 16#0043#, 16#0061#, 16#006C#, 16#006C#, others => 16#0000#), others => <>); -- "The connection point references used as destinations/sources of transitions associated with a submachine state must be defined as entry/exit points in the submachine state machine." MS_03D7 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 191, Unused => 180, Length => 180, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002F#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0079#, 16#002F#, 16#0065#, 16#0078#, 16#0069#, 16#0074#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A_input_action" MS_03D8 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0041#, 16#005F#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#005F#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "Activity edges may be owned only by activities or groups." MS_03D9 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 57, Length => 57, Value => (16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "A destroy link action is a write link action that destroys links and link objects." MS_03DA : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 87, Unused => 82, Length => 82, Value => (16#0041#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0077#, 16#0072#, 16#0069#, 16#0074#, 16#0065#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#0073#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "context" MS_03DB : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, others => 16#0000#), others => <>); -- "The type of the result output pin is the same as the type of the qualifier attribute." MS_03DC : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 87, Unused => 85, Length => 85, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A_bodyOutput_loopNode" MS_03DD : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0041#, 16#005F#, 16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#004F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#005F#, 16#006C#, 16#006F#, 16#006F#, 16#0070#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "Specifies a link that enables communication between two or more instances. This link may be an instance of an association, or it may represent the possibility of the instances being able to communicate because their identities are known by virtue of being passed in as parameters, held in variables or slots, or because the communicating instances are the same instance. The link may be realized by something as simple as a pointer or by something as complex as a network connection. In contrast to associations, which specify links between any instance of the associated classifiers, connectors specify links between instances playing the connected parts only." MS_03DE : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 687, Unused => 661, Length => 661, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0065#, 16#006E#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0075#, 16#006E#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002C#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#0069#, 16#006C#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0062#, 16#0065#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0075#, 16#006E#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0063#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0069#, 16#0072#, 16#0020#, 16#0069#, 16#0064#, 16#0065#, 16#006E#, 16#0074#, 16#0069#, 16#0074#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#006B#, 16#006E#, 16#006F#, 16#0077#, 16#006E#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0076#, 16#0069#, 16#0072#, 16#0074#, 16#0075#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0062#, 16#0065#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0070#, 16#0061#, 16#0073#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#002C#, 16#0020#, 16#0068#, 16#0065#, 16#006C#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0076#, 16#0061#, 16#0072#, 16#0069#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0073#, 16#006C#, 16#006F#, 16#0074#, 16#0073#, 16#002C#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0062#, 16#0065#, 16#0063#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0075#, 16#006E#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 16#0065#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0073#, 16#0069#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 16#0065#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0078#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#006E#, 16#0065#, 16#0074#, 16#0077#, 16#006F#, 16#0072#, 16#006B#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, 16#0020#, 16#0049#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#0061#, 16#0073#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002C#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0073#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0073#, 16#002C#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0073#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0073#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0070#, 16#006C#, 16#0061#, 16#0079#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "The connection points defined for this state machine. They represent the interface of the state machine when used as part of submachine state." MS_03DF : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 151, Unused => 142, Length => 142, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0079#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0066#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "interruptingEdge" MS_03E0 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0072#, 16#0075#, 16#0070#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0045#, 16#0064#, 16#0067#, 16#0065#, others => 16#0000#), others => <>); -- "visibleMembers" MS_03E1 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0076#, 16#0069#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#004D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0073#, others => 16#0000#), others => <>); -- "no_output_pins" MS_03E2 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#006E#, 16#006F#, 16#005F#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#005F#, 16#0070#, 16#0069#, 16#006E#, 16#0073#, others => 16#0000#), others => <>); -- "StructuredActivityNode" MS_03E3 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0053#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "extensionPoint" MS_03E4 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0050#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "starting_time" MS_03E5 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 13, Length => 13, Value => (16#0073#, 16#0074#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, others => 16#0000#), others => <>); -- "The multiplicity of firstEvent must be 2 if the multiplicity of constrainedElement is 2. Otherwise the multiplicity of firstEvent is 0." MS_03E6 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 143, Unused => 135, Length => 135, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0032#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0032#, 16#002E#, 16#0020#, 16#004F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0077#, 16#0069#, 16#0073#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#006C#, 16#0074#, 16#0069#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0030#, 16#002E#, others => 16#0000#), others => <>); -- "endType" MS_03E7 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#0065#, 16#006E#, 16#0064#, 16#0054#, 16#0079#, 16#0070#, 16#0065#, others => 16#0000#), others => <>); -- "An actor can only have associations to use cases, components and classes. Furthermore these associations must be binary." MS_03E8 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 120, Length => 120, Value => (16#0041#, 16#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0073#, 16#002C#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#006E#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0065#, 16#0073#, 16#002E#, 16#0020#, 16#0046#, 16#0075#, 16#0072#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0073#, 16#0065#, 16#0020#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0062#, 16#0069#, 16#006E#, 16#0061#, 16#0072#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "no_entry_behavior" MS_03E9 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#006E#, 16#006F#, 16#005F#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0079#, 16#005F#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, others => 16#0000#), others => <>); -- "The end object input pin is not also a qualifier value input pin." MS_03EA : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 65, Length => 65, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "Indicates that the behavior deletes values." MS_03EB : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 43, Length => 43, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0064#, 16#0065#, 16#006C#, 16#0065#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "unordered" MS_03EC : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0075#, 16#006E#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, others => 16#0000#), others => <>); -- "A_classifierBehavior_behavioredClassifier" MS_03ED : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 41, Length => 41, Value => (16#0041#, 16#005F#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0042#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#005F#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0065#, 16#0064#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "linkEndDestructionData" MS_03EE : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0045#, 16#006E#, 16#0064#, 16#0044#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0044#, 16#0061#, 16#0074#, 16#0061#, others => 16#0000#), others => <>); -- "The set of nodes and edges that perform the repetitive computations of the loop. The body section is executed as long as the test section produces a true value." MS_03EF : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 167, Unused => 160, Length => 160, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0070#, 16#0065#, 16#0072#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0065#, 16#0074#, 16#0069#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#0075#, 16#0074#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#006F#, 16#006F#, 16#0070#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#0020#, 16#0073#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#006C#, 16#006F#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0065#, 16#0073#, 16#0074#, 16#0020#, 16#0073#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0064#, 16#0075#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "Specifies the general Classifiers for this Classifier." MS_03F0 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 54, Length => 54, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "A binding contains at most one parameter substitution for each formal template parameter of the target template signature." MS_03F1 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 122, Length => 122, Value => (16#0041#, 16#0020#, 16#0062#, 16#0069#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0073#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#006D#, 16#006F#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0073#, 16#0074#, 16#0069#, 16#0074#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#006C#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier." MS_03F2 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 98, Length => 98, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0050#, 16#0061#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0028#, 16#0029#, 16#0020#, 16#0067#, 16#0069#, 16#0076#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0074#, 16#006F#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0065#, 16#0064#, 16#0020#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "A_part_structuredClassifier" MS_03F3 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0041#, 16#005F#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#005F#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "A_manifestation_artifact" MS_03F4 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#0041#, 16#005F#, 16#006D#, 16#0061#, 16#006E#, 16#0069#, 16#0066#, 16#0065#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0066#, 16#0061#, 16#0063#, 16#0074#, others => 16#0000#), others => <>); -- "handlerBody" MS_03F5 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0068#, 16#0061#, 16#006E#, 16#0064#, 16#006C#, 16#0065#, 16#0072#, 16#0042#, 16#006F#, 16#0064#, 16#0079#, others => 16#0000#), others => <>); -- "Top-level groups in the activity." MS_03F6 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 33, Length => 33, Value => (16#0054#, 16#006F#, 16#0070#, 16#002D#, 16#006C#, 16#0065#, 16#0076#, 16#0065#, 16#006C#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#002E#, others => 16#0000#), others => <>); -- "associations" MS_03F7 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, others => 16#0000#), others => <>); -- "If the interactionOperator is break, the corresponding InteractionOperand must cover all Lifelines within the enclosing InteractionFragment." MS_03F8 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 151, Unused => 140, Length => 140, Value => (16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0062#, 16#0072#, 16#0065#, 16#0061#, 16#006B#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#004C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0063#, 16#006C#, 16#006F#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0046#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "not_own_self" MS_03F9 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#006E#, 16#006F#, 16#0074#, 16#005F#, 16#006F#, 16#0077#, 16#006E#, 16#005F#, 16#0073#, 16#0065#, 16#006C#, 16#0066#, others => 16#0000#), others => <>); -- "An additional edge incoming to the decision node that provides a decision input value." MS_03FA : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 86, Length => 86, Value => (16#0041#, 16#006E#, 16#0020#, 16#0061#, 16#0064#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0063#, 16#0069#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0076#, 16#0069#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0064#, 16#0065#, 16#0063#, 16#0069#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "Specifies the post condition of the transition which is the condition that should be obtained once the transition is triggered. This post condition is part of the post condition of the operation connected to the transition." MS_03FB : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 231, Unused => 223, Length => 223, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0073#, 16#0068#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#006F#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "TimeEvent" MS_03FC : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0054#, 16#0069#, 16#006D#, 16#0065#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "isAccessibleBy" MS_03FD : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0069#, 16#0073#, 16#0041#, 16#0063#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0042#, 16#0079#, others => 16#0000#), others => <>); -- "Specifies the triggers that may fire the transition." MS_03FE : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 52, Length => 52, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The query containingProfile() returns the closest profile directly or indirectly containing this package (or this package itself, if it is a profile)." MS_03FF : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 159, Unused => 150, Length => 150, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0050#, 16#0072#, 16#006F#, 16#0066#, 16#0069#, 16#006C#, 16#0065#, 16#0028#, 16#0029#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006C#, 16#006F#, 16#0073#, 16#0065#, 16#0073#, 16#0074#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0066#, 16#0069#, 16#006C#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0069#, 16#006E#, 16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0028#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0065#, 16#006C#, 16#0066#, 16#002C#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0066#, 16#0069#, 16#006C#, 16#0065#, 16#0029#, 16#002E#, others => 16#0000#), others => <>); end AMF.Internals.Tables.UML_String_Data_03;
burratoo/Acton
Ada
1,424
ads
------------------------------------------------------------------------------------------ -- -- -- OAK CORE SUPPORT PACKAGE -- -- ARM ARM7TDMI -- -- -- -- OAK.CORE_SUPPORT_PACKAGE.CALL_STACK.OPS -- -- -- -- Copyright (C) 2014-2021, Patrick Bernardi -- -- -- ------------------------------------------------------------------------------------------ with Oak.Memory.Call_Stack; use Oak.Memory.Call_Stack; with System; use System; package Oak.Core_Support_Package.Call_Stack.Ops with Pure is procedure Set_Task_Instruction_Pointer (Stack : in out Call_Stack_Handler; Instruction_Address : in Address) with Inline; procedure Set_Task_Body_Procedure (Stack : in out Call_Stack_Handler; Procedure_Address : in Address; Task_Value_Record : in Address); end Oak.Core_Support_Package.Call_Stack.Ops;
reznikmm/matreshka
Ada
4,425
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ private with Ada.Containers.Hashed_Sets; private with League.Strings.Hash; with XML.SAX.Parse_Exceptions; with AMF.XMI.Error_Handlers; package AMF.Internals.XMI_Error_Handlers is type Default_Error_Handler is limited new AMF.XMI.Error_Handlers.XMI_Error_Handler with private; overriding function Error_String (Self : Default_Error_Handler) return League.Strings.Universal_String; -- Returns error message for the last detected error. overriding procedure Error (Self : in out Default_Error_Handler; Occurrence : XML.SAX.Parse_Exceptions.SAX_Parse_Exception; Success : in out Boolean); -- Called when XMI reader detects error. private package String_Sets is new Ada.Containers.Hashed_Sets (League.Strings.Universal_String, League.Strings.Hash, League.Strings."=", League.Strings."="); type Default_Error_Handler is limited new AMF.XMI.Error_Handlers.XMI_Error_Handler with record Messages : String_Sets.Set; end record; end AMF.Internals.XMI_Error_Handlers;
reznikmm/matreshka
Ada
7,460
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- 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 AMF.Internals.UML_Elements; with AMF.UML.Parameterable_Elements; with AMF.UML.Template_Bindings; with AMF.UML.Template_Parameter_Substitutions; with AMF.UML.Template_Parameters; with AMF.Visitors; package AMF.Internals.UML_Template_Parameter_Substitutions is type UML_Template_Parameter_Substitution_Proxy is limited new AMF.Internals.UML_Elements.UML_Element_Proxy and AMF.UML.Template_Parameter_Substitutions.UML_Template_Parameter_Substitution with null record; overriding function Get_Actual (Self : not null access constant UML_Template_Parameter_Substitution_Proxy) return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access; -- Getter of TemplateParameterSubstitution::actual. -- -- The element that is the actual parameter for this substitution. overriding procedure Set_Actual (Self : not null access UML_Template_Parameter_Substitution_Proxy; To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access); -- Setter of TemplateParameterSubstitution::actual. -- -- The element that is the actual parameter for this substitution. overriding function Get_Formal (Self : not null access constant UML_Template_Parameter_Substitution_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; -- Getter of TemplateParameterSubstitution::formal. -- -- The formal template parameter that is associated with this substitution. overriding procedure Set_Formal (Self : not null access UML_Template_Parameter_Substitution_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); -- Setter of TemplateParameterSubstitution::formal. -- -- The formal template parameter that is associated with this substitution. overriding function Get_Owned_Actual (Self : not null access constant UML_Template_Parameter_Substitution_Proxy) return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access; -- Getter of TemplateParameterSubstitution::ownedActual. -- -- The actual parameter that is owned by this substitution. overriding procedure Set_Owned_Actual (Self : not null access UML_Template_Parameter_Substitution_Proxy; To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access); -- Setter of TemplateParameterSubstitution::ownedActual. -- -- The actual parameter that is owned by this substitution. overriding function Get_Template_Binding (Self : not null access constant UML_Template_Parameter_Substitution_Proxy) return AMF.UML.Template_Bindings.UML_Template_Binding_Access; -- Getter of TemplateParameterSubstitution::templateBinding. -- -- The optional bindings from this element to templates. overriding procedure Set_Template_Binding (Self : not null access UML_Template_Parameter_Substitution_Proxy; To : AMF.UML.Template_Bindings.UML_Template_Binding_Access); -- Setter of TemplateParameterSubstitution::templateBinding. -- -- The optional bindings from this element to templates. overriding procedure Enter_Element (Self : not null access constant UML_Template_Parameter_Substitution_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Leave_Element (Self : not null access constant UML_Template_Parameter_Substitution_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Visit_Element (Self : not null access constant UML_Template_Parameter_Substitution_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of iterator interface. end AMF.Internals.UML_Template_Parameter_Substitutions;
sparre/JSA
Ada
1,805
ads
------------------------------------------------------------------------------ -- -- package Debugging (spec) -- -- This package is used to log debugging messages. -- If the program is executed with command line arguments, then the last -- argument is used as the name Current_Error is logged to. Otherwise -- will Current_Error be redirected to Standard_Output. -- ------------------------------------------------------------------------------ -- Update information: -- -- 1996.04.05 (Jacob Sparre Andersen) -- Written. -- -- 1996.05.07 (Jacob S. A. & Jesper H. V. L.) -- Added the exceptions Not_Implemented_Yet and Can_Not_Be_Implemented. -- -- 1996.07.26 (Jacob Sparre Andersen) -- Added the exception This_Can_Never_Happen. -- -- (Insert additional update information above this line.) ------------------------------------------------------------------------------ package JSA.Debugging is Debug : constant Boolean := True; --------------------------------------------------------------------------- -- Exceptions: Not_Implemented_Yet : exception; Can_Not_Be_Implemented : exception; This_Can_Never_Happen : exception; ----------------------------------------------------------------------- -- procedure Message: -- -- Writes a message to Current_Error if debugging is activated. procedure Message (Item : in String); pragma Inline (Message); ----------------------------------------------------------------------- -- procedure Message_Line: -- -- Writes a message and a new line to Current_Error if debugging is -- activated. procedure Message_Line (Item : in String); pragma Inline (Message_Line); ----------------------------------------------------------------------- end JSA.Debugging;
reznikmm/matreshka
Ada
3,817
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.ODF_Attributes.FO.Font_Weight; package ODF.DOM.Attributes.FO.Font_Weight.Internals is function Create (Node : Matreshka.ODF_Attributes.FO.Font_Weight.FO_Font_Weight_Access) return ODF.DOM.Attributes.FO.Font_Weight.ODF_FO_Font_Weight; function Wrap (Node : Matreshka.ODF_Attributes.FO.Font_Weight.FO_Font_Weight_Access) return ODF.DOM.Attributes.FO.Font_Weight.ODF_FO_Font_Weight; end ODF.DOM.Attributes.FO.Font_Weight.Internals;
sungyeon/drake
Ada
380
ads
pragma License (Unrestricted); -- extended unit with Ada.Directories.Volumes; function Ada.Directories.Equal_File_Names ( FS : Volumes.File_System; Left, Right : String) return Boolean; -- This function compare two file names by the method of the file system. -- For example, it uses NFD and case-insensitive on HFS+. pragma Inline (Ada.Directories.Equal_File_Names);
reznikmm/matreshka
Ada
11,561
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015-2018, Vadim Godunko <[email protected]> -- -- 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.HTTP_Cookies; package body Matreshka.Servlet_HTTP_Requests is use type Spikedog.HTTP_Session_Managers.HTTP_Session_Manager_Access; ----------------------- -- Change_Session_Id -- ----------------------- overriding function Change_Session_Id (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String is begin if Self.Session_Manager = null or else Self.Data.Session = null then raise Program_Error; end if; Self.Session_Manager.Change_Session_Id (Self.Data.Session); return Self.Data.Session.Get_Id; end Change_Session_Id; ---------------------- -- Get_Context_Path -- ---------------------- overriding function Get_Context_Path (Self : Abstract_HTTP_Servlet_Request) return League.String_Vectors.Universal_String_Vector is begin return Self.URL.Get_Path.Slice (1, Self.Context_Last); end Get_Context_Path; -------------- -- Get_Path -- -------------- function Get_Path (Self : Abstract_HTTP_Servlet_Request'Class) return League.String_Vectors.Universal_String_Vector is begin return Self.URL.Get_Path; end Get_Path; ------------------- -- Get_Path_Info -- ------------------- overriding function Get_Path_Info (Self : Abstract_HTTP_Servlet_Request) return League.String_Vectors.Universal_String_Vector is Path : constant League.String_Vectors.Universal_String_Vector := Self.URL.Get_Path; begin return Path.Slice (Self.Servlet_Last + 1, Path.Length); end Get_Path_Info; --------------------- -- Get_Request_URL -- --------------------- overriding function Get_Request_URL (Self : Abstract_HTTP_Servlet_Request) return League.IRIs.IRI is begin return Self.URL; end Get_Request_URL; ------------------------------ -- Get_Requested_Session_Id -- ------------------------------ overriding function Get_Requested_Session_Id (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String is begin if not Self.Data.Requested_Id_Computed then -- Obtain session identifier from the request. declare Cookie : constant Servlet.HTTP_Cookies.Cookie := Abstract_HTTP_Servlet_Request'Class (Self).Get_Cookies.Element (League.Strings.To_Universal_String ("MSID")); begin if not Cookie.Is_Empty then Self.Data.Requested_Id := Cookie.Get_Value; end if; Self.Data.Requested_Id_Computed := True; end; end if; return Self.Data.Requested_Id; end Get_Requested_Session_Id; ---------------- -- Get_Scheme -- ---------------- overriding function Get_Scheme (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String is begin return Self.URL.Get_Scheme; end Get_Scheme; --------------------- -- Get_Server_Name -- --------------------- overriding function Get_Server_Name (Self : Abstract_HTTP_Servlet_Request) return League.Strings.Universal_String is begin return Self.URL.Get_Host; end Get_Server_Name; --------------------- -- Get_Server_Port -- --------------------- overriding function Get_Server_Port (Self : Abstract_HTTP_Servlet_Request) return Positive is begin return Self.URL.Get_Port; end Get_Server_Port; ------------------------- -- Get_Servlet_Context -- ------------------------- overriding function Get_Servlet_Context (Self : Abstract_HTTP_Servlet_Request) return access Servlet.Contexts.Servlet_Context'Class is begin return Self.Context; end Get_Servlet_Context; ---------------------- -- Get_Servlet_Path -- ---------------------- overriding function Get_Servlet_Path (Self : Abstract_HTTP_Servlet_Request) return League.String_Vectors.Universal_String_Vector is begin return Self.URL.Get_Path.Slice (Self.Context_Last + 1, Self.Servlet_Last); end Get_Servlet_Path; ----------------- -- Get_Session -- ----------------- overriding function Get_Session (Self : Abstract_HTTP_Servlet_Request; Create : Boolean := True) return access Servlet.HTTP_Sessions.HTTP_Session'Class is begin if Self.Data.Session /= null or else Self.Data.Session_Computed then -- Session was created or not needed to be created. return Self.Data.Session; end if; declare Identifier : constant League.Strings.Universal_String := Self.Get_Requested_Session_Id; begin -- Check whether session identifier was passed in HTTP cookie and -- attempt to reconstruct session. if Self.Session_Manager = null then -- XXX Suspicuous behavior should be reported: session manager is -- not setted up. null; elsif not Identifier.Is_Empty then -- Decode session identifier specified in request. Detect and -- report security event if this conversion fails. if Self.Session_Manager.Is_Session_Identifier_Valid (Identifier) then Self.Data.Session := Self.Session_Manager.Get_Session (Identifier); Self.Data.Session_Computed := True; if Self.Data.Session = null then -- XXX Security event should be reported: SID unknown. null; end if; else -- XXX Suspicuous behavior should be reported: SID has wrong -- format. null; end if; end if; end; -- Allocate new session when it was not specified in HTTP cookie or -- resolved. if Self.Data.Session = null and Self.Session_Manager /= null and Create then Self.Data.Session := Self.Session_Manager.New_Session; end if; return Self.Data.Session; end Get_Session; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : in out Abstract_HTTP_Servlet_Request'Class; URL : League.IRIs.IRI) is begin Self.URL := URL; Self.Data := Self.Storage'Unchecked_Access; end Initialize; ----------------------------------- -- Is_Requested_Session_Id_Valid -- ----------------------------------- overriding function Is_Requested_Session_Id_Valid (Self : Abstract_HTTP_Servlet_Request) return Boolean is use type League.Strings.Universal_String; begin return Self.Data.Requested_Id_Computed and then Self.Data.Session /= null and then Self.Data.Session.Get_Id = Self.Data.Requested_Id; end Is_Requested_Session_Id_Valid; ------------------------------ -- Set_Context_Last_Segment -- ------------------------------ procedure Set_Context_Last_Segment (Self : in out Abstract_HTTP_Servlet_Request'Class; Last : Natural) is begin Self.Context_Last := Last; end Set_Context_Last_Segment; ------------------------- -- Set_Servlet_Context -- ------------------------- procedure Set_Servlet_Context (Self : in out Abstract_HTTP_Servlet_Request'Class; Context : Servlet.Contexts.Servlet_Context_Access) is begin Self.Context := Context; end Set_Servlet_Context; ------------------------------ -- Set_Servlet_Last_Segment -- ------------------------------ procedure Set_Servlet_Last_Segment (Self : in out Abstract_HTTP_Servlet_Request'Class; Last : Natural) is begin Self.Servlet_Last := Last; end Set_Servlet_Last_Segment; ------------------------- -- Set_Session_Manager -- ------------------------- procedure Set_Session_Manager (Self : in out Abstract_HTTP_Servlet_Request'Class; Manager : Spikedog.HTTP_Session_Managers.HTTP_Session_Manager_Access) is begin Self.Session_Manager := Manager; end Set_Session_Manager; end Matreshka.Servlet_HTTP_Requests;
reznikmm/matreshka
Ada
6,740
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Text.Ruby_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Text_Ruby_Element_Node is begin return Self : Text_Ruby_Element_Node do Matreshka.ODF_Text.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Text_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Text_Ruby_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Text_Ruby (ODF.DOM.Text_Ruby_Elements.ODF_Text_Ruby_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Text_Ruby_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Ruby_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Text_Ruby_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Text_Ruby (ODF.DOM.Text_Ruby_Elements.ODF_Text_Ruby_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Text_Ruby_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Text_Ruby (Visitor, ODF.DOM.Text_Ruby_Elements.ODF_Text_Ruby_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Ruby_Element, Text_Ruby_Element_Node'Tag); end Matreshka.ODF_Text.Ruby_Elements;
tum-ei-rcs/StratoX
Ada
747
ads
with Units.Vectors; use Units.Vectors; with Units; use Units; package Dynamics3D is -- Rotation Systems type Tait_Bryan_Angle_Type is (ROLL, PITCH, YAW); type Euler_Angle_Type is (X1, Z2, X3); subtype Wind_Speed is Units.Linear_Velocity_Type range 0.0 .. 50.0; -- 180 km/h -- -- -- type Pose_Type is record -- position : GPS_Loacation_Type; -- -- velocity : -- orientation : Orientation_Vector; -- end record; -- -- -- type Shape_Type is (SPHERE, BOX); -- -- -- procedure transform( pose : Pose_Type; transformation : Transformation_Vector) is null; -- function Orientation (gravity_vector : Linear_Acceleration_Vector) return Orientation_Vector is null; end Dynamics3D;
reznikmm/matreshka
Ada
4,712
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Style.Text_Line_Through_Type_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Text_Line_Through_Type_Attribute_Node is begin return Self : Style_Text_Line_Through_Type_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Text_Line_Through_Type_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Text_Line_Through_Type_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Text_Line_Through_Type_Attribute, Style_Text_Line_Through_Type_Attribute_Node'Tag); end Matreshka.ODF_Style.Text_Line_Through_Type_Attributes;
charlie5/cBound
Ada
1,418
ads
-- 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_get_selection_owner_cookie_t is -- Item -- type Item is record sequence : aliased Interfaces.C.unsigned; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_get_selection_owner_cookie_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_get_selection_owner_cookie_t.Item, Element_Array => xcb.xcb_get_selection_owner_cookie_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_get_selection_owner_cookie_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_get_selection_owner_cookie_t.Pointer, Element_Array => xcb.xcb_get_selection_owner_cookie_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_get_selection_owner_cookie_t;
albinjal/ada_basic
Ada
838
adb
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Person_Sorted_List; use Person_Sorted_List; with Person_Handling; use Person_Handling; procedure Lab5B is Test_List: List_Type; Test_Person1: Person; Test_Person2: Person; Test_Person3: Person; begin Get(Test_Person1); Insert(Test_List, Test_Person1); Get(Test_Person2); Insert(Test_List, Test_Person2); Get(Test_Person3); Insert(Test_List, Test_Person3); New_Line; New_Line; Put(Test_List); New_Line; New_Line; Remove(Test_List, Test_Person3); Put("Tog bort sista personen:"); New_Line; New_Line; Put(Test_List); New_Line; New_Line; Put("Find - person inmatad som nr 2:"); New_Line; Put(Find(Test_List, Test_Person2)); New_Line; New_Line; Put("Längd av listan: "); New_Line; Put(Length(Test_List)); end Lab5B;
reznikmm/matreshka
Ada
6,564
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ package body League.Holders.Generic_Floats is ----------------- -- Constructor -- ----------------- overriding function Constructor (Is_Empty : not null access Boolean) return Float_Container is pragma Assert (Is_Empty.all); begin return (Counter => <>, Is_Empty => Is_Empty.all, Value => <>); end Constructor; ------------- -- Element -- ------------- function Element (Self : Holder) return Num is begin if Self.Data.all not in Float_Container and Self.Data.all not in Universal_Float_Container then raise Constraint_Error with "invalid type of value"; end if; if Self.Data.Is_Empty then raise Constraint_Error with "value is empty"; end if; if Self.Data.all in Universal_Float_Container then return Num (Universal_Float_Container'Class (Self.Data.all).Value); else return Float_Container'Class (Self.Data.all).Value; end if; end Element; ----------- -- First -- ----------- overriding function First (Self : not null access constant Float_Container) return Universal_Float is pragma Unreferenced (Self); begin return Universal_Float (Num'First); end First; --------- -- Get -- --------- overriding function Get (Self : not null access constant Float_Container) return Universal_Float is begin return Universal_Float (Self.Value); end Get; ---------- -- Last -- ---------- overriding function Last (Self : not null access constant Float_Container) return Universal_Float is pragma Unreferenced (Self); begin return Universal_Float (Num'Last); end Last; --------------------- -- Replace_Element -- --------------------- procedure Replace_Element (Self : in out Holder; To : Num) is begin if Self.Data.all not in Float_Container and Self.Data.all not in Universal_Float_Container then raise Constraint_Error with "invalid type of value"; end if; -- XXX This subprogram can be improved to reuse shared segment when -- possible. if Self.Data.all in Universal_Float_Container then Dereference (Self.Data); Self.Data := new Universal_Float_Container' (Counter => <>, Is_Empty => False, Value => Universal_Float (To)); else Dereference (Self.Data); Self.Data := new Float_Container' (Counter => <>, Is_Empty => False, Value => To); end if; end Replace_Element; --------- -- Set -- --------- overriding procedure Set (Self : not null access Float_Container; To : Universal_Float) is begin Self.Is_Empty := False; Self.Value := Num (To); end Set; --------------- -- To_Holder -- --------------- function To_Holder (Item : Num) return Holder is begin return (Ada.Finalization.Controlled with new Float_Container' (Counter => <>, Is_Empty => False, Value => Item)); end To_Holder; end League.Holders.Generic_Floats;
reznikmm/matreshka
Ada
6,041
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014-2020, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ package body Servlet.Request_Wrappers is ---------------------- -- Get_Content_Type -- ---------------------- overriding function Get_Content_Type (Self : Servlet_Request_Wrapper) return League.Strings.Universal_String is begin return Self.Request.Get_Content_Type; end Get_Content_Type; ---------------------- -- Get_Input_Stream -- ---------------------- overriding function Get_Input_Stream (Self : Servlet_Request_Wrapper) return not null access Ada.Streams.Root_Stream_Type'Class is begin return Self.Request.Get_Input_Stream; end Get_Input_Stream; ------------------------- -- Get_Parameter_Names -- ------------------------- overriding function Get_Parameter_Names (Self : Servlet_Request_Wrapper) return League.String_Vectors.Universal_String_Vector is begin return Self.Request.Get_Parameter_Names; end Get_Parameter_Names; -------------------------- -- Get_Parameter_Values -- -------------------------- overriding function Get_Parameter_Values (Self : Servlet_Request_Wrapper; Name : League.Strings.Universal_String) return League.String_Vectors.Universal_String_Vector is begin return Self.Request.Get_Parameter_Values (Name); end Get_Parameter_Values; ---------------- -- Get_Scheme -- ---------------- overriding function Get_Scheme (Self : Servlet_Request_Wrapper) return League.Strings.Universal_String is begin return Self.Request.Get_Scheme; end Get_Scheme; --------------------- -- Get_Server_Name -- --------------------- overriding function Get_Server_Name (Self : Servlet_Request_Wrapper) return League.Strings.Universal_String is begin return Self.Request.Get_Server_Name; end Get_Server_Name; --------------------- -- Get_Server_Port -- --------------------- overriding function Get_Server_Port (Self : Servlet_Request_Wrapper) return Positive is begin return Self.Request.Get_Server_Port; end Get_Server_Port; ------------------------- -- Get_Servlet_Context -- ------------------------- overriding function Get_Servlet_Context (Self : Servlet_Request_Wrapper) return access Servlet.Contexts.Servlet_Context'Class is begin return Self.Request.Get_Servlet_Context; end Get_Servlet_Context; ------------------------ -- Is_Async_Supported -- ------------------------ overriding function Is_Async_Supported (Self : not null access Servlet_Request_Wrapper) return Boolean is begin return Self.Request.Is_Async_Supported; end Is_Async_Supported; end Servlet.Request_Wrappers;
zhmu/ananas
Ada
26,374
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- B I N D O . V A L I D A T O R S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Debug; use Debug; with Output; use Output; with Types; use Types; with Bindo.Units; use Bindo.Units; with Bindo.Writers; use Bindo.Writers; use Bindo.Writers.Phase_Writers; package body Bindo.Validators is ----------------------- -- Local subprograms -- ----------------------- procedure Write_Error (Msg : String; Flag : out Boolean); pragma Inline (Write_Error); -- Write error message Msg to standard output and set flag Flag to True ---------------------- -- Cycle_Validators -- ---------------------- package body Cycle_Validators is Has_Invalid_Cycle : Boolean := False; -- Flag set when the library graph contains an invalid cycle ----------------------- -- Local subprograms -- ----------------------- procedure Validate_Cycle (G : Library_Graph; Cycle : Library_Graph_Cycle_Id); pragma Inline (Validate_Cycle); -- Ensure that a cycle meets the following requirements: -- -- * Is of proper kind -- * Has enough edges to form a circuit -- * No edge is repeated procedure Validate_Cycle_Path (G : Library_Graph; Cycle : Library_Graph_Cycle_Id); pragma Inline (Validate_Cycle_Path); -- Ensure that the path of a cycle meets the following requirements: -- -- * No edge is repeated -------------------- -- Validate_Cycle -- -------------------- procedure Validate_Cycle (G : Library_Graph; Cycle : Library_Graph_Cycle_Id) is Msg : constant String := "Validate_Cycle"; begin pragma Assert (Present (G)); if not Present (Cycle) then Write_Error (Msg, Has_Invalid_Cycle); Write_Str (" empty cycle"); Write_Eol; Write_Eol; return; end if; if Kind (G, Cycle) = No_Cycle_Kind then Write_Error (Msg, Has_Invalid_Cycle); Write_Str (" cycle (LGC_Id_"); Write_Int (Int (Cycle)); Write_Str (") is a No_Cycle"); Write_Eol; Write_Eol; end if; -- A cycle requires at least one edge (self cycle) to form a circuit if Length (G, Cycle) < 1 then Write_Error (Msg, Has_Invalid_Cycle); Write_Str (" cycle (LGC_Id_"); Write_Int (Int (Cycle)); Write_Str (") does not contain enough edges"); Write_Eol; Write_Eol; end if; Validate_Cycle_Path (G, Cycle); end Validate_Cycle; ------------------------- -- Validate_Cycle_Path -- ------------------------- procedure Validate_Cycle_Path (G : Library_Graph; Cycle : Library_Graph_Cycle_Id) is Msg : constant String := "Validate_Cycle_Path"; Edge : Library_Graph_Edge_Id; Edges : LGE_Sets.Membership_Set; Iter : Edges_Of_Cycle_Iterator; begin pragma Assert (Present (G)); pragma Assert (Present (Cycle)); -- Use a set to detect duplicate edges while traversing the cycle Edges := LGE_Sets.Create (Length (G, Cycle)); -- Inspect the edges of the cycle, trying to catch duplicates Iter := Iterate_Edges_Of_Cycle (G, Cycle); while Has_Next (Iter) loop Next (Iter, Edge); -- The current edge has already been encountered while traversing -- the cycle. This indicates that the cycle is malformed as edges -- are not repeated in the circuit. if LGE_Sets.Contains (Edges, Edge) then Write_Error (Msg, Has_Invalid_Cycle); Write_Str (" library graph edge (LGE_Id_"); Write_Int (Int (Edge)); Write_Str (") is repeated in cycle (LGC_Id_"); Write_Int (Int (Cycle)); Write_Str (")"); Write_Eol; -- Otherwise add the current edge to the set of encountered edges else LGE_Sets.Insert (Edges, Edge); end if; end loop; LGE_Sets.Destroy (Edges); end Validate_Cycle_Path; --------------------- -- Validate_Cycles -- --------------------- procedure Validate_Cycles (G : Library_Graph) is Cycle : Library_Graph_Cycle_Id; Iter : All_Cycle_Iterator; begin pragma Assert (Present (G)); -- Nothing to do when switch -d_V (validate bindo cycles, graphs, and -- order) is not in effect. if not Debug_Flag_Underscore_VV then return; end if; Start_Phase (Cycle_Validation); Iter := Iterate_All_Cycles (G); while Has_Next (Iter) loop Next (Iter, Cycle); Validate_Cycle (G, Cycle); end loop; End_Phase (Cycle_Validation); if Has_Invalid_Cycle then raise Invalid_Cycle; end if; end Validate_Cycles; end Cycle_Validators; ---------------------------------- -- Elaboration_Order_Validators -- ---------------------------------- package body Elaboration_Order_Validators is Has_Invalid_Data : Boolean := False; -- Flag set when the elaboration order contains invalid data ----------------------- -- Local subprograms -- ----------------------- function Build_Elaborable_Unit_Set return Unit_Sets.Membership_Set; pragma Inline (Build_Elaborable_Unit_Set); -- Create a set from all units that need to be elaborated procedure Report_Missing_Elaboration (U_Id : Unit_Id); pragma Inline (Report_Missing_Elaboration); -- Emit an error concerning unit U_Id that must be elaborated, but was -- not. procedure Report_Missing_Elaborations (Set : Unit_Sets.Membership_Set); pragma Inline (Report_Missing_Elaborations); -- Emit errors on all units in set Set that must be elaborated, but were -- not. procedure Report_Spurious_Elaboration (U_Id : Unit_Id); pragma Inline (Report_Spurious_Elaboration); -- Emit an error concerning unit U_Id that is incorrectly elaborated procedure Validate_Unit (U_Id : Unit_Id; Elab_Set : Unit_Sets.Membership_Set); pragma Inline (Validate_Unit); -- Validate the elaboration status of unit U_Id. Elab_Set is the set of -- all units that need to be elaborated. procedure Validate_Units (Order : Unit_Id_Table); pragma Inline (Validate_Units); -- Validate all units in elaboration order Order ------------------------------- -- Build_Elaborable_Unit_Set -- ------------------------------- function Build_Elaborable_Unit_Set return Unit_Sets.Membership_Set is Iter : Elaborable_Units_Iterator; Set : Unit_Sets.Membership_Set; U_Id : Unit_Id; begin Set := Unit_Sets.Create (Number_Of_Elaborable_Units); Iter := Iterate_Elaborable_Units; while Has_Next (Iter) loop Next (Iter, U_Id); Unit_Sets.Insert (Set, U_Id); end loop; return Set; end Build_Elaborable_Unit_Set; -------------------------------- -- Report_Missing_Elaboration -- -------------------------------- procedure Report_Missing_Elaboration (U_Id : Unit_Id) is Msg : constant String := "Report_Missing_Elaboration"; begin pragma Assert (Present (U_Id)); Write_Error (Msg, Has_Invalid_Data); Write_Str ("unit (U_Id_"); Write_Int (Int (U_Id)); Write_Str (") name = "); Write_Name (Name (U_Id)); Write_Str (" must be elaborated"); Write_Eol; end Report_Missing_Elaboration; --------------------------------- -- Report_Missing_Elaborations -- --------------------------------- procedure Report_Missing_Elaborations (Set : Unit_Sets.Membership_Set) is Iter : Unit_Sets.Iterator; U_Id : Unit_Id; begin Iter := Unit_Sets.Iterate (Set); while Unit_Sets.Has_Next (Iter) loop Unit_Sets.Next (Iter, U_Id); Report_Missing_Elaboration (U_Id); end loop; end Report_Missing_Elaborations; --------------------------------- -- Report_Spurious_Elaboration -- --------------------------------- procedure Report_Spurious_Elaboration (U_Id : Unit_Id) is Msg : constant String := "Report_Spurious_Elaboration"; begin pragma Assert (Present (U_Id)); Write_Error (Msg, Has_Invalid_Data); Write_Str ("unit (U_Id_"); Write_Int (Int (U_Id)); Write_Str (") name = "); Write_Name (Name (U_Id)); Write_Str (" must not be elaborated"); end Report_Spurious_Elaboration; -------------------------------- -- Validate_Elaboration_Order -- -------------------------------- procedure Validate_Elaboration_Order (Order : Unit_Id_Table) is begin -- Nothing to do when switch -d_V (validate bindo cycles, graphs, and -- order) is not in effect. if not Debug_Flag_Underscore_VV then return; end if; Start_Phase (Elaboration_Order_Validation); Validate_Units (Order); End_Phase (Elaboration_Order_Validation); if Has_Invalid_Data then raise Invalid_Elaboration_Order; end if; end Validate_Elaboration_Order; ------------------- -- Validate_Unit -- ------------------- procedure Validate_Unit (U_Id : Unit_Id; Elab_Set : Unit_Sets.Membership_Set) is begin pragma Assert (Present (U_Id)); -- The current unit in the elaboration order appears within the set -- of units that require elaboration. Remove it from the set. if Unit_Sets.Contains (Elab_Set, U_Id) then Unit_Sets.Delete (Elab_Set, U_Id); -- Otherwise the current unit in the elaboration order must not be -- elaborated. else Report_Spurious_Elaboration (U_Id); end if; end Validate_Unit; -------------------- -- Validate_Units -- -------------------- procedure Validate_Units (Order : Unit_Id_Table) is Elab_Set : Unit_Sets.Membership_Set; begin -- Collect all units in the compilation that need to be elaborated -- in a set. Elab_Set := Build_Elaborable_Unit_Set; -- Validate each unit in the elaboration order against the set of -- units that need to be elaborated. for Index in Unit_Id_Tables.First .. Unit_Id_Tables.Last (Order) loop Validate_Unit (U_Id => Order.Table (Index), Elab_Set => Elab_Set); end loop; -- At this point all units that need to be elaborated should have -- been eliminated from the set. Report any units that are missing -- their elaboration. Report_Missing_Elaborations (Elab_Set); Unit_Sets.Destroy (Elab_Set); end Validate_Units; end Elaboration_Order_Validators; --------------------------------- -- Invocation_Graph_Validators -- --------------------------------- package body Invocation_Graph_Validators is Has_Invalid_Data : Boolean := False; -- Flag set when the invocation graph contains invalid data ----------------------- -- Local subprograms -- ----------------------- procedure Validate_Invocation_Graph_Edge (G : Invocation_Graph; Edge : Invocation_Graph_Edge_Id); pragma Inline (Validate_Invocation_Graph_Edge); -- Verify that the attributes of edge Edge of invocation graph G are -- properly set. procedure Validate_Invocation_Graph_Edges (G : Invocation_Graph); pragma Inline (Validate_Invocation_Graph_Edges); -- Verify that the attributes of all edges of invocation graph G are -- properly set. procedure Validate_Invocation_Graph_Vertex (G : Invocation_Graph; Vertex : Invocation_Graph_Vertex_Id); pragma Inline (Validate_Invocation_Graph_Vertex); -- Verify that the attributes of vertex Vertex of invocation graph G are -- properly set. procedure Validate_Invocation_Graph_Vertices (G : Invocation_Graph); pragma Inline (Validate_Invocation_Graph_Vertices); -- Verify that the attributes of all vertices of invocation graph G are -- properly set. ------------------------------- -- Validate_Invocation_Graph -- ------------------------------- procedure Validate_Invocation_Graph (G : Invocation_Graph) is begin pragma Assert (Present (G)); -- Nothing to do when switch -d_V (validate bindo cycles, graphs, and -- order) is not in effect. if not Debug_Flag_Underscore_VV then return; end if; Start_Phase (Invocation_Graph_Validation); Validate_Invocation_Graph_Vertices (G); Validate_Invocation_Graph_Edges (G); End_Phase (Invocation_Graph_Validation); if Has_Invalid_Data then raise Invalid_Invocation_Graph; end if; end Validate_Invocation_Graph; ------------------------------------ -- Validate_Invocation_Graph_Edge -- ------------------------------------ procedure Validate_Invocation_Graph_Edge (G : Invocation_Graph; Edge : Invocation_Graph_Edge_Id) is Msg : constant String := "Validate_Invocation_Graph_Edge"; begin pragma Assert (Present (G)); if not Present (Edge) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" empty invocation graph edge"); Write_Eol; Write_Eol; return; end if; if not Present (Relation (G, Edge)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" invocation graph edge (IGE_Id_"); Write_Int (Int (Edge)); Write_Str (") lacks Relation"); Write_Eol; Write_Eol; end if; if not Present (Target (G, Edge)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" invocation graph edge (IGE_Id_"); Write_Int (Int (Edge)); Write_Str (") lacks Target"); Write_Eol; Write_Eol; end if; end Validate_Invocation_Graph_Edge; ------------------------------------- -- Validate_Invocation_Graph_Edges -- ------------------------------------- procedure Validate_Invocation_Graph_Edges (G : Invocation_Graph) is Edge : Invocation_Graph_Edge_Id; Iter : Invocation_Graphs.All_Edge_Iterator; begin pragma Assert (Present (G)); Iter := Iterate_All_Edges (G); while Has_Next (Iter) loop Next (Iter, Edge); Validate_Invocation_Graph_Edge (G, Edge); end loop; end Validate_Invocation_Graph_Edges; -------------------------------------- -- Validate_Invocation_Graph_Vertex -- -------------------------------------- procedure Validate_Invocation_Graph_Vertex (G : Invocation_Graph; Vertex : Invocation_Graph_Vertex_Id) is Msg : constant String := "Validate_Invocation_Graph_Vertex"; begin pragma Assert (Present (G)); if not Present (Vertex) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" empty invocation graph vertex"); Write_Eol; Write_Eol; return; end if; if not Present (Body_Vertex (G, Vertex)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" invocation graph vertex (IGV_Id_"); Write_Int (Int (Vertex)); Write_Str (") lacks Body_Vertex"); Write_Eol; Write_Eol; end if; if not Present (Construct (G, Vertex)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" invocation graph vertex (IGV_Id_"); Write_Int (Int (Vertex)); Write_Str (") lacks Construct"); Write_Eol; Write_Eol; end if; if not Present (Spec_Vertex (G, Vertex)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" invocation graph vertex (IGV_Id_"); Write_Int (Int (Vertex)); Write_Str (") lacks Spec_Vertex"); Write_Eol; Write_Eol; end if; end Validate_Invocation_Graph_Vertex; ---------------------------------------- -- Validate_Invocation_Graph_Vertices -- ---------------------------------------- procedure Validate_Invocation_Graph_Vertices (G : Invocation_Graph) is Iter : Invocation_Graphs.All_Vertex_Iterator; Vertex : Invocation_Graph_Vertex_Id; begin pragma Assert (Present (G)); Iter := Iterate_All_Vertices (G); while Has_Next (Iter) loop Next (Iter, Vertex); Validate_Invocation_Graph_Vertex (G, Vertex); end loop; end Validate_Invocation_Graph_Vertices; end Invocation_Graph_Validators; ------------------------------ -- Library_Graph_Validators -- ------------------------------ package body Library_Graph_Validators is Has_Invalid_Data : Boolean := False; -- Flag set when the library graph contains invalid data ----------------------- -- Local subprograms -- ----------------------- procedure Validate_Library_Graph_Edge (G : Library_Graph; Edge : Library_Graph_Edge_Id); pragma Inline (Validate_Library_Graph_Edge); -- Verify that the attributes of edge Edge of library graph G are -- properly set. procedure Validate_Library_Graph_Edges (G : Library_Graph); pragma Inline (Validate_Library_Graph_Edges); -- Verify that the attributes of all edges of library graph G are -- properly set. procedure Validate_Library_Graph_Vertex (G : Library_Graph; Vertex : Library_Graph_Vertex_Id); pragma Inline (Validate_Library_Graph_Vertex); -- Verify that the attributes of vertex Vertex of library graph G are -- properly set. procedure Validate_Library_Graph_Vertices (G : Library_Graph); pragma Inline (Validate_Library_Graph_Vertices); -- Verify that the attributes of all vertices of library graph G are -- properly set. ---------------------------- -- Validate_Library_Graph -- ---------------------------- procedure Validate_Library_Graph (G : Library_Graph) is begin pragma Assert (Present (G)); -- Nothing to do when switch -d_V (validate bindo cycles, graphs, and -- order) is not in effect. if not Debug_Flag_Underscore_VV then return; end if; Start_Phase (Library_Graph_Validation); Validate_Library_Graph_Vertices (G); Validate_Library_Graph_Edges (G); End_Phase (Library_Graph_Validation); if Has_Invalid_Data then raise Invalid_Library_Graph; end if; end Validate_Library_Graph; --------------------------------- -- Validate_Library_Graph_Edge -- --------------------------------- procedure Validate_Library_Graph_Edge (G : Library_Graph; Edge : Library_Graph_Edge_Id) is Msg : constant String := "Validate_Library_Graph_Edge"; begin pragma Assert (Present (G)); if not Present (Edge) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" empty library graph edge"); Write_Eol; Write_Eol; return; end if; if Kind (G, Edge) = No_Edge then Write_Error (Msg, Has_Invalid_Data); Write_Str (" library graph edge (LGE_Id_"); Write_Int (Int (Edge)); Write_Str (") is not a valid edge"); Write_Eol; Write_Eol; elsif Kind (G, Edge) = Body_Before_Spec_Edge then Write_Error (Msg, Has_Invalid_Data); Write_Str (" library graph edge (LGE_Id_"); Write_Int (Int (Edge)); Write_Str (") is a Body_Before_Spec edge"); Write_Eol; Write_Eol; end if; if not Present (Predecessor (G, Edge)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" library graph edge (LGE_Id_"); Write_Int (Int (Edge)); Write_Str (") lacks Predecessor"); Write_Eol; Write_Eol; end if; if not Present (Successor (G, Edge)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" library graph edge (LGE_Id_"); Write_Int (Int (Edge)); Write_Str (") lacks Successor"); Write_Eol; Write_Eol; end if; end Validate_Library_Graph_Edge; ---------------------------------- -- Validate_Library_Graph_Edges -- ---------------------------------- procedure Validate_Library_Graph_Edges (G : Library_Graph) is Edge : Library_Graph_Edge_Id; Iter : Library_Graphs.All_Edge_Iterator; begin pragma Assert (Present (G)); Iter := Iterate_All_Edges (G); while Has_Next (Iter) loop Next (Iter, Edge); Validate_Library_Graph_Edge (G, Edge); end loop; end Validate_Library_Graph_Edges; ----------------------------------- -- Validate_Library_Graph_Vertex -- ----------------------------------- procedure Validate_Library_Graph_Vertex (G : Library_Graph; Vertex : Library_Graph_Vertex_Id) is Msg : constant String := "Validate_Library_Graph_Vertex"; begin pragma Assert (Present (G)); if not Present (Vertex) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" empty library graph vertex"); Write_Eol; Write_Eol; return; end if; if (Is_Body_With_Spec (G, Vertex) or else Is_Spec_With_Body (G, Vertex)) and then not Present (Corresponding_Item (G, Vertex)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" library graph vertex (LGV_Id_"); Write_Int (Int (Vertex)); Write_Str (") lacks Corresponding_Item"); Write_Eol; Write_Eol; end if; if not Present (Unit (G, Vertex)) then Write_Error (Msg, Has_Invalid_Data); Write_Str (" library graph vertex (LGV_Id_"); Write_Int (Int (Vertex)); Write_Str (") lacks Unit"); Write_Eol; Write_Eol; end if; end Validate_Library_Graph_Vertex; ------------------------------------- -- Validate_Library_Graph_Vertices -- ------------------------------------- procedure Validate_Library_Graph_Vertices (G : Library_Graph) is Iter : Library_Graphs.All_Vertex_Iterator; Vertex : Library_Graph_Vertex_Id; begin pragma Assert (Present (G)); Iter := Iterate_All_Vertices (G); while Has_Next (Iter) loop Next (Iter, Vertex); Validate_Library_Graph_Vertex (G, Vertex); end loop; end Validate_Library_Graph_Vertices; end Library_Graph_Validators; ----------------- -- Write_Error -- ----------------- procedure Write_Error (Msg : String; Flag : out Boolean) is begin Write_Str ("ERROR: "); Write_Str (Msg); Write_Eol; Flag := True; end Write_Error; end Bindo.Validators;
wookey-project/ewok-legacy
Ada
1,680
ads
-- -- Copyright 2018 The wookey project team <[email protected]> -- - 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; package ewok.syscalls.init with spark_mode => off is procedure init_do_reg_devaccess (caller_id : in ewok.tasks_shared.t_task_id; params : in t_parameters; mode : in ewok.tasks_shared.t_task_mode) with convention => c, export => true, external_name => "init_do_reg_devaccess"; procedure init_do_done (caller_id : in ewok.tasks_shared.t_task_id; mode : in ewok.tasks_shared.t_task_mode); procedure init_do_get_taskid (caller_id : in ewok.tasks_shared.t_task_id; params : in t_parameters; mode : in ewok.tasks_shared.t_task_mode); procedure sys_init (caller_id : in ewok.tasks_shared.t_task_id; params : in out t_parameters; mode : in ewok.tasks_shared.t_task_mode); end ewok.syscalls.init;
luk9400/nsi
Ada
439
adb
package body Square_Root with SPARK_Mode is function Sqrt (X: Float; Tolerance: Float) return Float is A: Float := X; begin while abs(X - A ** 2) > X * Tolerance loop A := (X/A + A) / 2.0; pragma Loop_Invariant ((if X < 1.0 then (A >= X and A < 1.0))); pragma Loop_Invariant ((if X > 1.0 then (A >= 1.0 and A < X))); end loop; return A; end Sqrt; end Square_Root;
ytomino/web-ada
Ada
16,898
adb
package body Web.Producers is procedure Append (Container : in out Node_Array_Access; Item : in Node) is Old : Node_Array_Access := Container; begin if Old = null then Container := new Node_Array'(1 => Item); else begin Container := new Node_Array'(Old.all & Item); exception when others => Free (Old); raise; end; Free (Old); end if; end Append; procedure Release (Data : in out Data_Access) is procedure Cleanup (Item : in out Node_Array_Access) is begin if Item /= null then for I in Item'Range loop if Item (I).Nodes /= null then Cleanup (Item (I).Nodes); end if; end loop; Free (Item); end if; end Cleanup; begin if Data /= null then Data.Reference_Count := Data.Reference_Count - 1; if Data.Reference_Count = 0 then Free (Data.Source); Cleanup (Data.Root_Nodes); Free (Data); end if; end if; end Release; function Find_Part (Template : Producers.Template; Part : String) return Node_Array_Access is begin if Part'Length = 0 then return Template.Nodes; else if Template.Nodes /= null then for I in Template.Nodes'Range loop declare It : Node renames Template.Nodes (I); begin if Template.Data.Source (It.Tag_First .. It.Tag_Last) = Part then return It.Nodes; -- OK end if; end; end loop; end if; raise Data_Error with """" & Part & """ was not found."; end if; end Find_Part; -- implementation function Is_Empty (Object : Template) return Boolean is begin return Object.Data = null; end Is_Empty; function Is_Parsed (Object : Template) return Boolean is begin return Object.Nodes /= null; end Is_Parsed; function Read ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Length : Ada.Streams.Stream_Element_Count; Parsing : Boolean := True) return Template is Source : String_Access := new String (1 .. Natural (Length)); begin String'Read (Stream, Source.all); return Result : Template := (Ada.Finalization.Limited_Controlled with Data => new Data'(Reference_Count => 1, Source => Source, Root_Nodes => null), Nodes => null) do Source := null; -- free on Finalize if Parsing then Parse (Result); end if; end return; exception when others => Free (Source); raise; end Read; procedure Parse (Template : in out Producers.Template) is pragma Check (Dynamic_Predicate, Check => not Is_Empty (Template) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => not Is_Parsed (Template) or else raise Status_Error); Source : constant not null access constant String := Template.Data.Source; I : Positive := Source'First; Text_First : Positive := I; procedure Process (Nodes : in out Node_Array_Access; Tag : in String) is Text_Last : Natural; Tag_First : Positive; Tag_Last : Natural; begin while I <= Source'Last loop if Source (I) = '<' then Text_Last := I - 1; I := I + 1; if Source (I) = '/' then I := I + 1; if Source (I) = '?' then -- </?XXX> I := I + 1; Tag_First := I; while Source (I) /= '>' loop I := I + 1; end loop; Tag_Last := I - 1; I := I + 1; if Source (Tag_First .. Tag_Last) = Tag then if Text_First <= Text_Last then Append ( Nodes, Node'( Text_First => Text_First, Text_Last => Text_Last, Tag_First => 1, Tag_Last => 0, Nodes => null)); end if; Text_First := I; return; end if; end if; elsif Source (I) = '?' then I := I + 1; Tag_First := I; loop case Source (I) is when '/' => Tag_Last := I - 1; I := I + 1; if Source (I) /= '>' then raise Data_Error; end if; exit; when '>' => Tag_Last := I - 1; exit; when others => null; end case; I := I + 1; end loop; I := I + 1; if Source (I - 2) /= '?' then -- <?XXX> declare Sub_Nodes : Node_Array_Access := null; Current_Text_First : constant Positive := Text_First; Current_Text_Last : constant Natural := Text_Last; begin Text_First := I; if Source (I - 2) /= '/' then Process (Sub_Nodes, Source (Tag_First .. Tag_Last)); end if; Append ( Nodes, Node'( Text_First => Current_Text_First, Text_Last => Current_Text_Last, Tag_First => Tag_First, Tag_Last => Tag_Last, Nodes => Sub_Nodes)); end; end if; else while Source (I) /= '>' loop if Source (I) = '"' then loop I := I + 1; exit when Source (I) = '"'; end loop; I := I + 1; elsif Source (I) = '?' then -- <tag ?XXX> Text_Last := I - 1; I := I + 1; if Source (I) = '?' then -- <tag ?? ...> Append ( Nodes, Node'( Text_First => Text_First, Text_Last => Text_Last, Tag_First => 1, Tag_Last => 0, Nodes => null)); loop I := I + 1; case Source (I) is when '/' | '>' => exit; when '"' => loop I := I + 1; exit when Source (I) = '"'; end loop; when others => null; end case; end loop; Text_First := I; else Tag_First := I; loop case Source (I) is when ' ' | '=' | '/' | '>' => exit; when others => null; end case; I := I + 1; end loop; Tag_Last := I - 1; Append ( Nodes, Node'( Text_First => Text_First, Text_Last => Text_Last, Tag_First => Tag_First, Tag_Last => Tag_Last, Nodes => null)); Text_First := I; end if; else I := I + 1; end if; end loop; end if; else I := I + 1; end if; end loop; end Process; Nodes : Node_Array_Access := null; begin Process (Nodes, ""); if Text_First <= Template.Data.Source'Last then Append ( Nodes, Node'( Text_First => Text_First, Text_Last => Source'Last, Tag_First => 1, Tag_Last => 0, Nodes => null)); elsif Nodes = null then Nodes := new Node_Array'(1 .. 0 => <>); -- empty source file end if; Template.Data.Root_Nodes := Nodes; Template.Nodes := Nodes; end Parse; procedure Read_Parsed_Information ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Template : in out Producers.Template) is pragma Check (Dynamic_Predicate, Check => not Is_Empty (Template) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => not Is_Parsed (Template) or else raise Status_Error); procedure R (Nodes : in out Node_Array_Access) is Length : Integer; begin Integer'Read (Stream, Length); if Length > 0 then Nodes := new Node_Array (1 .. Length); for I in 1 .. Length loop Integer'Read (Stream, Nodes (I).Text_First); Integer'Read (Stream, Nodes (I).Text_Last); Integer'Read (Stream, Nodes (I).Tag_First); Integer'Read (Stream, Nodes (I).Tag_Last); R (Nodes (I).Nodes); end loop; end if; end R; begin pragma Assert (Template.Data.Root_Nodes = null); R (Template.Data.Root_Nodes); if Template.Data.Root_Nodes = null then Template.Data.Root_Nodes := new Node_Array'(1 .. 0 => <>); end if; Template.Nodes := Template.Data.Root_Nodes; end Read_Parsed_Information; procedure Write_Parsed_Information ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Template : in Producers.Template) is pragma Check (Dynamic_Predicate, Check => not Is_Empty (Template) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => Is_Parsed (Template) or else raise Status_Error); begin if Template.Nodes /= Template.Data.Root_Nodes then -- sub template raise Constraint_Error; else pragma Assert (Template.Data.Root_Nodes /= null); declare procedure W (Nodes : in Node_Array_Access) is begin if Nodes /= null then pragma Assert (Nodes'First = 1); Integer'Write (Stream, Nodes'Length); for I in Nodes'Range loop Integer'Write (Stream, Nodes (I).Text_First); Integer'Write (Stream, Nodes (I).Text_Last); Integer'Write (Stream, Nodes (I).Tag_First); Integer'Write (Stream, Nodes (I).Tag_Last); W (Nodes (I).Nodes); end loop; else Integer'Write (Stream, 0); end if; end W; begin W (Template.Data.Root_Nodes); end; end if; end Write_Parsed_Information; overriding procedure Finalize (Object : in out Template) is begin Release (Object.Data); Object.Nodes := null; end Finalize; -- implementation of producing by while loop procedure Start_Produce ( Produce : out Produce_Type; Output : not null access Ada.Streams.Root_Stream_Type'Class; Template : in Producers.Template'Class; Part : in String := "") is pragma Check (Dynamic_Predicate, Check => not Is_Empty (Producers.Template (Template)) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => Is_Parsed (Producers.Template (Template)) or else raise Status_Error); begin Produce.Output := Output; Produce.Sub_Template.Data := Template.Data; Template.Data.Reference_Count := Template.Data.Reference_Count + 1; Produce.Nodes := Find_Part (Producers.Template (Template), Part); if Produce.Nodes /= null then Produce.Position := Produce.Nodes'First - 1; Next (Produce); end if; end Start_Produce; function More (Produce : Produce_Type) return Boolean is begin return Produce.Nodes /= null and then Produce.Position <= Produce.Nodes'Last; end More; function Tag (Produce : Produce_Type) return String is It : Node renames Produce.Nodes (Produce.Position); begin return Produce.Sub_Template.Data.Source (It.Tag_First .. It.Tag_Last); end Tag; function Contents (Produce : Produce_Type) return Template_Constant_Reference_Type is X : constant not null access constant Template := Produce.Sub_Template'Access; begin return (Element => X); -- return (Element => Produce.Sub_Template'Access); -- Note: [gcc-6] It is wrongly detected as dangling. (Bug 70867) -- It's able to avoid this bug by using a temporary variable. end Contents; procedure Next (Produce : in out Produce_Type) is pragma Check (Pre, Check => (Produce.Nodes /= null and then Produce.Position <= Produce.Nodes'Last) or else raise Status_Error); begin loop Produce.Position := Produce.Position + 1; exit when Produce.Position > Produce.Nodes'Last; declare It : Node renames Produce.Nodes (Produce.Position); begin String'Write ( Produce.Output, Produce.Sub_Template.Data.Source (It.Text_First .. It.Text_Last)); Produce.Sub_Template.Nodes := It.Nodes; exit when It.Tag_First <= It.Tag_Last; end; end loop; end Next; procedure End_Produce (Produce : in out Produce_Type) is begin Produce.Output := null; Produce.Nodes := null; Produce.Position := 0; Finalize (Produce.Sub_Template); end End_Produce; -- producing by generalized iterator function Current (Object : Template_Iterator) return Cursor is Index : Natural; Produce : access constant Produce_Type; begin if More (Object.Produce) then Index := Object.Produce.Position; Produce := Object.Produce'Unchecked_Access; else Index := 0; Produce := null; end if; return (Index => Index, Produce => Produce); end Current; -- implementation of producing by generalized iterator function Has_Element (Position : Cursor) return Boolean is begin return Position.Index > 0; end Has_Element; function Tag (Position : Cursor) return String is pragma Check (Pre, Check => Has_Element (Position) or else raise Constraint_Error); pragma Check (Pre, Check => Position.Index = Position.Produce.Position or else raise Status_Error); begin return Tag (Position.Produce.all); end Tag; function Contents (Position : Cursor) return Template_Constant_Reference_Type is pragma Check (Pre, Check => Has_Element (Position) or else raise Constraint_Error); pragma Check (Pre, Check => Position.Index = Position.Produce.Position or else raise Status_Error); begin return Contents (Position.Produce.all); end Contents; function Produce ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Template : Producers.Template'Class; Part : String := "") return Template_Iterator_Interfaces.Forward_Iterator'Class is begin return Result : Template_Iterator do Start_Produce ( Result.Produce, Output, Template, -- checking the predicate Part); Result.First_Index := Result.Produce.Position; end return; end Produce; overriding function First (Object : Template_Iterator) return Cursor is pragma Check (Pre, Check => Object.Produce.Position = Object.First_Index or else raise Status_Error); begin return Current (Object); end First; overriding function Next (Object : Template_Iterator; Position : Cursor) return Cursor is pragma Check (Pre, Check => Has_Element (Position) or else raise Constraint_Error); pragma Check (Pre, Check => Position.Index = Position.Produce.Position or else raise Status_Error); begin Next (Object.Variable_View.Produce); return Current (Object); end Next; -- implementation of producing by closure procedure Produce ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Template : in Producers.Template'Class; Part : in String := ""; Handler : not null access procedure ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Tag : in String; Contents : in Producers.Template)) is pragma Check (Dynamic_Predicate, Check => not Is_Empty (Producers.Template (Template)) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => Is_Parsed (Producers.Template (Template)) or else raise Status_Error); Nodes : constant Node_Array_Access := Find_Part (Producers.Template (Template), Part); begin if Nodes /= null then for I in Nodes'Range loop declare It : Node renames Nodes (I); begin String'Write (Output, Template.Data.Source (It.Text_First .. It.Text_Last)); if It.Tag_First <= It.Tag_Last then declare Sub_Template : constant Producers.Template := Producers.Template'(Ada.Finalization.Limited_Controlled with Data => Template.Data, Nodes => It.Nodes); begin Template.Data.Reference_Count := Template.Data.Reference_Count + 1; Handler ( Output, Template.Data.Source (It.Tag_First .. It.Tag_Last), Sub_Template); end; end if; end; end loop; end if; end Produce; procedure Generic_Produce ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Template : in Producers.Template'Class; Part : in String := ""; Handler : not null access procedure ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Tag : in String; Contents : in Producers.Template; Params : access Parameter); Params : access Parameter) is procedure Handle ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Tag : in String; Contents : Producers.Template) is begin Handler (Output, Tag, Contents, Params); end Handle; begin Produce ( Output, Template, -- Status_Error would be raised if Object is not parsed Part, Handle'Access); end Generic_Produce; -- implementation of producing for the simple case procedure Produce ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Template : in Producers.Template'Class; -- Parsed_Template Part : in String := "") is pragma Check (Dynamic_Predicate, Check => not Is_Empty (Producers.Template (Template)) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => Is_Parsed (Producers.Template (Template)) or else raise Status_Error); Nodes : constant Node_Array_Access := Find_Part (Producers.Template (Template), Part); begin if Nodes /= null then for I in Nodes'Range loop declare It : Node renames Nodes (I); begin String'Write (Output, Template.Data.Source (It.Text_First .. It.Text_Last)); if It.Tag_First <= It.Tag_Last then raise Data_Error; -- some handler is required end if; end; end loop; end if; end Produce; end Web.Producers;
reznikmm/matreshka
Ada
3,824
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- 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 ODF.Constants; package body Matreshka.ODF_Attributes.FO.Hyphenation_Push_Char_Count is -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant FO_Hyphenation_Push_Char_Count_Node) return League.Strings.Universal_String is begin return ODF.Constants.Hyphenation_Push_Char_Count_Name; end Get_Local_Name; end Matreshka.ODF_Attributes.FO.Hyphenation_Push_Char_Count;
micahwelf/FLTK-Ada
Ada
2,606
ads
package FLTK.Widgets.Valuators is type Valuator is new Widget with private; type Valuator_Reference (Data : not null access Valuator'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Valuator; end Forge; function Clamp (This : in Valuator; Input : in Long_Float) return Long_Float; function Round (This : in Valuator; Input : in Long_Float) return Long_Float; function Increment (This : in Valuator; Input : in Long_Float; Step : in Integer) return Long_Float; function Get_Minimum (This : in Valuator) return Long_Float; procedure Set_Minimum (This : in out Valuator; To : in Long_Float); function Get_Maximum (This : in Valuator) return Long_Float; procedure Set_Maximum (This : in out Valuator; To : in Long_Float); function Get_Step (This : in Valuator) return Long_Float; procedure Set_Step (This : in out Valuator; To : in Long_Float); function Get_Value (This : in Valuator) return Long_Float; procedure Set_Value (This : in out Valuator; To : in Long_Float); procedure Set_Bounds (This : in out Valuator; Min, Max : in Long_Float); procedure Set_Precision (This : in out Valuator; To : in Integer); procedure Set_Range (This : in out Valuator; Min, Max : in Long_Float); function Handle (This : in out Valuator; Event : in Event_Kind) return Event_Outcome; private type Valuator is new Widget with null record; overriding procedure Finalize (This : in out Valuator); pragma Inline (Clamp); pragma Inline (Round); pragma Inline (Increment); pragma Inline (Get_Minimum); pragma Inline (Set_Minimum); pragma Inline (Get_Maximum); pragma Inline (Set_Maximum); pragma Inline (Get_Step); pragma Inline (Set_Step); pragma Inline (Get_Value); pragma Inline (Set_Value); pragma Inline (Set_Bounds); pragma Inline (Set_Precision); pragma Inline (Set_Range); pragma Inline (Handle); end FLTK.Widgets.Valuators;
johnperry-math/hac
Ada
10,485
ads
------------------------------------------------------------------------------------- -- -- HAC - HAC Ada Compiler -- -- A compiler in Ada for an Ada subset -- -- Copyright, license, etc. : see top package. -- ------------------------------------------------------------------------------------- -- -- Co_Defs: Compiler Definitions with HAC_Sys.Defs, HAC_Sys.PCode; with Ada.Streams, Ada.Text_IO; package HAC_Sys.Co_Defs is -- NB: cannot be a child package of Compiler because of Parser, Scanner, ... use HAC_Sys.Defs; type Exact_Typ is record -- NB: was called "Item" in SmallAda. TYP : Typen; Ref : Index; -- If TYP is not a standard type, then (TYP, Ref) does identify the type. -- E.g. it can be (Enums, [index of the enumerated type definition]). -- If TYP = Records, Ref is an index into the Block_Table; -- if TYP = Arrays, Ref is an index into the Arrays_Table , or -- if TYP = Enums, Ref is an index into the Id table (the type's name). end record; Type_Undefined : constant Exact_Typ := (TYP => NOTYP, Ref => 0); ------------------------------------------------------------------------- ------------------------------------------------------------ATabEntry---- ------------------------------------------------------------------------- -- Array-Table Entry : Array table entry represents an array. Each entry -- contains the following fields (fields marked with a C are used only by -- the compiler and ignored by the interpreter): -- type ATabEntry is record Index_xTyp : Exact_Typ; -- C Type of the index Element_Size : Index; -- Size of an element Element_xTyp : Exact_Typ; -- C Type of the elements of the array. -- Element_xTYP.Ref is an index to an entry -- in Arrays_Table if the elements of the array -- are themselves arrays Array_Size : Index; -- C Total size of the array Low, High : Index; -- Limits on the array index: array (Low .. High) of Element_TYP end record; ------------------------------------------------------------------------- ------------------------------------------------------------BTabEntry---- ------------------------------------------------------------------------- -- Block-table Entry : Each entry represents a subprogram or a record type. -- -- A subprogram activation record consists of: -- -- (1) the five word fixed area; (see definition of S in Interpreter) -- (2) an area for the actual parameters (whether values or -- addresses), and -- (3) an area for the local variables of the subprogram -- -- Once again, fields marked with C are used only by the compiler -- type BTabEntry is record Id : Alfa; -- Name of the block Last_Id_Idx : Index; -- C pointer to the last identifier in this block Last_Param_Id_Idx : Index; -- C pointer to the last parameter in this block PSize : Index; -- sum of the lengths of areas (1) & (2) above VSize : Index := 0; -- sum of PSize and length of area (3) -- (i.e. size of the activation record for -- this block if it is a subprogram) SrcFrom : Positive; -- Source code line count. Source starts here SrcTo : Positive; -- and goes until here (* Manuel *) end record; type aObject is ( -- Declared number: untyped constant, like -- "pi : constant := 3.1415927"; (RM 3.3.2). Declared_Number_or_Enum_Item, -- Variable, TypeMark, -- Prozedure, Funktion, -- aTask, aEntry, -- Label ); ------------------------------------------------------------------------ ------------------------------------------------------------TabEntry---- ------------------------------------------------------------------------ -- Identifier Table Entry type IdTabEntry is record Name : Alfa; -- identifier name in ALL CAPS Name_with_case : Alfa; -- identifier name with original casing Link : Index; Obj : aObject; -- One of: -- Declared_Number, Variable, TypeMark, -- Prozedure, Funktion, aTask, aEntry Read_only : Boolean; -- If Obj = Variable and Read_only = True, -- it's a typed constant. xTyp : Exact_Typ; -- Type identification Block_Ref : Index; -- Was: Ref (that was used also for what is now xTyp.Ref, -- which caused a mixup for functions' return types!) Normal : Boolean; -- value param? LEV : PCode.Nesting_level; Adr_or_Sz : Integer; Discrete_First : HAC_Integer; -- If Obj = TypeMark, T'First Discrete_Last : HAC_Integer; -- If Obj = TypeMark, T'Last end record; -- Obj Meaning of Adr_or_Sz -- ------------------------------------------------------------------------------- -- Declared_Number_or_Enum_Item Value (number), position (enumerated type) -- Variable Relative position in the stack. -- TypeMark Size (in PCode stack items) of an object -- of the declared type. -- Prozedure Index into the Object Code table, -- or Level 0 Standard Procedure code -- Funktion Index into the Object Code table, -- or Level 0 Standard Function code (SF_Code) -- aTask ? -- aEntry ? -- Label ? subtype Source_Line_String is String (1 .. 1000); ----------------------- -- Compiler tables -- ----------------------- subtype Fixed_Size_Object_Code_Table is HAC_Sys.PCode.Object_Code_Table (0 .. CDMax); type Arrays_Table_Type is array (1 .. AMax) of ATabEntry; type Blocks_Table_Type is array (0 .. BMax) of BTabEntry; type Display_Type is array (PCode.Nesting_level) of Integer; type Entries_Table_Type is array (0 .. EntryMax) of Index; type Identifier_Table_Type is array (0 .. Id_Table_Max) of IdTabEntry; subtype Strings_Constants_Table_Type is String (1 .. SMax); type Tasks_Definitions_Table_Type is array (0 .. TaskMax) of Index; -- Display: keeps track of addressing by nesting level. See Ben-Ari Appendix A. type Source_Stream_Access is access all Ada.Streams.Root_Stream_Type'Class; --------------------- -- Compiler_Data -- --------------------- type Compiler_Data is record -- Source code information and scanner data compiler_stream : Source_Stream_Access; source_file_name : VString; -- Indicative (error messages) -- Parsing Line_Count : Natural; -- Source line counter, used for listing InpLine : Source_Line_String; CH : Character; -- Previous Character read from source program CC : Integer; -- Character counter (=column in current line) LL : Natural; -- Length of current line Sy : KeyWSymbol; -- Last KeyWSymbol read by InSymbol syStart, syEnd : Integer; -- Start and end on line for the symbol in Sy Id : Alfa; -- Identifier from InSymbol Id_with_case : Alfa; -- Same as Id, but with casing. INum : HAC_Integer; -- Integer from InSymbol RNum : HAC_Float; -- FLOAT Number from InSymbol SLeng : Integer; -- String Length -- Compiler tables Arrays_Table : Arrays_Table_Type; -- NB: only static-sized arrays so far. Blocks_Table : Blocks_Table_Type; Display : Display_Type; Entries_Table : Entries_Table_Type; Float_Constants_Table : Float_Constants_Table_Type; -- Used by interpreter at run-time IdTab : Identifier_Table_Type; Strings_Constants_Table : Strings_Constants_Table_Type; -- Used by interpreter at run-time Tasks_Definitions_Table : Tasks_Definitions_Table_Type; -- Indices to compiler tables Arrays_Count : Natural; Blocks_Count : Natural; Entries_Count : Natural; Float_Constants_Count : Natural; Id_Count : Natural; Main_Proc_Id_Index : Natural; Strings_Table_Top : Natural; Tasks_Definitions_Count : Natural; -- Object code ObjCode : Fixed_Size_Object_Code_Table; LC : Integer; -- Location counter in the Object_Code_Table CMax : Integer; -- Top of available ObjCode table; -- CMax + 1 .. CDMax: variable initialization code -- Information about source code Full_Block_Id : VString; -- Full block's Id (P1.P2.F3.P4) Main_Program_ID : Alfa := Empty_Alfa; -- Main program name Main_Program_ID_with_case : Alfa := Empty_Alfa; -- listing_requested : Boolean; comp_dump_requested : Boolean; listing : Ada.Text_IO.File_Type; comp_dump : Ada.Text_IO.File_Type; -- Err_Count : Natural; Errs : Error_set; error_pipe : Smart_error_pipe := null; end record; Universe : constant VString := To_VString ("[-- The Universe --]"); type CASE_Label_Value is record Val : HAC_Integer; -- value of a choice in a CASE statement LC : Index; -- instruction address Is_others : Boolean; end record; type Constant_Rec is record TP : Exact_Typ; I : HAC_Integer; -- Includes Character and enumeration types (including Boolean) R : HAC_Float; end record; end HAC_Sys.Co_Defs;
stcarrez/ada-keystore
Ada
19,743
adb
----------------------------------------------------------------------- -- keystore-files -- Ada keystore files -- Copyright (C) 2019, 2020, 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Log.Loggers; with Keystore.IO.Refs; with Keystore.IO.Files; package body Keystore.Files is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Keystore.Files"); -- ------------------------------ -- Open the keystore file using the given password. -- Raises the Bad_Password exception if no key slot match the password. -- ------------------------------ procedure Open (Container : in out Wallet_File; Password : in Secret_Key; Path : in String; Data_Path : in String := ""; Config : in Wallet_Config := Secure_Config) is procedure Process (Provider : in out Keystore.Passwords.Provider'Class); procedure Process (Provider : in out Keystore.Passwords.Provider'Class) is Slot : Key_Slot; begin Container.Container.Unlock (Provider, Slot); end Process; Info : Wallet_Info; begin Container.Open (Path, Data_Path, Config, Info); Keystore.Passwords.To_Provider (Password, Process'Access); Log.Info ("Keystore {0} is opened", Path); end Open; -- ------------------------------ -- Open the keystore file without unlocking the wallet but get some information -- from the header section. -- ------------------------------ procedure Open (Container : in out Wallet_File; Path : in String; Data_Path : in String := ""; Config : in Wallet_Config := Secure_Config; Info : out Wallet_Info) is use IO.Files; Block : IO.Storage_Block; Wallet_Stream : IO.Files.Wallet_Stream_Access; Stream : IO.Refs.Stream_Ref; begin Log.Debug ("Open keystore {0}", Path); Block.Storage := IO.DEFAULT_STORAGE_ID; Block.Block := 1; Wallet_Stream := new IO.Files.Wallet_Stream; Stream := IO.Refs.Create (Wallet_Stream.all'Access); Wallet_Stream.Open (Path, Data_Path); Container.Container.Open (Config, 1, Block, Stream); Info := Wallet_Stream.Get_Info; Log.Info ("Keystore {0} is opened", Path); end Open; -- ------------------------------ -- Create the keystore file and protect it with the given password. -- The key slot #1 is used. -- ------------------------------ procedure Create (Container : in out Wallet_File; Password : in Secret_Key; Path : in String; Data_Path : in String := ""; Config : in Wallet_Config := Secure_Config) is procedure Process (Provider : in out Keystore.Passwords.Provider'Class); procedure Process (Provider : in out Keystore.Passwords.Provider'Class) is begin Container.Create (Provider, Path, Data_Path, Config); end Process; begin Keystore.Passwords.To_Provider (Password, Process'Access); end Create; procedure Create (Container : in out Wallet_File; Password : in out Keystore.Passwords.Provider'Class; Path : in String; Data_Path : in String := ""; Config : in Wallet_Config := Secure_Config) is Block : IO.Storage_Block; Wallet_Stream : IO.Files.Wallet_Stream_Access; Stream : IO.Refs.Stream_Ref; begin Log.Debug ("Create keystore {0}", Path); Wallet_Stream := new IO.Files.Wallet_Stream; Stream := IO.Refs.Create (Wallet_Stream.all'Access); Block.Storage := IO.DEFAULT_STORAGE_ID; Block.Block := 1; Wallet_Stream.Create (Path, Data_Path, Config); Wallet_Stream.Allocate (IO.MASTER_BLOCK, Block); Container.Container.Create (Password, Config, Block, 1, Stream); end Create; -- ------------------------------ -- Set the keystore master key before creating or opening the keystore. -- ------------------------------ procedure Set_Master_Key (Container : in out Wallet_File; Password : in out Keystore.Passwords.Keys.Key_Provider'Class) is begin Container.Container.Set_Master_Key (Password); end Set_Master_Key; -- ------------------------------ -- Unlock the wallet with the password. -- Raises the Bad_Password exception if no key slot match the password. -- ------------------------------ procedure Unlock (Container : in out Wallet_File; Password : in Secret_Key) is procedure Process (Provider : in out Keystore.Passwords.Provider'Class); procedure Process (Provider : in out Keystore.Passwords.Provider'Class) is Slot : Key_Slot; begin Container.Container.Unlock (Provider, Slot); end Process; begin Keystore.Passwords.To_Provider (Password, Process'Access); end Unlock; procedure Unlock (Container : in out Wallet_File; Password : in out Keystore.Passwords.Provider'Class; Slot : out Key_Slot) is begin Container.Container.Unlock (Password, Slot); end Unlock; -- ------------------------------ -- Close the keystore file. -- ------------------------------ procedure Close (Container : in out Wallet_File) is begin Container.Container.Close; end Close; -- ------------------------------ -- Set some header data in the keystore file. -- ------------------------------ procedure Set_Header_Data (Container : in out Wallet_File; Index : in Header_Slot_Index_Type; Kind : in Header_Slot_Type; Data : in Ada.Streams.Stream_Element_Array) is begin Container.Container.Set_Header_Data (Index, Kind, Data); end Set_Header_Data; -- ------------------------------ -- Get the header data information from the keystore file. -- ------------------------------ procedure Get_Header_Data (Container : in out Wallet_File; Index : in Header_Slot_Index_Type; Kind : out Header_Slot_Type; Data : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset) is begin Container.Container.Get_Header_Data (Index, Kind, Data, Last); end Get_Header_Data; -- Add in the wallet the named entry and associate it the children wallet. -- The children wallet meta data is protected by the container. -- The children wallet has its own key to protect the named entries it manages. procedure Add (Container : in out Wallet_File; Name : in String; Password : in out Keystore.Passwords.Provider'Class; Wallet : in out Wallet_File'Class) is begin null; Keystore.Containers.Add_Wallet (Container.Container, Name, Password, Wallet.Container); end Add; procedure Add (Container : in out Wallet_File; Name : in String; Password : in Keystore.Secret_Key; Wallet : in out Wallet_File'Class) is procedure Process (Provider : in out Keystore.Passwords.Provider'Class); procedure Process (Provider : in out Keystore.Passwords.Provider'Class) is begin Container.Add (Name, Provider, Wallet); end Process; begin Keystore.Passwords.To_Provider (Password, Process'Access); end Add; -- Load from the container the named children wallet. procedure Open (Container : in out Wallet_File; Name : in String; Password : in out Keystore.Passwords.Provider'Class; Wallet : in out Wallet_File'Class) is begin Keystore.Containers.Open_Wallet (Container.Container, Name, Password, Wallet.Container); end Open; procedure Open (Container : in out Wallet_File; Name : in String; Password : in Keystore.Secret_Key; Wallet : in out Wallet_File'Class) is procedure Process (Provider : in out Keystore.Passwords.Provider'Class); procedure Process (Provider : in out Keystore.Passwords.Provider'Class) is begin Container.Open (Name, Provider, Wallet); end Process; begin Keystore.Passwords.To_Provider (Password, Process'Access); end Open; -- ------------------------------ -- Return True if the container was configured. -- ------------------------------ overriding function Is_Configured (Container : in Wallet_File) return Boolean is begin return Container.Container.Get_State = S_PROTECTED; end Is_Configured; -- ------------------------------ -- Return True if the container can be accessed. -- ------------------------------ overriding function Is_Open (Container : in Wallet_File) return Boolean is begin return Container.Container.Get_State = S_OPEN; end Is_Open; -- ------------------------------ -- Get the wallet state. -- ------------------------------ overriding function State (Container : in Wallet_File) return State_Type is begin return Container.Container.Get_State; end State; -- ------------------------------ -- Set the key to encrypt and decrypt the container meta data. -- ------------------------------ overriding procedure Set_Key (Container : in out Wallet_File; Password : in Secret_Key; New_Password : in Secret_Key; Config : in Wallet_Config; Mode : in Mode_Type) is procedure Process (Provider : in out Keystore.Passwords.Provider'Class); procedure Process (Provider : in out Keystore.Passwords.Provider'Class) is procedure Process_New (New_Provider : in out Keystore.Passwords.Provider'Class); procedure Process_New (New_Provider : in out Keystore.Passwords.Provider'Class) is begin Container.Container.Set_Key (Provider, New_Provider, Config, Mode); end Process_New; begin Keystore.Passwords.To_Provider (New_Password, Process_New'Access); end Process; begin Keystore.Passwords.To_Provider (Password, Process'Access); end Set_Key; procedure Set_Key (Container : in out Wallet_File; Password : in out Keystore.Passwords.Provider'Class; New_Password : in out Keystore.Passwords.Provider'Class; Config : in Wallet_Config := Secure_Config; Mode : in Mode_Type := KEY_REPLACE) is begin Container.Container.Set_Key (Password, New_Password, Config, Mode); end Set_Key; -- ------------------------------ -- Remove the key from the key slot identified by `Slot`. The password is necessary to -- make sure a valid password is available. The `Remove_Current` must be set to remove -- the slot when it corresponds to the used password. -- ------------------------------ procedure Remove_Key (Container : in out Wallet_File; Password : in out Keystore.Passwords.Provider'Class; Slot : in Key_Slot; Force : in Boolean) is begin Container.Container.Remove_Key (Password, Slot, Force); end Remove_Key; -- ------------------------------ -- Return True if the container contains the given named entry. -- ------------------------------ overriding function Contains (Container : in Wallet_File; Name : in String) return Boolean is begin return Container.Container.Contains (Name); end Contains; -- ------------------------------ -- Add in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new named entry. -- ------------------------------ overriding procedure Add (Container : in out Wallet_File; Name : in String; Kind : in Entry_Type := T_BINARY; Content : in Ada.Streams.Stream_Element_Array) is begin Container.Container.Add (Name, Kind, Content); end Add; overriding procedure Add (Container : in out Wallet_File; Name : in String; Kind : in Entry_Type := T_BINARY; Input : in out Util.Streams.Input_Stream'Class) is begin Container.Container.Add (Name, Kind, Input); end Add; -- ------------------------------ -- Add or update in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new or updated named entry. -- ------------------------------ overriding procedure Set (Container : in out Wallet_File; Name : in String; Kind : in Entry_Type := T_BINARY; Content : in Ada.Streams.Stream_Element_Array) is begin Container.Container.Set (Name, Kind, Content); end Set; -- ------------------------------ -- Add or update in the wallet the named entry and associate it the content. -- The content is encrypted in AES-CBC with a secret key and an IV vector -- that is created randomly for the new or updated named entry. -- ------------------------------ overriding procedure Set (Container : in out Wallet_File; Name : in String; Kind : in Entry_Type := T_BINARY; Input : in out Util.Streams.Input_Stream'Class) is begin Container.Container.Set (Name, Kind, Input); end Set; -- ------------------------------ -- Update in the wallet the named entry and associate it the new content. -- The secret key and IV vectors are not changed. -- ------------------------------ overriding procedure Update (Container : in out Wallet_File; Name : in String; Kind : in Entry_Type := T_BINARY; Content : in Ada.Streams.Stream_Element_Array) is begin Container.Container.Update (Name, Kind, Content); end Update; -- ------------------------------ -- Read from the wallet the named entry starting at the given position. -- Upon successful completion, Last will indicate the last valid position of -- the Content array. -- ------------------------------ overriding procedure Read (Container : in out Wallet_File; Name : in String; Offset : in Ada.Streams.Stream_Element_Offset; Content : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset) is begin Container.Container.Read (Name, Offset, Content, Last); end Read; -- ------------------------------ -- Write in the wallet the named entry starting at the given position. -- The existing content is overwritten or new content is appended. -- ------------------------------ overriding procedure Write (Container : in out Wallet_File; Name : in String; Offset : in Ada.Streams.Stream_Element_Offset; Content : in Ada.Streams.Stream_Element_Array) is begin Container.Container.Write (Name, Offset, Content); end Write; -- ------------------------------ -- Delete from the wallet the named entry. -- ------------------------------ overriding procedure Delete (Container : in out Wallet_File; Name : in String) is begin Container.Container.Delete (Name); end Delete; overriding procedure Get (Container : in out Wallet_File; Name : in String; Info : out Entry_Info; Content : out Ada.Streams.Stream_Element_Array) is begin Container.Container.Get_Data (Name, Info, Content); end Get; -- ------------------------------ -- Write in the output stream the named entry value from the wallet. -- ------------------------------ overriding procedure Get (Container : in out Wallet_File; Name : in String; Output : in out Util.Streams.Output_Stream'Class) is begin Container.Container.Get_Data (Name, Output); end Get; -- ------------------------------ -- Get the list of entries contained in the wallet that correspond to the optional filter. -- ------------------------------ overriding procedure List (Container : in out Wallet_File; Filter : in Filter_Type := (others => True); Content : out Entry_Map) is begin Container.Container.List (Filter, Content); end List; -- ------------------------------ -- Get the list of entries contained in the wallet that correspond to the optiona filter -- and whose name matches the pattern. -- ------------------------------ overriding procedure List (Container : in out Wallet_File; Pattern : in GNAT.Regpat.Pattern_Matcher; Filter : in Filter_Type := (others => True); Content : out Entry_Map) is begin Container.Container.List (Pattern, Filter, Content); end List; overriding function Find (Container : in out Wallet_File; Name : in String) return Entry_Info is Result : Entry_Info; begin Container.Container.Find (Name, Result); return Result; end Find; -- ------------------------------ -- Get wallet file information and statistics. -- ------------------------------ procedure Get_Stats (Container : in out Wallet_File; Stats : out Wallet_Stats) is begin Container.Container.Get_Stats (Stats); end Get_Stats; procedure Set_Work_Manager (Container : in out Wallet_File; Workers : in Keystore.Task_Manager_Access) is begin Container.Container.Set_Work_Manager (Workers); end Set_Work_Manager; overriding procedure Initialize (Wallet : in out Wallet_File) is begin Wallet.Container.Initialize; end Initialize; overriding procedure Finalize (Wallet : in out Wallet_File) is begin if Wallet.Is_Open then Wallet.Container.Close; end if; end Finalize; end Keystore.Files;
ohenley/ada-util
Ada
12,908
ads
----------------------------------------------------------------------- -- util-properties -- Generic name/value property management -- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010, 2014, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Ada.Finalization; with Ada.Text_IO; with Util.Beans.Objects; with Util.Beans.Basic; with Util.Strings.Vectors; private with Util.Concurrent.Counters; -- = Property Files = -- The `Util.Properties` package and children implements support to read, write and use -- property files either in the Java property file format or the Windows INI configuration file. -- Each property is assigned a key and a value. The list of properties are stored in the -- `Util.Properties.Manager` tagged record and they are indexed by the key name. A property -- is therefore unique in the list. Properties can be grouped together in sub-properties so -- that a key can represent another list of properties. -- -- == File formats == -- The property file consists of a simple name and value pair separated by the `=` sign. -- Thanks to the Windows INI file format, list of properties can be grouped together -- in sections by using the `[section-name]` notation. -- -- test.count=20 -- test.repeat=5 -- [FileTest] -- test.count=5 -- test.repeat=2 -- -- == Using property files == -- An instance of the `Util.Properties.Manager` tagged record must be declared and it provides -- various operations that can be used. When created, the property manager is empty. One way -- to fill it is by using the `Load_Properties` procedure to read the property file. Another -- way is by using the `Set` procedure to insert or change a property by giving its name -- and its value. -- -- In this example, the property file `test.properties` is loaded and assuming that it contains -- the above configuration example, the `Get ("test.count")` will return the string `"20"`. -- The property `test.repeat` is then modified to have the value `"23"` and the properties are -- then saved in the file. -- -- with Util.Properties; -- ... -- Props : Util.Properties.Manager; -- ... -- Props.Load_Properties (Path => "test.properties"); -- Ada.Text_IO.Put_Line ("Count: " & Props.Get ("test.count"); -- Props.Set ("test.repeat", "23"); -- Props.Save_Properties (Path => "test.properties"); -- -- To be able to access a section from the property manager, it is necessary to retrieve it -- by using the `Get` function and giving the section name. For example, to retrieve the -- `test.count` property of the `FileTest` section, the following code is used: -- -- FileTest : Util.Properties.Manager := Props.Get ("FileTest"); -- ... -- Ada.Text_IO.Put_Line ("[FileTest] Count: " -- & FileTest.Get ("test.count"); -- -- When getting or removing a property, the `NO_PROPERTY` exception is raised if the property -- name was not found in the map. To avoid that exception, it is possible to check whether -- the name is known by using the `Exists` function. -- -- if Props.Exists ("test.old_count") then -- ... -- Property exist -- end if; -- -- @include util-properties-json.ads -- @include util-properties-bundles.ads -- -- == Advance usage of properties == -- The property manager holds the name and value pairs by using an Ada Bean object. -- -- It is possible to iterate over the properties by using the `Iterate` procedure that -- accepts as parameter a `Process` procedure that gets the property name as well as the -- property value. The value itself is passed as an `Util.Beans.Objects.Object` type. -- package Util.Properties is NO_PROPERTY : exception; use Ada.Strings.Unbounded; subtype Value is Util.Beans.Objects.Object; function "+" (S : String) return Unbounded_String renames To_Unbounded_String; function "-" (S : Unbounded_String) return String renames To_String; function To_String (V : in Value) return String renames Util.Beans.Objects.To_String; -- The manager holding the name/value pairs and providing the operations -- to get and set the properties. type Manager is new Ada.Finalization.Controlled and Util.Beans.Basic.Bean with private; type Manager_Access is access all Manager'Class; -- Get the value identified by the name. -- If the name cannot be found, the method should return the Null object. overriding function Get_Value (From : in Manager; Name : in String) return Util.Beans.Objects.Object; -- Set the value identified by the name. -- If the map contains the given name, the value changed. -- Otherwise name is added to the map and the value associated with it. overriding procedure Set_Value (From : in out Manager; Name : in String; Value : in Util.Beans.Objects.Object); -- Returns TRUE if the property manager is empty. function Is_Empty (Self : in Manager'Class) return Boolean; -- Returns TRUE if the property exists. function Exists (Self : in Manager'Class; Name : in Unbounded_String) return Boolean; -- Returns TRUE if the property exists. function Exists (Self : in Manager'Class; Name : in String) return Boolean; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in String) return String; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in String) return Unbounded_String; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in Unbounded_String) return Unbounded_String; -- Returns the property value. Raises an exception if not found. function Get (Self : in Manager'Class; Name : in Unbounded_String) return String; -- Returns the property value or Default if it does not exist. function Get (Self : in Manager'Class; Name : in String; Default : in String) return String; -- Returns a property manager that is associated with the given name. -- Raises NO_PROPERTY if there is no such property manager or if a property exists -- but is not a property manager. function Get (Self : in Manager'Class; Name : in String) return Manager; -- Create a property manager and associated it with the given name. function Create (Self : in out Manager'Class; Name : in String) return Manager; -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager'Class; Name : in String; Item : in String); -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager'Class; Name : in String; Item : in Unbounded_String); -- Set the value of the property. The property is created if it -- does not exists. procedure Set (Self : in out Manager'Class; Name : in Unbounded_String; Item : in Unbounded_String); -- Remove the property given its name. If the property does not -- exist, raises NO_PROPERTY exception. procedure Remove (Self : in out Manager'Class; Name : in String); -- Remove the property given its name. If the property does not -- exist, raises NO_PROPERTY exception. procedure Remove (Self : in out Manager'Class; Name : in Unbounded_String); -- Iterate over the properties and execute the given procedure passing the -- property name and its value. procedure Iterate (Self : in Manager'Class; Process : access procedure (Name : in String; Item : in Value)); -- Collect the name of the properties defined in the manager. -- When a prefix is specified, only the properties starting with the prefix are -- returned. procedure Get_Names (Self : in Manager; Into : in out Util.Strings.Vectors.Vector; Prefix : in String := ""); -- Load the properties from the file input stream. The file must follow -- the definition of Java property files. When a prefix is specified, keep -- only the properties that starts with the prefix. When <b>Strip</b> is True, -- the prefix part is removed from the property name. procedure Load_Properties (Self : in out Manager'Class; File : in Ada.Text_IO.File_Type; Prefix : in String := ""; Strip : in Boolean := False); -- Load the properties from the file. The file must follow the -- definition of Java property files. When a prefix is specified, keep -- only the properties that starts with the prefix. When <b>Strip</b> is True, -- the prefix part is removed from the property name. -- Raises NAME_ERROR if the file does not exist. procedure Load_Properties (Self : in out Manager'Class; Path : in String; Prefix : in String := ""; Strip : in Boolean := False); -- Save the properties in the given file path. procedure Save_Properties (Self : in out Manager'Class; Path : in String; Prefix : in String := ""); -- Copy the properties from FROM which start with a given prefix. -- If the prefix is empty, all properties are copied. When <b>Strip</b> is True, -- the prefix part is removed from the property name. procedure Copy (Self : in out Manager'Class; From : in Manager'Class; Prefix : in String := ""; Strip : in Boolean := False); -- Get the property manager represented by the item value. -- Raise the Conversion_Error exception if the value is not a property manager. function To_Manager (Item : in Value) return Manager; -- Returns True if the item value represents a property manager. function Is_Manager (Item : in Value) return Boolean; private -- Abstract interface for the implementation of Properties -- (this allows to decouples the implementation from the API) package Interface_P is type Manager is abstract limited new Util.Beans.Basic.Bean with record Count : Util.Concurrent.Counters.Counter; Shared : Boolean := False; end record; type Manager_Access is access all Manager'Class; -- Returns TRUE if the property exists. function Exists (Self : in Manager; Name : in String) return Boolean is abstract; -- Remove the property given its name. procedure Remove (Self : in out Manager; Name : in String) is abstract; -- Iterate over the properties and execute the given procedure passing the -- property name and its value. procedure Iterate (Self : in Manager; Process : access procedure (Name : in String; Item : in Value)) is abstract; -- Deep copy of properties stored in 'From' to 'To'. function Create_Copy (Self : in Manager) return Manager_Access is abstract; end Interface_P; -- Create a property implementation if there is none yet. procedure Check_And_Create_Impl (Self : in out Manager); type Manager is new Ada.Finalization.Controlled and Util.Beans.Basic.Bean with record Impl : Interface_P.Manager_Access := null; end record; overriding procedure Adjust (Object : in out Manager); overriding procedure Finalize (Object : in out Manager); end Util.Properties;
AdaCore/libadalang
Ada
177
ads
package Foo is type Myint is new Integer; --# decl function F return Myint is (1); X : Myint := F; --# decl procedure Set_X (V : Myint); --# decl end;
tum-ei-rcs/StratoX
Ada
604
ads
-- @summary this package serves as config lookup in HIL. -- actually this should not be here. Rather, HIL should -- offer an API for that. package HIL.Config with SPARK_Mode is -- PX4IO PX4IO_BAUD_RATE_HZ : constant := 1_500_000; -- UBLOX Baudrate: Default: 9_600, PX4-FMU configured: 38_400 UBLOX_BAUD_RATE_HZ : constant := 38_400; type Buzzer_Out_T is (BUZZER_USE_PORT, BUZZER_USE_AUX5); BUZZER_PORT : constant Buzzer_Out_T := BUZZER_USE_AUX5; -- Pixlite: BUZZER_USE_AUX5. Pixhawk: BUZZER_USE_PORT -- MPU6000 MPU6000_SAMPLE_RATE_HZ : constant := 100; end HIL.Config;
byblakeorriver/coinapi-sdk
Ada
9,715
adb
-- EMS _ REST API -- This section will provide necessary information about the `CoinAPI EMS REST API` protocol. <br/> This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> <br/><br/> Implemented Standards: * [HTTP1.0](https://datatracker.ietf.org/doc/html/rfc1945) * [HTTP1.1](https://datatracker.ietf.org/doc/html/rfc2616) * [HTTP2.0](https://datatracker.ietf.org/doc/html/rfc7540) ### Endpoints <table> <thead> <tr> <th>Deployment method</th> <th>Environment</th> <th>Url</th> </tr> </thead> <tbody> <tr> <td>Managed Cloud</td> <td>Production</td> <td>Use <a href=\"#ems_docs_sh\">Managed Cloud REST API /v1/locations</a> to get specific endpoints to each server site where your deployments span</td> </tr> <tr> <td>Managed Cloud</td> <td>Sandbox</td> <td><code>https://ems_gateway_aws_eu_central_1_dev.coinapi.io/</code></td> </tr> <tr> <td>Self Hosted</td> <td>Production</td> <td>IP Address of the <code>ems_gateway</code> container/excecutable in the closest server site to the caller location</td> </tr> <tr> <td>Self Hosted</td> <td>Sandbox</td> <td>IP Address of the <code>ems_gateway</code> container/excecutable in the closest server site to the caller location</td> </tr> </tbody> </table> ### Authentication If the software is deployed as `Self_Hosted` then API do not require authentication as inside your infrastructure, your company is responsible for the security and access controls. <br/><br/> If the software is deployed in our `Managed Cloud`, there are 2 methods for authenticating with us, you only need to use one: 1. Custom authorization header named `X_CoinAPI_Key` with the API Key 2. Query string parameter named `apikey` with the API Key 3. <a href=\"#certificate\">TLS Client Certificate</a> from the `Managed Cloud REST API` (/v1/certificate/pem endpoint) while establishing a TLS session with us. #### Custom authorization header You can authorize by providing additional custom header named `X_CoinAPI_Key` and API key as its value. Assuming that your API key is `73034021_THIS_IS_SAMPLE_KEY`, then the authorization header you should send to us will look like: <br/><br/> `X_CoinAPI_Key: 73034021_THIS_IS_SAMPLE_KEY` <aside class=\"success\">This method is recommended by us and you should use it in production environments.</aside> #### Query string authorization parameter You can authorize by providing an additional parameter named `apikey` with a value equal to your API key in the query string of your HTTP request. Assuming that your API key is `73034021_THIS_IS_SAMPLE_KEY` and that you want to request all balances, then your query string should look like this: <br/><br/> `GET /v1/balances?apikey=73034021_THIS_IS_SAMPLE_KEY` <aside class=\"notice\">Query string method may be more practical for development activities.</aside> -- -- The version of the OpenAPI document: v1 -- Contact: [email protected] -- -- NOTE: This package is auto generated by OpenAPI-Generator 6.2.1. -- https://openapi-generator.tech -- Do not edit the class manually. pragma Warnings (Off, "*is not referenced"); with Swagger.Streams; package body .Clients is pragma Style_Checks ("-mr"); -- Get balances -- Get current currency balance from all or single exchange. procedure V_1Balances_Get (Client : in out Client_Type; Exchange_Id : in Swagger.Nullable_UString; Result : out .Models.Balance_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICTION_JSON)); URI.Add_Param ("exchange_id", Exchange_Id); URI.Set_Path ("/v1/balances"); Client.Call (Swagger.Clients.GET, URI, Reply); .Models.Deserialize (Reply, "", Result); end V_1Balances_Get; -- Cancel all orders request -- This request cancels all open orders on single specified exchange. procedure V_1Orders_Cancel_All_Post (Client : in out Client_Type; Order_Cancel_All_Request_Type : in .Models.OrderCancelAllRequest_Type; Result : out .Models.MessageReject_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICTION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); .Models.Serialize (Req.Stream, "", Order_Cancel_All_Request_Type); URI.Set_Path ("/v1/orders/cancel/all"); Client.Call (Swagger.Clients.POST, URI, Req, Reply); .Models.Deserialize (Reply, "", Result); end V_1Orders_Cancel_All_Post; -- Cancel order request -- Request cancel for an existing order. The order can be canceled using the `client_order_id` or `exchange_order_id`. procedure V_1Orders_Cancel_Post (Client : in out Client_Type; Order_Cancel_Single_Request_Type : in .Models.OrderCancelSingleRequest_Type; Result : out .Models.OrderExecutionReport_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICTION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); .Models.Serialize (Req.Stream, "", Order_Cancel_Single_Request_Type); URI.Set_Path ("/v1/orders/cancel"); Client.Call (Swagger.Clients.POST, URI, Req, Reply); .Models.Deserialize (Reply, "", Result); end V_1Orders_Cancel_Post; -- Get open orders -- Get last execution reports for open orders across all or single exchange. procedure V_1Orders_Get (Client : in out Client_Type; Exchange_Id : in Swagger.Nullable_UString; Result : out .Models.OrderExecutionReport_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICTION_JSON)); URI.Add_Param ("exchange_id", Exchange_Id); URI.Set_Path ("/v1/orders"); Client.Call (Swagger.Clients.GET, URI, Reply); .Models.Deserialize (Reply, "", Result); end V_1Orders_Get; -- History of order changes -- Based on the date range, all changes registered in the orderbook. procedure V_1Orders_History_Time_Start_Time_End_Get (Client : in out Client_Type; Time_Start : in Swagger.UString; Time_End : in Swagger.UString; Result : out .Models.OrderHistory_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON)); URI.Set_Path ("/v1/orders/history/{time_start}/{time_end}"); URI.Set_Path_Param ("time_start", Time_Start); URI.Set_Path_Param ("time_end", Time_End); Client.Call (Swagger.Clients.GET, URI, Reply); .Models.Deserialize (Reply, "", Result); end V_1Orders_History_Time_Start_Time_End_Get; -- Send new order -- This request creating new order for the specific exchange. procedure V_1Orders_Post (Client : in out Client_Type; Order_New_Single_Request_Type : in .Models.OrderNewSingleRequest_Type; Result : out .Models.OrderExecutionReport_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICTION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); .Models.Serialize (Req.Stream, "", Order_New_Single_Request_Type); URI.Set_Path ("/v1/orders"); Client.Call (Swagger.Clients.POST, URI, Req, Reply); .Models.Deserialize (Reply, "", Result); end V_1Orders_Post; -- Get order execution report -- Get the last order execution report for the specified order. The requested order does not need to be active or opened. procedure V_1Orders_Status_Client_Order_Id_Get (Client : in out Client_Type; Client_Order_Id : in Swagger.UString; Result : out .Models.OrderExecutionReport_Type) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON)); URI.Set_Path ("/v1/orders/status/{client_order_id}"); URI.Set_Path_Param ("client_order_id", Client_Order_Id); Client.Call (Swagger.Clients.GET, URI, Reply); .Models.Deserialize (Reply, "", Result); end V_1Orders_Status_Client_Order_Id_Get; -- Get open positions -- Get current open positions across all or single exchange. procedure V_1Positions_Get (Client : in out Client_Type; Exchange_Id : in Swagger.Nullable_UString; Result : out .Models.Position_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin Client.Set_Accept ((Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICTION_JSON)); URI.Add_Param ("exchange_id", Exchange_Id); URI.Set_Path ("/v1/positions"); Client.Call (Swagger.Clients.GET, URI, Reply); .Models.Deserialize (Reply, "", Result); end V_1Positions_Get; end .Clients;
stcarrez/ada-util
Ada
10,802
ads
----------------------------------------------------------------------- -- util-dates-formats -- Date Format ala strftime -- Copyright (C) 2011, 2018, 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Properties; -- == Localized date formatting == -- The `Util.Dates.Formats` provides a date formatting and parsing operation similar to the -- Unix `strftime`, `strptime` or the `GNAT.Calendar.Time_IO`. The localization of month -- and day labels is however handled through `Util.Properties.Bundle` (similar to -- the Java world). Unlike `strftime` and `strptime`, this allows to have a multi-threaded -- application that reports dates in several languages. The `GNAT.Calendar.Time_IO` only -- supports English and this is the reason why it is not used here. -- -- The date pattern recognizes the following formats: -- -- | Format | Description | -- | --- | ---------- | -- | %a | The abbreviated weekday name according to the current locale. -- | %A | The full weekday name according to the current locale. -- | %b | The abbreviated month name according to the current locale. -- | %h | Equivalent to %b. (SU) -- | %B | The full month name according to the current locale. -- | %c | The preferred date and time representation for the current locale. -- | %C | The century number (year/100) as a 2-digit integer. (SU) -- | %d | The day of the month as a decimal number (range 01 to 31). -- | %D | Equivalent to %m/%d/%y -- | %e | Like %d, the day of the month as a decimal number, -- | | but a leading zero is replaced by a space. (SU) -- | %F | Equivalent to %Y\-%m\-%d (the ISO 8601 date format). (C99) -- | %G | The ISO 8601 week-based year -- | %H | The hour as a decimal number using a 24-hour clock (range 00 to 23). -- | %I | The hour as a decimal number using a 12-hour clock (range 01 to 12). -- | %j | The day of the year as a decimal number (range 001 to 366). -- | %k | The hour (24 hour clock) as a decimal number (range 0 to 23); -- | %l | The hour (12 hour clock) as a decimal number (range 1 to 12); -- | %m | The month as a decimal number (range 01 to 12). -- | %M | The minute as a decimal number (range 00 to 59). -- | %n | A newline character. (SU) -- | %p | Either "AM" or "PM" -- | %P | Like %p but in lowercase: "am" or "pm" -- | %r | The time in a.m. or p.m. notation. -- | | In the POSIX locale this is equivalent to %I:%M:%S %p. (SU) -- | %R | The time in 24 hour notation (%H:%M). -- | %s | The number of seconds since the Epoch, that is, -- | | since 1970\-01\-01 00:00:00 UTC. (TZ) -- | %S | The second as a decimal number (range 00 to 60). -- | %t | A tab character. (SU) -- | %T | The time in 24 hour notation (%H:%M:%S). (SU) -- | %u | The day of the week as a decimal, range 1 to 7, -- | | Monday being 1. See also %w. (SU) -- | %U | The week number of the current year as a decimal -- | | number, range 00 to 53 -- | %V | The ISO 8601 week number -- | %w | The day of the week as a decimal, range 0 to 6, -- | | Sunday being 0. See also %u. -- | %W | The week number of the current year as a decimal number, -- | | range 00 to 53 -- | %x | The preferred date representation for the current locale -- | | without the time. -- | %X | The preferred time representation for the current locale -- | | without the date. -- | %y | The year as a decimal number without a century (range 00 to 99). -- | %Y | The year as a decimal number including the century. -- | %z | The timezone as hour offset from GMT. -- | %Z | The timezone or name or abbreviation. -- -- The following strftime flags are ignored: -- -- | Format | Description | -- | --- | ---------- | -- | %E | Modifier: use alternative format, see below. (SU) -- | %O | Modifier: use alternative format, see below. (SU) -- -- SU: Single Unix Specification -- C99: C99 standard, POSIX.1-2001 -- -- See strftime (3) and strptime (3) manual page -- -- To format and use the localize date, it is first necessary to get a bundle -- for the `dates` so that date elements are translated into the given locale. -- -- Factory : Util.Properties.Bundles.Loader; -- Bundle : Util.Properties.Bundles.Manager; -- ... -- Load_Bundle (Factory, "dates", "fr", Bundle); -- -- The date is formatted according to the pattern string described above. -- The bundle is used by the formatter to use the day and month names in the -- expected locale. -- -- Date : String := Util.Dates.Formats.Format (Pattern => Pattern, -- Date => Ada.Calendar.Clock, -- Bundle => Bundle); -- -- To parse a date according to a pattern and a localization, the same pattern string -- and bundle can be used and the `Parse` function will return the date in split format. -- -- Result : Date_Record := Util.Dates.Formats.Parse (Date => Date, -- Pattern => Pattern, -- Bundle => Bundle); -- package Util.Dates.Formats is -- Month labels. MONTH_NAME_PREFIX : constant String := "util.month"; -- Day labels. DAY_NAME_PREFIX : constant String := "util.day"; -- Short month/day suffix. SHORT_SUFFIX : constant String := ".short"; -- Long month/day suffix. LONG_SUFFIX : constant String := ".long"; -- The date time pattern name to be used for the %x representation. -- This property name is searched in the bundle to find the localized date time pattern. DATE_TIME_LOCALE_NAME : constant String := "util.datetime.pattern"; -- The default date pattern for %c (English). DATE_TIME_DEFAULT_PATTERN : constant String := "%a %b %_d %T %Y"; -- The date pattern to be used for the %x representation. -- This property name is searched in the bundle to find the localized date pattern. DATE_LOCALE_NAME : constant String := "util.date.pattern"; -- The default date pattern for %x (English). DATE_DEFAULT_PATTERN : constant String := "%m/%d/%y"; -- The time pattern to be used for the %X representation. -- This property name is searched in the bundle to find the localized time pattern. TIME_LOCALE_NAME : constant String := "util.time.pattern"; -- The default time pattern for %X (English). TIME_DEFAULT_PATTERN : constant String := "%T %Y"; AM_NAME : constant String := "util.date.am"; PM_NAME : constant String := "util.date.pm"; AM_DEFAULT : constant String := "AM"; PM_DEFAULT : constant String := "PM"; -- Format the date passed in <b>Date</b> using the date pattern specified in <b>Pattern</b>. -- The date pattern is similar to the Unix <b>strftime</b> operation. -- -- For month and day of week strings, use the resource bundle passed in <b>Bundle</b>. -- Append the formatted date in the <b>Into</b> string. procedure Format (Into : in out Ada.Strings.Unbounded.Unbounded_String; Pattern : in String; Date : in Date_Record; Bundle : in Util.Properties.Manager'Class); -- Format the date passed in <b>Date</b> using the date pattern specified in <b>Pattern</b>. -- For month and day of week strings, use the resource bundle passed in <b>Bundle</b>. -- Append the formatted date in the <b>Into</b> string. procedure Format (Into : in out Ada.Strings.Unbounded.Unbounded_String; Pattern : in String; Date : in Ada.Calendar.Time; Bundle : in Util.Properties.Manager'Class); function Format (Pattern : in String; Date : in Ada.Calendar.Time; Bundle : in Util.Properties.Manager'Class) return String; -- Append the localized month string in the <b>Into</b> string. -- The month string is found in the resource bundle under the name: -- util.month<month number>.short -- util.month<month number>.long -- If the month string is not found, the month is displayed as a number. procedure Append_Month (Into : in out Ada.Strings.Unbounded.Unbounded_String; Month : in Ada.Calendar.Month_Number; Bundle : in Util.Properties.Manager'Class; Short : in Boolean := True); -- Append the localized month string in the <b>Into</b> string. -- The month string is found in the resource bundle under the name: -- util.month<month number>.short -- util.month<month number>.long -- If the month string is not found, the month is displayed as a number. procedure Append_Day (Into : in out Ada.Strings.Unbounded.Unbounded_String; Day : in Ada.Calendar.Formatting.Day_Name; Bundle : in Util.Properties.Manager'Class; Short : in Boolean := True); -- Append a number with padding if necessary procedure Append_Number (Into : in out Ada.Strings.Unbounded.Unbounded_String; Value : in Natural; Padding : in Character; Length : in Natural := 2); -- Append the timezone offset procedure Append_Time_Offset (Into : in out Ada.Strings.Unbounded.Unbounded_String; Offset : in Ada.Calendar.Time_Zones.Time_Offset); -- Parse the date according to the pattern and the given locale bundle and -- return the data split record. -- A `Constraint_Error` exception is raised if the date string is not in the correct format. function Parse (Date : in String; Pattern : in String; Bundle : in Util.Properties.Manager'Class) return Date_Record; end Util.Dates.Formats;
reznikmm/matreshka
Ada
3,714
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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 XML.DOM.Attributes; package ODF.DOM.Smil_Decelerate_Attributes is pragma Preelaborate; type ODF_Smil_Decelerate_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Smil_Decelerate_Attribute_Access is access all ODF_Smil_Decelerate_Attribute'Class with Storage_Size => 0; end ODF.DOM.Smil_Decelerate_Attributes;
reznikmm/matreshka
Ada
4,728
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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 XML.DOM.Visitors; with ODF.DOM.Text_Description_Elements; package Matreshka.ODF_Text.Description_Elements is type Text_Description_Element_Node is new Matreshka.ODF_Text.Abstract_Text_Element_Node and ODF.DOM.Text_Description_Elements.ODF_Text_Description with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Text_Description_Element_Node; overriding function Get_Local_Name (Self : not null access constant Text_Description_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Text_Description_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Text_Description_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Text_Description_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Text.Description_Elements;
msrLi/portingSources
Ada
1,119
adb
-- Copyright 2013-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 type Small is range -128 .. 127; SR : Small := 48; type Small_Integer is range -2 ** 31 .. 2 ** 31 - 1; SI : Small_Integer := 740804; type Integer4_T is range -2 ** 31 .. 2 ** 31 - 1; for Integer4_T'Size use 32; IR : Integer4_T := 974; begin Do_Nothing (SR'Address); -- STOP Do_Nothing (SI'Address); Do_Nothing (IR'Address); end Foo;
LiberatorUSA/GUCEF
Ada
326
adb
with Agar.Core.Thin; with Interfaces.C; package body Agar.Core.Config is package C renames Interfaces.C; use type C.int; function Load return Boolean is begin return Thin.Config.Load = 0; end Load; function Save return Boolean is begin return Thin.Config.Save = 0; end Save; end Agar.Core.Config;
charlie5/aIDE
Ada
9,375
ads
----------------------------------------------------------------------- -- GtkAda - Ada95 binding for the Gimp Toolkit -- -- -- -- Copyright (C) 1998-1999 -- -- Emmanuel Briot, Joel Brobecker and Arnaud Charlet -- -- Copyright (C) 2003 ACT Europe -- -- Copyright (C) 2010, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public -- -- License as published by the Free Software Foundation; either -- -- version 2 of the License, or (at your option) any later version. -- -- -- -- This 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 -- -- General Public License for more details. -- -- -- -- You should have received a copy of the GNU 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. -- -- -- ----------------------------------------------------------------------- with Glib; use Glib; with Gtk; use Gtk; with Gtk.Adjustment; use Gtk.Adjustment; with Gtk.Button; use Gtk.Button; with Gtk.Check_Button; use Gtk.Check_Button; with Gtk.Dialog; use Gtk.Dialog; with Gtk.Label; use Gtk.Label; with Gtk.Combo_Box_Text; use Gtk.Combo_Box_Text; with Gtk.gEntry; use Gtk.gEntry; with Gtk.Text_View; use Gtk.Text_View; with Gtk.Handlers; use Gtk.Handlers; with Gtk.Widget; use Gtk.Widget; with Gtk.Window; use Gtk.Window; with Interfaces.C.Strings; with Gtk.Notebook; use Gtk.Notebook; package Common_Gtk is -- This package is created to avoid the instantiation of the -- generic packages for callbacks. This provides a much smaller -- executable -- It also contains services that are used in 2 or more examples -- of testgtk. package Widget_Handler is new Handlers.Callback (Gtk_Widget_Record); package User_Widget_Handler is new Handlers.User_Callback (Gtk_Widget_Record, Gtk_Widget); package Label_Handler is new Handlers.Callback (Gtk_Label_Record); package Label_return_Handler is new Handlers.return_Callback (Gtk_Label_Record, Boolean); package Notebook_Cb is new Handlers.Callback (Gtk_Notebook_Record); procedure enable_bold_Tabs_for (the_Notebook : in gtk_Notebook); package comboBox_Text_Handler is new Handlers.Callback (Gtk_Combo_Box_Text_Record); package Adj_Handler is new Handlers.Callback (Gtk_Adjustment_Record); package Check_Handler is new Handlers.Callback (Gtk_Check_Button_Record); package Button_Handler is new Handlers.Callback (Gtk_Button_Record); package Entry_Handler is new Handlers.Callback (Gtk_Entry_Record); -- package Text_Handler is new Handlers.Callback (Gtk_Text_Record); package Textview_Handler is new Handlers.Callback (Gtk_Text_View_Record); type Gtk_Window_Access is access all Gtk_Window; package Destroy_Handler is new Handlers.User_Callback (Gtk_Window_Record, Gtk_Window_Access); procedure Destroy_Window (Win : access Gtk.Window.Gtk_Window_Record'Class; Ptr : Gtk_Window_Access); type Gtk_Dialog_Access is access all Gtk_Dialog; package Destroy_Dialog_Handler is new Handlers.User_Callback (Gtk_Dialog_Record, Gtk_Dialog_Access); procedure Destroy_Dialog (Win : access Gtk_Dialog_Record'Class; Ptr : Gtk_Dialog_Access); -- procedure Build_Option_Menu -- (Omenu : out Gtk.Option_Menu.Gtk_Option_Menu; -- Gr : in out Widget_SList.GSlist; -- Items : Chars_Ptr_Array; -- History : Gint; -- Cb : Widget_Handler.Marshallers.Void_Marshaller.Handler); -- -- Builds an option menu with the given list of items. -- -- If 'History' is in Items'Range, then item number 'History' -- -- will be set to active. function Image_Of (I : Gint) return String; -- Returns the image of the given Gint. The leading spaces are -- stripped. package ICS renames Interfaces.C.Strings; Book_Open_Xpm : ICS.chars_ptr_array := (ICS.New_String ("16 16 4 1"), ICS.New_String (" c None s None"), ICS.New_String (". c black"), ICS.New_String ("X c #808080"), ICS.New_String ("o c white"), ICS.New_String (" "), ICS.New_String (" .. "), ICS.New_String (" .Xo. ... "), ICS.New_String (" .Xoo. ..oo. "), ICS.New_String (" .Xooo.Xooo... "), ICS.New_String (" .Xooo.oooo.X. "), ICS.New_String (" .Xooo.Xooo.X. "), ICS.New_String (" .Xooo.oooo.X. "), ICS.New_String (" .Xooo.Xooo.X. "), ICS.New_String (" .Xooo.oooo.X. "), ICS.New_String (" .Xoo.Xoo..X. "), ICS.New_String (" .Xo.o..ooX. "), ICS.New_String (" .X..XXXXX. "), ICS.New_String (" ..X....... "), ICS.New_String (" .. "), ICS.New_String (" ")); Book_Closed_Xpm : ICS.chars_ptr_array := (ICS.New_String ("16 16 6 1"), ICS.New_String (" c None s None"), ICS.New_String (". c black"), ICS.New_String ("X c red"), ICS.New_String ("o c yellow"), ICS.New_String ("O c #808080"), ICS.New_String ("# c white"), ICS.New_String (" "), ICS.New_String (" .. "), ICS.New_String (" ..XX. "), ICS.New_String (" ..XXXXX. "), ICS.New_String (" ..XXXXXXXX. "), ICS.New_String (".ooXXXXXXXXX. "), ICS.New_String ("..ooXXXXXXXXX. "), ICS.New_String (".X.ooXXXXXXXXX. "), ICS.New_String (".XX.ooXXXXXX.. "), ICS.New_String (" .XX.ooXXX..#O "), ICS.New_String (" .XX.oo..##OO. "), ICS.New_String (" .XX..##OO.. "), ICS.New_String (" .X.#OO.. "), ICS.New_String (" ..O.. "), ICS.New_String (" .. "), ICS.New_String (" ")); Mini_Page_Xpm : ICS.chars_ptr_array := (ICS.New_String ("16 16 4 1"), ICS.New_String (" c None s None"), ICS.New_String (". c black"), ICS.New_String ("X c white"), ICS.New_String ("O c #808080"), ICS.New_String (" "), ICS.New_String (" ....... "), ICS.New_String (" .XXXXX.. "), ICS.New_String (" .XoooX.X. "), ICS.New_String (" .XXXXX.... "), ICS.New_String (" .XooooXoo.o "), ICS.New_String (" .XXXXXXXX.o "), ICS.New_String (" .XooooooX.o "), ICS.New_String (" .XXXXXXXX.o "), ICS.New_String (" .XooooooX.o "), ICS.New_String (" .XXXXXXXX.o "), ICS.New_String (" .XooooooX.o "), ICS.New_String (" .XXXXXXXX.o "), ICS.New_String (" ..........o "), ICS.New_String (" oooooooooo "), ICS.New_String (" ")); Gtk_Mini_Xpm : ICS.chars_ptr_array := (ICS.New_String ("15 20 17 1"), ICS.New_String (" c None"), ICS.New_String (". c #14121F"), ICS.New_String ("+ c #278828"), ICS.New_String ("@ c #9B3334"), ICS.New_String ("# c #284C72"), ICS.New_String ("$ c #24692A"), ICS.New_String ("% c #69282E"), ICS.New_String ("& c #37C539"), ICS.New_String ("* c #1D2F4D"), ICS.New_String ("= c #6D7076"), ICS.New_String ("- c #7D8482"), ICS.New_String ("; c #E24A49"), ICS.New_String ("> c #515357"), ICS.New_String (", c #9B9C9B"), ICS.New_String ("' c #2FA232"), ICS.New_String (") c #3CE23D"), ICS.New_String ("! c #3B6CCB"), ICS.New_String (" "), ICS.New_String (" ***> "), ICS.New_String (" >.*!!!* "), ICS.New_String (" ***....#*= "), ICS.New_String (" *!*.!!!**!!# "), ICS.New_String (" .!!#*!#*!!!!# "), ICS.New_String (" @%#!.##.*!!$& "), ICS.New_String (" @;%*!*.#!#')) "), ICS.New_String (" @;;@%!!*$&)'' "), ICS.New_String (" @%.%@%$'&)$+' "), ICS.New_String (" @;...@$'*'*)+ "), ICS.New_String (" @;%..@$+*.')$ "), ICS.New_String (" @;%%;;$+..$)# "), ICS.New_String (" @;%%;@$$$'.$# "), ICS.New_String (" %;@@;;$$+))&* "), ICS.New_String (" %;;;@+$&)&* "), ICS.New_String (" %;;@'))+> "), ICS.New_String (" %;@'&# "), ICS.New_String (" >%$$ "), ICS.New_String (" >= ")); end Common_Gtk;
reznikmm/matreshka
Ada
3,914
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- 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. ------------------------------------------------------------------------------ -- An input pin is a pin that holds input values to be consumed by an action. ------------------------------------------------------------------------------ with AMF.UML.Pins; package AMF.UML.Input_Pins is pragma Preelaborate; type UML_Input_Pin is limited interface and AMF.UML.Pins.UML_Pin; type UML_Input_Pin_Access is access all UML_Input_Pin'Class; for UML_Input_Pin_Access'Storage_Size use 0; end AMF.UML.Input_Pins;
ytomino/zlib-ada
Ada
3,693
adb
-- test for deflating and inflating with Ada.Command_Line; with Ada.Directories; with Ada.Environment_Variables; with Ada.Text_IO; with Ada.Streams.Stream_IO; with zlib; procedure test_di is use type Ada.Streams.Stream_Element; use type Ada.Streams.Stream_Element_Offset; Verbose : Boolean := False; begin for I in 1 .. Ada.Command_Line.Argument_Count loop if Ada.Command_Line.Argument (I) = "-v" then Verbose := True; end if; end loop; declare Source_File : Ada.Streams.Stream_IO.File_Type; begin Ada.Streams.Stream_IO.Open ( Source_File, Ada.Streams.Stream_IO.In_File, "test_di.adb"); declare Compressed_File_Name : constant String := Ada.Directories.Compose ( Ada.Environment_Variables.Value ("TMPDIR", Default => "/tmp"), "test_di.gz"); Size : constant Ada.Streams.Stream_IO.Count := Ada.Streams.Stream_IO.Size (Source_File); Source : Ada.Streams.Stream_Element_Array (1 .. Ada.Streams.Stream_Element_Offset (Size)); Reading_Last : Ada.Streams.Stream_Element_Offset; begin Ada.Streams.Stream_IO.Read (Source_File, Source, Reading_Last); Ada.Streams.Stream_IO.Close (Source_File); declare Gz_File : Ada.Streams.Stream_IO.File_Type; Stream : zlib.Stream := zlib.Deflate_Init (Header => zlib.GZip); First : Ada.Streams.Stream_Element_Offset := Source'First; In_Last : Ada.Streams.Stream_Element_Offset; Output : Ada.Streams.Stream_Element_Array (1 .. 10); Out_Last : Ada.Streams.Stream_Element_Offset; Finished : Boolean; begin Ada.Streams.Stream_IO.Create (Gz_File, Name => Compressed_File_Name); loop if Verbose then Ada.Text_IO.Put ('*'); end if; zlib.Deflate ( Stream, Source (First .. Source'Last), In_Last, Output, Out_Last, Finish => True, Finished => Finished); Ada.Streams.Stream_IO.Write (Gz_File, Output (Output'First .. Out_Last)); exit when Finished; First := In_Last + 1; end loop; Ada.Streams.Stream_IO.Close (Gz_File); if Verbose then Ada.Text_IO.New_Line; end if; end; declare Gz_File : Ada.Streams.Stream_IO.File_Type; Stream : zlib.Stream := zlib.Inflate_Init (Header => zlib.GZip); Input : Ada.Streams.Stream_Element_Array (1 .. 10); In_First : Ada.Streams.Stream_Element_Offset := Input'Last + 1; In_Last : Ada.Streams.Stream_Element_Offset; In_Used : Ada.Streams.Stream_Element_Offset; Output : Ada.Streams.Stream_Element_Array (1 .. 10); Out_Last : Ada.Streams.Stream_Element_Offset; Finished : Boolean; Index : Ada.Streams.Stream_Element_Offset := Source'First; begin Ada.Streams.Stream_IO.Open ( Gz_File, Ada.Streams.Stream_IO.In_File, Name => Compressed_File_Name); loop if Verbose then Ada.Text_IO.Put ('*'); end if; if In_First > Input'Last then Ada.Streams.Stream_IO.Read (Gz_File, Input, In_Last); In_First := Input'First; end if; zlib.Inflate ( Stream, Input (In_First .. In_Last), In_Used, Output, Out_Last, Finish => In_Last < Input'Last, Finished => Finished); for I in Output'First .. Out_Last loop if Output (I) /= Source (Index) then raise Program_Error; end if; Index := Index + 1; end loop; exit when Finished; In_First := In_Used + 1; end loop; Ada.Streams.Stream_IO.Close (Gz_File); if Verbose then Ada.Text_IO.New_Line; end if; if Index /= Source'Last + 1 then raise Program_Error; end if; end; end; end; -- finish Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok"); end test_di;
reznikmm/matreshka
Ada
5,130
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- 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.Interaction_Uses.Collections is pragma Preelaborate; package UML_Interaction_Use_Collections is new AMF.Generic_Collections (UML_Interaction_Use, UML_Interaction_Use_Access); type Set_Of_UML_Interaction_Use is new UML_Interaction_Use_Collections.Set with null record; Empty_Set_Of_UML_Interaction_Use : constant Set_Of_UML_Interaction_Use; type Ordered_Set_Of_UML_Interaction_Use is new UML_Interaction_Use_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Interaction_Use : constant Ordered_Set_Of_UML_Interaction_Use; type Bag_Of_UML_Interaction_Use is new UML_Interaction_Use_Collections.Bag with null record; Empty_Bag_Of_UML_Interaction_Use : constant Bag_Of_UML_Interaction_Use; type Sequence_Of_UML_Interaction_Use is new UML_Interaction_Use_Collections.Sequence with null record; Empty_Sequence_Of_UML_Interaction_Use : constant Sequence_Of_UML_Interaction_Use; private Empty_Set_Of_UML_Interaction_Use : constant Set_Of_UML_Interaction_Use := (UML_Interaction_Use_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Interaction_Use : constant Ordered_Set_Of_UML_Interaction_Use := (UML_Interaction_Use_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Interaction_Use : constant Bag_Of_UML_Interaction_Use := (UML_Interaction_Use_Collections.Bag with null record); Empty_Sequence_Of_UML_Interaction_Use : constant Sequence_Of_UML_Interaction_Use := (UML_Interaction_Use_Collections.Sequence with null record); end AMF.UML.Interaction_Uses.Collections;
reznikmm/matreshka
Ada
4,073
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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 ODF.DOM.Dr3d_Horizontal_Segments_Attributes; package Matreshka.ODF_Dr3d.Horizontal_Segments_Attributes is type Dr3d_Horizontal_Segments_Attribute_Node is new Matreshka.ODF_Dr3d.Abstract_Dr3d_Attribute_Node and ODF.DOM.Dr3d_Horizontal_Segments_Attributes.ODF_Dr3d_Horizontal_Segments_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Dr3d_Horizontal_Segments_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Dr3d_Horizontal_Segments_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Dr3d.Horizontal_Segments_Attributes;
reznikmm/matreshka
Ada
3,684
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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 XML.DOM.Elements; package ODF.DOM.Text_Sender_Email_Elements is pragma Preelaborate; type ODF_Text_Sender_Email is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Text_Sender_Email_Access is access all ODF_Text_Sender_Email'Class with Storage_Size => 0; end ODF.DOM.Text_Sender_Email_Elements;
JeremyGrosser/clock3
Ada
4,298
adb
with SAMD21_SVD.Interrupts; use SAMD21_SVD.Interrupts; with Board; use Board; with HAL; use HAL; with Str; use Str; package body ESP8266 is ESP_RST : Pins := D4; ESP_EN : Pins := D5; ESP_GPIO_15 : Pins := D10; ESP_GPIO_2 : Pins := D11; ESP_GPIO_0 : Pins := D12; type Boot_Mode is (Normal, Program, SD_Card); procedure Set_Boot_Mode (Mode : Boot_Mode) is begin case Mode is when Normal => Digital_Write (ESP_GPIO_0, True); Digital_Write (ESP_GPIO_2, True); Digital_Write (ESP_GPIO_15, False); when Program => Digital_Write (ESP_GPIO_0, False); Digital_Write (ESP_GPIO_2, True); Digital_Write (ESP_GPIO_15, False); when SD_Card => Digital_Write (ESP_GPIO_0, False); Digital_Write (ESP_GPIO_2, False); Digital_Write (ESP_GPIO_15, True); end case; end Set_Boot_Mode; procedure Reset is begin Digital_Write (ESP_RST, False); Wait (10); Digital_Write (ESP_RST, True); Wait (500); end Reset; procedure Enable is begin Digital_Write (ESP_EN, True); Reset; Byte_Queue.Clear (Serial_Buffer); Enable_Interrupt (SERCOM2_Interrupt); end Enable; procedure Disable is begin Digital_Write (ESP_EN, False); Disable_Interrupt (SERCOM2_Interrupt); end Disable; function To_String (U : UInt8_Array) return String is S : String (1 .. U'Length); J : Positive := S'First; begin for I in U'Range loop S (J) := Character'Val (U (I)); J := J + 1; end loop; return S; end To_String; function To_Array (S : String) return UInt8_Array is U : UInt8_Array (S'Range); begin for I in S'Range loop U (I) := UInt8 (Character'Pos (S (I))); end loop; return U; end To_Array; procedure Initialize is begin Pin_Mode (ESP_EN, Output); Disable; Pin_Mode (ESP_RST, Output); Pin_Mode (ESP_GPIO_15, Output); Pin_Mode (ESP_GPIO_2, Output); Pin_Mode (ESP_GPIO_0, Output); Set_Boot_Mode (Normal); --Set_Boot_Mode (Program); --Enable; end Initialize; procedure Get_Time (Hour, Minute, Second : out Natural) is procedure Wait_For (Ch : Character) is begin loop exit when Character'Val (Serial_Get) = Ch; end loop; end Wait_For; CRLF : constant String := ASCII.CR & ASCII.LF; begin Board.Byte_Queue.Clear (Serial_Buffer); Wait (1000); Serial_Write (To_Array ("wifi.setmode(wifi.STATION)" & CRLF)); Wait (20); Serial_Write (To_Array ("function on_time(sec,usec,server,info) " & CRLF & "tm = rtctime.epoch2cal(sec)" & CRLF & "print(string.format(""!TIME=%04d-%02d-%02dT%02d:%02d:%02d"", tm[""year""], tm[""mon""], tm[""day""], tm[""hour""], tm[""min""], tm[""sec""]))" & CRLF & "end" & CRLF)); Wait (20); Serial_Write (To_Array ("wifi.eventmon.register(wifi.eventmon.STA_GOT_IP, function() sntp.sync(nil, on_time) end)" & CRLF)); Wait (20); Serial_Write (To_Array ("wifi.eventmon.register(wifi.eventmon.STA_CONNECTED, function() print(""!CONNECTED"") end)" & CRLF)); Wait (20); Serial_Write (To_Array ("wifi.sta.config({ssid=""sierra24"",pwd=""whatevenisapassword""})" & CRLF)); Wait (20); Board.Byte_Queue.Clear (Serial_Buffer); loop Wait_For ('!'); declare Line : String := Serial_Get_Line; begin if Starts_With (Line, "TIME=") then declare Hour_Str : String := Line (Find (Line (Line'First + 1 .. Line'Last), 'T') + 1 .. Find (Line, ':') - 1); Minute_Str : String := Line (Hour_Str'Last + 2 .. Hour_Str'Last + 3); Second_Str : String := Line (Minute_Str'Last + 2 .. Minute_Str'Last + 3); begin Hour := To_Natural (Hour_Str); Minute := To_Natural (Minute_Str); Second := To_Natural (Second_Str); return; end; end if; end; end loop; end Get_Time; end ESP8266;
1Crazymoney/LearnAda
Ada
995
ads
package Racionalisok is type Racionalis is private; function Szamlalo ( R: Racionalis ) return Integer; function Nevezo ( R: Racionalis ) return Positive; function "/" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis; function "/" ( X, Y: Racionalis ) return Racionalis; function "/" ( X: Racionalis; Y: Positive ) return Racionalis; function "+" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis; function "+" ( X, Y: Racionalis ) return Racionalis; function "+" ( X: Racionalis; Y: Positive ) return Racionalis; function "*" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis; function "*" ( X, Y: Racionalis ) return Racionalis; function "*" ( X: Racionalis; Y: Positive ) return Racionalis; -- function "=" ( X, Y: Racionalis ) return Boolean; private type Racionalis is record Szamlalo: Integer := 0; Nevezo: Positive := 1; end record; end Racionalisok;
zhmu/ananas
Ada
322
ads
package Generic_Inst7_Types is type Index is new Integer range 0 .. 10; type Element is record I : Integer; end record; type Element_Array is array (Index range <>) of Element; type List (Size : Index := 1) is record Arr : Element_Array (1 .. Size); end record; end Generic_Inst7_Types;
reznikmm/matreshka
Ada
10,821
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with League.Application; with League.Characters; with League.String_Vectors; with Matreshka.Internals.Settings.Ini_Files; with Matreshka.Internals.Settings.Fallbacks; package body Matreshka.Internals.Settings.Ini_Managers is use type League.Strings.Universal_String; package Paths is function User_Path return League.Strings.Universal_String; -- Returns path where user's settings are stored. Returned path has -- trailing path separator. function System_Paths return League.String_Vectors.Universal_String_Vector; -- Returns paths where system settings are stored. Returned path has -- trailing path separator. end Paths; function Ini_File_Name (Self : not null access Ini_File_Manager'Class; Path : League.Strings.Universal_String; Organization : League.Strings.Universal_String; Application : League.Strings.Universal_String := League.Strings.Empty_Universal_String) return League.Strings.Universal_String; -- Constructs file name of settings file. When Appllication is not empty -- this is application settings file, otherwise it is name of organization -- settings file. function Extension (Self : not null access Ini_File_Manager'Class) return League.Strings.Universal_String; -- Returns configuration file extention. -- XXX .conf and .ini are used depending of platform and format, but not -- yet implemented. Unknown_Organization : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("Unknown Organization"); ------------ -- Create -- ------------ overriding function Create (Self : not null access Ini_File_Manager) return not null Settings_Access is begin return Aux : constant not null Settings_Access := Matreshka.Internals.Settings.Fallbacks.Create (Self) do declare Proxy : Fallbacks.Fallback_Settings'Class renames Fallbacks.Fallback_Settings'Class (Aux.all); System_Paths : constant League.String_Vectors.Universal_String_Vector := Paths.System_Paths; begin -- Append user's application and organization files. Proxy.Add (Self.Create (Self.Ini_File_Name (Paths.User_Path, League.Application.Organization_Name, League.Application.Application_Name))); if Self.Ini_File_Name (Paths.User_Path, League.Application.Organization_Name) /= Self.Ini_File_Name (Paths.User_Path, League.Application.Organization_Name, League.Application.Application_Name) then Proxy.Add (Self.Create (Self.Ini_File_Name (Paths.User_Path, League.Application.Organization_Name))); end if; -- Append system's application and organization files for every -- system configuration directory. for J in 1 .. System_Paths.Length loop Proxy.Add (Self.Create (Self.Ini_File_Name (System_Paths.Element (J), League.Application.Organization_Name, League.Application.Application_Name))); if Self.Ini_File_Name (System_Paths.Element (J), League.Application.Organization_Name) /= Self.Ini_File_Name (System_Paths.Element (J), League.Application.Organization_Name, League.Application.Application_Name) then Proxy.Add (Self.Create (Self.Ini_File_Name (System_Paths.Element (J), League.Application.Organization_Name))); end if; end loop; end; end return; end Create; ------------ -- Create -- ------------ overriding function Create (Self : not null access Ini_File_Manager; File_Name : League.Strings.Universal_String) return not null Settings_Access is begin return Matreshka.Internals.Settings.Ini_Files.Create (Self, File_Name); end Create; ------------ -- Create -- ------------ overriding function Create (Self : not null access Ini_File_Manager; Organization_Name : League.Strings.Universal_String; Organization_Domain : League.Strings.Universal_String; Application_Name : League.Strings.Universal_String) return not null Settings_Access is pragma Unreferenced (Organization_Domain); begin return Matreshka.Internals.Settings.Ini_Files.Create (Self, Self.Ini_File_Name (Paths.User_Path, Organization_Name, Application_Name)); end Create; --------------- -- Extension -- --------------- function Extension (Self : not null access Ini_File_Manager'Class) return League.Strings.Universal_String is begin if Self.Native then return League.Strings.To_Universal_String (".conf"); else return League.Strings.To_Universal_String (".ini"); end if; end Extension; ------------------- -- Ini_File_Name -- ------------------- function Ini_File_Name (Self : not null access Ini_File_Manager'Class; Path : League.Strings.Universal_String; Organization : League.Strings.Universal_String; Application : League.Strings.Universal_String := League.Strings.Empty_Universal_String) return League.Strings.Universal_String is begin if Application.Is_Empty then if Organization.Is_Empty then return Path & Unknown_Organization & Self.Extension; else return Path & Organization & Self.Extension; end if; else if Organization.Is_Empty then return Path & Unknown_Organization & '/' & Application & Self.Extension; else return Path & Organization & '/' & Application & Self.Extension; end if; end if; end Ini_File_Name; ----------- -- Paths -- ----------- package body Paths is separate; -------------------- -- To_Storage_Key -- -------------------- overriding function To_Storage_Key (Self : not null access Ini_File_Manager; Key : League.Strings.Universal_String) return League.Strings.Universal_String is pragma Unreferenced (Self); use type League.Characters.Universal_Character; Slash : Boolean := False; begin return Result : League.Strings.Universal_String do for J in 1 .. Key.Length loop if Key.Element (J) = '/' or Key.Element (J) = '\' then Slash := True; else if Slash then if not Result.Is_Empty then Result.Append ('/'); end if; Slash := False; end if; Result.Append (Key.Element (J)); end if; end loop; end return; end To_Storage_Key; end Matreshka.Internals.Settings.Ini_Managers;
joakim-strandberg/wayland_ada_binding
Ada
100
ads
package Client_Examples.Find_Compositor is procedure Run; end Client_Examples.Find_Compositor;
persan/advent-of-code-2020
Ada
364
adb
with Ada.Text_IO; use Ada.Text_IO; procedure Adventofcode.Day_4.Main is procedure Check (Path : String) is Passports : Passport_Vector; begin Passports.Read (Path); Put_Line ("Valid_Passports =>" & Passports.Count_Valid'Img); end Check; begin Check ("src/day-4/input.test"); Check ("src/day-4/input"); end Adventofcode.Day_4.Main;
zhmu/ananas
Ada
5,806
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- SYSTEM.MACHINE_STATE_OPERATIONS -- -- -- -- S p e c -- -- -- -- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; package System.Machine_State_Operations is subtype Code_Loc is System.Address; -- Code location used in building exception tables and for call addresses -- when propagating an exception (also traceback table) Values of this -- type are created by using Label'Address or extracted from machine -- states using Get_Code_Loc. type Machine_State is new System.Address; -- The table based exception handling approach (see a-except.adb) isolates -- the target dependent aspects using an abstract data type interface -- to the type Machine_State, which is represented as a System.Address -- value (presumably implemented as a pointer to an appropriate record -- structure). function Machine_State_Length return System.Storage_Elements.Storage_Offset; -- Function to determine the length of the Storage_Array needed to hold -- a machine state. The machine state will always be maximally aligned. -- The value returned is a constant that will be used to allocate space -- for a machine state value. function Allocate_Machine_State return Machine_State; -- Allocate the required space for a Machine_State procedure Free_Machine_State (M : in out Machine_State); -- Free the dynamic memory taken by Machine_State -- The initial value of type Machine_State is created by the low level -- routine that actually raises an exception using the special builtin -- _builtin_machine_state. This value will typically encode the value of -- the program counter, and relevant registers. The following operations -- are defined on Machine_State values: function Get_Code_Loc (M : Machine_State) return Code_Loc; -- This function extracts the program counter value from a machine state, -- which the caller uses for searching the exception tables, and also for -- recording entries in the traceback table. The call returns a value of -- Null_Loc if the machine state represents the outer level, or some other -- frame for which no information can be provided. procedure Pop_Frame (M : Machine_State); -- This procedure pops the machine state M so that it represents the -- call point, as though the current subprogram had returned. It changes -- only the value referenced by M, and does not affect the current stack -- environment. function Fetch_Code (Loc : Code_Loc) return Code_Loc; -- Some architectures (notably HPUX) use a descriptor to describe a -- subprogram address. This function computes the actual starting -- address of the code from Loc. -- -- Do not add pragma Inline to this function: there is a curious -- interaction between rtsfind and front-end inlining. The exception -- declaration in s-auxdec calls rtsfind, which forces several other system -- packages to be compiled. Some of those have a pragma Inline, and we -- compile the corresponding bodies so that inlining can take place. One -- of these packages is s-mastop, which depends on s-auxdec, which is still -- being compiled: we have not seen all the declarations in it yet, so we -- get confused semantic errors ??? procedure Set_Machine_State (M : Machine_State); -- This routine sets M from the current machine state. It is called when an -- exception is initially signalled to initialize the state. end System.Machine_State_Operations;
AdaCore/libadalang
Ada
818
ads
-- Check the handling of bit order/scalar storage order with System; package Pkg is type U3 is mod 2 ** 3; type U6 is mod 2 ** 6; type U7 is mod 2 ** 7; type R1 is record X1 : U7; X2 : U3; X3 : U6; end record with Bit_Order => System.Low_Order_First, Scalar_Storage_Order => System.Low_Order_First; for R1 use record X1 at 0 range 0 .. 6; X2 at 0 range 7 .. 9; X3 at 1 range 2 .. 7; end record; type R2 is record X1 : U7; X2 : U3; X3 : U6; end record with Bit_Order => System.High_Order_First, Scalar_Storage_Order => System.High_Order_First; for R2 use record X1 at 0 range 0 .. 6; X2 at 0 range 7 .. 9; X3 at 1 range 2 .. 7; end record; end Pkg;
charlie5/aIDE
Ada
12,199
adb
with aIDE.GUI, aIDE.Editor.of_subtype_indication, AdaM.a_Type.enumeration_literal, glib.Error, gtk.Builder, gtk.Handlers; with Ada.Text_IO; use Ada.Text_IO; package body aIDE.Editor.of_access_type is use Gtk.Builder, Glib, glib.Error; function on_type_name_Entry_leave (the_Entry : access Gtk_Entry_Record'Class; Target : in AdaM.a_Type.access_type.view) return Boolean is the_Text : constant String := the_Entry.Get_Text; begin Target.Name_is (the_Text); return False; end on_type_name_Entry_leave; function on_first_Entry_leave (the_Entry : access Gtk_Entry_Record'Class; Target : in AdaM.a_Type.access_type.view) return Boolean is the_Text : constant String := the_Entry.Get_Text; begin -- Target.index_Indication.First_is (the_Text); return False; end on_first_Entry_leave; function on_last_Entry_leave (the_Entry : access Gtk_Entry_Record'Class; Target : in AdaM.a_Type.access_type.view) return Boolean is the_Text : constant String := the_Entry.Get_Text; begin -- Target.index_Indication.Last_is (the_Text); return False; end on_last_Entry_leave; procedure on_index_type_Button_clicked (the_Entry : access Gtk_Button_Record'Class; the_Editor : in aIDE.Editor.of_access_type.view) -- return Boolean is -- the_Text : constant String := the_Entry.get_Text; begin null; -- aIDE.GUI.show_types_Palette (Invoked_by => the_Entry.all'Access, -- Target => the_Editor.Target.index_Indication.main_Type); -- Target.Name_is (the_Text); -- return False; end on_index_type_Button_clicked; procedure on_element_type_Button_clicked (the_Entry : access Gtk_Button_Record'Class; the_Editor : in aIDE.Editor.of_access_type.view) -- return Boolean is -- the_Text : constant String := the_Entry.get_Text; begin null; -- aIDE.GUI.show_types_Palette (Invoked_by => the_Entry.all'Access, -- Target => the_Editor.Target.component_Indication.main_Type); end on_element_type_Button_clicked; procedure on_rid_Button_clicked (the_Button : access Gtk_Button_Record'Class; the_Editor : in aIDE.Editor.of_access_type.view) is pragma Unreferenced (the_Editor); begin the_Button.get_Parent.destroy; end on_rid_Button_clicked; package Entry_return_Callbacks is new Gtk.Handlers.User_Return_Callback (Gtk_Entry_Record, Boolean, AdaM.a_Type.access_type.view); package Button_Callbacks is new Gtk.Handlers.User_Callback (Gtk_Button_Record, aIDE.Editor.of_access_type.view); function on_unconstrained_Label_clicked (the_Label : access Gtk_Label_Record'Class; Self : in aIDE.Editor.of_access_type.view) return Boolean is pragma Unreferenced (the_Label); begin -- Self.Target.is_Constrained; Self.freshen; return False; end on_unconstrained_Label_clicked; function on_constrained_Label_clicked (the_Label : access Gtk_Label_Record'Class; Self : in aIDE.Editor.of_access_type.view) return Boolean is pragma Unreferenced (the_Label); begin -- Self.Target.is_Constrained (Now => False); Self.freshen; return False; end on_constrained_Label_clicked; package Label_return_Callbacks is new Gtk.Handlers.User_Return_Callback (Gtk_Label_Record, Boolean, aIDE.Editor.of_access_type.view); package body Forge is function to_Editor (the_Target : in AdaM.a_Type.access_type.view) return View is use AdaM, Glib; Self : constant Editor.of_access_type.view := new Editor.of_access_type.item; the_Builder : Gtk_Builder; Error : aliased GError; Result : Guint; pragma Unreferenced (Result); begin Self.Target := the_Target; Gtk_New (the_Builder); Result := the_Builder.Add_From_File ("glade/editor/access_type_editor.glade", Error'Access); if Error /= null then raise Program_Error with "Error: adam.Editor.of_enumeration_type ~ " & Get_Message (Error); end if; Self.top_Box := gtk_Box (the_Builder.get_Object ("top_Box")); Self.type_name_Entry := Gtk_Entry (the_Builder.get_Object ("type_name_Entry")); Self.is_Label := Gtk_Label (the_Builder.get_Object ("is_Label")); Self.modifier_Label := Gtk_Label (the_Builder.get_Object ("modifier_Label")); Self.not_null_Label := Gtk_Label (the_Builder.get_Object ("not_null_Label")); Self.subeditor_Box := gtk_Box (the_Builder.get_Object ("subeditor_Box")); -- Self.component_Box := gtk_Box (the_Builder.get_Object ("component_Box")); -- Self.index_type_Button := Gtk_Button (the_Builder.get_Object ("index_type_Button")); -- -- Self.unconstrained_Label := Gtk_Label (the_Builder.get_Object ("unconstrained_Label")); -- Self. constrained_Label := Gtk_Label (the_Builder.get_Object ( "constrained_Label")); -- -- Self.first_Entry := Gtk_Entry (the_Builder.get_Object ("first_Entry")); -- Self. last_Entry := Gtk_Entry (the_Builder.get_Object ( "last_Entry")); -- Self.element_type_Button := Gtk_Button (the_Builder.get_Object ("element_type_Button")); Self.rid_Button := gtk_Button (the_Builder.get_Object ("rid_Button")); Self.subeditor_Box.pack_Start (Editor.of_subtype_indication.Forge.to_Editor (Self.Target.Indication, is_in_unconstrained_Array => False).top_Widget); Self.type_name_Entry.Set_Text (+Self.Target.Name); Entry_return_Callbacks.connect (Self.type_name_Entry, "focus-out-event", on_type_name_Entry_leave'Access, the_Target); -- declare -- indication_Editor : constant aIDE.Editor.of_subtype_indication.view -- := aIDE.Editor.of_subtype_indication.Forge.to_Editor (the_Target => Self.Target.index_Indication.all'Access, -- is_in_unconstrained_Array => not Self.Target.is_Constrained); -- begin -- Self.index_Box.pack_Start (indication_Editor.top_Widget); -- end; -- declare -- indication_Editor : constant aIDE.Editor.of_subtype_indication.view -- := aIDE.Editor.of_subtype_indication.Forge.to_Editor (the_Target => Self.Target.component_Indication.all'Access, -- is_in_unconstrained_Array => False); -- begin -- Self.component_Box.pack_Start (indication_Editor.top_Widget); -- end; -- Self.first_Entry.set_Text (Self.Target.index_Indication.First); -- -- Entry_return_Callbacks.connect (Self.first_Entry, -- "focus-out-event", -- on_first_Entry_leave'Access, -- the_Target); -- -- Self.last_Entry.set_Text (Self.Target.index_Indication.Last); -- -- Entry_return_Callbacks.connect (Self.last_Entry, -- "focus-out-event", -- on_last_Entry_leave'Access, -- the_Target); -- -- -- -- Self.index_type_Button.set_Label (+Self.Target.index_Indication.main_Type.Name); -- -- button_Callbacks.connect (Self.index_type_Button, -- "clicked", -- on_index_type_Button_clicked'Access, -- Self); -- Self.element_type_Button.set_Label (+Self.Target.element_Indication.main_Type.Name); -- -- button_Callbacks.connect (Self.element_type_Button, -- "clicked", -- on_element_type_Button_clicked'Access, -- Self); Button_Callbacks.Connect (Self.rid_Button, "clicked", on_rid_Button_clicked'Access, Self); -- Label_return_Callbacks.Connect (Self.unconstrained_Label, -- "button-release-event", -- on_unconstrained_Label_clicked'Access, -- Self); -- -- Label_return_Callbacks.Connect (Self.constrained_Label, -- "button-release-event", -- on_constrained_Label_clicked'Access, -- Self); Self.freshen; return Self; end to_Editor; end Forge; procedure destroy_Callback (Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class) is begin Widget.destroy; end destroy_Callback; overriding procedure freshen (Self : in out Item) is use AdaM.a_Type.access_type, gtk.Widget; -- the_Literals : AdaM.a_Type.enumeration_literal.vector renames Self.Target.Literals; -- literal_Editor : aIDE.Editor.of_enumeration_literal.view; begin if Self.Target.has_not_Null then Self.not_null_Label.show; else Self.not_null_Label.hide; end if; case Self.Target.Modifier is when None => Self.modifier_Label.hide; when all_Modifier => Self.modifier_Label.show; Self.modifier_Label.set_Text (" all "); when constant_Modifier => Self.modifier_Label.show; Self.modifier_Label.set_Text (" constant "); end case; -- if Self.Target.is_Constrained -- then -- Self.unconstrained_Label.hide; -- Self. constrained_Label.show; -- Self.first_Entry.show; -- Self.last_Entry.show; -- else -- Self.first_Entry.hide; -- Self.last_Entry.hide; -- Self. constrained_Label.hide; -- Self.unconstrained_Label.show; -- end if; null; -- Self.first_Entry.set_Text (Self.Target.First); -- Self.last_Entry .set_Text (Self.Target.Last); -- Self.literals_Box.Foreach (destroy_Callback'Access); -- for Each of the_Literals -- loop -- literal_Editor := Editor.of_enumeration_literal.Forge.to_Editor (Each, -- targets_Parent => Self.Target.all'Access); -- Self.literals_Box.pack_Start (literal_Editor.top_Widget); -- end loop; end freshen; overriding function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget is begin return gtk.Widget.Gtk_Widget (Self.top_Box); end top_Widget; end aIDE.Editor.of_access_type;
reznikmm/matreshka
Ada
7,018
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Db.Table_Filter_Pattern_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Db_Table_Filter_Pattern_Element_Node is begin return Self : Db_Table_Filter_Pattern_Element_Node do Matreshka.ODF_Db.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Db_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Db_Table_Filter_Pattern_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Db_Table_Filter_Pattern (ODF.DOM.Db_Table_Filter_Pattern_Elements.ODF_Db_Table_Filter_Pattern_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Db_Table_Filter_Pattern_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Table_Filter_Pattern_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Db_Table_Filter_Pattern_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Db_Table_Filter_Pattern (ODF.DOM.Db_Table_Filter_Pattern_Elements.ODF_Db_Table_Filter_Pattern_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Db_Table_Filter_Pattern_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Db_Table_Filter_Pattern (Visitor, ODF.DOM.Db_Table_Filter_Pattern_Elements.ODF_Db_Table_Filter_Pattern_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Db_URI, Matreshka.ODF_String_Constants.Table_Filter_Pattern_Element, Db_Table_Filter_Pattern_Element_Node'Tag); end Matreshka.ODF_Db.Table_Filter_Pattern_Elements;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
1,502
ads
with STM32GD.Clock; with STM32GD.Clock.Tree; generic Clock : STM32GD.Clock.Clock_Type; with package Clock_Tree is new STM32GD.Clock.Tree (<>); package STM32GD.RTC is subtype Year_Type is Natural range 2000 .. 2099; subtype Month_Type is Natural range 1 .. 12; subtype Day_Type is Natural range 1 .. 31; subtype Hour_Type is Natural range 0 .. 23; subtype Minute_Type is Natural range 0 .. 59; subtype Second_Type is Natural range 0 .. 59; subtype Second_Delta_Type is Natural range 0 .. (60 * 60 * 24); subtype Minute_Delta_Type is Natural range 0 .. (60 * 24); type Date_Time_Type is record Year : Year_Type; Month : Month_Type; Day : Day_Type; Hour : Hour_Type; Minute : Minute_Type; Second : Second_Type; end record; procedure Init; procedure Unlock; procedure Lock; procedure Read (Date_Time : out Date_Time_Type); generic with procedure Put (S : String); procedure Print (Date_Time : Date_Time_Type); procedure Add_Seconds (Date_Time : in out Date_Time_Type; Second_Delta : Second_Delta_Type); procedure Add_Minutes (Date_Time : in out Date_Time_Type; Minute_Delta : Minute_Delta_Type); procedure Set_Alarm (Date_Time : Date_Time_Type); procedure Wait_For_Alarm; function Alarm_Triggered return Boolean; procedure Clear_Alarm; function To_Seconds (Date_Time : Date_Time_Type) return Natural; end STM32GD.RTC;
SayCV/rtems-addon-packages
Ada
7,784
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2009,2011 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 <[email protected]> 2000 -- Version Control -- $Revision$ -- $Date$ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Ada.Strings.Unbounded; with Interfaces.C; with Terminal_Interface.Curses.Aux; procedure ncurses2.slk_test is procedure myGet (Win : Window := Standard_Window; Str : out Ada.Strings.Unbounded.Unbounded_String; Len : Integer := -1); procedure myGet (Win : Window := Standard_Window; Str : out Ada.Strings.Unbounded.Unbounded_String; Len : Integer := -1) is use Ada.Strings.Unbounded; use Interfaces.C; use Terminal_Interface.Curses.Aux; function Wgetnstr (Win : Window; Str : char_array; Len : int) return int; pragma Import (C, Wgetnstr, "wgetnstr"); -- FIXME: how to construct "(Len > 0) ? Len : 80"? Ask : constant Interfaces.C.size_t := Interfaces.C.size_t'Val (Len + 80); Txt : char_array (0 .. Ask); begin Txt (0) := Interfaces.C.char'First; if Wgetnstr (Win, Txt, Txt'Length) = Curses_Err then raise Curses_Exception; end if; Str := To_Unbounded_String (To_Ada (Txt, True)); end myGet; use Int_IO; use Ada.Strings.Unbounded; c : Key_Code; buf : Unbounded_String; c2 : Character; fmt : Label_Justification := Centered; tmp : Integer; begin c := CTRL ('l'); loop Move_Cursor (Line => 0, Column => 0); c2 := Code_To_Char (c); case c2 is when Character'Val (Character'Pos ('l') mod 16#20#) => -- CTRL('l') Erase; Switch_Character_Attribute (Attr => (Bold_Character => True, others => False)); Add (Line => 0, Column => 20, Str => "Soft Key Exerciser"); Switch_Character_Attribute (On => False, Attr => (Bold_Character => True, others => False)); Move_Cursor (Line => 2, Column => 0); P ("Available commands are:"); P (""); P ("^L -- refresh screen"); P ("a -- activate or restore soft keys"); P ("d -- disable soft keys"); P ("c -- set centered format for labels"); P ("l -- set left-justified format for labels"); P ("r -- set right-justified format for labels"); P ("[12345678] -- set label; labels are numbered 1 through 8"); P ("e -- erase stdscr (should not erase labels)"); P ("s -- test scrolling of shortened screen"); P ("x, q -- return to main menu"); P (""); P ("Note: if activating the soft keys causes your terminal to"); P ("scroll up one line, your terminal auto-scrolls when anything"); P ("is written to the last screen position. The ncurses code"); P ("does not yet handle this gracefully."); Refresh; Restore_Soft_Label_Keys; when 'a' => Restore_Soft_Label_Keys; when 'e' => Clear; when 's' => Add (Line => 20, Column => 0, Str => "Press Q to stop the scrolling-test: "); loop c := Getchar; c2 := Code_To_Char (c); exit when c2 = 'Q'; -- c = ERR? -- TODO when c is not a character (arrow key) -- the behavior is different from the C version. Add (Ch => c2); end loop; when 'd' => Clear_Soft_Label_Keys; when 'l' => fmt := Left; when 'c' => fmt := Centered; when 'r' => fmt := Right; when '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' => Add (Line => 20, Column => 0, Str => "Please enter the label value: "); Set_Echo_Mode (SwitchOn => True); myGet (Str => buf); Set_Echo_Mode (SwitchOn => False); tmp := ctoi (c2); Set_Soft_Label_Key (Label_Number (tmp), To_String (buf), fmt); Refresh_Soft_Label_Keys; Move_Cursor (Line => 20, Column => 0); Clear_To_End_Of_Line; when 'x' | 'q' => exit; -- the C version needed a goto, ha ha -- breaks exit the case not the loop because fall-through -- happens in C! when others => Beep; end case; c := Getchar; -- TODO exit when c = EOF end loop; Erase; End_Windows; end ncurses2.slk_test;
iyan22/AprendeAda
Ada
363
adb
with Ada.Text_Io, Ada.Integer_Text_Io; use Ada.Text_Io, Ada.Integer_Text_Io; with vectores; use vectores; procedure escribir_vector (V : in Vector_De_Enteros) is --Pre: --Post: se han escrito en pantalla todos los valores de V -- begin for pos in V'First..V'Last loop put(V(pos), width => 3); end loop; new_line; end escribir_vector;
reznikmm/matreshka
Ada
6,761
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Chart.Axis_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Chart_Axis_Element_Node is begin return Self : Chart_Axis_Element_Node do Matreshka.ODF_Chart.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Chart_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Chart_Axis_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Chart_Axis (ODF.DOM.Chart_Axis_Elements.ODF_Chart_Axis_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Chart_Axis_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Axis_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Chart_Axis_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Chart_Axis (ODF.DOM.Chart_Axis_Elements.ODF_Chart_Axis_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Chart_Axis_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Chart_Axis (Visitor, ODF.DOM.Chart_Axis_Elements.ODF_Chart_Axis_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Chart_URI, Matreshka.ODF_String_Constants.Axis_Element, Chart_Axis_Element_Node'Tag); end Matreshka.ODF_Chart.Axis_Elements;
charlie5/aShell
Ada
2,499
adb
with Shell.Commands.Safe, Ada.Text_IO, Ada.Exceptions; procedure Test_Concurrent_Commands is use Ada.Text_IO, Ada.Exceptions; task Task_1; task body Task_1 is begin for i in 1 .. 50_000 loop declare use Shell, Shell.Commands, Shell.Commands.Safe, Shell.Commands.Safe.Forge; The_Command : Safe.Command := To_Command ("ls /home"); begin Safe.Run (The_Command); declare Output : constant String := +Output_Of (Results_Of (The_Command)); begin Put_Line ("Task 1 i =" & i'Image & " => " & Output); if Output = "" then raise Program_Error with "Task 1: NO OUTPUT"; end if; end; end; delay 0.01; -- Allow other task a turn. end loop; exception when E : others => Put_Line ("Task 1: Fatal Error"); Put_Line (Exception_Information (E)); end Task_1; task Task_2; task body Task_2 is begin for i in 1 .. 50_000 loop declare use Shell, Shell.Commands, Shell.Commands.Safe, Shell.Commands.Safe.Forge; The_Command : Safe.Command := To_Command ("pwd"); begin Safe.Run (The_Command); declare Output : constant String := +Output_Of (Results_Of (The_Command)); begin Put_Line ("Task 2 i =" & i'Image & " => " & Output); if Output = "" then raise Program_Error with "Task 2: NO OUTPUT"; end if; end; end; delay 0.01; -- Allow other task a turn. end loop; exception when E : others => Put_Line ("Task 2: Fatal Error"); Put_Line (Exception_Information (E)); end Task_2; begin Shell.Open_Log ("aShell_spawn_Client.log"); loop exit when Task_1'Terminated and Task_2'Terminated; delay 0.1; end loop; New_Line (2); Put_Line ("Main Task has terminated."); Shell.Commands.Safe.Stop_Spawn_Client; delay 0.2; Shell.Close_Log; -- Put_Line ("Delaying for 5 minutes."); -- delay 25.0; -- * 60.0; -- Allow time to check for open pipes and zombie processes. end Test_Concurrent_Commands;
joakim-strandberg/wayland_ada_binding
Ada
52,740
adb
with Aida.UTF8; with Ada.Characters.Latin_1; with Aida.Text_IO; use all type Aida.UTF8.Code_Point; -- Known unsupported issues: Escaping of text (for example &amp;) -- The stack roof may be hit if the comments and texts in the XML are HUGE. -- It should not be an issue in general. procedure Aida.XML_SAX_Parse (Argument : in out Argument_Type; Contents : String; Call_Result : in out Aida.Call_Result) is type Initial_State_Id is (Less_Sign, Question_Mark, X, XM, XML, XML_S, XML_S_V, XML_S_VE, XML_S_VER, XML_S_VERS, XML_S_VERSI, XML_S_VERSIO, XML_S_VERSION, XML_S_VERSION_E, XML_S_VERSION_E_Q, XML_S_VERSION_E_Q_1, XML_S_VERSION_E_Q_1_P, XML_S_VERSION_E_Q_1_P_0, XML_S_VERSION_E_Q_1_P_0_Q, XML_S_VERSION_E_Q_1_P_0_Q_S, XML_S_VERSION_E_Q_1_P_0_Q_S_E, XML_S_VERSION_E_Q_1_P_0_Q_S_EN, XML_S_VERSION_E_Q_1_P_0_Q_S_ENC, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCO, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCOD, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODI, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODIN, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_U, XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_UT, XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF, XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D, XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8, XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q, XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q_QM, -- QM is short for Question Mark End_State); type State_Id_Type is (Expecting_NL_Sign_Or_Space_Or_Less_Sign, -- NL = New Line Init_Found_Less_Sign, -- First start tag has not yet been found Init_Found_Less_Followed_By_Exclamation_Sign, -- First start tag has not yet been found Init_Found_Less_Followed_By_Exclamation_And_Dash_Sign, -- First start tag has not yet been found Extracting_Start_Tag_Name, Expecting_G_Sign_Or_Attributes, Expecting_G_Sign_Or_Attributes_And_Found_Slash, Extracting_Attribute_Name, Expecting_Attribute_Value_Quotation_Mark, Extracting_Attribute_Value, Expecting_New_Tag_Or_Extracting_Tag_Value, -- Or start of comment or start- tag or end-tag Expecting_New_Tag_Or_Tag_Value_And_Found_L, Expecting_Only_Trailing_Spaces, Extracting_End_Tag_Name, New_Tag_Or_Tag_Value_And_L_And_Excl_And_Dash, -- ED is short for Exclamation and Dash -- -- Enumeration values introduced to handle <!CDATA[--]]> New_Tag_Or_Tag_Value_And_Found_L_And_Exclamation, New_Tag_Or_Tag_Value_But_Expecting_C, New_Tag_Or_Tag_Value_But_Expecting_CD, New_Tag_Or_Tag_Value_But_Expecting_CDA, New_Tag_Or_Tag_Value_But_Expecting_CDAT, New_Tag_Or_Tag_Value_But_Expecting_CDATA, New_Tag_Or_Tag_Value_But_Expecting_CDATA_And_SB, -- SB is short for Square bracket Extracting_CDATA, Extracting_CDATA_Found_Square_Bracket, Extracting_CDATA_Found_Two_Square_Brackets, Init_Extracting_Comment, -- First start tag has not yet been found Init_Extracting_Comment_And_Found_Dash, -- First start tag has not yet been found Init_Extracting_Comment_And_Found_Dash_Dash, -- First start tag has not yet been found Extracting_Comment, Extracting_Comment_And_Found_Dash, Extracting_Comment_And_Found_Dash_Dash); type Expected_Quotation_Symbol_T is (Single_Quotes, -- Example: 'hello' Double_Quotes -- Example: "hello" ); function Is_Special_Symbol (CP : Aida.UTF8.Code_Point) return Boolean is (if CP = Character'Pos ('<') then True elsif CP = Character'Pos ('>') then True elsif CP = Character'Pos ('/') then True elsif CP = Character'Pos ('"') then True else False); XML_IDENTIFIER_ERROR_1 : constant Integer := -1913564897; XML_IDENTIFIER_ERROR_2 : constant Integer := -0537097086; subtype P_T is Integer range Contents'First .. Contents'Last + 4; subtype Prev_P_T is Integer range Contents'First + 1 .. Contents'Last; procedure Analyze_XML (P : in out P_T) with Global => (In_Out => (Call_Result, Argument), Input => Contents), Pre => (not Call_Result.Has_Failed and P > Contents'First and P <= Contents'Last and Contents'Last < Integer'Last - 4); procedure Analyze_XML (P : in out P_T) is Depth : Natural := 0; State_Id : State_Id_Type := Expecting_NL_Sign_Or_Space_Or_Less_Sign; subtype Prev_Prev_P_T is Integer range Contents'First + 0 .. Contents'Last; subtype Contents_Index_T is Integer range Contents'First .. Contents'Last; CP : Aida.UTF8.Code_Point; Prev_P : Prev_P_T := P; Prev_Prev_P : Prev_Prev_P_T; -- := Prev_P; Start_Tag_Name_First_Index : Contents_Index_T := Prev_P; Start_Tag_Name_Last_Index : Contents_Index_T := Prev_P; Tag_Value_First_Index : Contents_Index_T := Contents'First; Tag_Value_Last_Index : Contents_Index_T := Contents'First; End_Tag_Name_First_Index : Contents_Index_T := Contents'First; End_Tag_Name_Last_Index : Contents_Index_T; Attribute_First_Index : Contents_Index_T := Prev_P; Attribute_Last_Index : Contents_Index_T := Prev_P; Attribute_Value_First_Index : Contents_Index_T := Prev_P; Attribute_Value_Last_Index : Contents_Index_T; Comment_First_Index : Contents_Index_T := Prev_P; -- Shall_Ignore_Tag_Value : Boolean := False; -- Shall_Ignore_Tag_Value : Boolean; -- Shall_Ignore_Until_Next_Quotation_Mark : Boolean := False; Expected_Quotation_Symbol : Expected_Quotation_Symbol_T := Double_Quotes; begin if Aida.UTF8.Is_Valid_UTF8_Code_Point (Source => Contents, Pointer => P) then Aida.UTF8.Get (Source => Contents, Pointer => P, Value => CP); if CP = Character'Pos ('>') then while P <= Contents'Last loop Prev_Prev_P := Prev_P; Prev_P := P; if not Aida.UTF8.Is_Valid_UTF8_Code_Point (Source => Contents, Pointer => P) then Call_Result.Initialize (1434797854, -0068724898); exit; end if; Aida.UTF8.Get (Source => Contents, Pointer => P, Value => CP); pragma Loop_Variant (Increases => P); pragma Loop_Invariant (not Call_Result.Has_Failed); pragma Loop_Invariant (P <= Contents'Last + 4); pragma Loop_Invariant (Prev_Prev_P < Prev_P and Prev_P < P); pragma Loop_Invariant (State_Id /= Extracting_Attribute_Name or (State_Id = Extracting_Attribute_Name and then (Attribute_First_Index < P))); -- Aida.Text_IO.Put ("Extracted:"); -- Aida.Text_IO.Put (Image (CP)); -- Aida.Text_IO.Put (", state "); -- Aida.Text_IO.Put_Line -- (String_T (State_Id_Type'Image (State_Id))); -- Aida.Text_IO.Put (Image (CP)); case State_Id is when Expecting_NL_Sign_Or_Space_Or_Less_Sign => if CP = Character'Pos (' ') or CP = Character'Pos (Ada.Characters.Latin_1.LF) or CP = Character'Pos (Ada.Characters.Latin_1.CR) or CP = Character'Pos (Ada.Characters.Latin_1.HT) then null; -- Normal elsif CP = Character'Pos ('<') then State_Id := Init_Found_Less_Sign; else Call_Result.Initialize (1003548980, 1714289304); exit; end if; when Init_Found_Less_Sign => if CP = Character'Pos ('!') then State_Id := Init_Found_Less_Followed_By_Exclamation_Sign; elsif CP = Character'Pos ('/') then if Depth = 0 then Call_Result.Initialize (-1797161339, -1801650669); exit; end if; if P > Contents'Last then Call_Result.Initialize (0386434633, -1112825058); exit; end if; Text (Argument, "", Call_Result); if Call_Result.Has_Failed then exit; end if; State_Id := Extracting_End_Tag_Name; End_Tag_Name_First_Index := P; elsif not Is_Special_Symbol (CP) then State_Id := Extracting_Start_Tag_Name; Start_Tag_Name_First_Index := Prev_P; pragma Assert (Start_Tag_Name_First_Index < P); else Call_Result.Initialize (1448645964, 0183871387); exit; end if; when Init_Found_Less_Followed_By_Exclamation_Sign => if CP = Character'Pos ('-') then State_Id := Init_Found_Less_Followed_By_Exclamation_And_Dash_Sign; else Call_Result.Initialize (1915807131, 1377704704); exit; end if; when Init_Found_Less_Followed_By_Exclamation_And_Dash_Sign => if CP = Character'Pos ('-') then State_Id := Init_Extracting_Comment; Comment_First_Index := (if P <= Contents'Last then P else Contents'Last); else Call_Result.Initialize (-1302785225, -0551230956); exit; end if; when Extracting_Start_Tag_Name => if CP = Character'Pos (' ') then Start_Tag_Name_Last_Index := Prev_Prev_P; Start_Tag (Argument, Contents (Start_Tag_Name_First_Index .. Start_Tag_Name_Last_Index), Call_Result); if Call_Result.Has_Failed then exit; end if; if Depth < Integer'Last then Depth := Depth + 1; else Call_Result.Initialize (-0197127393, -1788002976); exit; end if; State_Id := Expecting_G_Sign_Or_Attributes; elsif CP = Character'Pos ('>') then Start_Tag_Name_Last_Index := Prev_Prev_P; Start_Tag (Argument, Contents (Start_Tag_Name_First_Index .. Start_Tag_Name_Last_Index), Call_Result); if Call_Result.Has_Failed then exit; end if; if Depth < Integer'Last then Depth := Depth + 1; else Call_Result.Initialize (0133265230, -0905163379); exit; end if; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; elsif Is_Special_Symbol (CP) then Call_Result.Initialize (-0192291225, -1709997324); exit; end if; when Expecting_G_Sign_Or_Attributes => if CP = Character'Pos (' ') or CP = Character'Pos (Ada.Characters.Latin_1.LF) or CP = Character'Pos (Ada.Characters.Latin_1.CR) or CP = Character'Pos (Ada.Characters.Latin_1.HT) then null; -- Normal elsif CP = Character'Pos ('>') then State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; if P > Contents'Last then Call_Result.Initialize (-1521899768, -0725554341); exit; end if; Tag_Value_First_Index := P; elsif CP = Character'Pos ('/') then State_Id := Expecting_G_Sign_Or_Attributes_And_Found_Slash; elsif not Is_Special_Symbol (CP) then Attribute_First_Index := Prev_P; State_Id := Extracting_Attribute_Name; else Call_Result.Initialize (-0429878843, 1344381718); exit; end if; when Expecting_G_Sign_Or_Attributes_And_Found_Slash => if CP = Character'Pos ('>') then State_Id := Expecting_NL_Sign_Or_Space_Or_Less_Sign; Text (Argument, "", Call_Result); if Call_Result.Has_Failed then exit; end if; -- End_Tag_Name_Last_Index := Prev_Prev_P; End_Tag (Argument, Contents (Start_Tag_Name_First_Index .. Start_Tag_Name_Last_Index), Call_Result); if Call_Result.Has_Failed then exit; end if; if Depth > 0 then Depth := Depth - 1; else Call_Result.Initialize (0766893447, -0197942014); exit; end if; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); else Call_Result.Initialize (1180086532, 1745903660); exit; end if; when Extracting_Attribute_Name => if CP = Character'Pos ('=') then Attribute_Last_Index := Prev_Prev_P; State_Id := Expecting_Attribute_Value_Quotation_Mark; elsif CP = Character'Pos (Ada.Characters.Latin_1.LF) or CP = Character'Pos (Ada.Characters.Latin_1.CR) then Call_Result.Initialize (-0986469701, -0000005525); exit; elsif not Is_Special_Symbol (CP) then null; -- Normal else Call_Result.Initialize (0819713752, 1428867079); exit; end if; when Expecting_Attribute_Value_Quotation_Mark => if CP = Character'Pos ('"') then Expected_Quotation_Symbol := Double_Quotes; Attribute_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Extracting_Attribute_Value; elsif CP = Character'Pos (''') then Expected_Quotation_Symbol := Single_Quotes; Attribute_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Extracting_Attribute_Value; else Call_Result.Initialize (0240833721, 0455771309); exit; end if; when Extracting_Attribute_Value => if (CP = Character'Pos ('"') and Expected_Quotation_Symbol = Double_Quotes) or (CP = Character'Pos (''') and Expected_Quotation_Symbol = Single_Quotes) then Attribute_Value_Last_Index := Prev_Prev_P; State_Id := Expecting_G_Sign_Or_Attributes; declare Name : String := Contents (Attribute_First_Index .. Attribute_Last_Index); Value : String := Contents (Attribute_Value_First_Index .. Attribute_Value_Last_Index); begin Attribute (Argument, Name, Value, Call_Result); end; if Call_Result.Has_Failed then exit; end if; elsif CP = Character'Pos (Ada.Characters.Latin_1.LF) or CP = Character'Pos (Ada.Characters.Latin_1.CR) then Call_Result.Initialize (0587945467, 1683764896); exit; end if; when Expecting_New_Tag_Or_Extracting_Tag_Value => -- if CP = Character'Pos ('"') then -- Shall_Ignore_Until_Next_Quotation_Mark := -- not Shall_Ignore_Until_Next_Quotation_Mark; if CP = Character'Pos ('<') then -- if not Shall_Ignore_Until_Next_Quotation_Mark then State_Id := Expecting_New_Tag_Or_Tag_Value_And_Found_L; Tag_Value_Last_Index := Prev_Prev_P; Text (Argument, Contents (Tag_Value_First_Index .. Tag_Value_Last_Index), Call_Result); if Call_Result.Has_Failed then exit; end if; -- end if; end if; when Expecting_New_Tag_Or_Tag_Value_And_Found_L => if CP = Character'Pos ('/') then if P > Contents'Last then Call_Result.Initialize (-1635958681, 2091153567); exit; end if; State_Id := Extracting_End_Tag_Name; End_Tag_Name_First_Index := P; elsif CP = Character'Pos ('!') then State_Id := New_Tag_Or_Tag_Value_And_Found_L_And_Exclamation; elsif Is_Special_Symbol (CP) then Call_Result.Initialize (-0115323975, -1084437773); exit; else -- Will start parsing child tag! State_Id := Extracting_Start_Tag_Name; Start_Tag_Name_First_Index := Prev_P; end if; when New_Tag_Or_Tag_Value_And_Found_L_And_Exclamation => if CP = Character'Pos ('[') then State_Id := New_Tag_Or_Tag_Value_But_Expecting_C; elsif CP = Character'Pos ('-') then State_Id := New_Tag_Or_Tag_Value_And_L_And_Excl_And_Dash; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when New_Tag_Or_Tag_Value_But_Expecting_C => if CP = Character'Pos ('C') then State_Id := New_Tag_Or_Tag_Value_But_Expecting_CD; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when New_Tag_Or_Tag_Value_But_Expecting_CD => if CP = Character'Pos ('D') then State_Id := New_Tag_Or_Tag_Value_But_Expecting_CDA; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when New_Tag_Or_Tag_Value_But_Expecting_CDA => if CP = Character'Pos ('A') then State_Id := New_Tag_Or_Tag_Value_But_Expecting_CDAT; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when New_Tag_Or_Tag_Value_But_Expecting_CDAT => if CP = Character'Pos ('T') then State_Id := New_Tag_Or_Tag_Value_But_Expecting_CDATA; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when New_Tag_Or_Tag_Value_But_Expecting_CDATA => if CP = Character'Pos ('A') then State_Id := New_Tag_Or_Tag_Value_But_Expecting_CDATA_And_SB; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when New_Tag_Or_Tag_Value_But_Expecting_CDATA_And_SB => if CP = Character'Pos ('[') then State_Id := Extracting_CDATA; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when Extracting_CDATA => if CP = Character'Pos (']') then Tag_Value_Last_Index := Prev_Prev_P; State_Id := Extracting_CDATA_Found_Square_Bracket; end if; when Extracting_CDATA_Found_Square_Bracket => if CP = Character'Pos (']') then State_Id := Extracting_CDATA_Found_Two_Square_Brackets; else State_Id := Extracting_CDATA; end if; when Extracting_CDATA_Found_Two_Square_Brackets => if CP = Character'Pos ('>') then CDATA (Argument, Contents (Tag_Value_First_Index .. Tag_Value_Last_Index), Call_Result); if Call_Result.Has_Failed then exit; end if; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; else State_Id := Extracting_CDATA; end if; when Extracting_End_Tag_Name => if CP = Character'Pos ('>') then End_Tag_Name_Last_Index := Prev_Prev_P; End_Tag (Argument, Contents (End_Tag_Name_First_Index .. End_Tag_Name_Last_Index), Call_Result); if Call_Result.Has_Failed then exit; end if; if Depth > 0 then Depth := Depth - 1; else Call_Result.Initialize (-0534201701, -0614895498); exit; end if; if Depth = 0 then State_Id := Expecting_Only_Trailing_Spaces; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); elsif CP = Character'Pos (Ada.Characters.Latin_1.LF) or CP = Character'Pos (Ada.Characters.Latin_1.CR) then Call_Result.Initialize (-1658791000, 1638125646); exit; elsif Is_Special_Symbol (CP) then Call_Result.Initialize (1726646144, -0779212513); exit; end if; when New_Tag_Or_Tag_Value_And_L_And_Excl_And_Dash => if CP = Character'Pos ('-') then Comment_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Extracting_Comment; else State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; end if; when Init_Extracting_Comment => if CP = Character'Pos ('-') then State_Id := Init_Extracting_Comment_And_Found_Dash; end if; when Init_Extracting_Comment_And_Found_Dash => if CP = Character'Pos ('-') then State_Id := Init_Extracting_Comment_And_Found_Dash_Dash; else State_Id := Init_Extracting_Comment; end if; when Init_Extracting_Comment_And_Found_Dash_Dash => if CP = Character'Pos ('>') then Comment (Argument, Value => Contents (Comment_First_Index .. (P - 4)), Call_Result => Call_Result); if Call_Result.Has_Failed then exit; end if; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Expecting_NL_Sign_Or_Space_Or_Less_Sign; else State_Id := Init_Extracting_Comment; end if; when Extracting_Comment => if CP = Character'Pos ('-') then State_Id := Extracting_Comment_And_Found_Dash; end if; when Extracting_Comment_And_Found_Dash => if CP = Character'Pos ('-') then State_Id := Extracting_Comment_And_Found_Dash_Dash; else State_Id := Extracting_Comment; end if; when Extracting_Comment_And_Found_Dash_Dash => if CP = Character'Pos ('>') then Comment (Argument, Value => Contents (Comment_First_Index .. (P - 4)), Call_Result => Call_Result); if Call_Result.Has_Failed then exit; end if; Tag_Value_First_Index := (if P <= Contents'Last then P else Contents'Last); State_Id := Expecting_New_Tag_Or_Extracting_Tag_Value; else State_Id := Init_Extracting_Comment; end if; when Expecting_Only_Trailing_Spaces => if CP = Character'Pos (' ') or CP = 10 or CP = 13 then null; -- Trailing spaces are OK else Call_Result.Initialize (1777504526, -1635825641); exit; end if; end case; end loop; if not Call_Result.Has_Failed and then State_Id /= Expecting_Only_Trailing_Spaces then Call_Result.Initialize (-1968500370, -1627762655); end if; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); end if; else Call_Result.Initialize (-1672429119, -1233854200); end if; end Analyze_XML; State_Id : Initial_State_Id := Less_Sign; P : P_T := Contents'First; CP : Aida.UTF8.Code_Point; begin while P <= Contents'Last loop exit when State_Id = End_State; if not Aida.UTF8.Is_Valid_UTF8_Code_Point (Source => Contents, Pointer => P) then Call_Result.Initialize (-0356399774, -0280059910); exit; end if; Aida.UTF8.Get (Source => Contents, Pointer => P, Value => CP); pragma Loop_Variant (Increases => P); pragma Loop_Invariant (not Call_Result.Has_Failed); pragma Loop_Invariant (State_Id /= Less_Sign or (State_Id = Less_Sign and then (P > Contents'First and Contents'Last >= Contents'First))); pragma Loop_Invariant (State_Id /= Question_Mark or (State_Id = Question_Mark and then (P > Contents'First + 1 and Contents'Last >= Contents'First + 1))); pragma Loop_Invariant (State_Id /= X or (State_Id = X and then (P > Contents'First + 2 and Contents'Last >= Contents'First + 2))); pragma Loop_Invariant (State_Id /= XM or (State_Id = XM and then (P > Contents'First + 3 and Contents'Last >= Contents'First + 3))); pragma Loop_Invariant (State_Id /= XML or (State_Id = XML and then (P > Contents'First + 4 and Contents'Last >= Contents'First + 4))); pragma Loop_Invariant (State_Id /= XML_S or (State_Id = XML_S and then (P > Contents'First + 5 and Contents'Last >= Contents'First + 5))); pragma Loop_Invariant (State_Id /= XML_S_V or (State_Id = XML_S_V and then (P > Contents'First + 6 and Contents'Last >= Contents'First + 6))); pragma Loop_Invariant (State_Id /= XML_S_VE or (State_Id = XML_S_VE and then (P > Contents'First + 7 and Contents'Last >= Contents'First + 7))); pragma Loop_Invariant (State_Id /= XML_S_VER or (State_Id = XML_S_VER and then (P > Contents'First + 8 and Contents'Last >= Contents'First + 8))); pragma Loop_Invariant (State_Id /= XML_S_VERS or (State_Id = XML_S_VERS and then (P > Contents'First + 9 and Contents'Last >= Contents'First + 9))); pragma Loop_Invariant (State_Id /= XML_S_VERSI or (State_Id = XML_S_VERSI and then (P > Contents'First + 10 and Contents'Last >= Contents'First + 10))); pragma Loop_Invariant (State_Id /= XML_S_VERSIO or (State_Id = XML_S_VERSIO and then (P > Contents'First + 11 and Contents'Last >= Contents'First + 11))); pragma Loop_Invariant (State_Id /= XML_S_VERSION or (State_Id = XML_S_VERSION and then (P > Contents'First + 12 and Contents'Last >= Contents'First + 12))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E or (State_Id = XML_S_VERSION_E and then (P > Contents'First + 13 and Contents'Last >= Contents'First + 13))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q or (State_Id = XML_S_VERSION_E_Q and then (P > Contents'First + 14 and Contents'Last >= Contents'First + 14))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1 or (State_Id = XML_S_VERSION_E_Q_1 and then (P > Contents'First + 15 and Contents'Last >= Contents'First + 15))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P or (State_Id = XML_S_VERSION_E_Q_1_P and then (P > Contents'First + 16 and Contents'Last >= Contents'First + 16))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0 or (State_Id = XML_S_VERSION_E_Q_1_P_0 and then (P > Contents'First + 17 and Contents'Last >= Contents'First + 17))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q and then (P > Contents'First + 18 and Contents'Last >= Contents'First + 18))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S and then (P > Contents'First + 19 and Contents'Last >= Contents'First + 19))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_E or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_E and then (P > Contents'First + 20 and Contents'Last >= Contents'First + 20))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_EN or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_EN and then (P > Contents'First + 21 and Contents'Last >= Contents'First + 21))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENC or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENC and then (P > Contents'First + 22 and Contents'Last >= Contents'First + 22))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCO or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCO and then (P > Contents'First + 23 and Contents'Last >= Contents'First + 23))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCOD or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCOD and then (P > Contents'First + 24 and Contents'Last >= Contents'First + 24))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODI or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODI and then (P > Contents'First + 25 and Contents'Last >= Contents'First + 25))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODIN or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODIN and then (P > Contents'First + 26 and Contents'Last >= Contents'First + 26))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING and then (P > Contents'First + 27 and Contents'Last >= Contents'First + 27))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E and then (P > Contents'First + 28 and Contents'Last >= Contents'First + 28))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q and then (P > Contents'First + 29 and Contents'Last >= Contents'First + 29))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_U or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_U and then (P > Contents'First + 30 and Contents'Last >= Contents'First + 30))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_UT or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_UT and then (P > Contents'First + 31 and Contents'Last >= Contents'First + 31))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF and then (P > Contents'First + 32 and Contents'Last >= Contents'First + 32))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D and then (P > Contents'First + 33 and Contents'Last >= Contents'First + 33))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8 or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8 and then (P > Contents'First + 34 and Contents'Last >= Contents'First + 34))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q and then (P > Contents'First + 35 and Contents'Last >= Contents'First + 35))); pragma Loop_Invariant (State_Id /= XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q_QM or (State_Id = XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q_QM and then (P > Contents'First + 36 and Contents'Last >= Contents'First + 36))); -- Aida.Text_IO.Put ("Extracted:"); -- Aida.Text_IO.Put (Image (CP)); -- Aida.Text_IO.Put (", state "); -- Aida.Text_IO.Put_Line (State_Id_T'Image (State_Id)); -- Aida.Text_IO.Put (Image (CP)); case State_Id is when End_State => null; when Less_Sign => if CP = Character'Pos (' ') then null; elsif CP = Character'Pos ('<') then State_Id := Question_Mark; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when Question_Mark => if CP = Character'Pos ('?') then State_Id := X; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when X => if CP = Character'Pos ('x') then State_Id := XM; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XM => if CP = Character'Pos ('m') then State_Id := XML; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML => if CP = Character'Pos ('l') then State_Id := XML_S; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S => if CP = Character'Pos (' ') then State_Id := XML_S_V; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_V => if CP = Character'Pos ('v') then State_Id := XML_S_VE; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VE => if CP = Character'Pos ('e') then State_Id := XML_S_VER; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VER => if CP = Character'Pos ('r') then State_Id := XML_S_VERS; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERS => if CP = Character'Pos ('s') then State_Id := XML_S_VERSI; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSI => if CP = Character'Pos ('i') then State_Id := XML_S_VERSIO; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSIO => if CP = Character'Pos ('o') then State_Id := XML_S_VERSION; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION => if CP = Character'Pos ('n') then State_Id := XML_S_VERSION_E; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E => if CP = Character'Pos ('=') then State_Id := XML_S_VERSION_E_Q; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q => if CP = Character'Pos ('"') then State_Id := XML_S_VERSION_E_Q_1; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1 => if CP = Character'Pos ('1') then State_Id := XML_S_VERSION_E_Q_1_P; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P => if CP = Character'Pos ('.') then State_Id := XML_S_VERSION_E_Q_1_P_0; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0 => if CP = Character'Pos ('0') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q => if CP = Character'Pos ('"') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S => if CP = Character'Pos (' ') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_E; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_E => if CP = Character'Pos ('e') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_EN; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_EN => if CP = Character'Pos ('n') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENC; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENC => if CP = Character'Pos ('c') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCO; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCO => if CP = Character'Pos ('o') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCOD; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCOD => if CP = Character'Pos ('d') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODI; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODI => if CP = Character'Pos ('i') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODIN; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODIN => if CP = Character'Pos ('n') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING => if CP = Character'Pos ('g') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E => if CP = Character'Pos ('=') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q => if CP = Character'Pos ('"') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_U; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_U => if CP = Character'Pos ('u') or CP = Character'Pos ('U') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_UT; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENCODING_E_Q_UT => if CP = Character'Pos ('t') or CP = Character'Pos ('T') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF => if CP = Character'Pos ('f') or CP = Character'Pos ('F') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D => if CP = Character'Pos ('-') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8 => if CP = Character'Pos ('8') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q => if CP = Character'Pos ('"') then State_Id := XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q_QM; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; when XML_S_VERSION_E_Q_1_P_0_Q_S_ENC_E_Q_UTF_D_8_Q_QM => if CP = Character'Pos ('?') then if P <= Contents'Last then State_Id := End_State; pragma Assert (P > Contents'First + 36); Analyze_XML (P); else Call_Result.Initialize (-0645831530, 1132432555); exit; end if; else Call_Result.Initialize (XML_IDENTIFIER_ERROR_1, XML_IDENTIFIER_ERROR_2); exit; end if; end case; end loop; end Aida.XML_SAX_Parse;
alvaromb/Compilemon
Ada
1,306
ads
-- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- This software was developed by John Self of the Arcadia project -- at the University of California, Irvine. -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- TITLE scanner parser interface -- AUTHOR: John Self (UCI) -- DESCRIPTION causes parser to call augmented version of YYLex. -- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/aflex_scanner.a,v 1.3 90/01/12 15:19:33 self Exp Locker: self $ with parse_tokens, scanner; use parse_tokens, scanner; package aflex_scanner is function YYLEX return TOKEN; end aflex_scanner;
reznikmm/matreshka
Ada
4,648
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Style.Repeat_Content_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Repeat_Content_Attribute_Node is begin return Self : Style_Repeat_Content_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Repeat_Content_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Repeat_Content_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Repeat_Content_Attribute, Style_Repeat_Content_Attribute_Node'Tag); end Matreshka.ODF_Style.Repeat_Content_Attributes;
reznikmm/matreshka
Ada
4,722
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ package XML.Schema.Type_Definitions is pragma Preelaborate; type XS_Type_Definition is limited interface; not overriding function Get_Final (Self : not null access constant XS_Type_Definition) return XML.Schema.Derivation_Flags is abstract; -- For complex types the returned value is a bit combination of the subset -- of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to final -- set of this type or DERIVATION_NONE. For simple types the returned value -- is a bit combination of the subset of { DERIVATION_RESTRICTION, -- DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST} corresponding -- to final set of this type or DERIVATION_NONE. not overriding function Is_Final (Self : not null access constant XS_Type_Definition; Restriction : XML.Schema.Derivation_Kinds) return Boolean is abstract; -- {final}. For a complex type definition it is a subset of {extension, -- restriction}. For a simple type definition it is a subset of {extension, -- list, restriction, union}. -- -- Parameters -- -- restriction of type unsigned short -- Extension, restriction, list, union constants (defined in -- XSConstants). -- -- Return Value -- -- True if restriction is in the final set, otherwise false. end XML.Schema.Type_Definitions;
zhmu/ananas
Ada
65,451
adb
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.INDEFINITE_HASHED_SETS -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2022, 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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; with Ada.Containers.Hash_Tables.Generic_Operations; pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Operations); with Ada.Containers.Hash_Tables.Generic_Keys; pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Keys); with Ada.Containers.Helpers; use Ada.Containers.Helpers; with Ada.Containers.Prime_Numbers; with System; use type System.Address; with System.Put_Images; package body Ada.Containers.Indefinite_Hashed_Sets with SPARK_Mode => Off is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers ----------------------- -- Local Subprograms -- ----------------------- procedure Assign (Node : Node_Access; Item : Element_Type); pragma Inline (Assign); function Copy_Node (Source : Node_Access) return Node_Access; pragma Inline (Copy_Node); function Equivalent_Keys (Key : Element_Type; Node : Node_Access) return Boolean; pragma Inline (Equivalent_Keys); function Find_Equal_Key (R_HT : Hash_Table_Type; L_Node : Node_Access) return Boolean; function Find_Equivalent_Key (R_HT : Hash_Table_Type; L_Node : Node_Access) return Boolean; procedure Free (X : in out Node_Access); function Hash_Node (Node : Node_Access) return Hash_Type; pragma Inline (Hash_Node); procedure Insert (HT : in out Hash_Table_Type; New_Item : Element_Type; Node : out Node_Access; Inserted : out Boolean); function Is_In (HT : aliased in out Hash_Table_Type; Key : Node_Access) return Boolean; pragma Inline (Is_In); function Next (Node : Node_Access) return Node_Access; pragma Inline (Next); function Read_Node (Stream : not null access Root_Stream_Type'Class) return Node_Access; pragma Inline (Read_Node); procedure Set_Next (Node : Node_Access; Next : Node_Access); pragma Inline (Set_Next); function Vet (Position : Cursor) return Boolean; procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Access); pragma Inline (Write_Node); -------------------------- -- Local Instantiations -- -------------------------- procedure Free_Element is new Ada.Unchecked_Deallocation (Element_Type, Element_Access); package HT_Ops is new Hash_Tables.Generic_Operations (HT_Types => HT_Types, Hash_Node => Hash_Node, Next => Next, Set_Next => Set_Next, Copy_Node => Copy_Node, Free => Free); package Element_Keys is new Hash_Tables.Generic_Keys (HT_Types => HT_Types, Next => Next, Set_Next => Set_Next, Key_Type => Element_Type, Hash => Hash, Equivalent_Keys => Equivalent_Keys); function Is_Equal is new HT_Ops.Generic_Equal (Find_Equal_Key); function Is_Equivalent is new HT_Ops.Generic_Equal (Find_Equivalent_Key); procedure Read_Nodes is new HT_Ops.Generic_Read (Read_Node); procedure Replace_Element is new Element_Keys.Generic_Replace_Element (Hash_Node, Assign); procedure Write_Nodes is new HT_Ops.Generic_Write (Write_Node); --------- -- "=" -- --------- function "=" (Left, Right : Set) return Boolean is begin return Is_Equal (Left.HT, Right.HT); end "="; ------------ -- Adjust -- ------------ procedure Adjust (Container : in out Set) is begin HT_Ops.Adjust (Container.HT); end Adjust; ------------ -- Assign -- ------------ procedure Assign (Node : Node_Access; Item : Element_Type) is X : Element_Access := Node.Element; -- The element allocator may need an accessibility check in the case the -- actual type is class-wide or has access discriminants (RM 4.8(10.1) -- and AI12-0035). pragma Unsuppress (Accessibility_Check); begin Node.Element := new Element_Type'(Item); Free_Element (X); end Assign; procedure Assign (Target : in out Set; Source : Set) is begin if Target'Address = Source'Address then return; else Target.Clear; Target.Union (Source); end if; end Assign; -------------- -- Capacity -- -------------- function Capacity (Container : Set) return Count_Type is begin return HT_Ops.Capacity (Container.HT); end Capacity; ----------- -- Clear -- ----------- procedure Clear (Container : in out Set) is begin HT_Ops.Clear (Container.HT); end Clear; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Set; Position : Cursor) return Constant_Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "Node has no element"; end if; pragma Assert (Vet (Position), "bad cursor in Constant_Reference"); declare HT : Hash_Table_Type renames Position.Container.all.HT; TC : constant Tamper_Counts_Access := HT.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do Busy (TC.all); end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Set; Item : Element_Type) return Boolean is begin return Find (Container, Item) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Set; Capacity : Count_Type := 0) return Set is C : Count_Type; begin if Capacity < Source.Length then if Checks and then Capacity /= 0 then raise Capacity_Error with "Requested capacity is less than Source length"; end if; C := Source.Length; else C := Capacity; end if; return Target : Set do Target.Reserve_Capacity (C); Target.Assign (Source); end return; end Copy; --------------- -- Copy_Node -- --------------- function Copy_Node (Source : Node_Access) return Node_Access is E : Element_Access := new Element_Type'(Source.Element.all); begin return new Node_Type'(Element => E, Next => null); exception when others => Free_Element (E); raise; end Copy_Node; ------------ -- Delete -- ------------ procedure Delete (Container : in out Set; Item : Element_Type) is X : Node_Access; begin Element_Keys.Delete_Key_Sans_Free (Container.HT, Item, X); if Checks and then X = null then raise Constraint_Error with "attempt to delete element not in set"; end if; Free (X); end Delete; procedure Delete (Container : in out Set; Position : in out Cursor) is begin TC_Check (Container.HT.TC); if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Position), "Position cursor is bad"); HT_Ops.Delete_Node_Sans_Free (Container.HT, Position.Node); Free (Position.Node); Position.Container := null; end Delete; ---------------- -- Difference -- ---------------- procedure Difference (Target : in out Set; Source : Set) is Src_HT : Hash_Table_Type renames Source'Unrestricted_Access.HT; Tgt_Node : Node_Access; begin if Target'Address = Source'Address then Clear (Target); return; end if; if Src_HT.Length = 0 then return; end if; TC_Check (Target.HT.TC); if Src_HT.Length < Target.HT.Length then declare Src_Node : Node_Access; begin Src_Node := HT_Ops.First (Src_HT); while Src_Node /= null loop Tgt_Node := Element_Keys.Find (Target.HT, Src_Node.Element.all); if Tgt_Node /= null then HT_Ops.Delete_Node_Sans_Free (Target.HT, Tgt_Node); Free (Tgt_Node); end if; Src_Node := HT_Ops.Next (Src_HT, Src_Node); end loop; end; else Tgt_Node := HT_Ops.First (Target.HT); while Tgt_Node /= null loop if Is_In (Src_HT, Tgt_Node) then declare X : Node_Access := Tgt_Node; begin Tgt_Node := HT_Ops.Next (Target.HT, Tgt_Node); HT_Ops.Delete_Node_Sans_Free (Target.HT, X); Free (X); end; else Tgt_Node := HT_Ops.Next (Target.HT, Tgt_Node); end if; end loop; end if; end Difference; function Difference (Left, Right : Set) return Set is Left_HT : Hash_Table_Type renames Left'Unrestricted_Access.HT; Right_HT : Hash_Table_Type renames Right'Unrestricted_Access.HT; Buckets : HT_Types.Buckets_Access; Length : Count_Type; begin if Left'Address = Right'Address then return Empty_Set; end if; if Left.Length = 0 then return Empty_Set; end if; if Right.Length = 0 then return Left; end if; declare Size : constant Hash_Type := Prime_Numbers.To_Prime (Left.Length); begin Buckets := HT_Ops.New_Buckets (Length => Size); end; Length := 0; Iterate_Left : declare procedure Process (L_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (L_Node : Node_Access) is begin if not Is_In (Right_HT, L_Node) then declare -- Per AI05-0022, the container implementation is required -- to detect element tampering by a generic actual -- subprogram, hence the use of Checked_Index instead of a -- simple invocation of generic formal Hash. Indx : constant Hash_Type := HT_Ops.Checked_Index (Left_HT, Buckets.all, L_Node); Bucket : Node_Access renames Buckets (Indx); Src : Element_Type renames L_Node.Element.all; Tgt : Element_Access := new Element_Type'(Src); begin Bucket := new Node_Type'(Tgt, Bucket); exception when others => Free_Element (Tgt); raise; end; Length := Length + 1; end if; end Process; -- Start of processing for Iterate_Left begin Iterate (Left.HT); exception when others => HT_Ops.Free_Hash_Table (Buckets); raise; end Iterate_Left; return (Controlled with HT => (Buckets, Length, (Busy => 0, Lock => 0))); end Difference; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_Type is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of equals No_Element"; end if; if Checks and then Position.Node.Element = null then -- handle dangling reference raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position), "bad cursor in function Element"); return Position.Node.Element.all; end Element; ----------- -- Empty -- ----------- function Empty (Capacity : Count_Type := 1000) return Set is begin return Result : Set do Reserve_Capacity (Result, Capacity); end return; end Empty; --------------------- -- Equivalent_Sets -- --------------------- function Equivalent_Sets (Left, Right : Set) return Boolean is begin return Is_Equivalent (Left.HT, Right.HT); end Equivalent_Sets; ------------------------- -- Equivalent_Elements -- ------------------------- function Equivalent_Elements (Left, Right : Cursor) return Boolean is begin if Checks and then Left.Node = null then raise Constraint_Error with "Left cursor of Equivalent_Elements equals No_Element"; end if; if Checks and then Right.Node = null then raise Constraint_Error with "Right cursor of Equivalent_Elements equals No_Element"; end if; if Checks and then Left.Node.Element = null then raise Program_Error with "Left cursor of Equivalent_Elements is bad"; end if; if Checks and then Right.Node.Element = null then raise Program_Error with "Right cursor of Equivalent_Elements is bad"; end if; pragma Assert (Vet (Left), "bad Left cursor in Equivalent_Elements"); pragma Assert (Vet (Right), "bad Right cursor in Equivalent_Elements"); -- AI05-0022 requires that a container implementation detect element -- tampering by a generic actual subprogram. However, the following case -- falls outside the scope of that AI. Randy Brukardt explained on the -- ARG list on 2013/02/07 that: -- (Begin Quote): -- But for an operation like "<" [the ordered set analog of -- Equivalent_Elements], there is no need to "dereference" a cursor -- after the call to the generic formal parameter function, so nothing -- bad could happen if tampering is undetected. And the operation can -- safely return a result without a problem even if an element is -- deleted from the container. -- (End Quote). return Equivalent_Elements (Left.Node.Element.all, Right.Node.Element.all); end Equivalent_Elements; function Equivalent_Elements (Left : Cursor; Right : Element_Type) return Boolean is begin if Checks and then Left.Node = null then raise Constraint_Error with "Left cursor of Equivalent_Elements equals No_Element"; end if; if Checks and then Left.Node.Element = null then raise Program_Error with "Left cursor of Equivalent_Elements is bad"; end if; pragma Assert (Vet (Left), "bad Left cursor in Equivalent_Elements"); return Equivalent_Elements (Left.Node.Element.all, Right); end Equivalent_Elements; function Equivalent_Elements (Left : Element_Type; Right : Cursor) return Boolean is begin if Checks and then Right.Node = null then raise Constraint_Error with "Right cursor of Equivalent_Elements equals No_Element"; end if; if Checks and then Right.Node.Element = null then raise Program_Error with "Right cursor of Equivalent_Elements is bad"; end if; pragma Assert (Vet (Right), "bad Right cursor in Equivalent_Elements"); return Equivalent_Elements (Left, Right.Node.Element.all); end Equivalent_Elements; --------------------- -- Equivalent_Keys -- --------------------- function Equivalent_Keys (Key : Element_Type; Node : Node_Access) return Boolean is begin return Equivalent_Elements (Key, Node.Element.all); end Equivalent_Keys; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Set; Item : Element_Type) is X : Node_Access; begin Element_Keys.Delete_Key_Sans_Free (Container.HT, Item, X); Free (X); end Exclude; -------------- -- Finalize -- -------------- procedure Finalize (Container : in out Set) is begin HT_Ops.Finalize (Container.HT); end Finalize; procedure Finalize (Object : in out Iterator) is begin if Object.Container /= null then Unbusy (Object.Container.HT.TC); end if; end Finalize; ---------- -- Find -- ---------- function Find (Container : Set; Item : Element_Type) return Cursor is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Element_Keys.Find (HT, Item); begin return (if Node = null then No_Element else Cursor'(Container'Unrestricted_Access, Node)); end Find; -------------------- -- Find_Equal_Key -- -------------------- function Find_Equal_Key (R_HT : Hash_Table_Type; L_Node : Node_Access) return Boolean is R_Index : constant Hash_Type := Element_Keys.Index (R_HT, L_Node.Element.all); R_Node : Node_Access := R_HT.Buckets (R_Index); begin loop if R_Node = null then return False; end if; if L_Node.Element.all = R_Node.Element.all then return True; end if; R_Node := Next (R_Node); end loop; end Find_Equal_Key; ------------------------- -- Find_Equivalent_Key -- ------------------------- function Find_Equivalent_Key (R_HT : Hash_Table_Type; L_Node : Node_Access) return Boolean is R_Index : constant Hash_Type := Element_Keys.Index (R_HT, L_Node.Element.all); R_Node : Node_Access := R_HT.Buckets (R_Index); begin loop if R_Node = null then return False; end if; if Equivalent_Elements (L_Node.Element.all, R_Node.Element.all) then return True; end if; R_Node := Next (R_Node); end loop; end Find_Equivalent_Key; ----------- -- First -- ----------- function First (Container : Set) return Cursor is Node : constant Node_Access := HT_Ops.First (Container.HT); begin return (if Node = null then No_Element else Cursor'(Container'Unrestricted_Access, Node)); end First; function First (Object : Iterator) return Cursor is begin return Object.Container.First; end First; ---------- -- Free -- ---------- procedure Free (X : in out Node_Access) is procedure Deallocate is new Ada.Unchecked_Deallocation (Node_Type, Node_Access); begin if X = null then return; end if; X.Next := X; -- detect mischief (in Vet) begin Free_Element (X.Element); exception when others => X.Element := null; Deallocate (X); raise; end; Deallocate (X); end Free; ------------------------ -- Get_Element_Access -- ------------------------ function Get_Element_Access (Position : Cursor) return not null Element_Access is begin return Position.Node.Element; end Get_Element_Access; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin pragma Assert (Vet (Position), "bad cursor in Has_Element"); return Position.Node /= null; end Has_Element; --------------- -- Hash_Node -- --------------- function Hash_Node (Node : Node_Access) return Hash_Type is begin return Hash (Node.Element.all); end Hash_Node; ------------- -- Include -- ------------- procedure Include (Container : in out Set; New_Item : Element_Type) is Position : Cursor; Inserted : Boolean; X : Element_Access; begin Insert (Container, New_Item, Position, Inserted); if not Inserted then TE_Check (Container.HT.TC); X := Position.Node.Element; declare -- The element allocator may need an accessibility check in the -- case the actual type is class-wide or has access discriminants -- (see RM 4.8(10.1) and AI12-0035). pragma Unsuppress (Accessibility_Check); begin Position.Node.Element := new Element_Type'(New_Item); end; Free_Element (X); end if; end Include; ------------ -- Insert -- ------------ procedure Insert (Container : in out Set; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean) is begin Insert (Container.HT, New_Item, Position.Node, Inserted); Position.Container := Container'Unchecked_Access; end Insert; procedure Insert (Container : in out Set; New_Item : Element_Type) is Position : Cursor; Inserted : Boolean; begin Insert (Container, New_Item, Position, Inserted); if Checks and then not Inserted then raise Constraint_Error with "attempt to insert element already in set"; end if; end Insert; procedure Insert (HT : in out Hash_Table_Type; New_Item : Element_Type; Node : out Node_Access; Inserted : out Boolean) is function New_Node (Next : Node_Access) return Node_Access; pragma Inline (New_Node); procedure Local_Insert is new Element_Keys.Generic_Conditional_Insert (New_Node); -------------- -- New_Node -- -------------- function New_Node (Next : Node_Access) return Node_Access is -- The element allocator may need an accessibility check in the case -- the actual type is class-wide or has access discriminants (see -- RM 4.8(10.1) and AI12-0035). pragma Unsuppress (Accessibility_Check); Element : Element_Access := new Element_Type'(New_Item); begin return new Node_Type'(Element, Next); exception when others => Free_Element (Element); raise; end New_Node; -- Start of processing for Insert begin if HT_Ops.Capacity (HT) = 0 then HT_Ops.Reserve_Capacity (HT, 1); end if; Local_Insert (HT, New_Item, Node, Inserted); if Inserted and then HT.Length > HT_Ops.Capacity (HT) then HT_Ops.Reserve_Capacity (HT, HT.Length); end if; end Insert; ------------------ -- Intersection -- ------------------ procedure Intersection (Target : in out Set; Source : Set) is Src_HT : Hash_Table_Type renames Source'Unrestricted_Access.HT; Tgt_Node : Node_Access; begin if Target'Address = Source'Address then return; end if; if Source.Length = 0 then Clear (Target); return; end if; TC_Check (Target.HT.TC); Tgt_Node := HT_Ops.First (Target.HT); while Tgt_Node /= null loop if Is_In (Src_HT, Tgt_Node) then Tgt_Node := HT_Ops.Next (Target.HT, Tgt_Node); else declare X : Node_Access := Tgt_Node; begin Tgt_Node := HT_Ops.Next (Target.HT, Tgt_Node); HT_Ops.Delete_Node_Sans_Free (Target.HT, X); Free (X); end; end if; end loop; end Intersection; function Intersection (Left, Right : Set) return Set is Left_HT : Hash_Table_Type renames Left'Unrestricted_Access.HT; Right_HT : Hash_Table_Type renames Right'Unrestricted_Access.HT; Buckets : HT_Types.Buckets_Access; Length : Count_Type; begin if Left'Address = Right'Address then return Left; end if; Length := Count_Type'Min (Left.Length, Right.Length); if Length = 0 then return Empty_Set; end if; declare Size : constant Hash_Type := Prime_Numbers.To_Prime (Length); begin Buckets := HT_Ops.New_Buckets (Length => Size); end; Length := 0; Iterate_Left : declare procedure Process (L_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (L_Node : Node_Access) is begin if Is_In (Right_HT, L_Node) then declare -- Per AI05-0022, the container implementation is required -- to detect element tampering by a generic actual -- subprogram, hence the use of Checked_Index instead of a -- simple invocation of generic formal Hash. Indx : constant Hash_Type := HT_Ops.Checked_Index (Left_HT, Buckets.all, L_Node); Bucket : Node_Access renames Buckets (Indx); Src : Element_Type renames L_Node.Element.all; Tgt : Element_Access := new Element_Type'(Src); begin Bucket := new Node_Type'(Tgt, Bucket); exception when others => Free_Element (Tgt); raise; end; Length := Length + 1; end if; end Process; -- Start of processing for Iterate_Left begin Iterate (Left.HT); exception when others => HT_Ops.Free_Hash_Table (Buckets); raise; end Iterate_Left; return (Controlled with HT => (Buckets, Length, (Busy => 0, Lock => 0))); end Intersection; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Set) return Boolean is begin return Container.HT.Length = 0; end Is_Empty; ----------- -- Is_In -- ----------- function Is_In (HT : aliased in out Hash_Table_Type; Key : Node_Access) return Boolean is begin return Element_Keys.Find (HT, Key.Element.all) /= null; end Is_In; --------------- -- Is_Subset -- --------------- function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is Subset_HT : Hash_Table_Type renames Subset'Unrestricted_Access.HT; Of_Set_HT : Hash_Table_Type renames Of_Set'Unrestricted_Access.HT; Subset_Node : Node_Access; begin if Subset'Address = Of_Set'Address then return True; end if; if Subset.Length > Of_Set.Length then return False; end if; Subset_Node := HT_Ops.First (Subset_HT); while Subset_Node /= null loop if not Is_In (Of_Set_HT, Subset_Node) then return False; end if; Subset_Node := HT_Ops.Next (Subset_HT, Subset_Node); end loop; return True; end Is_Subset; ------------- -- Iterate -- ------------- procedure Iterate (Container : Set; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access); pragma Inline (Process_Node); procedure Iterate is new HT_Ops.Generic_Iteration (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access) is begin Process (Cursor'(Container'Unrestricted_Access, Node)); end Process_Node; Busy : With_Busy (Container.HT.TC'Unrestricted_Access); -- Start of processing for Iterate begin Iterate (Container.HT); end Iterate; function Iterate (Container : Set) return Set_Iterator_Interfaces.Forward_Iterator'Class is begin return It : constant Iterator := Iterator'(Limited_Controlled with Container => Container'Unrestricted_Access) do Busy (Container.HT.TC'Unrestricted_Access.all); end return; end Iterate; ------------ -- Length -- ------------ function Length (Container : Set) return Count_Type is begin return Container.HT.Length; end Length; ---------- -- Move -- ---------- procedure Move (Target : in out Set; Source : in out Set) is begin HT_Ops.Move (Target => Target.HT, Source => Source.HT); end Move; ---------- -- Next -- ---------- function Next (Node : Node_Access) return Node_Access is begin return Node.Next; end Next; function Next (Position : Cursor) return Cursor is begin if Position.Node = null then return No_Element; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "bad cursor in Next"; end if; pragma Assert (Vet (Position), "bad cursor in Next"); declare HT : Hash_Table_Type renames Position.Container.HT; Node : constant Node_Access := HT_Ops.Next (HT, Position.Node); begin return (if Node = null then No_Element else Cursor'(Position.Container, Node)); end; end Next; procedure Next (Position : in out Cursor) is begin Position := Next (Position); end Next; function Next (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong set"; end if; return Next (Position); end Next; ------------- -- Overlap -- ------------- function Overlap (Left, Right : Set) return Boolean is Left_HT : Hash_Table_Type renames Left'Unrestricted_Access.HT; Right_HT : Hash_Table_Type renames Right'Unrestricted_Access.HT; Left_Node : Node_Access; begin if Right.Length = 0 then return False; end if; if Left'Address = Right'Address then return True; end if; Left_Node := HT_Ops.First (Left_HT); while Left_Node /= null loop if Is_In (Right_HT, Left_Node) then return True; end if; Left_Node := HT_Ops.Next (Left_HT, Left_Node); end loop; return False; end Overlap; ---------------------- -- Pseudo_Reference -- ---------------------- function Pseudo_Reference (Container : aliased Set'Class) return Reference_Control_Type is TC : constant Tamper_Counts_Access := Container.HT.TC'Unrestricted_Access; begin return R : constant Reference_Control_Type := (Controlled with TC) do Busy (TC.all); end return; end Pseudo_Reference; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)) is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of Query_Element equals No_Element"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "bad cursor in Query_Element"; end if; pragma Assert (Vet (Position), "bad cursor in Query_Element"); declare HT : Hash_Table_Type renames Position.Container'Unrestricted_Access.all.HT; Lock : With_Lock (HT.TC'Unrestricted_Access); begin Process (Position.Node.Element.all); end; end Query_Element; --------------- -- Put_Image -- --------------- procedure Put_Image (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; begin Array_Before (S); for X of V loop if First_Time then First_Time := False; else Simple_Array_Between (S); end if; Element_Type'Put_Image (S, X); end loop; Array_After (S); end Put_Image; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Set) is begin Read_Nodes (Stream, Container.HT); end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor) is begin raise Program_Error with "attempt to stream set cursor"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; --------------- -- Read_Node -- --------------- function Read_Node (Stream : not null access Root_Stream_Type'Class) return Node_Access is X : Element_Access := new Element_Type'(Element_Type'Input (Stream)); begin return new Node_Type'(X, null); exception when others => Free_Element (X); raise; end Read_Node; ------------- -- Replace -- ------------- procedure Replace (Container : in out Set; New_Item : Element_Type) is Node : constant Node_Access := Element_Keys.Find (Container.HT, New_Item); X : Element_Access; pragma Warnings (Off, X); begin TE_Check (Container.HT.TC); if Checks and then Node = null then raise Constraint_Error with "attempt to replace element not in set"; end if; X := Node.Element; declare -- The element allocator may need an accessibility check in the case -- the actual type is class-wide or has access discriminants (see -- RM 4.8(10.1) and AI12-0035). pragma Unsuppress (Accessibility_Check); begin Node.Element := new Element_Type'(New_Item); end; Free_Element (X); end Replace; --------------------- -- Replace_Element -- --------------------- procedure Replace_Element (Container : in out Set; Position : Cursor; New_Item : Element_Type) is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "bad cursor in Replace_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; pragma Assert (Vet (Position), "bad cursor in Replace_Element"); Replace_Element (Container.HT, Position.Node, New_Item); end Replace_Element; ---------------------- -- Reserve_Capacity -- ---------------------- procedure Reserve_Capacity (Container : in out Set; Capacity : Count_Type) is begin HT_Ops.Reserve_Capacity (Container.HT, Capacity); end Reserve_Capacity; -------------- -- Set_Next -- -------------- procedure Set_Next (Node : Node_Access; Next : Node_Access) is begin Node.Next := Next; end Set_Next; -------------------------- -- Symmetric_Difference -- -------------------------- procedure Symmetric_Difference (Target : in out Set; Source : Set) is Tgt_HT : Hash_Table_Type renames Target.HT; Src_HT : Hash_Table_Type renames Source.HT'Unrestricted_Access.all; begin if Target'Address = Source'Address then Clear (Target); return; end if; TC_Check (Tgt_HT.TC); declare N : constant Count_Type := Target.Length + Source.Length; begin if N > HT_Ops.Capacity (Tgt_HT) then HT_Ops.Reserve_Capacity (Tgt_HT, N); end if; end; if Target.Length = 0 then Iterate_Source_When_Empty_Target : declare procedure Process (Src_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (Src_Node : Node_Access) is E : Element_Type renames Src_Node.Element.all; B : Buckets_Type renames Tgt_HT.Buckets.all; J : constant Hash_Type := Hash (E) mod B'Length; N : Count_Type renames Tgt_HT.Length; begin declare X : Element_Access := new Element_Type'(E); begin B (J) := new Node_Type'(X, B (J)); exception when others => Free_Element (X); raise; end; N := N + 1; end Process; -- Per AI05-0022, the container implementation is required to -- detect element tampering by a generic actual subprogram. Lock_Tgt : With_Lock (Tgt_HT.TC'Unrestricted_Access); Lock_Src : With_Lock (Src_HT.TC'Unrestricted_Access); -- Start of processing for Iterate_Source_When_Empty_Target begin Iterate (Src_HT); end Iterate_Source_When_Empty_Target; else Iterate_Source : declare procedure Process (Src_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (Src_Node : Node_Access) is E : Element_Type renames Src_Node.Element.all; B : Buckets_Type renames Tgt_HT.Buckets.all; J : constant Hash_Type := Hash (E) mod B'Length; N : Count_Type renames Tgt_HT.Length; begin if B (J) = null then declare X : Element_Access := new Element_Type'(E); begin B (J) := new Node_Type'(X, null); exception when others => Free_Element (X); raise; end; N := N + 1; elsif Equivalent_Elements (E, B (J).Element.all) then declare X : Node_Access := B (J); begin B (J) := B (J).Next; N := N - 1; Free (X); end; else declare Prev : Node_Access := B (J); Curr : Node_Access := Prev.Next; begin while Curr /= null loop if Equivalent_Elements (E, Curr.Element.all) then Prev.Next := Curr.Next; N := N - 1; Free (Curr); return; end if; Prev := Curr; Curr := Prev.Next; end loop; declare X : Element_Access := new Element_Type'(E); begin B (J) := new Node_Type'(X, B (J)); exception when others => Free_Element (X); raise; end; N := N + 1; end; end if; end Process; -- Per AI05-0022, the container implementation is required to -- detect element tampering by a generic actual subprogram. Lock_Tgt : With_Lock (Tgt_HT.TC'Unrestricted_Access); Lock_Src : With_Lock (Src_HT.TC'Unrestricted_Access); -- Start of processing for Iterate_Source begin Iterate (Src_HT); end Iterate_Source; end if; end Symmetric_Difference; function Symmetric_Difference (Left, Right : Set) return Set is Left_HT : Hash_Table_Type renames Left'Unrestricted_Access.HT; Right_HT : Hash_Table_Type renames Right'Unrestricted_Access.HT; Buckets : HT_Types.Buckets_Access; Length : Count_Type; begin if Left'Address = Right'Address then return Empty_Set; end if; if Right.Length = 0 then return Left; end if; if Left.Length = 0 then return Right; end if; declare Size : constant Hash_Type := Prime_Numbers.To_Prime (Left.Length + Right.Length); begin Buckets := HT_Ops.New_Buckets (Length => Size); end; Length := 0; Iterate_Left : declare procedure Process (L_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (L_Node : Node_Access) is begin if not Is_In (Right_HT, L_Node) then declare E : Element_Type renames L_Node.Element.all; -- Per AI05-0022, the container implementation is required -- to detect element tampering by a generic actual -- subprogram, hence the use of Checked_Index instead of a -- simple invocation of generic formal Hash. J : constant Hash_Type := HT_Ops.Checked_Index (Left_HT, Buckets.all, L_Node); begin declare X : Element_Access := new Element_Type'(E); begin Buckets (J) := new Node_Type'(X, Buckets (J)); exception when others => Free_Element (X); raise; end; Length := Length + 1; end; end if; end Process; -- Start of processing for Iterate_Left begin Iterate (Left_HT); exception when others => HT_Ops.Free_Hash_Table (Buckets); raise; end Iterate_Left; Iterate_Right : declare procedure Process (R_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (R_Node : Node_Access) is begin if not Is_In (Left_HT, R_Node) then declare E : Element_Type renames R_Node.Element.all; -- Per AI05-0022, the container implementation is required -- to detect element tampering by a generic actual -- subprogram, hence the use of Checked_Index instead of a -- simple invocation of generic formal Hash. J : constant Hash_Type := HT_Ops.Checked_Index (Right_HT, Buckets.all, R_Node); begin declare X : Element_Access := new Element_Type'(E); begin Buckets (J) := new Node_Type'(X, Buckets (J)); exception when others => Free_Element (X); raise; end; Length := Length + 1; end; end if; end Process; -- Start of processing for Iterate_Right begin Iterate (Right_HT); exception when others => HT_Ops.Free_Hash_Table (Buckets); raise; end Iterate_Right; return (Controlled with HT => (Buckets, Length, (Busy => 0, Lock => 0))); end Symmetric_Difference; ------------ -- To_Set -- ------------ function To_Set (New_Item : Element_Type) return Set is HT : Hash_Table_Type; Node : Node_Access; Inserted : Boolean; begin Insert (HT, New_Item, Node, Inserted); return Set'(Controlled with HT); end To_Set; ----------- -- Union -- ----------- procedure Union (Target : in out Set; Source : Set) is procedure Process (Src_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (Src_Node : Node_Access) is Src : Element_Type renames Src_Node.Element.all; function New_Node (Next : Node_Access) return Node_Access; pragma Inline (New_Node); procedure Insert is new Element_Keys.Generic_Conditional_Insert (New_Node); -------------- -- New_Node -- -------------- function New_Node (Next : Node_Access) return Node_Access is Tgt : Element_Access := new Element_Type'(Src); begin return new Node_Type'(Tgt, Next); exception when others => Free_Element (Tgt); raise; end New_Node; Tgt_Node : Node_Access; Success : Boolean; -- Start of processing for Process begin Insert (Target.HT, Src, Tgt_Node, Success); end Process; -- Start of processing for Union begin if Target'Address = Source'Address then return; end if; TC_Check (Target.HT.TC); declare N : constant Count_Type := Target.Length + Source.Length; begin if N > HT_Ops.Capacity (Target.HT) then HT_Ops.Reserve_Capacity (Target.HT, N); end if; end; Iterate (Source.HT); end Union; function Union (Left, Right : Set) return Set is Left_HT : Hash_Table_Type renames Left.HT'Unrestricted_Access.all; Right_HT : Hash_Table_Type renames Right.HT'Unrestricted_Access.all; Buckets : HT_Types.Buckets_Access; Length : Count_Type; begin if Left'Address = Right'Address then return Left; end if; if Right.Length = 0 then return Left; end if; if Left.Length = 0 then return Right; end if; declare Size : constant Hash_Type := Prime_Numbers.To_Prime (Left.Length + Right.Length); begin Buckets := HT_Ops.New_Buckets (Length => Size); end; Iterate_Left : declare procedure Process (L_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (L_Node : Node_Access) is Src : Element_Type renames L_Node.Element.all; J : constant Hash_Type := Hash (Src) mod Buckets'Length; Bucket : Node_Access renames Buckets (J); Tgt : Element_Access := new Element_Type'(Src); begin Bucket := new Node_Type'(Tgt, Bucket); exception when others => Free_Element (Tgt); raise; end Process; -- Per AI05-0022, the container implementation is required to detect -- element tampering by a generic actual subprogram, hence the use of -- Checked_Index instead of a simple invocation of generic formal -- Hash. Lock_Left : With_Lock (Left_HT.TC'Unrestricted_Access); -- Start of processing for Iterate_Left begin Iterate (Left_HT); exception when others => HT_Ops.Free_Hash_Table (Buckets); raise; end Iterate_Left; Length := Left.Length; Iterate_Right : declare procedure Process (Src_Node : Node_Access); procedure Iterate is new HT_Ops.Generic_Iteration (Process); ------------- -- Process -- ------------- procedure Process (Src_Node : Node_Access) is Src : Element_Type renames Src_Node.Element.all; Idx : constant Hash_Type := Hash (Src) mod Buckets'Length; Tgt_Node : Node_Access := Buckets (Idx); begin while Tgt_Node /= null loop if Equivalent_Elements (Src, Tgt_Node.Element.all) then return; end if; Tgt_Node := Next (Tgt_Node); end loop; declare Tgt : Element_Access := new Element_Type'(Src); begin Buckets (Idx) := new Node_Type'(Tgt, Buckets (Idx)); exception when others => Free_Element (Tgt); raise; end; Length := Length + 1; end Process; -- Per AI05-0022, the container implementation is required to detect -- element tampering by a generic actual subprogram, hence the use of -- Checked_Index instead of a simple invocation of generic formal -- Hash. Lock_Left : With_Lock (Left_HT.TC'Unrestricted_Access); Lock_Right : With_Lock (Right_HT.TC'Unrestricted_Access); -- Start of processing for Iterate_Right begin Iterate (Right.HT); exception when others => HT_Ops.Free_Hash_Table (Buckets); raise; end Iterate_Right; return (Controlled with HT => (Buckets, Length, (Busy => 0, Lock => 0))); end Union; --------- -- Vet -- --------- function Vet (Position : Cursor) return Boolean is begin if Position.Node = null then return Position.Container = null; end if; if Position.Container = null then return False; end if; if Position.Node.Next = Position.Node then return False; end if; if Position.Node.Element = null then return False; end if; declare HT : Hash_Table_Type renames Position.Container.HT; X : Node_Access; begin if HT.Length = 0 then return False; end if; if HT.Buckets = null or else HT.Buckets'Length = 0 then return False; end if; X := HT.Buckets (Element_Keys.Checked_Index (HT, Position.Node.Element.all)); for J in 1 .. HT.Length loop if X = Position.Node then return True; end if; if X = null then return False; end if; if X = X.Next then -- to prevent unnecessary looping return False; end if; X := X.Next; end loop; return False; end; end Vet; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Set) is begin Write_Nodes (Stream, Container.HT); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor) is begin raise Program_Error with "attempt to stream set cursor"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; ---------------- -- Write_Node -- ---------------- procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Access) is begin Element_Type'Output (Stream, Node.Element.all); end Write_Node; package body Generic_Keys is ----------------------- -- Local Subprograms -- ----------------------- function Equivalent_Key_Node (Key : Key_Type; Node : Node_Access) return Boolean; pragma Inline (Equivalent_Key_Node); -------------------------- -- Local Instantiations -- -------------------------- package Key_Keys is new Hash_Tables.Generic_Keys (HT_Types => HT_Types, Next => Next, Set_Next => Set_Next, Key_Type => Key_Type, Hash => Hash, Equivalent_Keys => Equivalent_Key_Node); ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is Position : constant Cursor := Find (Container, Key); begin if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; return Constant_Reference (Container, Position); end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Set; Key : Key_Type) return Boolean is begin return Find (Container, Key) /= No_Element; end Contains; ------------ -- Delete -- ------------ procedure Delete (Container : in out Set; Key : Key_Type) is X : Node_Access; begin Key_Keys.Delete_Key_Sans_Free (Container.HT, Key, X); if Checks and then X = null then raise Constraint_Error with "key not in set"; end if; Free (X); end Delete; ------------- -- Element -- ------------- function Element (Container : Set; Key : Key_Type) return Element_Type is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Key_Keys.Find (HT, Key); begin if Checks and then Node = null then raise Constraint_Error with "key not in set"; end if; return Node.Element.all; end Element; ------------------------- -- Equivalent_Key_Node -- ------------------------- function Equivalent_Key_Node (Key : Key_Type; Node : Node_Access) return Boolean is begin return Equivalent_Keys (Key, Generic_Keys.Key (Node.Element.all)); end Equivalent_Key_Node; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Set; Key : Key_Type) is X : Node_Access; begin Key_Keys.Delete_Key_Sans_Free (Container.HT, Key, X); Free (X); end Exclude; -------------- -- Finalize -- -------------- procedure Finalize (Control : in out Reference_Control_Type) is begin if Control.Container /= null then Impl.Reference_Control_Type (Control).Finalize; if Checks and then Hash (Key (Control.Old_Pos)) /= Control.Old_Hash then HT_Ops.Delete_Node_At_Index (Control.Container.HT, Control.Index, Control.Old_Pos.Node); raise Program_Error; end if; Control.Container := null; end if; end Finalize; ---------- -- Find -- ---------- function Find (Container : Set; Key : Key_Type) return Cursor is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Key_Keys.Find (HT, Key); begin return (if Node = null then No_Element else Cursor'(Container'Unrestricted_Access, Node)); end Find; --------- -- Key -- --------- function Key (Position : Cursor) return Key_Type is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "Position cursor is bad"; end if; pragma Assert (Vet (Position), "bad cursor in function Key"); return Key (Position.Node.Element.all); end Key; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; ------------------------------ -- Reference_Preserving_Key -- ------------------------------ function Reference_Preserving_Key (Container : aliased in out Set; Position : Cursor) return Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "Node has no element"; end if; pragma Assert (Vet (Position), "bad cursor in function Reference_Preserving_Key"); declare HT : Hash_Table_Type renames Container.HT; begin return R : constant Reference_Type := (Element => Position.Node.Element.all'Access, Control => (Controlled with HT.TC'Unrestricted_Access, Container => Container'Unchecked_Access, Index => HT_Ops.Index (HT, Position.Node), Old_Pos => Position, Old_Hash => Hash (Key (Position)))) do Busy (HT.TC); end return; end; end Reference_Preserving_Key; function Reference_Preserving_Key (Container : aliased in out Set; Key : Key_Type) return Reference_Type is Position : constant Cursor := Find (Container, Key); begin if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ------------- -- Replace -- ------------- procedure Replace (Container : in out Set; Key : Key_Type; New_Item : Element_Type) is Node : constant Node_Access := Key_Keys.Find (Container.HT, Key); begin if Checks and then Node = null then raise Constraint_Error with "attempt to replace key not in set"; end if; Replace_Element (Container.HT, Node, New_Item); end Replace; ----------------------------------- -- Update_Element_Preserving_Key -- ----------------------------------- procedure Update_Element_Preserving_Key (Container : in out Set; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)) is HT : Hash_Table_Type renames Container.HT; Indx : Hash_Type; begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor equals No_Element"; end if; if Checks and then (Position.Node.Element = null or else Position.Node.Next = Position.Node) then raise Program_Error with "Position cursor is bad"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong set"; end if; if Checks and then (HT.Buckets = null or else HT.Buckets'Length = 0 or else HT.Length = 0) then raise Program_Error with "Position cursor is bad (set is empty)"; end if; pragma Assert (Vet (Position), "bad cursor in Update_Element_Preserving_Key"); -- Per AI05-0022, the container implementation is required to detect -- element tampering by a generic actual subprogram. declare E : Element_Type renames Position.Node.Element.all; K : constant Key_Type := Key (E); Lock : With_Lock (HT.TC'Unrestricted_Access); begin Indx := HT_Ops.Index (HT, Position.Node); Process (E); if Equivalent_Keys (K, Key (E)) then return; end if; end; if HT.Buckets (Indx) = Position.Node then HT.Buckets (Indx) := Position.Node.Next; else declare Prev : Node_Access := HT.Buckets (Indx); begin while Prev.Next /= Position.Node loop Prev := Prev.Next; if Checks and then Prev = null then raise Program_Error with "Position cursor is bad (node not found)"; end if; end loop; Prev.Next := Position.Node.Next; end; end if; HT.Length := HT.Length - 1; declare X : Node_Access := Position.Node; begin Free (X); end; raise Program_Error with "key was modified"; end Update_Element_Preserving_Key; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; end Generic_Keys; end Ada.Containers.Indefinite_Hashed_Sets;
sf17k/sdlada
Ada
1,340
ads
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2014 Luke A. Guest -- -- 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. -------------------------------------------------------------------------------------------------------------------- -- SDL.Inputs -------------------------------------------------------------------------------------------------------------------- package SDL.Inputs is end SDL.Inputs;
swagger-api/swagger-codegen
Ada
9,841
ads
-- Swagger Petstore -- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 -- Contact: [email protected] -- -- NOTE: This package is auto generated by the swagger code generator 2.4.3-SNAPSHOT. -- https://github.com/swagger-api/swagger-codegen.git -- Do not edit the class manually. with Swagger.Streams; with Ada.Containers.Vectors; package Samples.Petstore.Models is type Currency_Type is record end record; package Currency_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Currency_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Currency_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Currency_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Currency_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Currency_Type_Vectors.Vector); type Amount_Type is record Value : double; Currency : Samples.Petstore.Models.Currency_Type; end record; package Amount_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Amount_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Amount_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Amount_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Amount_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Amount_Type_Vectors.Vector); -- ------------------------------ -- An uploaded response -- Describes the result of uploading an image resource -- ------------------------------ type ApiResponse_Type is record Code : Swagger.Nullable_Integer; P_Type : Swagger.Nullable_UString; Message : Swagger.Nullable_UString; end record; package ApiResponse_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => ApiResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ApiResponse_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in ApiResponse_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out ApiResponse_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out ApiResponse_Type_Vectors.Vector); -- ------------------------------ -- Pet Tag -- A tag for a pet -- ------------------------------ type Tag_Type is record Id : Swagger.Nullable_Long; Name : Swagger.Nullable_UString; end record; package Tag_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Tag_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Tag_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Tag_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Tag_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Tag_Type_Vectors.Vector); -- ------------------------------ -- Pet category -- A category for a pet -- ------------------------------ type Category_Type is record Id : Swagger.Nullable_Long; Name : Swagger.Nullable_UString; end record; package Category_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Category_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Category_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Category_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Category_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Category_Type_Vectors.Vector); -- ------------------------------ -- a Pet -- A pet for sale in the pet store -- ------------------------------ type Pet_Type is record Id : Swagger.Nullable_Long; Category : Samples.Petstore.Models.Category_Type; Name : Swagger.UString; Photo_Urls : Swagger.Nullable_UString_Vectors.Vector; Tags : Samples.Petstore.Models.Tag_Type_Vectors.Vector; Status : Swagger.Nullable_UString; end record; package Pet_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Pet_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Pet_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Pet_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Pet_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Pet_Type_Vectors.Vector); -- ------------------------------ -- a User -- A User who is purchasing from the pet store -- ------------------------------ type User_Type is record Id : Swagger.Nullable_Long; Username : Swagger.Nullable_UString; First_Name : Swagger.Nullable_UString; Last_Name : Swagger.Nullable_UString; Email : Swagger.Nullable_UString; Password : Swagger.Nullable_UString; Phone : Swagger.Nullable_UString; User_Status : Swagger.Nullable_Integer; end record; package User_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => User_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in User_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in User_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out User_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out User_Type_Vectors.Vector); -- ------------------------------ -- Pet Order -- An order for a pets from the pet store -- ------------------------------ type Order_Type is record Id : Swagger.Nullable_Long; Pet_Id : Swagger.Nullable_Long; Quantity : Swagger.Nullable_Integer; Ship_Date : Swagger.Nullable_Date; Status : Swagger.Nullable_UString; Complete : Swagger.Nullable_Boolean; end record; package Order_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Order_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Order_Type); procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class; Name : in String; Value : in Order_Type_Vectors.Vector); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Order_Type); procedure Deserialize (From : in Swagger.Value_Type; Name : in String; Value : out Order_Type_Vectors.Vector); end Samples.Petstore.Models;
docandrew/troodon
Ada
33,931
adb
with Ada.Characters.Conversions; with Ada.Containers.Indefinite_Hashed_Maps; with Ada.Containers; use Ada.Containers; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; with Interfaces; use Interfaces; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; with System; with Freetype; with GL; with GLext; with GLX; with xcb; with xproto; with Compositor; with Render.Fonts; with Render.Shaders; with Render.Text; with Render.Util; with Render.Widgets; with Setup; with Util; package body Frames is package RUtil renames Render.Util; FRAME_BG : constant := 16#1F2430_FF#; FRAME_BG_FOCUSED : constant := 16#707A8C_FF#; FRAME_BORDER : constant := 16#101521_FF#; FRAME_BORDER_FOCUSED : constant := 16#707A8C_FF#; FRAME_BORDER_WIDTH : constant := 4; BUTTON_RADIUS : constant := 10; BUTTON_GAP : constant := 4; TITLEBAR_HEIGHT : constant := 2 * BUTTON_RADIUS + 2 * BUTTON_GAP; BUTTON_CLOSE_COLOR_ACTIVE : RUtil.DecorationColor := RUtil.rgbaToGLColor (16#F28779_FF#); BUTTON_CLOSE_COLOR_INACTIVE : RUtil.DecorationColor := RUtil.rgbaToGLColor (16#707A8C_FF#); BUTTON_MAXIMIZE_COLOR_ACTIVE : RUtil.DecorationColor := RUtil.rgbaToGLColor (16#BAE67E_FF#); BUTTON_MAXIMIZE_COLOR_INACTIVE : RUtil.DecorationColor := RUtil.rgbaToGLColor (16#707A7C_FF#); BUTTON_MINIMIZE_COLOR_ACTIVE : RUtil.DecorationColor := RUtil.rgbaToGLColor (16#FFD580_FF#); BUTTON_MINIMIZE_COLOR_INACTIVE : RUtil.DecorationColor := RUtil.rgbaToGLColor (16#707A7C_FF#); FRAME_BG_GL : RUtil.DecorationColor := RUtil.rgbaToGLColor (FRAME_BG); FRAME_BG_GL_FOCUSED : RUtil.DecorationColor := RUtil.rgbaToGLColor (FRAME_BG_FOCUSED); FRAME_BORDER_GL : RUtil.DecorationColor := RUtil.rgbaToGLColor (FRAME_BORDER); FRAME_BORDER_GL_FOCUSED : RUtil.DecorationColor := RUtil.rgbaToGLColor (FRAME_BORDER_FOCUSED); --------------------------------------------------------------------------- -- hashFunc --------------------------------------------------------------------------- function hashFunc(Key : xproto.xcb_window_t) return Ada.Containers.Hash_Type is use Ada.Containers; -- Knuth's multiplicative method tauPrime : constant := 2654435769; begin return Hash_Type(Key * tauPrime); end hashFunc; --------------------------------------------------------------------------- -- map -- Call xcb_map_window on this frame's window and child if appropriate. -- Go ahead and give the newly-mapped window the focus as well. --------------------------------------------------------------------------- procedure map(f : Frame) is cookie : xcb.xcb_void_cookie_t; begin cookie := xcb_map_window (c => f.connection, window => f.frameID); cookie := xcb_map_window (c => f.connection, window => f.appWindow); Ada.Text_IO.Put_Line (" mapped" & f.appWindow'Image); focus(f.frameID); end map; --------------------------------------------------------------------------- -- draw -- Render the decorations, buttons, etc. for this frame. --------------------------------------------------------------------------- procedure draw (f : Frame) is use render; cookie : xcb.xcb_void_cookie_t; rend : Render.Renderer := f.surface.renderer; title : String := To_String(f.title); result : Interfaces.C.int; type Color is array (Natural range 1..4) of aliased GL.GLfloat with Convention => C; textColor : aliased Color := (0.0, 0.0, 0.0, 1.0); -- OpenGL info -- tex : aliased GL.GLuint; -- top-left coord of window label x : Float := 20.0; y : Float := 20.0; -- window dimensions winW : Float; winH : Float; glErr : GL.GLenum; dragAlpha : Float := (if f.dragging then 0.5 else 1.0); begin -- Ada.Text_IO.Put_Line("Enter drawTitleBar"); if f.surface.kind = render.SOFTWARE then cookie := xcb_image_text_8_checked(c => f.connection, string_len => title'Length, drawable => f.frameID, gc => f.surface.gc, x => 20, y => 10, string => Interfaces.C.Strings.New_String(title)); util.checkFatal(f.connection, cookie, "drawTitleBar: Unable to draw text"); else result := GLX.glXMakeContextCurrent (dpy => rend.display, draw => f.surface.drawable, read => f.surface.drawable, ctx => rend.context); if result = 0 then Ada.Text_IO.Put_Line("Troodon: failed to make context current in drawTitleBar"); end if; if f.dragging then Ada.Text_IO.Put_Line ("Drawing dragging"); end if; -- If we haven't loaded the shader program, do that now. -- We can't do this until we have a current context, which we don't have until we -- have a drawable window. -- -- @TODO create a background window and then use that to create the context -- and init shaders. -- if Render.Shaders.textShaderProg = 0 then -- Render.Shaders.initShaders; -- end if; -- Enable blending GL.glEnable (cap => GL.GL_BLEND); GL.glBlendFunc (sfactor => GL.GL_SRC_ALPHA, dfactor => GL.GL_ONE_MINUS_SRC_ALPHA); if f.focused then --Ada.Text_IO.Put_Line ("Drawing focused window"); GL.glClearColor (red => FRAME_BG_GL_FOCUSED.r, green => FRAME_BG_GL_FOCUSED.g, blue => FRAME_BG_GL_FOCUSED.b, alpha => dragAlpha); else --Ada.Text_IO.Put_Line ("Drawing un-focused window"); GL.glClearColor (red => FRAME_BG_GL.r, green => FRAME_BG_GL.g, blue => FRAME_BG_GL.b, alpha => dragAlpha); end if; GL.glClear (GL.GL_COLOR_BUFFER_BIT); -- glErr := GL.glGetError; -- Ada.Text_IO.Put_Line ("glClear GL error? " & glErr'Image); winW := Float(f.width); winH := Float(f.height); -- Ada.Text_IO.Put_Line ("Window Width: " & f.width'Image); -- Ada.Text_IO.Put_Line ("Window Height: " & f.height'Image); -- Ada.Text_IO.Put_Line ("Scaling factor :" & sx'Image & ", " & sy'Image); --Render.Text.renderGLText (Ada.Characters.Conversions.To_Wide_Wide_String (title), x, y, w, h); Render.Text.renderGLText (title, x, y, winW, winH); Render.Text.renderGLText ("🙂🔋⌨️", x, y, winW, winH, Render.Fonts.emojiFace); -- Close button Render.Widgets.drawCircle (x => winW - Float(BUTTON_RADIUS + BUTTON_GAP), y => Float(BUTTON_RADIUS + BUTTON_GAP), radius => Float(BUTTON_RADIUS), r => BUTTON_CLOSE_COLOR_ACTIVE.r, g => BUTTON_CLOSE_COLOR_ACTIVE.g, b => BUTTON_CLOSE_COLOR_ACTIVE.b, a => BUTTON_CLOSE_COLOR_ACTIVE.a, windowW => winW, windowH => winH); -- Maximize button Render.Widgets.drawCircle (x => winW - Float(3 * BUTTON_RADIUS + 2 * BUTTON_GAP), y => Float(BUTTON_RADIUS + BUTTON_GAP), radius => Float(BUTTON_RADIUS), r => BUTTON_MAXIMIZE_COLOR_ACTIVE.r, g => BUTTON_MAXIMIZE_COLOR_ACTIVE.g, b => BUTTON_MAXIMIZE_COLOR_ACTIVE.b, a => BUTTON_MAXIMIZE_COLOR_ACTIVE.a, windowW => winW, windowH => winH); -- Minimize button Render.Widgets.drawCircle (x => winW - Float(5 * BUTTON_RADIUS + 3 * BUTTON_GAP), y => Float(BUTTON_RADIUS + BUTTON_GAP), radius => Float(BUTTON_RADIUS), r => BUTTON_MINIMIZE_COLOR_ACTIVE.r, g => BUTTON_MINIMIZE_COLOR_ACTIVE.g, b => BUTTON_MINIMIZE_COLOR_ACTIVE.b, a => BUTTON_MINIMIZE_COLOR_ACTIVE.a, windowW => winW, windowH => winH); -- Draw an X on the close button -- Render.Widgets.drawLine (fromX => 0.0, -- fromY => 0.0, -- toX => winW, -- toY => winH, -- width => 1.0, -- r => 0.0, -- g => 0.0, -- b => 0.0, -- a => 1.0, -- windowW => winW, -- windowH => winH); -- Render.Widgets.drawLine (fromX => 1.0, -- fromY => h / 3.0, -- toX => w, -- toY => h / 3.0, -- width => 5.0, -- r => 1.0, -- g => 0.0, -- b => 0.0, -- a => 1.0, -- windowW => w, -- windowH => h); GLX.glxSwapBuffers(rend.display, f.surface.drawable); end if; -- Ada.Text_IO.Put_Line("Exit drawTitleBar"); end draw; --------------------------------------------------------------------------- -- createOpenGLSurface --------------------------------------------------------------------------- function createOpenGLSurface (f : Frame; rend : Render.Renderer) return render.RenderingSurface is glxWindow : GLX.GLXWindow; drawable : GLX.GLXDrawable; begin Ada.Text_IO.Put_Line("Troodon: Creating OpenGL Frame"); glxWindow := GLX.glXCreateWindow(dpy => rend.display, config => rend.fbConfig, win => Interfaces.C.unsigned_long(f.frameID), attribList => null); drawable := GLX.GLXDrawable(glxWindow); return R : render.RenderingSurface := (render.OPENGL, drawable => drawable, renderer => rend); end createOpenGLSurface; --------------------------------------------------------------------------- -- createSoftwareSurface --------------------------------------------------------------------------- function createSoftwareSurface (f : Frame; rend : render.Renderer) return render.RenderingSurface is use xcb; use xproto; gc : Interfaces.C.Unsigned; mask : Interfaces.C.Unsigned := xproto.XCB_GC_BACKGROUND or xproto.XCB_GC_FOREGROUND or xproto.XCB_GC_FONT; cookie : xcb_void_cookie_t; begin -- Create X11 GC gc := xcb_generate_id(f.connection); cookie := xcb_create_gc_aux_checked (c => f.connection, cid => gc, drawable => f.frameID, value_mask => mask, value_list => rend.gcConfig'Access); util.checkFatal(f.connection, cookie, "drawTitleBar: Unable to create graphics context"); return R : render.RenderingSurface := (render.SOFTWARE, gc => gc, renderer => rend); end createSoftwareSurface; --------------------------------------------------------------------------- -- frameWindow --------------------------------------------------------------------------- function frameWindow (connection : access xcb.xcb_connection_t; window : xproto.xcb_window_t; rend : render.Renderer) return Frame is use xcb; use xproto; use render; f : Frame; geom : xcb_get_geometry_reply_t; screen : access xcb_screen_t; cookie : xcb_void_cookie_t; error : access xcb_generic_error_t; result : Interfaces.C.int; title : Ada.Strings.Unbounded.Unbounded_String; -- Stuff to get a 32-bit window colormap : xcb_colormap_t; frameCreateAttributes : aliased xcb_create_window_value_list_t; appAttributes : aliased xcb_change_window_attributes_value_list_t; frameValueMask : Interfaces.C.unsigned; begin -- Get information about app window geom := Util.getWindowGeometry (connection, window); -- get the first screen screen := xcb_setup_roots_iterator (xcb_get_setup (connection)).data; -- Create new parent window for frame f.frameID := xcb_generate_id (connection); -- Create new colormap colormap := xcb_generate_id (connection); cookie := xcb_create_colormap_checked (c => connection, alloc => xcb_colormap_alloc_t'Pos(XCB_COLORMAP_ALLOC_NONE), mid => colormap, window => screen.root, visual => rend.visualID); error := xcb_request_check (connection, cookie); if error /= null then raise FrameException with "Troodon: (Frame) Failed to create colormap, error:" & error.error_code'Image; end if; -- See what name the app is trying to use. Try these until we find one. if setup.ewmh /= null then title := Util.getStringProperty (connection, window, setup.ewmh.u_NET_WM_NAME); end if; if Length(title) = 0 then title := Util.getStringProperty (connection, window, XCB_ATOM_WM_NAME); end if; if Length(title) = 0 then title := Util.getStringProperty (connection, window, XCB_ATOM_WM_COMMAND); end if; -- Setup frame attributes here. If we're using OpenGL then the background pixel -- won't matter. -- @Note that if our color depth differs from the parent depth, we need -- to set back pixel, border pixel _and_ colormap. -- -- See https://stackoverflow.com/questions/3645632/how-to-create-a-window-with-a-bit-depth-of-32 -- frameCreateAttributes.background_pixel := FRAME_BG; frameCreateAttributes.border_pixel := FRAME_BORDER; frameCreateAttributes.colormap := rend.colormap; -- colormap frameCreateAttributes.event_mask := XCB_EVENT_MASK_EXPOSURE or -- window needs to be redrawn XCB_EVENT_MASK_STRUCTURE_NOTIFY or -- frame is destroyed XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT or -- app resizes itself XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY or -- subwindows get notifications XCB_EVENT_MASK_BUTTON_PRESS or -- if we get clicked or dragged, XCB_EVENT_MASK_BUTTON_RELEASE or -- we need to know. XCB_EVENT_MASK_POINTER_MOTION or -- for dragging XCB_EVENT_MASK_ENTER_WINDOW or -- so we can change cursor for resize... XCB_EVENT_MASK_LEAVE_WINDOW; -- ...and change it back. frameValueMask := XCB_CW_BACK_PIXEL or XCB_CW_BORDER_PIXEL or XCB_CW_COLORMAP or XCB_CW_EVENT_MASK; f.width := Natural(geom.width) + 2 * FRAME_BORDER_WIDTH; f.height := Natural(geom.height + 2 * FRAME_BORDER_WIDTH + TITLEBAR_HEIGHT); -- Create actual frame window cookie := xcb_create_window_aux_checked (c => connection, depth => 32, wid => f.frameID, parent => screen.root, x => geom.x, y => geom.y, width => unsigned_short(f.width), height => unsigned_short(f.height), border_width => 0, u_class => xcb_window_class_t'Pos (XCB_WINDOW_CLASS_INPUT_OUTPUT), visual => rend.visualID, value_mask => frameValueMask, value_list => frameCreateAttributes'Access); error := xcb_request_check (connection, cookie); if error /= null then raise FrameException with "Troodon: (Frame) Failed to create window, error:" & error.error_code'Image; end if; -- we'll use the UTF-8 title if the app set one. we set the property on the frame -- so that we can just pull the property later for the title. if setup.ewmh /= null then cookie := xcb_change_property (c => connection, mode => unsigned_char(xcb_prop_mode_t'Pos(XCB_PROP_MODE_REPLACE)), window => f.frameID, property => setup.ewmh.u_NET_WM_NAME, c_type => XCB_ATOM_STRING, format => 8, data_len => unsigned(Length(title)), data => To_String(title)'Address); -- cookie := xcb_change_property (c => connection, -- mode => unsigned_char(xcb_prop_mode_t'Pos(XCB_PROP_MODE_REPLACE)), -- window => f.frameID, -- property => setup.ewmh.u_NET_WM_WINDOW_OPACITY, -- c_type => XCB_ATOM_CARDINAL, -- format => 32, -- -- ); else cookie := xcb_change_property (c => connection, mode => unsigned_char(xcb_prop_mode_t'Pos(XCB_PROP_MODE_REPLACE)), window => f.frameID, property => XCB_ATOM_WM_NAME, c_type => XCB_ATOM_STRING, format => 8, data_len => unsigned(Length(title)), data => To_String(title)'Address); end if; -- Grab button presses in frame cookie := xcb_grab_button (c => connection, owner_events => 0, grab_window => window, event_mask => unsigned_short(XCB_EVENT_MASK_BUTTON_PRESS), pointer_mode => unsigned_char(xcb_grab_mode_t'Pos(XCB_GRAB_MODE_SYNC)), keyboard_mode => unsigned_char(xcb_grab_mode_t'Pos(XCB_GRAB_MODE_ASYNC)), confine_to => XCB_NONE, cursor => XCB_NONE, button => 1, modifiers => unsigned_short(XCB_MOD_MASK_ANY)); -- appAttributes.event_mask := XCB_EVENT_MASK_BUTTON_PRESS; -- cookie := xcb_change_window_attributes_aux (c => connection, -- window => window, -- value_mask => XCB_CW_EVENT_MASK, -- value_list => appAttributes'Access); cookie := xcb_reparent_window (c => connection, window => window, parent => f.frameID, x => FRAME_BORDER_WIDTH, y => FRAME_BORDER_WIDTH + TITLEBAR_HEIGHT); cookie := xcb_map_window (c => connection, window => f.frameID); cookie := xcb_map_window (c => connection, window => window); f.surface.renderer := rend; f.connection := connection; f.appWindow := window; f.title := title; f.focused := False; f.grabbed := True; f.dragging := False; -- If using OpenGL renderer, create GLX window here out of our mapped window if rend.kind = render.OPENGL then f.surface := createOpenGLSurface (f => f, rend => rend); else f.surface := createSoftwareSurface (f => f, rend => rend); end if; -- Add this new frame to our map allFrames.Include (window, f); result := xcb_flush (connection); Ada.Text_IO.Put_Line ("Framed window" & window'Image & " with parent" & f.frameID'Image); return f; end frameWindow; --------------------------------------------------------------------------- -- deleteFrame -- Delete the window and GLX resources used by this frame. --------------------------------------------------------------------------- procedure deleteFrame (f : Frame) is cookie : xcb.xcb_void_cookie_t; begin Ada.Text_IO.Put_Line ("Delete Frame" & f.frameID'Image); GLX.glXDestroyWindow (f.surface.renderer.display, GLX.GLXWindow(f.surface.drawable)); -- Remove us from the render scene Compositor.deleteWindow (f.frameID); cookie := xcb_destroy_window (f.connection, f.frameID); -- Note that allFrames is indexed by app window ID. allFrames.Delete (f.appWindow); end deleteFrame; --------------------------------------------------------------------------- -- unFrameWindow --------------------------------------------------------------------------- procedure unFrameWindow (f : Frame) is cookie : xcb.xcb_void_cookie_t; geom : xproto.xcb_get_geometry_reply_t; begin Ada.Text_IO.Put_Line ("Unframe Window" & f.appWindow'Image); -- Figure out where this thing lives geom := Util.getWindowGeometry (f.connection, f.appWindow); -- Re-parent to root, at the same location it was before. cookie := xcb_reparent_window (c => f.connection, window => f.appWindow, parent => Setup.getRootWindow (f.connection), x => geom.x + FRAME_BORDER_WIDTH, y => geom.y + FRAME_BORDER_WIDTH + TITLEBAR_HEIGHT); -- Frame is dead to us now. deleteFrame (f); end unFrameWindow; --------------------------------------------------------------------------- -- startDrag -- Set this frame as "Dragging" so it can change the way it draws itself. --------------------------------------------------------------------------- procedure startDrag (frameID : xproto.xcb_window_t) is use FrameMap; begin for f of allFrames loop if f.frameID = frameID then f.dragging := True; else f.dragging := False; end if; --@TODO there's a more efficient way to do this than re-drawing everything. f.draw; end loop; end startDrag; --------------------------------------------------------------------------- -- stopDrag -- Stop dragging all frames --------------------------------------------------------------------------- procedure stopDrag is use FrameMap; begin for f of allFrames loop f.dragging := False; --@TODO there's a more efficient way to do this than re-drawing everything. f.draw; end loop; end stopDrag; --------------------------------------------------------------------------- -- Focus -- Set the focused property of the Frame with a given frameID to True, set -- all other frames to False. This is extra work but ensures correctness, -- in that only one frame will have the focus at a given time. -- -- This ungrabs the inputs for the focused frame, and re-grabs inputs for -- the unfocused frames. --------------------------------------------------------------------------- procedure focus (frameID : xproto.xcb_window_t) is use FrameMap; use xcb; use xproto; cookie : xcb_void_cookie_t; ignore : Interfaces.C.int; -- Raise window to top of stack procedure raiseToTop (connection : access xcb_connection_t; win : xcb_window_t) is winAttr : aliased xcb_configure_window_value_list_t; cookie : xcb_void_cookie_t; ignore : Interfaces.C.int; begin winAttr.stack_mode := xcb_stack_mode_t'Pos (XCB_STACK_MODE_ABOVE); cookie := xcb_configure_window_aux (c => connection, window => win, value_mask => unsigned_short (XCB_CONFIG_WINDOW_STACK_MODE), value_list => winAttr'Access); -- We may not have gotten the CreateNotify yet for this frame. Compositor.bringToTop (win); end raiseToTop; begin -- Unfocus all frames first. This ensures only one frame has the focus at a time. unfocusAll; for f of allFrames loop if f.frameID = frameID then f.focused := True; -- Now that we focused it, we can ungrab the pointer to allow app to get events cookie := xcb_ungrab_button (c => f.connection, button => 1, grab_window => f.appWindow, modifiers => unsigned_short(XCB_MOD_MASK_ANY)); -- Send the last click to the app cookie := xcb_allow_events (c => f.connection, mode => unsigned_char(xcb_allow_t'Pos(XCB_ALLOW_REPLAY_POINTER)), time => XCB_CURRENT_TIME); -- Give the app the input focus now. cookie := xcb_set_input_focus(c => f.connection, revert_to => xcb_input_focus_t'Pos(XCB_INPUT_FOCUS_POINTER_ROOT), focus => f.appWindow, time => XCB_CURRENT_TIME); f.grabbed := False; raiseToTop (f.connection, frameID); f.draw; -- might be able to skip this re-draw since raiseToTop should trigger -- an expose event. ignore := xcb_flush (f.connection); return; end if; end loop; end focus; --------------------------------------------------------------------------- -- unfocusAll -- Remove the focus from all frames in our map, making them grab mouse -- inputs as well. --------------------------------------------------------------------------- procedure unfocusAll is use xcb; use xproto; cookie : xcb_void_cookie_t; begin for f of allFrames loop -- Skip if already unfocused to avoid re-draw if f.focused = True then f.focused := False; -- @TODO Might be able to skip this check too if f.grabbed = False then cookie := xcb_grab_button (c => f.connection, owner_events => 0, grab_window => f.appWindow, event_mask => unsigned_short(XCB_EVENT_MASK_BUTTON_PRESS), pointer_mode => unsigned_char(xcb_grab_mode_t'Pos(XCB_GRAB_MODE_SYNC)), keyboard_mode => unsigned_char(xcb_grab_mode_t'Pos(XCB_GRAB_MODE_ASYNC)), confine_to => XCB_NONE, cursor => XCB_NONE, button => 1, modifiers => unsigned_short(XCB_MOD_MASK_ANY)); f.grabbed := True; end if; -- re-draw f.draw; end if; end loop; end unfocusAll; --------------------------------------------------------------------------- -- isFrame -- Linear search through the list of frames to see if this X11 window is a -- frame --------------------------------------------------------------------------- function isFrame (frameID : xproto.xcb_window_t) return Boolean is use FrameMap; begin for C in allFrames.Iterate loop if allFrames(C).frameID = frameID then return True; end if; end loop; return False; end isFrame; --------------------------------------------------------------------------- -- getFrameFromList -- Linear search through the map of frames to get the Frame object -- corresponding to this X11 ID if it exists. -- NOTE: I believe this makes a _copy_ of the element, not sure. --------------------------------------------------------------------------- function getFrameFromList (frameID : xproto.xcb_window_t) return Frame is use FrameMap; begin for C in allFrames.Iterate loop if allFrames(C).frameID = frameID then return allFrames(C); end if; end loop; raise Program_Error with "Attempted to retrieve non-existent Frame from list"; end getFrameFromList; --------------------------------------------------------------------------- -- hasFrame -- Fast search through the map of frames to see if this X11 window already -- has a frame. --------------------------------------------------------------------------- function hasFrame (windowID : xproto.xcb_window_t) return Boolean is begin return allFrames.Contains (windowID); end hasFrame; --------------------------------------------------------------------------- -- getWindowFrame -- NOTE: I believe this makes a _copy_ of the element, not sure. --------------------------------------------------------------------------- function getFrameOfWindow (windowID : xproto.xcb_window_t) return Frame is use FrameMap; begin return allFrames(windowID); end getFrameOfWindow; end frames;
Fabien-Chouteau/GESTE
Ada
4,743
adb
------------------------------------------------------------------------------ -- -- -- GESTE -- -- -- -- Copyright (C) 2018 Fabien Chouteau -- -- -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Interfaces; use Interfaces; with GESTE.Maths_Tables; use GESTE.Maths_Tables; package body GESTE.Maths is --------- -- Sin -- --------- function Sin (A : Value) return Value is begin return Sine_Table (Unsigned_32 (Integer (A * Sine_Alpha) mod (2**30)) and (Sine_Table_Size - 1)); end Sin; --------- -- Cos -- --------- function Cos (A : Value) return Value is begin return Cos_Table (Unsigned_32 (Integer (A * Cos_Alpha) mod (2**30)) and (Cos_Table_Size - 1)); end Cos; ---------------- -- To_Degrees -- ---------------- function To_Degrees (A : Value) return Value is (Value (Value (A * 360.0) / Value (Pi * 2.0))); --------- -- To_ -- --------- function To_Rad (A : Value) return Value is (Value (A * Value (Pi * 2.0)) / Value (360.0)); --------- -- "-" -- --------- function "-" (V : Vect) return Vect is (-V.X, -V.Y); --------- -- "*" -- --------- function "*" (V : Vect; F : Value) return Vect is (V.X * F, V.Y * F); --------- -- "*" -- --------- function "*" (F : Value; V : Vect) return Vect is (V.X * F, V.Y * F); --------- -- "+" -- --------- function "+" (V : Vect; F : Value) return Vect is (V.X + F, V.Y + F); --------- -- "+" -- --------- function "+" (F : Value; V : Vect) return Vect is (V.X + F, V.Y + F); --------- -- "+" -- --------- function "+" (V1, V2 : Vect) return Vect is ((V1.X + V2.X, V1.Y + V2.Y)); ---------- -- Sqrt -- ---------- function Sqrt (V : Value) return Value is A : Value; begin if V <= 0.0 then return -1.0; elsif V = 1.0 then return 1.0; end if; A := V / 2; for K in 1 .. Fractional_Bits loop if A = 0.0 then return 0.0; end if; A := (A + V / A) / 2.0; end loop; return A; end Sqrt; --------------- -- Magnitude -- --------------- function Magnitude (V : Vect) return Value is (Sqrt (V.X * V.X + V.Y * V.Y)); end GESTE.Maths;
io7m/coreland-lua-ada
Ada
657
ads
-- Lua userdata handling with System.Address_To_Access_Conversions; with Lua; with Lua.Lib; generic type User_Data_t is private; Class_Name : String; Method_Table : Lua.Lib.Register_Array_t; Meta_Table : Lua.Lib.Register_Array_t; package Lua.User_Data is type User_Data_Access_t is access all User_Data_t; procedure Register (State : Lua.State_t); procedure Push (State : Lua.State_t; Item : User_Data_t); function Get (State : Lua.State_t; Index : Integer := 1) return User_Data_t; pragma Inline (Get); private package Convert is new System.Address_To_Access_Conversions (User_Data_t); end Lua.User_Data;
rveenker/sdlada
Ada
14,848
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2020, Luke A. Guest -- -- 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 Ada.Unchecked_Conversion; with SDL.Error; package body SDL.Video.Textures is package C renames Interfaces.C; use type C.int; use type SDL.C_Pointers.Texture_Pointer; procedure Destroy (Self : in out Texture) is procedure SDL_Destroy_Texture (T : in SDL.C_Pointers.Texture_Pointer) with Import => True, Convention => C, External_Name => "SDL_DestroyTexture"; begin SDL_Destroy_Texture (Self.Internal); Self.Internal := null; end Destroy; function Get_Alpha (Self : in Texture) return SDL.Video.Palettes.Colour_Component is function SDL_Get_Texture_Alpha_Mod (T : in SDL.C_Pointers.Texture_Pointer; Alpha : out SDL.Video.Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_GetTextureAlphaMod"; Data : SDL.Video.Palettes.Colour_Component; Result : C.int := SDL_Get_Texture_Alpha_Mod (Self.Internal, Data); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; return Data; end Get_Alpha; procedure Set_Alpha (Self : in out Texture; Alpha : in SDL.Video.Palettes.Colour_Component) is function SDL_Set_Texture_Alpha_Mod (T : in SDL.C_Pointers.Texture_Pointer; Alpha : in SDL.Video.Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_SetTextureAlphaMod"; Result : C.int := SDL_Set_Texture_Alpha_Mod (Self.Internal, Alpha); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; end Set_Alpha; function Get_Blend_Mode (Self : in Texture) return Blend_Modes is function SDL_Get_Texture_Blend_Mode (T : in SDL.C_Pointers.Texture_Pointer; Blend : out Blend_Modes) return C.int with Import => True, Convention => C, External_Name => "SDL_GetTextureBlendMode"; Data : Blend_Modes; Result : C.int := SDL_Get_Texture_Blend_Mode (Self.Internal, Data); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; return Data; end Get_Blend_Mode; procedure Set_Blend_Mode (Self : in out Texture; Mode : in Blend_Modes) is function SDL_Set_Texture_Blend_Mode (T : in SDL.C_Pointers.Texture_Pointer; Mode : in Blend_Modes) return C.int with Import => True, Convention => C, External_Name => "SDL_SetTextureBlendMode"; Result : C.int := SDL_Set_Texture_Blend_Mode (Self.Internal, Mode); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; end Set_Blend_Mode; function Get_Modulate_Colour (Self : in Texture) return SDL.Video.Palettes.RGB_Colour is function SDL_Get_Texture_Color_Mod (T : in SDL.C_Pointers.Texture_Pointer; R, G, B : out SDL.Video.Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_GetTextureColorMod"; Data : SDL.Video.Palettes.RGB_Colour; Result : C.int := SDL_Get_Texture_Color_Mod (Self.Internal, Data.Red, Data.Green, Data.Blue); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; return Data; end Get_Modulate_Colour; procedure Set_Modulate_Colour (Self : in out Texture; Colour : in SDL.Video.Palettes.RGB_Colour) is function SDL_Set_Texture_Color_Mod (T : in SDL.C_Pointers.Texture_Pointer; R, G, B : in SDL.Video.Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_SetTextureColorMod"; Result : C.int := SDL_Set_Texture_Color_Mod (Self.Internal, Colour.Red, Colour.Green, Colour.Blue); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; end Set_Modulate_Colour; -- procedure Lock_Texture (Self : in out Texture; -- Pixels : out SDL.Video.Pixels.Pixel_ARGB_8888_Array_Access) is -- type Int_Ptr is access C.int with -- Convention => C; -- -- function SDL_Lock_Texture (T : in System.Address; -- Area : in System.Address; -- Pixels : out SDL.Video.Pixels.C_Pixel_Ptr; -- Pitch : out Int_Ptr) return C.int with -- Import => True, -- Convention => C, -- External_Name => "SDL_LockTexture"; -- -- C_Pixels : SDL.Video.Pixels.C_Pixel_Ptr := null; -- C_Pitch : Int_Ptr := null; -- Result : C.int := SDL_Lock_Texture (Self.Internal, System.Null_Address, C_Pixels, C_Pitch); -- begin -- if Result /= Success then -- raise Texture_Error with SDL.Error.Get; -- end if; -- -- Self.Locked := True; -- -- Pixels := SDL.Video.Pixels.Create (C_Pixels, C_Pitch.all, Self.Size); -- end Lock_Texture; procedure Lock (Self : in out Texture; Pixels : out Pixel_Pointer_Type) is function SDL_Lock_Texture (T : in SDL.C_Pointers.Texture_Pointer; Area : in System.Address; Pixels : out Pixel_Pointer_Type; Pitch : out SDL.Video.Pixels.Pitches) return C.int with Import => True, Convention => C, External_Name => "SDL_LockTexture"; -- Don't care about Pitch value. Dummy : SDL.Video.Pixels.Pitches := 0; Result : C.int := SDL_Lock_Texture (Self.Internal, System.Null_Address, Pixels, Dummy); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; Self.Locked := True; end Lock; procedure Lock_Area (Self : in out Texture; Area : in SDL.Video.Rectangles.Rectangle; Pixels : out Pixel_Pointer_Type; Pitch : out SDL.Video.Pixels.Pitches) is function SDL_Lock_Texture (T : in SDL.C_Pointers.Texture_Pointer; Area : in SDL.Video.Rectangles.Rectangle; Pixels : out Pixel_Pointer_Type; Pitch : out SDL.Video.Pixels.Pitches) return C.int with Import => True, Convention => C, External_Name => "SDL_LockTexture"; Result : C.int := SDL_Lock_Texture (Self.Internal, Area, Pixels, Pitch); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; Self.Locked := True; end Lock_Area; procedure Unlock (Self : in out Texture) is procedure SDL_Unlock_Texture (T : in SDL.C_Pointers.Texture_Pointer) with Import => True, Convention => C, External_Name => "SDL_UnlockTexture"; begin if Self.Locked then SDL_Unlock_Texture (Self.Internal); Self.Locked := False; end if; end Unlock; procedure Query (Self : in Texture; Pixel_Format_Name : out SDL.Video.Pixel_Formats.Pixel_Format_Names; Kind : out Kinds; Size : out SDL.Sizes) is function SDL_Query_Texture (T : in SDL.C_Pointers.Texture_Pointer; Pixel_Format_Name : out SDL.Video.Pixel_Formats.Pixel_Format_Names; Kind : out Kinds; Width : out SDL.Dimension; Height : out SDL.Dimension) return C.int with import => True, Convention => C, External_Name => "SDL_QueryTexture"; W : SDL.Dimension := 0; H : SDL.Dimension := 0; Result : C.int := SDL_Query_Texture (Self.Internal, Pixel_Format_Name, Kind, W, H); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; Size := SDL.Sizes'(W, H); end Query; function Get_Pixel_Format (Self : in Texture) return SDL.Video.Pixel_Formats.Pixel_Format_Names is function SDL_Query_Texture (T : in SDL.C_Pointers.Texture_Pointer; Pixel_Format_Name : out SDL.Video.Pixel_Formats.Pixel_Format_Names; Kind : in System.Address := System.Null_Address; Width : in System.Address := System.Null_Address; Height : in System.Address := System.Null_Address) return C.int with import => True, Convention => C, External_Name => "SDL_QueryTexture"; Format_Name : SDL.Video.Pixel_Formats.Pixel_Format_Names; Result : C.int := SDL_Query_Texture (T => Self.Internal, Pixel_Format_Name => Format_Name); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; return Format_Name; end Get_Pixel_Format; function Get_Kind (Self : in Texture) return Kinds is function SDL_Query_Texture (T : in SDL.C_Pointers.Texture_Pointer; Pixel_Format_Name : in System.Address := System.Null_Address; Kind : out Kinds; Width : in System.Address := System.Null_Address; Height : in System.Address := System.Null_Address) return C.int with import => True, Convention => C, External_Name => "SDL_QueryTexture"; Kind : Kinds; Result : C.int := SDL_Query_Texture (T => Self.Internal, Kind => Kind); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; return Kind; end Get_Kind; function Get_Size (Self : in Texture) return SDL.Sizes is function SDL_Query_Texture (T : in SDL.C_Pointers.Texture_Pointer; Pixel_Format_Name : in System.Address := System.Null_Address; Kind : in System.Address := System.Null_Address; Width : out SDL.Dimension; Height : out SDL.Dimension) return C.int with import => True, Convention => C, External_Name => "SDL_QueryTexture"; Size : SDL.Sizes := SDL.Zero_Size; Result : C.int := SDL_Query_Texture (T => Self.Internal, Width => Size.Width, Height => Size.Height); begin if Result /= Success then raise Texture_Error with SDL.Error.Get; end if; return Size; end Get_Size; procedure Update_YUV_Texture (Self : in out Texture; Y_Plane : in Pixel_Pointer_Type; Y_Pitch : in Natural; U_Plane : in Pixel_Pointer_Type; U_Pitch : in Natural; V_Plane : in Pixel_Pointer_Type; V_Pitch : in Natural) is procedure SDL_UpdateYUVTexture (T : in SDL.C_Pointers.Texture_Pointer; Area : in System.Address; YPlane : in Pixel_Pointer_Type; YPitch : in Natural; UPlane : in Pixel_Pointer_Type; UPitch : in Natural; VPlane : in Pixel_Pointer_Type; VPitch : in Natural) with Import => True, Convention => C, External_Name => "SDL_UpdateYUVTexture"; -- extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture (SDL_Texture * texture, -- const SDL_Rect * rect, -- const Uint8 * Yplane, int Ypitch, -- const Uint8 * Uplane, int Upitch, -- const Uint8 *Vplane, int Vpitch); begin SDL_UpdateYUVTexture (T => Self.Internal, Area => System.Null_Address, YPlane => Y_Plane, YPitch => Y_Pitch, UPlane => U_Plane, UPitch => U_Pitch, VPlane => V_Plane, VPitch => V_Pitch); end Update_YUV_Texture; overriding procedure Finalize (Self : in out Texture) is begin if Self.Internal /= null and then Self.Owns then Destroy (Self); end if; end Finalize; function Get_Internal_Texture (Self : in Texture) return SDL.C_Pointers.Texture_Pointer is begin return Self.Internal; end Get_Internal_Texture; end SDL.Video.Textures;
ellamosi/Ada_BMP_Library
Ada
23,977
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2017, 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 Bitmap.Color_Conversion; use Bitmap.Color_Conversion; package body Bitmap.Soft_Drawing is subtype Dispatch is Soft_Drawing_Bitmap_Buffer'Class; overriding procedure Draw_Line (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32; Start, Stop : Point; Thickness : Natural := 1; Fast : Boolean := True) is DX : constant Float := abs Float (Stop.X - Start.X); DY : constant Float := abs Float (Stop.Y - Start.Y); Err : Float; X : Natural := Start.X; Y : Natural := Start.Y; Step_X : Integer := 1; Step_Y : Integer := 1; procedure Draw_Point (P : Point) with Inline; ---------------- -- Draw_Point -- ---------------- procedure Draw_Point (P : Point) is begin if Thickness /= 1 then if not Fast then Dispatch (Buffer). Fill_Circle (Color => Color, Center => P, Radius => Thickness / 2); else Dispatch (Buffer).Fill_Rect (Color, ((P.X - (Thickness / 2), P.Y - (Thickness / 2)), Thickness, Thickness)); end if; else Dispatch (Buffer).Set_Pixel ((P.X, P.Y), Color); end if; end Draw_Point; begin if Start.X > Stop.X then Step_X := -1; end if; if Start.Y > Stop.Y then Step_Y := -1; end if; if DX > DY then Err := DX / 2.0; while X /= Stop.X loop Draw_Point ((X, Y)); Err := Err - DY; if Err < 0.0 then Y := Y + Step_Y; Err := Err + DX; end if; X := X + Step_X; end loop; else Err := DY / 2.0; while Y /= Stop.Y loop Draw_Point ((X, Y)); Err := Err - DX; if Err < 0.0 then X := X + Step_X; Err := Err + DY; end if; Y := Y + Step_Y; end loop; end if; Draw_Point ((X, Y)); end Draw_Line; overriding procedure Draw_Line (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Start, Stop : Point; Thickness : Natural := 1; Fast : Boolean := True) is Col : constant UInt32 := Bitmap_Color_To_Word (Dispatch (Buffer).Color_Mode, Color); begin Dispatch (Buffer).Draw_Line (Col, Start, Stop, Thickness, Fast); end Draw_Line; ---------- -- Fill -- ---------- overriding procedure Fill (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color) is Col : constant UInt32 := Bitmap_Color_To_Word (Dispatch (Buffer).Color_Mode, Color); begin Fill (Dispatch (Buffer), Col); end Fill; ---------- -- Fill -- ---------- overriding procedure Fill (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32) is begin for Y in 0 .. Dispatch (Buffer).Height - 1 loop for X in 0 .. Dispatch (Buffer).Width - 1 loop Dispatch (Buffer).Set_Pixel ((X, Y), Color); end loop; end loop; end Fill; --------------- -- Fill_Rect -- --------------- overriding procedure Fill_Rect (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Area : Rect) is begin Fill_Rect (Dispatch (Buffer), Bitmap_Color_To_Word (Dispatch (Buffer).Color_Mode, Color), Area); end Fill_Rect; --------------- -- Fill_Rect -- --------------- overriding procedure Fill_Rect (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32; Area : Rect) is begin for Y0 in Area.Position.Y .. Area.Position.Y + Area.Height - 1 loop for X0 in Area.Position.X .. Area.Position.X + Area.Width - 1 loop Dispatch (Buffer).Set_Pixel ((X0, Y0), Color); end loop; end loop; end Fill_Rect; --------------- -- Copy_Rect -- --------------- overriding procedure Copy_Rect (Src_Buffer : Bitmap_Buffer'Class; Src_Pt : Point; Dst_Buffer : in out Soft_Drawing_Bitmap_Buffer; Dst_Pt : Point; Bg_Buffer : Bitmap_Buffer'Class; Bg_Pt : Point; Width : Natural; Height : Natural; Synchronous : Boolean) is begin raise Constraint_Error with "Not implemented yet."; end Copy_Rect; --------------- -- Copy_Rect -- --------------- overriding procedure Copy_Rect (Src_Buffer : Bitmap_Buffer'Class; Src_Pt : Point; Dst_Buffer : in out Soft_Drawing_Bitmap_Buffer; Dst_Pt : Point; Width : Natural; Height : Natural; Synchronous : Boolean) is pragma Unreferenced (Synchronous); Pix : UInt32; begin if Src_Pt.X + Width > Src_Buffer.Width or else Src_Pt.Y + Height > Src_Buffer.Height then raise Constraint_Error with "invalid copy area for source bitmap"; end if; if Dst_Pt.X + Width > Dispatch (Dst_Buffer).Width or else Dst_Pt.Y + Height > Dispatch (Dst_Buffer).Height then raise Constraint_Error with "invalid copy area for destination bitmap"; end if; for X in 0 .. Width - 1 loop for Y in 0 .. Height - 1 loop Pix := Src_Buffer.Pixel (Src_Pt + (X, Y)); Dispatch (Dst_Buffer).Set_Pixel (Dst_Pt + (X, Y), Pix); end loop; end loop; end Copy_Rect; --------------------- -- Copy_Rect_Blend -- --------------------- overriding procedure Copy_Rect_Blend (Src_Buffer : Soft_Drawing_Bitmap_Buffer; Src_Pt : Point; Dst_Buffer : in out Bitmap_Buffer'Class; Dst_Pt : Point; Width : Natural; Height : Natural; Synchronous : Boolean) is begin Copy_Rect (Src_Buffer => Dispatch (Src_Buffer), Src_Pt => Src_Pt, Dst_Buffer => Dst_Buffer, Dst_Pt => Dst_Pt, Bg_Buffer => Dst_Buffer, Bg_Pt => Dst_Pt, Width => Width, Height => Height, Synchronous => Synchronous); end Copy_Rect_Blend; ------------------------ -- Draw_Vertical_Line -- ------------------------ overriding procedure Draw_Vertical_Line (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32; Pt : Point; Height : Integer) is begin Fill_Rect (Dispatch (Buffer), Color, (Position => Pt, Width => 1, Height => Height)); end Draw_Vertical_Line; ------------------------ -- Draw_Vertical_Line -- ------------------------ overriding procedure Draw_Vertical_Line (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Pt : Point; Height : Integer) is begin Fill_Rect (Dispatch (Buffer), Color, (Position => Pt, Width => 1, Height => Height)); end Draw_Vertical_Line; -------------------------- -- Draw_Horizontal_Line -- -------------------------- overriding procedure Draw_Horizontal_Line (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32; Pt : Point; Width : Integer) is begin Fill_Rect (Dispatch (Buffer), Color, (Position => Pt, Width => Width, Height => 1)); end Draw_Horizontal_Line; -------------------------- -- Draw_Horizontal_Line -- -------------------------- overriding procedure Draw_Horizontal_Line (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Pt : Point; Width : Integer) is begin Fill_Rect (Dispatch (Buffer), Color, (Position => Pt, Width => Width, Height => 1)); end Draw_Horizontal_Line; --------------- -- Draw_Rect -- --------------- overriding procedure Draw_Rect (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Area : Rect; Thickness : Natural := 1) is X0, Y0, X1, Y1 : Natural; begin X0 := Area.Position.X; Y0 := Area.Position.Y; X1 := Area.Position.X + Area.Width - 1; Y1 := Area.Position.Y + Area.Height - 1; Dispatch (Buffer).Fill_Rect (Color, (Position => (X0 - Thickness / 2, Y0), Width => Thickness, Height => Area.Height + Thickness / 2)); Dispatch (Buffer).Fill_Rect (Color, (Position => (X1 - Thickness / 2, Y0), Width => Thickness, Height => Area.Height + Thickness / 2)); Dispatch (Buffer).Fill_Rect (Color, (Position => (X0, Y0 - Thickness / 2), Width => Area.Width + Thickness / 2, Height => Thickness)); Dispatch (Buffer).Fill_Rect (Color, (Position => (X0, Y1 - Thickness / 2), Width => Area. Width + Thickness / 2, Height => Thickness)); end Draw_Rect; ----------------------- -- Draw_Rounded_Rect -- ----------------------- overriding procedure Draw_Rounded_Rect (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Area : Rect; Radius : Natural; Thickness : Natural := 1) is F : Integer := 1 - Radius; ddF_X : Integer := 0; ddF_Y : Integer := (-2) * Radius; X0 : Integer := 0; Y0 : Integer := Radius; Center_Top : constant Natural := Area.Position.Y + Radius; Center_Bot : constant Natural := Area.Position.Y + Area.Height - 1 - Radius; Center_Lft : constant Natural := Area.Position.X + Radius; Center_Rgt : constant Natural := Area.Position.X + Area.Width - 1 - Radius; procedure Draw_Point (X, Y : Natural) with Inline; ---------------- -- Draw_Point -- ---------------- procedure Draw_Point (X, Y : Natural) is begin if Thickness /= 1 then Dispatch (Buffer).Fill_Rect (Color, (Position => (X - (Thickness / 2), Y - (Thickness / 2)), Width => Thickness, Height => Thickness)); else Dispatch (Buffer).Set_Pixel ((X, Y), Color); end if; end Draw_Point; begin if Radius = 0 then Draw_Rect (Buffer, Color, Area, Thickness); return; end if; Dispatch (Buffer).Fill_Rect (Color, (Position => (Area.Position.X - Thickness / 2, Area.Position.Y + Radius), Width => Thickness, Height => Area.Height - 2 * Radius)); Dispatch (Buffer).Fill_Rect (Color, (Position => (Area.Position.X + Area.Width - Thickness / 2 - 1, Area.Position.Y + Radius), Width => Thickness, Height => Area.Height - 2 * Radius)); Dispatch (Buffer).Fill_Rect (Color, (Position => (Area.Position.X + Radius, Area.Position.Y - Thickness / 2), Width => Area.Width - 2 * Radius, Height => Thickness)); Dispatch (Buffer).Fill_Rect (Color, (Position => (Area.Position.X + Radius, Area.Position.Y + Area.Height - Thickness / 2 - 1), Width => Area.Width - 2 * Radius, Height => Thickness)); while X0 < Y0 loop if F >= 0 then Y0 := Y0 - 1; ddF_Y := ddF_Y + 2; F := F + ddF_Y; end if; X0 := X0 + 1; ddF_X := ddF_X + 2; F := F + ddF_X + 1; Draw_Point (Center_Rgt + X0, Center_Bot + Y0); Draw_Point (Center_Lft - X0, Center_Bot + Y0); Draw_Point (Center_Rgt + X0, Center_Top - Y0); Draw_Point (Center_Lft - X0, Center_Top - Y0); Draw_Point (Center_Rgt + Y0, Center_Bot + X0); Draw_Point (Center_Lft - Y0, Center_Bot + X0); Draw_Point (Center_Rgt + Y0, Center_Top - X0); Draw_Point (Center_Lft - Y0, Center_Top - X0); end loop; end Draw_Rounded_Rect; ----------------------- -- Fill_Rounded_Rect -- ----------------------- overriding procedure Fill_Rounded_Rect (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Area : Rect; Radius : Natural) is Col : constant UInt32 := Bitmap_Color_To_Word (Dispatch (Buffer).Color_Mode, Color); F : Integer := 1 - Radius; ddF_X : Integer := 0; ddF_Y : Integer := (-2) * Radius; X0 : Integer := 0; Y0 : Integer := Radius; Center_Top : constant Natural := Area.Position.Y + Radius; Center_Bot : constant Natural := Area.Position.Y + Area.Height - 1 - Radius; Center_Lft : constant Natural := Area.Position.X + Radius; begin if Radius = 0 then Dispatch (Buffer).Fill_Rect (Col, Area'Update (Position => (X0, Y0))); return; end if; Dispatch (Buffer).Fill_Rect (Col, (Position => (Area.Position.X, Center_Top), Width => Area.Width, Height => Area.Height - 2 * Radius)); while X0 < Y0 loop if F >= 0 then Y0 := Y0 - 1; ddF_Y := ddF_Y + 2; F := F + ddF_Y; end if; X0 := X0 + 1; ddF_X := ddF_X + 2; F := F + ddF_X + 1; Dispatch (Buffer).Draw_Horizontal_Line (Col, (Center_Lft - X0, Center_Bot + Y0), Area.Width - 2 * Radius + 2 * X0); Dispatch (Buffer).Draw_Horizontal_Line (Col, (Center_Lft - X0, Center_Top - Y0), Area.Width - 2 * Radius + 2 * X0); Dispatch (Buffer).Draw_Horizontal_Line (Col, (Center_Lft - Y0, Center_Bot + X0), Area.Width - 2 * Radius + 2 * Y0); Dispatch (Buffer).Draw_Horizontal_Line (Col, (Center_Lft - Y0, Center_Top - X0), Area.Width - 2 * Radius + 2 * Y0); end loop; end Fill_Rounded_Rect; ----------------- -- Draw_Circle -- ----------------- overriding procedure Draw_Circle (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Center : Point; Radius : Natural) is begin Draw_Circle (Dispatch (Buffer), Bitmap_Color_To_Word (Dispatch (Buffer).Color_Mode, Color), Center, Radius); end Draw_Circle; -- http://rosettacode.org/wiki/Bitmap/Midpoint_circle_algorithm ----------------- -- Draw_Circle -- ----------------- overriding procedure Draw_Circle (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32; Center : Point; Radius : Natural) is F : Integer := 1 - Radius; ddF_X : Integer := 0; ddF_Y : Integer := (-2) * Radius; X : Integer := 0; Y : Integer := Radius; begin Dispatch (Buffer).Set_Pixel ((Center.X, Center.Y + Radius), Color); Dispatch (Buffer).Set_Pixel ((Center.X, Center.Y - Radius), Color); Dispatch (Buffer).Set_Pixel ((Center.X + Radius, Center.Y), Color); Dispatch (Buffer).Set_Pixel ((Center.X - Radius, Center.Y), Color); while X < Y loop if F >= 0 then Y := Y - 1; ddF_Y := ddF_Y + 2; F := F + ddF_Y; end if; X := X + 1; ddF_X := ddF_X + 2; F := F + ddF_X + 1; Dispatch (Buffer).Set_Pixel ((Center.X + X, Center.Y + Y), Color); Dispatch (Buffer).Set_Pixel ((Center.X - X, Center.Y + Y), Color); Dispatch (Buffer).Set_Pixel ((Center.X + X, Center.Y - Y), Color); Dispatch (Buffer).Set_Pixel ((Center.X - X, Center.Y - Y), Color); Dispatch (Buffer).Set_Pixel ((Center.X + Y, Center.Y + X), Color); Dispatch (Buffer).Set_Pixel ((Center.X - Y, Center.Y + X), Color); Dispatch (Buffer).Set_Pixel ((Center.X + Y, Center.Y - X), Color); Dispatch (Buffer).Set_Pixel ((Center.X - Y, Center.Y - X), Color); end loop; end Draw_Circle; ----------------- -- Fill_Circle -- ----------------- overriding procedure Fill_Circle (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; Center : Point; Radius : Natural) is U32_Color : constant UInt32 := Bitmap_Color_To_Word (Dispatch (Buffer).Color_Mode, Color); begin Dispatch (Buffer).Fill_Circle (U32_Color, Center, Radius); end Fill_Circle; ----------------- -- Fill_Circle -- ----------------- overriding procedure Fill_Circle (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : UInt32; Center : Point; Radius : Natural) is procedure Draw_Horizontal_Line (X, Y : Integer; Width : Natural); ------------------------ -- Draw_Vertical_Line -- ------------------------ procedure Draw_Vertical_Line (X, Y : Integer; Height : Natural); -------------------------- -- Draw_Horizontal_Line -- -------------------------- procedure Draw_Horizontal_Line (X, Y : Integer; Width : Natural) is X1, W1 : Natural; begin if Width = 0 then return; elsif Y < 0 or else Y >= Dispatch (Buffer).Height then return; elsif X + Width < 0 or else X >= Dispatch (Buffer).Width then return; end if; if X < 0 then X1 := 0; W1 := Width + X; else X1 := X; W1 := Width; end if; if X1 + W1 >= Dispatch (Buffer).Width then W1 := Dispatch (Buffer).Width - X1 - 1; end if; if W1 = 0 then return; end if; Dispatch (Buffer).Fill_Rect (Color, ((X1, Y), W1, 1)); end Draw_Horizontal_Line; ------------------------ -- Draw_Vertical_Line -- ------------------------ procedure Draw_Vertical_Line (X, Y : Integer; Height : Natural) is Y1, H1 : Natural; begin if Height = 0 then return; elsif X < 0 or else X >= Dispatch (Buffer).Width then return; elsif Y + Height < 0 or else Y >= Dispatch (Buffer).Height then return; end if; if Y < 0 then Y1 := 0; H1 := Height + Y; else Y1 := Y; H1 := Height; end if; if Y1 + H1 >= Dispatch (Buffer).Height then H1 := Dispatch (Buffer).Height - Y1 - 1; end if; if H1 = 0 then return; end if; Dispatch (Buffer).Fill_Rect (Color, ((X, Y1), 1, H1)); end Draw_Vertical_Line; F : Integer := 1 - Radius; ddF_X : Integer := 1; ddF_Y : Integer := -(2 * Radius); X : Integer := 0; Y : Integer := Radius; begin Draw_Vertical_Line (Center.X, Center.Y - Radius, 2 * Radius); Draw_Horizontal_Line (Center.X - Radius, Center.Y, 2 * Radius); while X < Y loop if F >= 0 then Y := Y - 1; ddF_Y := ddF_Y + 2; F := F + ddF_Y; end if; X := X + 1; ddF_X := ddF_X + 2; F := F + ddF_X; Draw_Horizontal_Line (Center.X - X, Center.Y + Y, 2 * X); Draw_Horizontal_Line (Center.X - X, Center.Y - Y, 2 * X); Draw_Horizontal_Line (Center.X - Y, Center.Y + X, 2 * Y); Draw_Horizontal_Line (Center.X - Y, Center.Y - X, 2 * Y); end loop; end Fill_Circle; ------------------ -- Cubic_Bezier -- ------------------ overriding procedure Cubic_Bezier (Buffer : in out Soft_Drawing_Bitmap_Buffer; Color : Bitmap_Color; P1, P2, P3, P4 : Point; N : Positive := 20; Thickness : Natural := 1) is Points : array (0 .. N) of Point; begin for I in Points'Range loop declare T : constant Float := Float (I) / Float (N); A : constant Float := (1.0 - T)**3; B : constant Float := 3.0 * T * (1.0 - T)**2; C : constant Float := 3.0 * T**2 * (1.0 - T); D : constant Float := T**3; begin Points (I).X := Natural (A * Float (P1.X) + B * Float (P2.X) + C * Float (P3.X) + D * Float (P4.X)); Points (I).Y := Natural (A * Float (P1.Y) + B * Float (P2.Y) + C * Float (P3.Y) + D * Float (P4.Y)); end; end loop; for I in Points'First .. Points'Last - 1 loop Dispatch (Buffer).Draw_Line (Color, Points (I), Points (I + 1), Thickness => Thickness); end loop; end Cubic_Bezier; end Bitmap.Soft_Drawing;
reznikmm/matreshka
Ada
9,718
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- 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.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds; with AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds; with AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds; with AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds; with AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds; package body AMF.UMLDI.Holders is ------------- -- Element -- ------------- function Element (Holder : League.Holders.Holder) return AMF.UMLDI.Optional_UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind is begin if not League.Holders.Has_Tag (Holder, AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Value_Tag) then raise Constraint_Error; end if; if League.Holders.Is_Empty (Holder) then return (Is_Empty => True); else return (False, AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Element (Holder)); end if; end Element; ------------- -- Element -- ------------- function Element (Holder : League.Holders.Holder) return AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind is begin if not League.Holders.Has_Tag (Holder, AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Value_Tag) then raise Constraint_Error; end if; if League.Holders.Is_Empty (Holder) then return (Is_Empty => True); else return (False, AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Element (Holder)); end if; end Element; ------------- -- Element -- ------------- function Element (Holder : League.Holders.Holder) return AMF.UMLDI.Optional_UMLDI_UML_Interaction_Diagram_Kind is begin if not League.Holders.Has_Tag (Holder, AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Value_Tag) then raise Constraint_Error; end if; if League.Holders.Is_Empty (Holder) then return (Is_Empty => True); else return (False, AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Element (Holder)); end if; end Element; ------------- -- Element -- ------------- function Element (Holder : League.Holders.Holder) return AMF.UMLDI.Optional_UMLDI_UML_Interaction_Table_Label_Kind is begin if not League.Holders.Has_Tag (Holder, AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Value_Tag) then raise Constraint_Error; end if; if League.Holders.Is_Empty (Holder) then return (Is_Empty => True); else return (False, AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Element (Holder)); end if; end Element; ------------- -- Element -- ------------- function Element (Holder : League.Holders.Holder) return AMF.UMLDI.Optional_UMLDI_UML_Navigability_Notation_Kind is begin if not League.Holders.Has_Tag (Holder, AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Value_Tag) then raise Constraint_Error; end if; if League.Holders.Is_Empty (Holder) then return (Is_Empty => True); else return (False, AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Element (Holder)); end if; end Element; --------------- -- To_Holder -- --------------- function To_Holder (Element : AMF.UMLDI.Optional_UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind) return League.Holders.Holder is begin return Result : League.Holders.Holder do League.Holders.Set_Tag (Result, AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Value_Tag); if not Element.Is_Empty then AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Replace_Element (Result, Element.Value); end if; end return; end To_Holder; --------------- -- To_Holder -- --------------- function To_Holder (Element : AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind) return League.Holders.Holder is begin return Result : League.Holders.Holder do League.Holders.Set_Tag (Result, AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Value_Tag); if not Element.Is_Empty then AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Replace_Element (Result, Element.Value); end if; end return; end To_Holder; --------------- -- To_Holder -- --------------- function To_Holder (Element : AMF.UMLDI.Optional_UMLDI_UML_Interaction_Diagram_Kind) return League.Holders.Holder is begin return Result : League.Holders.Holder do League.Holders.Set_Tag (Result, AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Value_Tag); if not Element.Is_Empty then AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Replace_Element (Result, Element.Value); end if; end return; end To_Holder; --------------- -- To_Holder -- --------------- function To_Holder (Element : AMF.UMLDI.Optional_UMLDI_UML_Interaction_Table_Label_Kind) return League.Holders.Holder is begin return Result : League.Holders.Holder do League.Holders.Set_Tag (Result, AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Value_Tag); if not Element.Is_Empty then AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Replace_Element (Result, Element.Value); end if; end return; end To_Holder; --------------- -- To_Holder -- --------------- function To_Holder (Element : AMF.UMLDI.Optional_UMLDI_UML_Navigability_Notation_Kind) return League.Holders.Holder is begin return Result : League.Holders.Holder do League.Holders.Set_Tag (Result, AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Value_Tag); if not Element.Is_Empty then AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Replace_Element (Result, Element.Value); end if; end return; end To_Holder; end AMF.UMLDI.Holders;
zhmu/ananas
Ada
727
adb
-- { dg-do run } -- { dg-options "-O2" } with Ada.Command_Line; use Ada.Command_Line; procedure Opt65 is procedure Check_Version_And_Help (Version_String : String) is Help_Switch_Present : Boolean := False; Next_Arg : Natural := 1; begin while Next_Arg <= Argument_Count loop declare Next_Argv : constant String := Argument (Next_Arg); begin if Next_Argv = "--help" then Help_Switch_Present := True; end if; Next_Arg := Next_Arg + 1; end; end loop; if Help_Switch_Present then raise Program_Error; end if; end; begin Check_Version_And_Help ("version"); end;
stcarrez/ada-ado
Ada
5,561
ads
----------------------------------------------------------------------- -- ADO.Model -- ADO.Model ----------------------------------------------------------------------- -- 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 166 ----------------------------------------------------------------------- -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Sessions; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with Ada.Strings.Unbounded; private package ADO.Model is NOT_FOUND : exception; -- -------------------- -- Sequence generator -- -------------------- type Sequence_Ref is tagged record Id : Ada.Strings.Unbounded.Unbounded_String; Version : Integer; Value : ADO.Identifier; Block_Size : ADO.Identifier; Need_Save : Boolean := False; end record; -- Set the sequence name procedure Set_Name (Object : in out Sequence_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Sequence_Ref; Value : in String); -- Get the sequence name function Get_Name (Object : in Sequence_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Sequence_Ref) return String; -- Get the sequence record version function Get_Version (Object : in Sequence_Ref) return Integer; -- Set the sequence value procedure Set_Value (Object : in out Sequence_Ref; Value : in ADO.Identifier); -- Get the sequence value function Get_Value (Object : in Sequence_Ref) return ADO.Identifier; -- Set the sequence block size procedure Set_Block_Size (Object : in out Sequence_Ref; Value : in ADO.Identifier); -- Get the sequence block size function Get_Block_Size (Object : in Sequence_Ref) return ADO.Identifier; -- Find and load the entity. -- overriding procedure Find (Object : in out Sequence_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. procedure Save (Object : in out Sequence_Ref; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Sequence_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Table definition SEQUENCE_TABLE : aliased constant ADO.Schemas.Class_Mapping; -- -------------------- -- Entity types -- -------------------- -- Table definition ENTITY_TYPE_TABLE : aliased constant ADO.Schemas.Class_Mapping; -- Table definition VERSION_TABLE : aliased constant ADO.Schemas.Class_Mapping; private SEQUENCE_NAME : aliased constant String := "ado_sequence"; COL_0_1_NAME : aliased constant String := "name"; COL_1_1_NAME : aliased constant String := "version"; COL_2_1_NAME : aliased constant String := "value"; COL_3_1_NAME : aliased constant String := "block_size"; SEQUENCE_TABLE : aliased constant ADO.Schemas.Class_Mapping := (Count => 4, Table => SEQUENCE_NAME'Access, Members => ( COL_0_1_NAME'Access, COL_1_1_NAME'Access, COL_2_1_NAME'Access, COL_3_1_NAME'Access ) ); ENTITY_TYPE_NAME : aliased constant String := "ado_entity_type"; COL_0_2_NAME : aliased constant String := "id"; COL_1_2_NAME : aliased constant String := "name"; ENTITY_TYPE_TABLE : aliased constant ADO.Schemas.Class_Mapping := (Count => 2, Table => ENTITY_TYPE_NAME'Access, Members => ( COL_0_2_NAME'Access, COL_1_2_NAME'Access ) ); -- Load the object from current iterator position procedure Load (Object : in out Sequence_Ref; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); VERSION_NAME : aliased constant String := "ado_version"; COL_0_3_NAME : aliased constant String := "name"; COL_1_3_NAME : aliased constant String := "version"; VERSION_TABLE : aliased constant ADO.Schemas.Class_Mapping := (Count => 2, Table => VERSION_NAME'Access, Members => ( COL_0_3_NAME'Access, COL_1_3_NAME'Access ) ); end ADO.Model;
gitter-badger/spat
Ada
1,012
ads
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. ([email protected]) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hocevar. See the LICENSE file for more details. ------------------------------------------------------------------------------ pragma License (Unrestricted); ------------------------------------------------------------------------------ -- -- SPARK Proof Analysis Tool -- -- S.P.A.T. - Version information -- ------------------------------------------------------------------------------ with GNAT.Compiler_Version; package SPAT.Version is package Implementation is package Compiler_Info is new GNAT.Compiler_Version; end Implementation; Number : constant String := "1.1.0-pre"; Compiler : constant String := Implementation.Compiler_Info.Version; end SPAT.Version;
charlie5/cBound
Ada
1,535
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with xcb.xcb_render_trapezoid_t; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_render_trapezoid_iterator_t is -- Item -- type Item is record data : access xcb.xcb_render_trapezoid_t.Item; the_rem : aliased Interfaces.C.int; index : aliased Interfaces.C.int; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_render_trapezoid_iterator_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_trapezoid_iterator_t.Item, Element_Array => xcb.xcb_render_trapezoid_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_render_trapezoid_iterator_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_trapezoid_iterator_t.Pointer, Element_Array => xcb.xcb_render_trapezoid_iterator_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_render_trapezoid_iterator_t;
Fabien-Chouteau/coffee-clock
Ada
75
ads
package Utils is task Touch_Screen is end Touch_Screen; end Utils;
reznikmm/matreshka
Ada
5,133
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- 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 AMF.CMOF.Classes; with AMF.CMOF.Properties; with AMF.Extents; with AMF.Internals.Elements; with League.Holders; package AMF.Internals.DG_Elements is type DG_Element_Proxy is abstract limited new AMF.Internals.Elements.Element_Base with null record; overriding function Get (Self : not null access constant DG_Element_Proxy; Property : not null AMF.CMOF.Properties.CMOF_Property_Access) return League.Holders.Holder; overriding function Get_Meta_Class (Self : not null access constant DG_Element_Proxy) return AMF.CMOF.Classes.CMOF_Class_Access; -- overriding function Get_Owned_Comment -- (Self : not null access constant CMOF_Element_Proxy) -- return AMF.CMOF.Comments.Collections.Set_Of_CMOF_Comment; -- -- overriding function Get_Owned_Element -- (Self : not null access constant CMOF_Element_Proxy) -- return AMF.CMOF.Elements.Collections.Set_Of_CMOF_Element; -- -- overriding function Get_Owner -- (Self : not null access constant CMOF_Element_Proxy) -- return AMF.CMOF.Elements.CMOF_Element_Access; overriding procedure Set (Self : not null access DG_Element_Proxy; Property : not null AMF.CMOF.Properties.CMOF_Property_Access; Value : League.Holders.Holder); overriding function Extent (Self : not null access constant DG_Element_Proxy) return AMF.Extents.Extent_Access; -- overriding function Must_Be_Owned -- (Self : not null access constant DG_Element_Proxy) return Boolean; -- -- Operation Element::mustBeOwned. -- -- -- -- The query mustBeOwned() indicates whether elements of this type must -- -- have an owner. Subclasses of Element that do not require an owner must -- -- override this operation. end AMF.Internals.DG_Elements;
simonjwright/sdlada
Ada
4,642
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2020, Luke A. Guest -- -- 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 SDL.Error; package body SDL.Video.Displays is function Total return Display_Indices is -- This function returns a value >= 1, use this as a new lower type bound. function SDL_Get_Num_Video_Displays return C.int with Import => True, Convention => C, External_Name => "SDL_GetNumVideoDisplays"; Num : constant C.int := SDL_Get_Num_Video_Displays; begin if Num <= 0 then raise Video_Error with SDL.Error.Get; end if; return Display_Indices (Num); end Total; function Closest_Mode (Display : in Display_Indices; Wanted : in Mode; Target : out Mode) return Boolean is function SDL_Get_Closest_Display_Mode (D : C.int; W : in Mode; T : out Mode) return Access_Mode with Import => True, Convention => C, External_Name => "SDL_GetClosestDisplayMode"; Result : constant Access_Mode := SDL_Get_Closest_Display_Mode (C.int (Display - 1), Wanted, Target); begin return (Result = null); end Closest_Mode; function Current_Mode (Display : in Display_Indices; Target : out Mode) return Boolean is function SDL_Get_Current_Display_Mode (D : C.int; M : out Mode) return C.int with Import => True, Convention => C, External_Name => "SDL_GetCurrentDisplayMode"; Result : constant C.int := SDL_Get_Current_Display_Mode (C.int (Display - 1), Target); begin return (Result = Success); end Current_Mode; function Desktop_Mode (Display : in Display_Indices; Target : out Mode) return Boolean is function SDL_Get_Desktop_Display_Mode (D : C.int; M : out Mode) return C.int with Import => True, Convention => C, External_Name => "SDL_GetDesktopDisplayMode"; Result : constant C.int := SDL_Get_Desktop_Display_Mode (C.int (Display - 1), Target); begin return (Result = Success); end Desktop_Mode; function Display_Mode (Display : in Display_Indices; Index : in Natural; Target : out Mode) return Boolean is function SDL_Get_Display_Mode (D : in C.int; I : in C.int; T : out Mode) return C.int with Import => True, Convention => C, External_Name => "SDL_GetDisplayMode"; Result : constant C.int := SDL_Get_Display_Mode (C.int (Display - 1), C.int (Index), Target); begin return (Result = Success); end Display_Mode; function Total_Display_Modes (Display : in Display_Indices; Total : out Positive) return Boolean is function SDL_Get_Num_Display_Modes (I : in C.int) return C.int with Import => True, Convention => C, External_Name => "SDL_GetNumDisplayModes"; Result : constant C.int := SDL_Get_Num_Display_Modes (C.int (Display - 1)); begin if Result >= 1 then Total := Positive (Result); return True; end if; return False; end Total_Display_Modes; function Display_Bounds (Display : in Display_Indices; Bounds : out Rectangles.Rectangle) return Boolean is function SDL_Get_Display_Bounds (D : in C.int; B : out Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_GetDisplayBounds"; Result : constant C.int := SDL_Get_Display_Bounds (C.int (Display - 1), Bounds); begin return (Result = Success); end Display_Bounds; end SDL.Video.Displays;
reznikmm/matreshka
Ada
4,131
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ -- Containment iterators starts from root elements and go through their -- children. -- -- This iterator provides only capability to start traversal on each root -- element in the extent, another iterators are responsible to traverse -- elements of concrete metamodel. ------------------------------------------------------------------------------ with AMF.Extents; package AMF.Visitors.Containment is pragma Preelaborate; type Containment_Iterator is limited interface and AMF.Visitors.Abstract_Iterator; procedure Visit (Self : in out Containment_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Extent : not null access AMF.Extents.Extent'Class); -- Visit elements of the specified extent. end AMF.Visitors.Containment;
DrenfongWong/tkm-rpc
Ada
393
ads
with Ada.Unchecked_Conversion; package Tkmrpc.Request.Ike.Dh_Create.Convert is function To_Request is new Ada.Unchecked_Conversion ( Source => Dh_Create.Request_Type, Target => Request.Data_Type); function From_Request is new Ada.Unchecked_Conversion ( Source => Request.Data_Type, Target => Dh_Create.Request_Type); end Tkmrpc.Request.Ike.Dh_Create.Convert;
FredPraca/distributed_cbsg
Ada
3,941
adb
pragma Style_Checks ("NM32766"); --------------------------------------------------- -- This file has been generated automatically from -- cbsg.idl -- by IAC (IDL to Ada Compiler) 20.0w (rev. 90136cd4). --------------------------------------------------- -- NOTE: If you modify this file by hand, your -- changes will be lost when you re-run the -- IDL to Ada compiler. --------------------------------------------------- with PolyORB.Std; with PolyORB.Any; with CORBA.Object.Helper; with PolyORB.Utils.Strings; with PolyORB.Utils.Strings.Lists; with PolyORB.Initialization; package body CorbaCBSG.CBSG.Helper is package body Internals is CBSG_Initialized : PolyORB.Std.Boolean := False; --------------------- -- Initialize_CBSG -- --------------------- procedure Initialize_CBSG is Name_Ü : constant CORBA.String := CORBA.To_CORBA_String ("CBSG"); Id_Ü : constant CORBA.String := CORBA.To_CORBA_String ("IDL:CorbaCBSG/CBSG:1.0"); begin if not CBSG_Initialized then CBSG_Initialized := True; CorbaCBSG.CBSG.Helper.TC_CBSG := CORBA.TypeCode.Internals.To_CORBA_Object (PolyORB.Any.TypeCode.Tcf_Object); CORBA.Internals.Add_Parameter (TC_CBSG, CORBA.To_Any (Name_Ü)); CORBA.Internals.Add_Parameter (TC_CBSG, CORBA.To_Any (Id_Ü)); CORBA.TypeCode.Internals.Disable_Ref_Counting (TC_CBSG); CORBA.TypeCode.Internals.Freeze (TC_CBSG); end if; end Initialize_CBSG; end Internals; -------------- -- From_Any -- -------------- function From_Any (Item : CORBA.Any) return CorbaCBSG.CBSG.Ref is begin return To_Ref (CORBA.Object.Helper.From_Any (Item)); end From_Any; ------------ -- To_Any -- ------------ function To_Any (Item : CorbaCBSG.CBSG.Ref) return CORBA.Any is A : CORBA.Any := CORBA.Object.Helper.To_Any (CORBA.Object.Ref (Item)); begin CORBA.Internals.Set_Type (A, TC_CBSG); return A; end To_Any; ---------------------- -- Unchecked_To_Ref -- ---------------------- function Unchecked_To_Ref (The_Ref : CORBA.Object.Ref'Class) return CorbaCBSG.CBSG.Ref is Result : CorbaCBSG.CBSG.Ref; begin Set (Result, CORBA.Object.Object_Of (The_Ref)); return Result; end Unchecked_To_Ref; ------------ -- To_Ref -- ------------ function To_Ref (The_Ref : CORBA.Object.Ref'Class) return CorbaCBSG.CBSG.Ref is begin if (CORBA.Object.Is_Nil (The_Ref) or else CORBA.Object.Is_A (The_Ref, Repository_Id)) then return Unchecked_To_Ref (The_Ref); end if; CORBA.Raise_Bad_Param (CORBA.Default_Sys_Member); end To_Ref; ----------------------------- -- Deferred_Initialization -- ----------------------------- procedure Deferred_Initialization is begin CorbaCBSG.CBSG.Helper.Internals.Initialize_CBSG; end Deferred_Initialization; begin declare use PolyORB.Utils.Strings; use PolyORB.Utils.Strings.Lists; begin PolyORB.Initialization.Register_Module (PolyORB.Initialization.Module_Info' (Name => +"CorbaCBSG.CBSG.Helper", Conflicts => PolyORB.Utils.Strings.Lists.Empty, Depends => +"any", Provides => PolyORB.Utils.Strings.Lists.Empty, Implicit => False, Init => Deferred_Initialization'Access, Shutdown => null)); end; end CorbaCBSG.CBSG.Helper;
stcarrez/ada-util
Ada
7,785
adb
----------------------------------------------------------------------- -- util-listeners-tests -- Unit tests for listeners -- Copyright (C) 2012, 2013, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Measures; with Util.Test_Caller; with Util.Listeners.Observers; with Util.Listeners.Lifecycles; package body Util.Listeners.Tests is Test_Error : exception; Count : Natural := 0; package String_Observers is new Util.Listeners.Observers (String); package Integer_Observers is new Util.Listeners.Observers (Integer); type String_Listener is new String_Observers.Observer with record Expect : Ada.Strings.Unbounded.Unbounded_String; end record; overriding procedure Update (Listener : in String_Listener; Item : in String); type Integer_Listener is new Integer_Observers.Observer with record Expect : Integer; end record; overriding procedure Update (Listener : in Integer_Listener; Item : in Integer); package Caller is new Util.Test_Caller (Test, "Listeners"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Util.Listeners.Publish", Test_Publish'Access); Caller.Add_Test (Suite, "Test Util.Listeners.Publish_Perf", Test_Publish_Perf'Access); Caller.Add_Test (Suite, "Test Util.Listeners.Lifecycles", Test_Lifecycles'Access); end Add_Tests; overriding procedure Update (Listener : in String_Listener; Item : in String) is use type Ada.Strings.Unbounded.Unbounded_String; begin if Item /= Listener.Expect then raise Test_Error; end if; Count := Count + 1; end Update; overriding procedure Update (Listener : in Integer_Listener; Item : in Integer) is begin if Item /= Listener.Expect then raise Test_Error; end if; Count := Count + 1; end Update; -- ------------------------------ -- Test the listeners and the publish operation. -- ------------------------------ procedure Test_Publish (T : in out Test) is Listeners : Util.Listeners.List; L1 : aliased String_Listener; L2 : aliased Integer_Listener; L3 : aliased Integer_Listener; begin Listeners.Append (L1'Unchecked_Access); Listeners.Append (L2'Unchecked_Access); Listeners.Append (L3'Unchecked_Access); L1.Expect := Ada.Strings.Unbounded.To_Unbounded_String ("Hello"); String_Observers.Notify (Listeners, "Hello"); Util.Tests.Assert_Equals (T, 1, Count, "Invalid number of calls"); L2.Expect := 3; L3.Expect := 3; Integer_Observers.Notify (Listeners, 3); end Test_Publish; -- ------------------------------ -- Performance test for the listeners. -- ------------------------------ procedure Test_Publish_Perf (T : in out Test) is procedure Test_Basic (Item : in Integer); Listeners : Util.Listeners.List; L1 : aliased Integer_Listener; procedure Test_Basic (Item : in Integer) is begin Util.Tests.Assert_Equals (T, 3, Item); end Test_Basic; begin Listeners.Append (L1'Unchecked_Access); L1.Expect := 3; declare S : Util.Measures.Stamp; begin for I in 1 .. 1_000 loop Integer_Observers.Notify (Listeners, 3); end loop; Util.Measures.Report (S, "Observers.Notify", 1000); end; declare S : Util.Measures.Stamp; begin for I in 1 .. 1_000 loop Test_Basic (3); end loop; Util.Measures.Report (S, "Call basic procedure", 1000); end; end Test_Publish_Perf; -- ------------------------------ -- Test the lifecycles listener. -- ------------------------------ procedure Test_Lifecycles (T : in out Test) is package TL is new Util.Listeners.Lifecycles (Util.Measures.Stamp); Create_Count : Natural := 0; Update_Count : Natural := 0; Delete_Count : Natural := 0; type Listener is new TL.Listener with null record; -- The `On_Create` procedure is called by `Notify_Create` to notify the creation -- of the item. overriding procedure On_Create (Instance : in Listener; Item : in Util.Measures.Stamp); -- The `On_Update` procedure is called by `Notify_Update` to notify the update of the item. overriding procedure On_Update (Instance : in Listener; Item : in Util.Measures.Stamp); -- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion -- of the item. overriding procedure On_Delete (Instance : in Listener; Item : in Util.Measures.Stamp); -- ------------------------------ -- The `On_Create` procedure is called by `Notify_Create` to notify the creation -- of the item. -- ------------------------------ overriding procedure On_Create (Instance : in Listener; Item : in Util.Measures.Stamp) is pragma Unreferenced (Instance, Item); begin Create_Count := Create_Count + 1; end On_Create; -- ------------------------------ -- The `On_Update` procedure is called by `Notify_Update` to notify the update of the item. -- ------------------------------ overriding procedure On_Update (Instance : in Listener; Item : in Util.Measures.Stamp) is pragma Unreferenced (Instance, Item); begin Update_Count := Update_Count + 1; end On_Update; -- ------------------------------ -- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion -- of the item. -- ------------------------------ overriding procedure On_Delete (Instance : in Listener; Item : in Util.Measures.Stamp) is pragma Unreferenced (Instance, Item); begin Delete_Count := Delete_Count + 1; end On_Delete; Listeners : Util.Listeners.List; L1 : aliased Integer_Listener; L2 : aliased Listener; begin Listeners.Append (L1'Unchecked_Access); Listeners.Append (L2'Unchecked_Access); declare S : Util.Measures.Stamp; begin TL.Notify_Create (Listeners, S); TL.Notify_Update (Listeners, S); TL.Notify_Delete (Listeners, S); Util.Measures.Report (S, "Notify Create, Update, Delete"); end; Util.Tests.Assert_Equals (T, 1, Create_Count, "On_Create not called"); Util.Tests.Assert_Equals (T, 1, Update_Count, "On_Update not called"); Util.Tests.Assert_Equals (T, 1, Delete_Count, "On_Delete not called"); end Test_Lifecycles; end Util.Listeners.Tests;
gitter-badger/libAnne
Ada
425
adb
package body Generics.Text.Handling is function Is_All_Of(Str : String_Type) return Boolean is begin for S of Str loop if not Is_Of(S) then return False; end if; end loop; return True; end Is_All_Of; function Is_Any_Of(Str : String_Type) return Boolean is begin for S of Str loop if Is_Of(S) then return True; end if; end loop; return False; end Is_Any_Of; end Generics.Text.Handling;
reznikmm/matreshka
Ada
3,836
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.ODF_Elements.Style.Master_Page; package ODF.DOM.Elements.Style.Master_Page.Internals is function Create (Node : Matreshka.ODF_Elements.Style.Master_Page.Style_Master_Page_Access) return ODF.DOM.Elements.Style.Master_Page.ODF_Style_Master_Page; function Wrap (Node : Matreshka.ODF_Elements.Style.Master_Page.Style_Master_Page_Access) return ODF.DOM.Elements.Style.Master_Page.ODF_Style_Master_Page; end ODF.DOM.Elements.Style.Master_Page.Internals;
reznikmm/matreshka
Ada
4,886
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- 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 XML.DOM.Visitors; with ODF.DOM.Config_Config_Item_Map_Indexed_Elements; package Matreshka.ODF_Config.Config_Item_Map_Indexed_Elements is type Config_Config_Item_Map_Indexed_Element_Node is new Matreshka.ODF_Config.Abstract_Config_Element_Node and ODF.DOM.Config_Config_Item_Map_Indexed_Elements.ODF_Config_Config_Item_Map_Indexed with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Config_Config_Item_Map_Indexed_Element_Node; overriding function Get_Local_Name (Self : not null access constant Config_Config_Item_Map_Indexed_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Config_Config_Item_Map_Indexed_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Config_Config_Item_Map_Indexed_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Config_Config_Item_Map_Indexed_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Config.Config_Item_Map_Indexed_Elements;
seipy/ada-voxel-space-demo
Ada
4,270
adb
with SDL; with SDL.Video.Windows; with SDL.Video.Windows.Makers; with SDL.Video.Surfaces; with SDL.Video.Palettes; use SDL.Video.Palettes; with SDL.Video.Pixels; with SDL.Video.Pixel_Formats; use SDL.Video.Pixel_Formats; with SDL.Video.Textures; use SDL.Video.Textures; with SDL.Video.Textures.Makers; with SDL.Video.Renderers; with SDL.Video.Renderers.Makers; use SDL.Video; with Interfaces.C; use Interfaces.C; with Ada.Unchecked_Conversion; with System; use System; package body SDL_Display is W : SDL.Video.Windows.Window; Renderer : SDL.Video.Renderers.Renderer; Texture : SDL.Video.Textures.Texture; SDL_Pixels : System.Address := System.Null_Address; type Texture_1D_Array is array (Natural range <>) of aliased SDL_Pixel; procedure Lock is new SDL.Video.Textures.Lock (Pixel_Pointer_Type => System.Address); function Rendering return Boolean is (SDL_Pixels /= System.Null_Address); ------------------ -- Start_Render -- ------------------ procedure Start_Render is begin Lock (Texture, SDL_Pixels); end Start_Render; ------------------------ -- Draw_Vertical_Line -- ------------------------ procedure Draw_Vertical_Line (X, Start_Y, Stop_Y : Integer; C : SDL_Pixel) is Width : constant Natural := Texture.Get_Size.Width; Height : constant Natural := Texture.Get_Size.Height; Bounded_Start : constant Natural := (if Start_Y > 0 then Start_Y else 0); begin if X in 0 .. Width - 1 then declare Actual_Pixels : Texture_1D_Array (0 .. Natural (Width * Height - 1)) with Address => SDL_Pixels; begin for Y in Bounded_Start .. Integer'Min (Stop_Y, Height - 1) loop Actual_Pixels (X + Y * Natural (Width)) := C; end loop; end; end if; end Draw_Vertical_Line; ---------- -- Fill -- ---------- procedure Fill (C : SDL_Pixel) is Width : constant Natural := Texture.Get_Size.Width; Height : constant Natural := Texture.Get_Size.Height; begin declare Actual_Pixels : Texture_1D_Array (0 .. Natural (Width * Height - 1)) with Address => SDL_Pixels; begin for Elt of Actual_Pixels loop Elt := C; end loop; end; end Fill; ---------------- -- End_Render -- ---------------- procedure End_Render is Width : constant Natural := Texture.Get_Size.Width; Height : constant Natural := Texture.Get_Size.Height; begin Texture.Unlock; SDL_Pixels := System.Null_Address; Renderer.Clear; Renderer.Copy (Texture, To => (0, 0, int (Width), int (Height))); Renderer.Present; end End_Render; ------------------ -- To_SDL_Color -- ------------------ function To_SDL_Color (R, G, B : Unsigned_8) return SDL_Pixel is RB : constant Unsigned_16 := Shift_Right (Unsigned_16 (R), 3) and 16#1F#; GB : constant Unsigned_16 := Shift_Right (Unsigned_16 (G), 2) and 16#3F#; BB : constant Unsigned_16 := Shift_Right (Unsigned_16 (B), 3) and 16#1F#; begin return (Shift_Left (RB, 11) or Shift_Left (GB, 5) or BB); end To_SDL_Color; ---------------- -- Initialize -- ---------------- procedure Initialize is begin if not SDL.Initialise (Flags => SDL.Enable_Screen) then raise Program_Error with "SDL Video init failed"; end if; SDL.Video.Windows.Makers.Create (W, "Ada Voxel", 0, 0, Screen_Width, Screen_Height, Flags => SDL.Video.Windows.Resizable); SDL.Video.Renderers.Makers.Create (Renderer, W); SDL.Video.Textures.Makers.Create (Tex => Texture, Renderer => Renderer, Format => SDL.Video.Pixel_Formats.Pixel_Format_RGB_565, Kind => SDL.Video.Textures.Streaming, Size => (Screen_Width, Screen_Height)); end Initialize; begin Initialize; end SDL_Display;
burratoo/Acton
Ada
2,455
adb
------------------------------------------------------------------------------------------ -- -- -- OAK COMPONENTS -- -- -- -- OAK.STORAGE.BINARY_HEAP -- -- -- -- Copyright (C) 2014-2021, Patrick Bernardi -- -- -- ------------------------------------------------------------------------------------------ package body Oak.Storage.Binary_Heap is procedure Add_Item (To_Heap : in out Heap_Type; Item : in Item_Type) is J : Index_Type; begin if Is_Heap_Full (To_Heap) then raise Heap_Capacity_Error; end if; To_Heap.Size := To_Heap.Size + 1; J := To_Heap.Size; while J / 2 /= 0 and then To_Heap.Items (J / 2) > Item loop To_Heap.Items (J) := To_Heap.Items (J / 2); J := J / 2; end loop; To_Heap.Items (J) := Item; end Add_Item; procedure Remove_Top (From_Heap : in out Heap_Type; Item : out Item_Type) is J : Index_Type := 1; Child : Index_Type; Heap_Size : Index_Type renames From_Heap.Size; Items : Heap_Array renames From_Heap.Items; Last_Item : constant Index_Type := Heap_Size; begin if Heap_Size = 0 then Item := No_Item; return; end if; Item := Items (Items'First); Heap_Size := Heap_Size - 1; loop -- Find the smaller child if it exists Child := J * 2; exit when Child > Heap_Size; if Child /= Heap_Size and then Items (Child) > Items (Child + 1) then Child := Child + 1; end if; -- Push the current item down one level of the tree if needed exit when not (Items (Last_Item) > Items (Child)); Items (J) := Items (Child); J := Child; end loop; -- Move the last item to its new home. Items (J) := Items (Last_Item); end Remove_Top; end Oak.Storage.Binary_Heap;
python36/0xfa
Ada
48,517
adb
with ada.text_io; with ada.command_line; with gnat.os_lib; with ada.strings; with ada.strings.bounded; with ada.containers.vectors; with ada.containers.indefinite_ordered_maps; with ada.containers.ordered_maps; with ada.containers.doubly_linked_lists; with interfaces; with ada.exceptions; with ada.containers; with ada.io_exceptions; with ada.finalization; with getter; with getter.file; with getter.for_loop; with getter.macros; with numbers; use numbers; with strings; use strings; with address; use address; with labels; use labels; with env; use env; procedure a0xfa is use type byte; use type word; parse_error : exception; programm_address : pos_addr_t := create(0); ff : constant word := 16#ffff#; r_pc : constant word := 0; r_sp : constant word := 1; r_sr : constant word := 2; procedure error (s : string) is begin print(s); gnat.os_lib.os_exit(1); end error; procedure error_parse (s : string) is begin raise parse_error with s; end error_parse; procedure warning (msg : string) is begin print("[warning]: " & msg); end warning; type record_handler_type; type handler_type is access function (s : string) return record_handler_type; type record_handler_type is record ptr : handler_type; end record; type operation_access is access function (a, b : word) return word; parse_def_cursor : environment_t.cursor := environment_t.no_element; package operands_t is new ada.containers.doubly_linked_lists(word, "="); type operation_t is record operation_ptr : operation_access := words_add'access; priority : positive := 1; operand_cur : operands_t.cursor; end record; package operations_t is new ada.containers.vectors( element_type => operation_t, index_type => natural); function ">" (a, b : operation_t) return boolean is begin return a.priority > b.priority; end; procedure insert_sorted (ops : in out operations_t.vector; op : operation_t) is tmp_cursor : operations_t.cursor := ops.first; begin while operations_t.has_element(tmp_cursor) loop if op > operations_t.element(tmp_cursor) then operations_t.insert(ops, tmp_cursor, op); return; end if; operations_t.next(tmp_cursor); end loop; operations_t.append(ops, op); end insert_sorted; procedure environment_repr is tmp_cursor : environment_t.cursor := environment.first; begin while environment_t.has_element(tmp_cursor) loop print(environment_t.key(tmp_cursor) & " : " & environment_t.element(tmp_cursor)'img); environment_t.next(tmp_cursor); end loop; end environment_repr; type commands is ( f_rrc, f_swpb, f_rra, f_sxt, f_push, f_call, f_reti, f_jne, f_jeq, f_jnc, f_jc, f_jn, f_jge, f_jl, f_jmp, f_mov, f_add, f_addc, f_subc, f_sub, f_cmp, f_dadd, f_bit, f_bic, f_bis, f_xor, f_and, f_jnz, f_jz, f_jlo, f_jhs, f_clrc, f_clrn, f_clrz, f_dint, f_eint, f_nop, f_ret, f_setc, f_setn, f_setz, f_adc, f_br, f_clr, f_dadc, f_dec, f_decd, f_inc, f_incd, f_inv, f_pop, f_rla, f_rlc, f_sbc, f_tst, f_raw); subtype single_commands is commands range f_rrc..f_reti; subtype jump_commands is commands range f_jne..f_jmp; subtype alternatives_jump_commands is commands range f_jnz..f_jhs; subtype two_commands is commands range f_mov..f_and; subtype emulated_commands is commands range f_jnz..f_tst; subtype zero_emulated_commands is commands range f_clrc..f_setz; subtype single_emulated_commands is commands range f_adc..f_tst; type addressing_modes is ( m_constant, m_immediate, m_indexed, m_symbolic, m_absolute, m_indirect_register, m_indirect_autoincrement, m_register); type operand_t is record mode : addressing_modes := m_constant; value : word := 0; register : word := 0; label : label_t := null_label; end record; null_operand : constant operand_t := (m_register, 0, ff, null_label); type command_t is record command : commands; source, destination : operand_t := null_operand; num_operands : byte := 0; bw : boolean := true; end record; package programm_t is new ada.containers.ordered_maps( element_type => command_t, key_type => pos_addr_t); programm : programm_t.map; null_command : command_t := (f_raw, null_operand, null_operand, 0, true); type words_t is array (word range <>) of word; command : command_t := null_command; procedure void (r : record_handler_type) is begin null; end void; function parse_main (s : string) return record_handler_type; -- procedure from_file (path : string); function parse_word (s : string) return word is begin return value(s); exception when constraint_error => error_parse("bad value " & s); return 0; end parse_word; function validate_register (s : string) return boolean is begin return car(s) = 'r' and then natural'value(cdr(s)) in 0..15; exception when constraint_error => return false; end validate_register; procedure validate_variable_assert (s : string) is begin if not validate_variable(s) then error_parse("error var name " & s); end if; end validate_variable_assert; function parse_def (s : string) return record_handler_type is use type environment_t.cursor; tb : boolean; begin if parse_def_cursor = environment_t.no_element then validate_variable_assert(s); environment.insert(s, 0, parse_def_cursor, tb); if not tb then warning("variable """ & s & """ redefined"); end if; return (ptr => parse_def'access); end if; environment.replace_element(parse_def_cursor, parse_word(s)); parse_def_cursor := environment_t.no_element; return (ptr => parse_main'access); end parse_def; function parse_defs (s : string) return record_handler_type is begin if s = ".end_defs" then return (ptr => parse_main'access); end if; void(parse_def(s)); return (ptr => parse_defs'access); end parse_defs; function parse_undef (s : string) return record_handler_type is begin validate_variable_assert(s); if not environment_t.contains(environment, s) then warning("variable name """ & s & """ not defined"); else environment.delete(s); end if; return (ptr => parse_main'access); end parse_undef; function parse_set (s : string) return record_handler_type is begin validate_variable_assert(s); if not environment_t.contains(environment, s) then error_parse("variable name """ & s & """ not defined"); end if; void(parse_undef(s)); return parse_def(s); end parse_set; function parse_include (s : string) return record_handler_type is begin if first_element(s) /= '"' or last_element(s) /= '"' then error_parse("error .include format"); end if; getter.file.open(trim(s((s'first + 1)..(s'last - 1)))); return (ptr => parse_main'access); end parse_include; type for_loop_step_t is (for_loop_var, for_loop_mode, for_loop_range); for_loop_step : for_loop_step_t := for_loop_var; tmp_for_loop_cursor : environment_t.cursor; function parse_for_loop (s : string) return record_handler_type is tb : boolean; dots_pos : natural; begin if for_loop_step = for_loop_var then validate_variable_assert(s); environment.insert(s, 0, tmp_for_loop_cursor, tb); if not tb then error_parse("variable name """ & s & """ already defined"); end if; for_loop_step := for_loop_mode; elsif for_loop_step = for_loop_mode then if s /= "in" then error_parse("error format for: " & s); end if; for_loop_step := for_loop_range; elsif for_loop_step = for_loop_range then dots_pos := fix.index(s, ".."); if dots_pos < 2 or (dots_pos + 1) >= s'last then error_parse("error range: " & s); end if; getter.for_loop.create( parse_word(s(s'first..(dots_pos - 1))), parse_word(s((dots_pos + 2)..s'last)), tmp_for_loop_cursor); for_loop_step := for_loop_var; return (ptr => parse_main'access); end if; return (ptr => parse_for_loop'access); end parse_for_loop; macro_name : unb.unbounded_string := unb.null_unbounded_string; macro_params : unb.unbounded_string := unb.null_unbounded_string; macro_wait_open : boolean := false; function get_macros_name_params (s : string) return boolean is use type unb.unbounded_string; open_pos : natural := 1; procedure set_macro_name (name : string) is begin if not validate_variable(name) then error_parse("error macros name: " & name); end if; macro_name := unb.to_unbounded_string(name); end set_macro_name; procedure append_param (s : string) is begin if s'length = 0 then return; end if; unb.append(macro_params, s & ' '); end append_param; begin if macro_name = unb.null_unbounded_string then macro_wait_open := true; open_pos := fix.index(s, "("); if open_pos > 0 then set_macro_name(s(s'first..(open_pos - 1))); else set_macro_name(s); return false; end if; end if; if macro_wait_open then if s(open_pos) /= '(' then error_parse("wait '(' but: " & s); end if; macro_wait_open := false; inc(open_pos); end if; if endswith(s, ')') then if s'length > 1 then append_param(s(open_pos..(s'last - 1))); end if; return true; else append_param(s(open_pos..s'last)); end if; return false; end get_macros_name_params; function parse_macros (s : string) return record_handler_type is begin if get_macros_name_params(s) then getter.macros.define(unb.to_string(macro_name), unb.to_string(macro_params)); macro_name := unb.null_unbounded_string; macro_params := unb.null_unbounded_string; return (ptr => parse_main'access); end if; return (ptr => parse_macros'access); end parse_macros; function parse_instruction (s : string) return record_handler_type is begin if s = ".def" then return (ptr => parse_def'access); elsif s = ".undef" then return (ptr => parse_undef'access); elsif s = ".set" then return (ptr => parse_set'access); elsif s = ".include" then return (ptr => parse_include'access); elsif s = ".for" then return (ptr => parse_for_loop'access); elsif s = ".macro" then return (ptr => parse_macros'access); elsif s = ".defs" then return (ptr => parse_defs'access); end if; error_parse("unknown instruction " & s); return (ptr => parse_main'access); end parse_instruction; function in_labels (s : string) return boolean is begin return get_by_name(s) /= null_label; end in_labels; function validate_command (s : string) return boolean is begin return commands'value("f_" & s(s'first..(s'last - to_natural(endswith(s, ".b"), 2) - to_natural(endswith(s, ".w"), 2)))) >= commands'first; exception when others => return false; end validate_command; function parse_label (s : string) return record_handler_type is tmp_word : word; label : label_t; begin if first_element(s) in '0'..'9' then tmp_word := parse_word(s); if not valid_value_for_pos_addr(tmp_word) then error_parse("bad value address " & s); end if; if last_label /= null_label and then programm_address = get(last_label) then error_parse("set address must be before define label"); end if; programm_address := create(tmp_word); elsif first_element(s) in 'a'..'z' then validate_variable_assert(s); if validate_register(s) then error_parse(s & " label can not be r0..15"); elsif validate_command(s) then error_parse(s & " label can not be command"); end if; label := get_by_name(s); if label /= null_label then if get(label) = null_pos_addr then label.set(programm_address); else error_parse("label " & s & " already defined"); end if; else create(s, programm_address); end if; else error_parse("invalid data " & s); end if; return (ptr => parse_main'access); end parse_label; function get_var_val (s : string) return word is tmp_cursor : environment_t.cursor; begin tmp_cursor := environment_t.find(environment, s); -- environment_repr; if environment_t.has_element(tmp_cursor) then return environment_t.element(tmp_cursor); end if; error_parse("variable " & s & " undefined"); return 0; end get_var_val; function parse_precompile (s : string) return string is use type ada.containers.count_type; start_pos, end_pos : natural := 0; value : word := 0; operation : operation_access := words_add'access; i : natural := s'first; priority : positive; operations : operations_t.vector; operands : operands_t.list; tmp_operation : operation_t; k_priority : natural := 0; begin while i < s'last + 1 loop if s(i) in '0'..'9'|'a'..'z'|'_' then if start_pos = end_pos then start_pos := i; end_pos := i + 1; else if i /= end_pos then error_parse("error " & s(start_pos..i)); end if; inc(end_pos); end if; else if s(i) = ' ' then null; elsif s(i) = '(' then k_priority := k_priority + 10; elsif s(i) = ')' then if k_priority = 0 then error_parse(s & " ')' > '('"); end if; k_priority := k_priority - 10; elsif start_pos /= end_pos then if s(start_pos) in 'a'..'z' then -- print(s(start_pos..(end_pos - 1)) & get_var_val(s(start_pos..(end_pos - 1)))'img); operands.append(get_var_val(s(start_pos..(end_pos - 1)))); else -- print(s(start_pos..(end_pos - 1))); operands.append(parse_word(s(start_pos..(end_pos - 1)))); end if; if s(i) = ';' then exit; elsif s(i) = '<' then if s(i + 1) /= '<' then error_parse(s & " unknown operation. maybe << ?"); end if; inc(i); operation := words_sl'access; priority := k_priority + 4; elsif s(i) = '>' then if s(i + 1) /= '>' then error_parse(s & " unknown operation. maybe >> ?"); end if; inc(i); operation := words_sr'access; priority := k_priority + 4; elsif s(i) = '+' then operation := words_add'access; priority := k_priority + 5; elsif s(i) = '-' then operation := words_sub'access; priority := k_priority + 5; elsif s(i) = '*' then if s(i + 1) = '*' then operation := words_pow'access; priority := k_priority + 7; inc(i); else operation := words_mul'access; priority := k_priority + 6; end if; elsif s(i) = '/' then operation := words_div'access; priority := k_priority + 6; elsif s(i) = '%' then operation := words_mod'access; priority := k_priority + 6; elsif s(i) = '|' then operation := words_or'access; priority := k_priority + 1; elsif s(i) = '&' then operation := words_and'access; priority := k_priority + 3; elsif s(i) = '^' then operation := words_xor'access; priority := k_priority + 2; else error_parse(s & " unknown operation"); end if; -- print(" = " & operands_t.element(operands, operands.last_index)'img); insert_sorted(operations, (operation, priority, operands.last)); start_pos := end_pos; else error_parse(s & " error"); end if; end if; inc(i); end loop; if k_priority /= 0 then error_parse(s & " '(' > ')'"); end if; if operations_t.length(operations) = 0 and operands_t.length(operands) = 1 then return ltrim(operands_t.first_element(operands)'img); end if; while not operations_t.is_empty(operations) loop tmp_operation := operations_t.first_element(operations); value := tmp_operation.operation_ptr.all( operands_t.element(tmp_operation.operand_cur), operands_t.element(operands_t.next(tmp_operation.operand_cur))); operands_t.replace_element(operands, operands_t.next(tmp_operation.operand_cur), value); operands.delete(tmp_operation.operand_cur); operations_t.delete_first(operations); end loop; return ltrim(value'img); end parse_precompile; function operand_has_ext_word (operand : operand_t) return boolean is begin return operand.mode in m_symbolic|m_absolute|m_immediate|m_indexed; end operand_has_ext_word; procedure command_to_programm (cmd : in out command_t) is tmp_cursor : programm_t.cursor; inserted : boolean; prev_addr : pos_addr_t; prev_cursor : programm_t.cursor; procedure inc_addr_by_mode (operand : operand_t; addr : in out pos_addr_t) is begin if operand /= null_operand then if operand_has_ext_word(operand) then inc(addr); end if; end if; end inc_addr_by_mode; begin if cmd.command in emulated_commands then case cmd.command is when f_adc => cmd.command := f_addc; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 0; when f_br => cmd.command := f_mov; cmd.destination.mode := m_register; cmd.destination.register := r_pc; when f_clr => cmd.command := f_mov; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 0; when f_clrc => cmd.command := f_bic; cmd.source.mode := m_constant; cmd.source.value := 1; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_clrn => cmd.command := f_bic; cmd.source.mode := m_constant; cmd.source.value := 4; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_clrz => cmd.command := f_bic; cmd.source.mode := m_constant; cmd.source.value := 2; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_dadc => cmd.command := f_dadd; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 0; when f_dec => cmd.command := f_sub; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 1; when f_decd => cmd.command := f_sub; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 2; when f_dint => cmd.command := f_bic; cmd.source.mode := m_constant; cmd.source.value := 8; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_eint => cmd.command := f_bis; cmd.source.mode := m_constant; cmd.source.value := 8; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_inc => cmd.command := f_add; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 1; when f_incd => cmd.command := f_add; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 2; when f_inv => cmd.command := f_xor; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 16#ffff#; when f_nop => cmd.command := f_mov; cmd.source.mode := m_constant; cmd.source.value := 0; cmd.destination.mode := m_register; cmd.destination.register := 3; when f_pop => cmd.command := f_mov; cmd.destination := cmd.source; cmd.source.mode := m_indirect_autoincrement; cmd.source.register := r_sp; when f_ret => cmd.command := f_mov; cmd.source.mode := m_indirect_autoincrement; cmd.source.register := r_sp; cmd.destination.mode := m_register; cmd.destination.register := r_pc; when f_rla => cmd.command := f_add; cmd.destination := cmd.source; when f_rlc => cmd.command := f_addc; cmd.destination := cmd.source; when f_sbc => cmd.command := f_subc; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 0; when f_setc => cmd.command := f_bis; cmd.source.mode := m_constant; cmd.source.value := 1; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_setn => cmd.command := f_bis; cmd.source.mode := m_constant; cmd.source.value := 4; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_setz => cmd.command := f_bis; cmd.source.mode := m_constant; cmd.source.value := 2; cmd.destination.mode := m_register; cmd.destination.register := r_sr; when f_tst => cmd.command := f_cmp; cmd.destination := cmd.source; cmd.source.mode := m_constant; cmd.source.value := 0; when f_jnz => cmd.command := f_jne; when f_jz => cmd.command := f_jeq; when f_jlo => cmd.command := f_jnc; when f_jhs => cmd.command := f_jc; when others => null; end case; elsif cmd.command = f_reti then cmd.source.mode := m_register; cmd.source.register := 0; end if; programm_t.insert(programm, programm_address, cmd, tmp_cursor, inserted); if not inserted then error_parse("rewrite command: " & hex(get(programm_address))); end if; prev_cursor := programm_t.previous(tmp_cursor); if programm_t.has_element(prev_cursor) then prev_addr := programm_t.key(prev_cursor); if programm_t.element(prev_cursor).command not in jump_commands|alternatives_jump_commands|f_raw then inc_addr_by_mode(programm_t.element(prev_cursor).source, prev_addr); inc_addr_by_mode(programm_t.element(prev_cursor).destination, prev_addr); end if; if prev_addr >= programm_address and programm_t.key(prev_cursor) < programm_address then error_parse("rewrite previous command: " & hex(get(programm_address))); end if; end if; inc(programm_address); if cmd.command not in jump_commands|alternatives_jump_commands|f_raw then inc_addr_by_mode(cmd.source, programm_address); inc_addr_by_mode(cmd.destination, programm_address); end if; tmp_cursor := programm_t.next(tmp_cursor); if programm_t.has_element(tmp_cursor) then if programm_t.key(tmp_cursor) < programm_address then error_parse("rewrite next command: " & hex(get(programm_address))); end if; end if; end command_to_programm; function parse_register (s : string) return word is begin if not validate_register(s) then error_parse(s & " is not register"); end if; return word'value(cdr(s)); end parse_register; procedure parse_operand (addr : in out operand_t; s : string) is open_pos, close_pos : natural; begin if first_element(s) = '#' then addr.mode := m_immediate; if s(s'first + 1) in '0'..'9'|'-' then addr.value := parse_word(cdr(s)); if addr.value in 0..2|4|8|ff then addr.mode := m_constant; end if; elsif in_labels(cdr(s)) then addr.label := get_by_name(cdr(s)); else addr.label := create(cdr(s)); end if; elsif first_element(s) = ''' and s'length = 3 then addr.mode := m_immediate; addr.value := character'pos(s(s'first + 1)); elsif first_element(s) = '@' then if last_element(s) = '+' then addr.mode := m_indirect_autoincrement; addr.register := parse_register(s((s'first + 1)..(s'last - 1))); else addr.mode := m_indirect_register; addr.register := parse_register(cdr(s)); end if; elsif validate_register(s) then addr.mode := m_register; addr.register := parse_register(s); elsif first_element(s) = '&' and then s'length > 1 then addr.mode := m_absolute; if s(s'first + 1) in '0'..'9'|'-' then addr.value := parse_word(cdr(s)); addr.label := null_label; elsif in_labels(cdr(s)) then addr.label := get_by_name(cdr(s)); else addr.label := create(cdr(s)); end if; elsif first_element(s) in '0'..'9' and last_element(s) /= ')' then addr.mode := m_symbolic; addr.value := parse_word(s); addr.label := null_label; elsif in_labels(s) then addr.mode := m_symbolic; addr.label := get_by_name(s); elsif validate_variable(s) then addr.mode := m_symbolic; addr.label := create(s); else open_pos := fix.index(s, "("); close_pos := fix.index(s, ")"); if open_pos > s'first and close_pos > (open_pos + 1) then addr.mode := m_indexed; addr.value := parse_word(s(s'first..(open_pos - 1))); addr.register := parse_register(s((open_pos + 1)..(close_pos - 1))); else error_parse(s & " error parse operand"); end if; end if; end parse_operand; function parse_operation (s : string) return record_handler_type is begin if command = null_command then if not validate_command(s) then error_parse(s & " unknown operation"); end if; if endswith(s, ".b") then command.command := commands'value("f_" & s(s'first..(s'last - 2))); command.bw := false; elsif endswith(s, ".w") then command.command := commands'value("f_" & s(s'first..(s'last - 2))); else command.command := commands'value("f_" & s); end if; if command.command in two_commands then command.num_operands := 2; return (ptr => parse_operation'access); elsif command.command in zero_emulated_commands|f_reti then null; else command.num_operands := 1; return (ptr => parse_operation'access); end if; elsif command.source = null_operand then parse_operand(command.source, s); if command.num_operands = 2 then return (ptr => parse_operation'access); end if; else parse_operand(command.destination, s); end if; command_to_programm(command); command := null_command; return (ptr => parse_main'access); end parse_operation; function parse_raw (s : string) return record_handler_type is begin if car(s) in 'a'..'z' then if in_labels(s) then command.source.value := get(get(get_by_name(s))); elsif not validate_variable(s) then error_parse(s & " bad name"); else command.source.value := get_var_val(s); end if; else command.source.value := parse_word(s); end if; -- command.source.value := swpb(command.source.value); command.source.mode := m_constant; command.command := f_raw; command.num_operands := 0; command_to_programm(command); command := null_command; return (ptr => parse_main'access); end parse_raw; function parse_string (s : string) return record_handler_type is i : natural := s'first; begin if s'length < 3 then error_parse(s & " error string"); end if; command.source.label := null_label; command.source.mode := m_constant; command.command := f_raw; command.num_operands := 0; while i /= s'last + 1 loop if s(i) = '"' then if i /= s'last then error_parse("end of string before end"); end if; command := null_command; return (ptr => parse_main'access); end if; if s(i) = '\' then if i = s'last then error_parse(" \ end of string"); end if; inc(i); end if; command.source.value := character'pos(s(i)); command_to_programm(command); inc(i); end loop; command := null_command; return (ptr => parse_string'access); end parse_string; function parse_call_macros (s : string) return record_handler_type is begin if get_macros_name_params(s) then getter.macros.call(unb.to_string(macro_name), unb.to_string(macro_params)); macro_name := unb.null_unbounded_string; macro_params := unb.null_unbounded_string; return (ptr => parse_main'access); end if; return (ptr => parse_call_macros'access); end parse_call_macros; function parse_main (s : string) return record_handler_type is begin if first_element(s) = '.' then return parse_instruction(s); elsif last_element(s) = ':' then return parse_label(s(s'first..(s'last - 1))); elsif first_element(s) in 'a'..'z' then if fix.index(s, "(") > 1 then return parse_call_macros(s); elsif validate_command(s) then return parse_operation(s); else return parse_raw(s); end if; elsif first_element(s) in '0'..'9' then return parse_raw(s); elsif first_element(s) = '"' then return parse_string(s((s'first + 1)..s'last)); else error_parse("error " & s); end if; return (ptr => parse_main'access); end parse_main; -- function preparse (s : string) return string is -- start_pos, end_pos, comment_pos : natural; -- begin -- comment_pos := fix.index(s, ";", ada.strings.forward); -- start_pos := fix.index(s, "{", ada.strings.backward); -- if start_pos > 0 and start_pos < comment_pos then -- end_pos := fix.index(s, "}", start_pos, ada.strings.forward); -- if end_pos < start_pos or end_pos > comment_pos then -- error_parse("error """ & s & """ no closed brackets"); -- end if; -- return preparse( -- s(s'first..(start_pos-1)) & -- parse_precompile(s((start_pos + 1)..(end_pos - 1)) & ';') & -- s((end_pos + 1)..s'last)); -- end if; -- return s; -- end preparse; -- вынести в модуль и сделать через финализе type code_t is access all unb.unbounded_string; type pre_code_t is record start_pos, end_pos : natural; code : code_t; end record; result : aliased unb.unbounded_string; -- type for_loop_t is record -- start_i, end_i, cur_i : natural; -- cursor : environment_t.cursor := environment_t.no_element; -- code : unb.unbounded_string; -- last : positive := 1; -- end record; -- for_loop_status : natural := 0; -- package for_loops_t is new ada.containers.vectors(element_type => for_loop_t, index_type => natural); -- for_loops : for_loops_t.vector; -- tmp_for_loop, last_for_loop : for_loop_t; -- for_end_offset : natural := 0; function pre_code_cmp (a, b : pre_code_t) return boolean is begin return false; end pre_code_cmp; package pre_codes_t is new ada.containers.doubly_linked_lists(pre_code_t, pre_code_cmp); pre_codes : pre_codes_t.list; end_asm : boolean := false; -- type record_getter_type; -- type getter_type is access function (getter : in out record_getter_type) return character; -- type record_getter_type is record -- ptr : getter_type; -- end record; -- current_file : ada.text_io.file_type; -- function get_from_file (getter : in out record_getter_type) return character is -- begin -- if ada.text_io.end_of_file(current_file) then -- return ascii.nul; -- end if; -- end get_from_file; function get_line return string is use type unb.unbounded_string; use type ada.containers.count_type; -- start_for : constant unb.unbounded_string := unb.to_unbounded_string(".for"); -- end_for : constant unb.unbounded_string := unb.to_unbounded_string(".end_for"); -- in_for : constant unb.unbounded_string := unb.to_unbounded_string("in"); last_code : code_t := result'access; c : character; -- tb : boolean; -- dots_pos : natural; begin loop result := unb.null_unbounded_string; loop -- -- if not for_loops_t.is_empty(for_loops) then -- c := ' '; -- if unb.length(last_for_loop.code) < last_for_loop.last then -- inc(last_for_loop.cur_i); -- last_for_loop.last := 1; -- environment.replace_element(last_for_loop.cursor, word(last_for_loop.cur_i)); -- else -- c := unb.element(last_for_loop.code, last_for_loop.last); -- inc(last_for_loop.last); -- end if; -- if last_for_loop.cur_i > last_for_loop.end_i then -- for_loop_status := 0; -- environment.delete(last_for_loop.cursor); -- for_loops.delete_last; -- if for_loops_t.length(for_loops) > 0 then -- last_for_loop := for_loops_t.last_element(for_loops); -- end if; -- end if; -- -- elsif ada.text_io.end_of_file(file) then -- -- c := ' '; -- -- end_asm := true; -- else c := getter.get; if c = ascii.nul then end_asm := true; return ""; end if; -- end if; -- if for_loop_status = 4 then -- unb.append(tmp_for_loop.code, c); -- -- if ada.text_io.end_of_line(file) and for_loops_t.is_empty(for_loops) then -- -- unb.append(tmp_for_loop.code, ' '); -- -- end if; -- end if; -- \; \{ \} \ \, \\ \. -- if c = ';' then -- if not ada.text_io.end_of_line(file) then -- ada.text_io.skip_line(file); -- end if; -- exit when pre_codes_t.is_empty(pre_codes); if c = '{' then pre_codes.append((0, 0, new unb.unbounded_string)); last_code := pre_codes_t.last_element(pre_codes).code; elsif c = '}' then if pre_codes_t.is_empty(pre_codes) then error_parse("""}"" without start"); end if; if pre_codes_t.has_element(pre_codes_t.previous(pre_codes_t.last(pre_codes))) then unb.append(pre_codes_t.element(pre_codes_t.previous(pre_codes_t.last(pre_codes))).code.all, parse_precompile(unb.to_string(last_code.all) & ';')); else unb.append(result, parse_precompile(unb.to_string(last_code.all) & ';')); end if; -- free(last_code); pre_codes.delete_last; if pre_codes_t.is_empty(pre_codes) then last_code := result'access; else last_code := pre_codes_t.last_element(pre_codes).code; end if; elsif pre_codes_t.is_empty(pre_codes) and c in ' '|',' then exit; else unb.append(last_code.all, c); end if; -- if ada.text_io.end_of_line(file) and for_loop_status /= 5 and for_loops_t.is_empty(for_loops) then -- exit when pre_codes_t.is_empty(pre_codes); -- unb.append(last_code.all, ' '); -- end if; end loop; -- if for_loop_status = 1 then -- validate_variable_assert(unb.to_string(result)); -- environment.insert(unb.to_string(result), 0, tmp_for_loop.cursor, tb); -- if not tb then -- error_parse("variable name """ & unb.to_string(result & """ already defined")); -- end if; -- inc(for_loop_status); -- elsif for_loop_status = 2 then -- if result /= in_for then -- error_parse("error format for"); -- end if; -- inc(for_loop_status); -- elsif for_loop_status = 3 then -- dots_pos := unb.index(result, ".."); -- if dots_pos < 2 or (dots_pos + 1) >= unb.length(result) then -- error_parse("error range: " & unb.to_string(result)); -- end if; -- tmp_for_loop.start_i := natural(parse_word(unb.slice(result, 1, dots_pos - 1))); -- tmp_for_loop.cur_i := tmp_for_loop.start_i; -- tmp_for_loop.end_i := natural(parse_word(unb.slice(result, dots_pos + 2, unb.length(result)))); -- environment.replace_element(tmp_for_loop.cursor, word(tmp_for_loop.cur_i)); -- inc(for_loop_status); -- elsif result = start_for then -- if for_loop_status = 4 then -- inc(for_end_offset); -- else -- for_loop_status := 1; -- tmp_for_loop.code := unb.null_unbounded_string; -- tmp_for_loop.last := 1; -- end if; -- elsif for_loop_status = 4 then -- if result = end_for then -- if for_end_offset /= 0 then -- dec(for_end_offset); -- else -- unb.replace_slice(tmp_for_loop.code, unb.length(tmp_for_loop.code) - 8, unb.length(tmp_for_loop.code), " "); -- if for_loops_t.length(for_loops) > 0 then -- for_loops.replace_element(for_loops_t.last(for_loops), last_for_loop); -- end if; -- last_for_loop := tmp_for_loop; -- for_loops.append(last_for_loop); -- for_loop_status := 5; -- end if; -- end if; -- else return unb.to_string(result); -- end if; end loop; return ""; end get_line; procedure from_file is -- file : ada.text_io.file_type; -- tmp_ustr : unb.unbounded_string; handler_ptr : handler_type := parse_main'access; -- cur_pos : natural := 0; -- last_space : natural := 0; begin -- getter.file.open(path); while not end_asm loop -- print(end_asm'img & path); declare l : constant string := get_line; begin -- print(l & end_asm'img); if l /= "" then handler_ptr := handler_ptr(l).ptr; end if; end; end loop; end_asm := false; -- ada.text_io.open(file, ada.text_io.in_file, path); -- while not end_asm loop -- declare -- l : constant string := get_line(file); -- begin -- if l /= "" then -- handler_ptr := handler_ptr(l).ptr; -- end if; -- end; -- end loop; -- end_asm := false; -- ada.text_io.close(file); exception when this_error: parse_error => if ada.exceptions.exception_message(this_error) /= "" then print('[' & ltrim(getter.get_line'img) & "]: " & ada.exceptions.exception_message(this_error)); end if; -- ada.text_io.close(file); raise parse_error with ""; when ada.io_exceptions.name_error => -- error_parse("no such file " & path); raise; when others => -- if ada.text_io.is_open(file) then -- ada.text_io.close(file); -- end if; raise; end from_file; procedure update_checksum (var : in out word; val : word) is begin var := var + (val and 255); var := var + sr(val, 8); end update_checksum; function word_to_str_revers (val : word) return string is begin return image(sr(val, 8) or sl(val, 8), 16); end word_to_str_revers; out_text : unb.unbounded_string; cur : programm_t.cursor; line_addr : pos_addr_t; package line_t is new ada.strings.bounded.generic_bounded_length(max => 40); out_file : ada.text_io.file_type; words : words_t(0..18); size : word := 0; procedure command_to_words (cmd : command_t; addr : pos_addr_t) is operation : word := 0; offset : word := 0; procedure set_bits (pos, length : natural; val : word) is begin operation := (operation and (sl(((2 ** length) - 1), pos - length) xor ff)) or sl(val and ((2 ** length) - 1), pos - length); end set_bits; procedure repr_ext_word (op : operand_t) is begin if operand_has_ext_word(op) then inc(words(0)); incd(offset); if op.label /= null_label and then get(op.label) = null_pos_addr then error_parse("label " & name(op.label) & " used but not defined"); end if; if op.mode = m_absolute then if op.label /= null_label then words(words(0)) := get(get(op.label)); else words(words(0)) := op.value; end if; elsif op.mode = m_immediate then if op.label /= null_label then words(words(0)) := get(get(op.label)); else words(words(0)) := op.value; end if; elsif op.mode = m_symbolic then if op.label /= null_label then words(words(0)) := get(get(op.label) - addr) - offset; else words(words(0)) := op.value - get(addr) - offset; end if; else words(words(0)) := op.value; end if; end if; end repr_ext_word; procedure repr_destination is begin if cmd.command not in two_commands then return; end if; case cmd.destination.mode is when m_register => set_bits(8, 1, 0); set_bits(4, 4, cmd.destination.register); when m_indexed => set_bits(8, 1, 1); set_bits(4, 4, cmd.destination.register); when m_symbolic => set_bits(8, 1, 1); set_bits(4, 4, r_pc); when m_absolute => set_bits(8, 1, 1); set_bits(4, 4, r_sr); when others => error_parse(cdr(cmd.destination.mode'img, 2) & " not be used for destination"); end case; repr_ext_word(cmd.destination); end repr_destination; procedure source_to_operation (pos : natural) is begin case cmd.source.mode is when m_register|m_indexed|m_indirect_register|m_indirect_autoincrement => set_bits(pos, 4, cmd.source.register); when m_symbolic|m_immediate => set_bits(pos, 4, r_pc); when m_absolute => set_bits(pos, 4, r_sr); when m_constant => if cmd.source.value = 0 then set_bits(6, 2, 0); set_bits(pos, 4, 3); elsif cmd.source.value = 1 then set_bits(6, 2, 1); set_bits(pos, 4, 3); elsif cmd.source.value = 2 then set_bits(6, 2, 2); set_bits(pos, 4, 3); elsif cmd.source.value = 4 then set_bits(6, 2, 2); set_bits(pos, 4, r_sr); elsif cmd.source.value = 8 then set_bits(6, 2, 3); set_bits(pos, 4, r_sr); elsif cmd.source.value = -1 then set_bits(6, 2, 3); set_bits(pos, 4, 3); else error_parse("constant not constant"); end if; end case; end source_to_operation; procedure repr_operands is begin if cmd.command in jump_commands|f_raw then return; end if; if cmd.source.mode = m_register then set_bits(6, 2, 0); elsif cmd.source.mode in m_indexed|m_symbolic|m_absolute then set_bits(6, 2, 1); elsif cmd.source.mode = m_indirect_register then set_bits(6, 2, 2); elsif cmd.source.mode in m_indirect_autoincrement|m_immediate then set_bits(6, 2, 3); end if; set_bits(7, 1, to_word(not cmd.bw)); if cmd.command in single_commands then source_to_operation(4); set_bits(13, 6, commands'pos(cmd.command) - commands'pos(single_commands'first) + 32); elsif cmd.command in two_commands then source_to_operation(12); set_bits(16, 4, commands'pos(cmd.command) - commands'pos(two_commands'first) + 4); end if; repr_ext_word(cmd.source); repr_destination; end repr_operands; w : word := 0; begin if cmd.command = f_raw then set_bits(16, 16, cmd.source.value); elsif cmd.command in jump_commands then set_bits(16, 3, 1); set_bits(13, 3, commands'pos(cmd.command) - commands'pos(jump_commands'first)); if cmd.source.mode /= m_symbolic then error_parse("jump operand must be symbolic"); end if; if cmd.source.label = null_label then if odd(cmd.source.value) then error_parse("jump addres [" & cmd.source.value'img & " ] must be even"); end if; w := sr((cmd.source.value - get(addr) - 2), 1); elsif get(cmd.source.label) = null_pos_addr then error_parse("label " & name(cmd.source.label) & " used but not defined"); else w := sr(get(get(cmd.source.label) - addr - create(2)), 1); end if; if w in 16#200#..16#7dff# then if cmd.source.label /= null_label then error_parse("jump to " & name(cmd.source.label) & " address > 10bit"); else error_parse("jump to " & cmd.source.value'img & " address > 10bit"); end if; end if; set_bits(10, 10, w); end if; inc(words(0)); w := words(0); repr_operands; words(w) := operation; end command_to_words; procedure append_line is l : word := word'min(words(0), 8); checksum : word; begin if l = 0 then return; end if; size := size + l * 2; checksum := l * 2; update_checksum(checksum, get(line_addr)); unb.append(out_text, ':' & cdr(image(l * 2, 16), 2) & image(get(line_addr), 16) & "00"); for i in 1..l loop update_checksum(checksum, words(i)); unb.append(out_text, word_to_str_revers(words(i))); end loop; unb.append(out_text, cdr(image(256 - (checksum and 255), 16), 2) & ascii.cr & ascii.lf); if words(0) > 8 then for i in 9..words(0) loop words(i - 8) := words(i); end loop; words(0) := words(0) - 8; line_addr := line_addr + word(16); else if programm_t.has_element(cur) then line_addr := programm_t.key(cur); end if; words(0) := 0; end if; end append_line; reti_inserted : boolean := false; reti_cursor : programm_t.cursor; reti_address : pos_addr_t; begin print(" 0xfa [http://0xfa.space]"); print("a0xfa v0.1.0 - msp430 assembler (ihex format [https://wikipedia.org/wiki/Intel_HEX])"); print(""); if word'size > ada.containers.hash_type'size then error("hash type error"); end if; if word'size > natural'size then error("integer size error"); end if; if ada.command_line.argument_count /= 2 then error("format: a0xfa input_file_path output_file_path"); end if; getter.file.open(ada.command_line.argument(1)); from_file; reti_address := create(get_var_val("mem_code_end") - 1); loop programm_t.insert(programm, reti_address, (f_reti, null_operand, null_operand, 0, true), reti_cursor, reti_inserted); exit when reti_inserted; dec(reti_address); end loop; for i in 32736..32767 loop programm_t.insert(programm, address.create(word(i * 2)), (f_raw, (m_constant, get(reti_address), 0, null_label), null_operand, 0, true), reti_cursor, reti_inserted); end loop; cur := programm.first; line_addr := programm.first_key; words(0) := 0; while programm_t.has_element(cur) loop command_to_words(programm_t.element(cur), programm_t.key(cur)); programm_t.next(cur); if words(0) >= 8 then append_line; end if; if not programm_t.has_element(cur) or else programm_t.key(cur) /= (line_addr + words(0) * 2) then append_line; end if; end loop; unb.append(out_text, ":00000001FF"); ada.text_io.create(out_file, name => ada.command_line.argument(2)); ada.text_io.put(out_file, unb.to_string(out_text)); ada.text_io.close(out_file); print("done. size:" & size'img & "b"); exception when this_error: parse_error => error(ada.exceptions.exception_message(this_error)); when this_error: ada.io_exceptions.use_error => error("Error: " & ada.exceptions.exception_message(this_error)); end a0xfa;
zrmyers/VulkanAda
Ada
10,245
ads
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2020 Zane Myers -- -- 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 Vulkan.Math.GenIType; with Vulkan.Math.Ivec3; with Vulkan.Math.Ivec2; use Vulkan.Math.GenIType; use Vulkan.Math.Ivec3; use Vulkan.Math.Ivec2; -------------------------------------------------------------------------------- --< @group Vulkan Math Basic Types -------------------------------------------------------------------------------- --< @summary --< This package defines a 32-bit signed integer vector type with 4 components. -------------------------------------------------------------------------------- package Vulkan.Math.Ivec4 is pragma Preelaborate; pragma Pure; --< A 4-component signed integer vector. subtype Vkm_Ivec4 is Vkm_GenIType(Last_Index => 3); ---------------------------------------------------------------------------- -- Ada does not have the concept of constructors in the sense that they exist -- in C++. For this reason, we will instead define multiple methods for -- instantiating a Ivec4 here. ---------------------------------------------------------------------------- -- The following are explicit constructors for Ivec4: ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a default vector with all components set to 0.0. -- --< @return An Ivec4 with all components set to 0.0. ---------------------------------------------------------------------------- function Make_Ivec4 return Vkm_Ivec4 is (GIT.Make_GenType(Last_Index => 3, value => 0)) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector with all components set to the same value. -- --< @param scalar_value The value to set all components to. -- --< @return A Ivec4 with all components set to scalar_value. ---------------------------------------------------------------------------- function Make_Ivec4 (scalar_value : in Vkm_Int) return Vkm_Ivec4 is (GIT.Make_GenType(Last_Index => 3, value => scalar_value)) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by copying components from an existing vector. -- --< @param vec4_value The Ivec4 to copy components from. -- --< @return A Ivec4 with all of its components set equal to the corresponding --< components of vec4_value. ---------------------------------------------------------------------------- function Make_Ivec4 (vec4_value : in Vkm_Ivec4) return Vkm_Ivec4 is (GIT.Make_GenType(vec4_value.data(0),vec4_value.data(1), vec4_value.data(2),vec4_value.data(3))) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by specifying the values for each of its components. -- --< @param value1 Value for component 1. --< @param value2 Value for component 2. --< @param value3 Value for componetn 3. --< @param value4 value for component 4. -- --< @return A Ivec4 with all components set as specified. ---------------------------------------------------------------------------- function Make_Ivec4 (value1, value2, value3, value4 : in Vkm_Int) return Vkm_Ivec4 renames GIT.Make_GenType; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by concatenating a scalar value with a Ivec3. -- --< Ivec4 = [scalar_value, vec3_value ] -- --< @param scalar_value The scalar value to concatenate with the Ivec3. --< @param vec3_value The Ivec3 to concatenate to the scalar value. -- --< @return The instance of Ivec4. ---------------------------------------------------------------------------- function Make_Ivec4 (scalar_value : in Vkm_Int; vec3_value : in Vkm_Ivec3) return Vkm_Ivec3 is (Make_Ivec4(scalar_value, vec3_value.data(0), vec3_value.data(1), vec3_value.data(2))) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by concatenating a Ivec3 with a scalar value. --< --< Ivec4 = [vec3_value, scalar_value] --< --< @param vec3_value The Ivec3 to concatenate to the scalar value. --< @param scalar_value The scalar value to concatenate to the Ivec3. --< --< @return The instance of Ivec4. ---------------------------------------------------------------------------- function Make_Ivec4 (vec3_value : in Vkm_Ivec3; scalar_value : in Vkm_Int) return Vkm_Ivec4 is (Make_Ivec4(vec3_value.data(0), vec3_value.data(1), vec3_value.data(2), scalar_value )) with Inline; --------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by concatenating a Ivec2 with a Ivec2. --< --< Ivec4 = [vec2_value1, vec2_value2] --< --< @param vec2_value1 The first Ivec2. --< @param vec2_value2 The second Ivec2. --< --< @return The instance of Ivec4. --------------------------------------------------------------------------- function Make_Ivec4 (vec2_value1, vec2_value2 : in Vkm_Ivec2) return Vkm_Ivec4 is (Make_Ivec4(vec2_value1.data(0),vec2_value1.data(1), vec2_value2.data(0),vec2_value2.data(1))); --------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by concatenating two scalar values with a Ivec2. -- --< Ivec4 = [scalar1, scalar2, vec2_value] -- --< @param scalar1 First scalar value. --< @param scalar2 Second scalar value. --< @param vec2_value The Ivec2 value. -- --< @return The instance of Ivec4. --------------------------------------------------------------------------- function Make_Ivec4 (scalar1, scalar2 : in Vkm_Int; vec2_value : in Vkm_Ivec2) return Vkm_Ivec4 is (Make_Ivec4(scalar1, scalar2, vec2_value.data(0),vec2_value.data(1))); --------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by concatenating two scalar values with a Ivec2. -- --< Ivec4 = [scalar1, vec2_value, scalar2] -- --< @param scalar1 First scalar value. --< @param vec2_value The Ivec2 value. --< @param scalar2 Second scalar value. -- --< @return The instance of Ivec4. --------------------------------------------------------------------------- function Make_Ivec4 (scalar1 : in Vkm_Int; vec2_value : in Vkm_Ivec2 ; scalar2 : in Vkm_Int) return Vkm_Ivec4 is (Make_Ivec4(scalar1, vec2_value.data(0),vec2_value.data(1), scalar2)); --------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Ivec4 type. --< --< @description --< Produce a vector by concatenating two scalar values with a Ivec2. --< --< Ivec4 = [vec2_value, scalar1, scalar2] --< --< @param vec2_value The Ivec2 value. --< @param scalar1 First scalar value. --< @param scalar2 Second scalar value. -- --< @return The instance of Ivec4. --------------------------------------------------------------------------- function Make_Ivec4 (vec2_value : in Vkm_Ivec2 ; scalar1 : in Vkm_Int; scalar2 : in Vkm_Int) return Vkm_Ivec4 is (Make_Ivec4(vec2_value.data(0),vec2_value.data(1), scalar1, scalar2)); end Vulkan.Math.Ivec4;
skill-lang/adaCommon
Ada
13,112
adb
-- ___ _ ___ _ _ -- -- / __| |/ (_) | | Common SKilL implementation -- -- \__ \ ' <| | | |__ stream to skill tokens -- -- |___/_|\_\_|_|____| by: Timm Felden, Dennis Przytarski -- -- -- pragma Ada_2012; with Ada.Characters.Latin_1; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with Interfaces; with Skill.Types; with Interfaces.C.Strings; with System; with Skill.Errors; with System.Address_To_Access_Conversions; with System.Storage_Elements; package body Skill.Streams.Reader is use Skill; use type Uchar.Pointer; function Invalid_Pointer return Map_Pointer is pragma Warnings (Off); function Cast is new Ada.Unchecked_Conversion (Integer, Map_Pointer); begin return Cast (-1); end Invalid_Pointer; -- type used to represent empty input streams -- @note(TF) this is used to keep stream & map pointers not null function Empty_Stream return Input_Stream is begin return new Input_Stream_T' (Map => Invalid_Pointer, Base => Invalid_Pointer, EOF => Invalid_Pointer, Path => null, File => Interfaces.C_Streams.NULL_Stream); end Empty_Stream; function Open (Path : Types.String_Access) return Input_Stream is use type Skill.Types.String_Access; use type Interfaces.C.size_t; begin if null = Path then return Empty_Stream; end if; declare Cpath : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (Path.all); Map : Mmap := MMap_Open (Cpath); Mf : aliased access Integer; for Mf'Address use Map.File'Address; pragma Import (Ada, Mf); Ml : aliased access Integer; for Ml'Address use Map.Length'Address; pragma Import (Ada, Ml); Mm : aliased access Integer; for Mm'Address use Map.Map'Address; pragma Import (Ada, Mm); begin Interfaces.C.Strings.Free (Cpath); if Mf = null and Ml = null and Mm = null then raise Skill.Errors.Skill_Error with "failed to open stream, see stdout for details"; end if; if 0 = Map.Length then return Empty_Stream; end if; return new Input_Stream_T' (Path => Path, File => Map.File, Map => Map.Map, Base => Map.Map, EOF => Map.Map + C.ptrdiff_t (Map.Length)); end; end Open; function Map (This : access Input_Stream_T; Base : Types.v64; First : Types.v64; Last : Types.v64) return Sub_Stream is use type Uchar.Pointer; use type Interfaces.Integer_64; function Cast is new Ada.Unchecked_Conversion (Map_Pointer, Types.v64); begin if Cast (This.EOF) < Cast (This.Base + C.ptrdiff_t (Base + Last)) then raise Constraint_Error with "Tried to read behind end of file."; end if; return new Sub_Stream_T' (Map => This.Base + C.ptrdiff_t (Base + First), Base => This.Base + C.ptrdiff_t (Base + First), EOF => This.Base + C.ptrdiff_t (Base + Last)); end Map; The_Empty_Sub_Stream : Sub_Stream := new Sub_Stream_T' (Map => Invalid_Pointer, Base => Invalid_Pointer, EOF => Invalid_Pointer); function Empty_Sub_Stream return Sub_Stream is (The_Empty_Sub_Stream); procedure Close (This : access Input_Stream_T) is type S is access all Input_Stream_T; procedure Delete is new Ada.Unchecked_Deallocation (Input_Stream_T, S); D : S := S (This); begin -- do not close fake files if Invalid_Pointer /= This.Map then MMap_Close (This.File); end if; Delete (D); end Close; procedure Free (This : access Sub_Stream_T) is type S is access all Sub_Stream_T; procedure Delete is new Ada.Unchecked_Deallocation (Sub_Stream_T, S); D : S := S (This); begin if S (This) /= S (The_Empty_Sub_Stream) then Delete (D); end if; end Free; function Path (This : access Input_Stream_T) return Skill.Types.String_Access is begin return This.Path; end Path; function Position (This : access Abstract_Stream'Class) return Skill.Types.v64 is begin return Types.v64 (This.Map - This.Base); end Position; procedure Check_Offset (This : access Abstract_Stream'Class; Pos : Skill.Types.v64) is use type Types.v64; begin if Types.v64 (This.EOF - This.Base) <= Pos then raise Constraint_Error with "Offset check failed, argument position is behind end of file."; end if; end Check_Offset; procedure Jump (This : access Abstract_Stream'Class; Pos : Skill.Types.v64) is begin This.Map := This.Base + C.ptrdiff_t (Pos); end Jump; function Eof (This : access Abstract_Stream'Class) return Boolean is use C; function Cast is new Ada.Unchecked_Conversion (Uchar.Pointer, Types.i64); use type Interfaces.Integer_64; begin return Cast (This.Map) >= Cast (This.EOF); end Eof; package Casts is new System.Address_To_Access_Conversions (C.unsigned_char); function Convert is new Ada.Unchecked_Conversion (Interfaces.C.unsigned_char, Skill.Types.i8); function Convert is new Ada.Unchecked_Conversion (Casts.Object_Pointer, Map_Pointer); function Convert is new Ada.Unchecked_Conversion (Map_Pointer, Casts.Object_Pointer); procedure Advance (P : in out Map_Pointer) is use C; use Uchar; use System.Storage_Elements; begin P := Convert (Casts.To_Pointer (Casts.To_Address (Convert (P)) + 1)); end Advance; pragma Inline_Always (Advance); function I8 (This : access Abstract_Stream'Class) return Skill.Types.i8 is use C; use Uchar; P : Map_Pointer := This.Map; R : Types.i8 := Convert (This.Map.all); begin Advance (P); This.Map := P; return R; end I8; function I16 (This : access Abstract_Stream'Class) return Skill.Types.i16 is use C; use Uchar; subtype Bytes is Unsigned_Char_Array (1 .. 2); function Convert is new Ada.Unchecked_Conversion (Bytes, Types.i16); P : Uchar.Pointer := This.Map; P1 : Uchar.Pointer := P + 1; R : Types.i16 := Convert (Bytes'(P1.all, This.Map.all)); begin This.Map := This.Map + 2; return R; end I16; function I32 (This : access Abstract_Stream'Class) return Skill.Types.i32 is use C; use Uchar; subtype Bytes is Unsigned_Char_Array (1 .. 4); function Convert is new Ada.Unchecked_Conversion (Bytes, Types.i32); P : Uchar.Pointer := This.Map; P1 : Uchar.Pointer := P + 1; P2 : Uchar.Pointer := P + 2; P3 : Uchar.Pointer := P + 3; R : Types.i32 := Convert (Bytes'(P3.all, P2.all, P1.all, This.Map.all)); begin This.Map := This.Map + 4; return R; end I32; function I64 (This : access Abstract_Stream'Class) return Skill.Types.i64 is use C; use Uchar; subtype Bytes is Unsigned_Char_Array (1 .. 8); function Convert is new Ada.Unchecked_Conversion (Bytes, Types.i64); P : Uchar.Pointer := This.Map; P1 : Uchar.Pointer := P + 1; P2 : Uchar.Pointer := P + 2; P3 : Uchar.Pointer := P + 3; P4 : Uchar.Pointer := P + 4; P5 : Uchar.Pointer := P + 5; P6 : Uchar.Pointer := P + 6; P7 : Uchar.Pointer := P + 7; R : Types.i64 := Convert (Bytes' (P7.all, P6.all, P5.all, P4.all, P3.all, P2.all, P1.all, This.Map.all)); begin This.Map := This.Map + 8; return R; end I64; function F32 (This : access Abstract_Stream'Class) return Skill.Types.F32 is function Cast is new Ada.Unchecked_Conversion (Types.i32, Types.F32); begin return Cast (This.I32); end F32; function F64 (This : access Abstract_Stream'Class) return Skill.Types.F64 is function Cast is new Ada.Unchecked_Conversion (Types.i64, Types.F64); begin return Cast (This.I64); end F64; function V64 (This : access Abstract_Stream'Class) return Skill.Types.v64 is use C; use Uchar; use type Interfaces.Unsigned_64; function Convert is new Ada.Unchecked_Conversion (Source => Types.Uv64, Target => Types.v64); P : Map_Pointer := This.Map; Bucket : C.unsigned_char := P.all; Return_Value : Types.Uv64 := Types.Uv64 (Bucket); begin Advance (P); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := (Return_Value and 16#7f#) or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 7); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 14); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 21); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 28); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 35); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 42); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket) and 16#7f#, 49); if 0 /= (Bucket and 16#80#) then Bucket := P.all; Advance (P); Return_Value := Return_Value or Interfaces.Shift_Left (Types.Uv64 (Bucket), 56); end if; end if; end if; end if; end if; end if; end if; end if; This.Map := P; return Convert (Return_Value); end V64; function Parse_Exception (This : access Input_Stream_T; Block_Counter : Positive; Cause : in Ada.Exceptions.Exception_Occurrence; Message : String) return String is begin return "Parse exception at" & Ada.Characters.Latin_1.LF & This.Path.all & Ada.Characters.Latin_1.LF & " position: " & Long_Integer'Image (Long_Integer (This.Position)) & Ada.Characters.Latin_1.LF & " block: " & Positive'Image (Block_Counter) & Ada.Characters.Latin_1.LF & " reason: " & Message & Ada.Characters.Latin_1.LF & " caused by: " & Ada.Exceptions.Exception_Information (Cause); end Parse_Exception; function Parse_Exception (This : access Input_Stream_T; Block_Counter : Positive; Message : String) return String is begin return "Parse exception at" & Ada.Characters.Latin_1.LF & This.Path.all & Ada.Characters.Latin_1.LF & " position: " & Long_Integer'Image (Long_Integer (This.Position)) & Ada.Characters.Latin_1.LF & " block: " & Positive'Image (Block_Counter) & Ada.Characters.Latin_1.LF & " reason: " & Message & Ada.Characters.Latin_1.LF; end Parse_Exception; end Skill.Streams.Reader;
reznikmm/matreshka
Ada
1,092
adb
with System.Address_To_Access_Conversions; package body Qt_Ada.Generic_Model_Index_Data is package Conversions is new System.Address_To_Access_Conversions (Data); ------------------ -- Create_Index -- ------------------ function Create_Index (Self : not null access constant Model'Class; Row : Qt4.Q_Integer; Column : Qt4.Q_Integer; Data : Data_Access) return Qt4.Model_Indices.Q_Model_Index is begin return Self.Create_Index (Row, Column, Conversions.To_Address (Conversions.Object_Pointer (Data))); end Create_Index; -------------- -- Get_Data -- -------------- function Get_Data (Self : not null access constant Model'Class; Index : Qt4.Model_Indices.Q_Model_Index) return Data_Access is begin if not Index.Is_Valid then return null; else pragma Assert (Index.Model = Self); return Data_Access (Conversions.To_Pointer (Index.Internal_Pointer)); end if; end Get_Data; end Qt_Ada.Generic_Model_Index_Data;
AdaCore/libadalang
Ada
3,330
adb
with Ada.Exceptions; use Ada.Exceptions; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; use Ada.Text_IO; with GNAT.Regexp; use GNAT.Regexp; with Libadalang.Analysis; use Libadalang.Analysis; with Libadalang.Common; use Libadalang.Common; with Libadalang.Data_Decomposition; use Libadalang.Data_Decomposition; with Libadalang.Iterators; use Libadalang.Iterators; procedure Main is function "+" (S : String) return Unbounded_String renames To_Unbounded_String; U : constant Analysis_Unit := Create_Context.Get_From_File ("pkg.ads"); T : constant Base_Type_Decl := Find_First (U.Root, Kind_Is (Ada_Concrete_Type_Decl)).As_Base_Type_Decl; procedure Check_Directories (Label : String; Name_Pattern : Regexp; Directories : Filename_Array); -- Run Load_From_Directories on the arguments and lookup T procedure Check_Directory (Label : String; Name_Pattern : Regexp; Directory : String); -- Run Load_From_Directory on the arguments and lookup T procedure Check (Repinfo : Repinfo_Collection); -- Lookup T in Repinfo ----------------------- -- Check_Directories -- ----------------------- procedure Check_Directories (Label : String; Name_Pattern : Regexp; Directories : Filename_Array) is Repinfo : Repinfo_Collection; begin Put_Line ("== Dirs: " & Label & " =="); New_Line; begin Repinfo := Load_From_Directories (Name_Pattern, Directories); exception when Exc : Loading_Error => Put_Line ("Loading_Error: " & Exception_Message (Exc)); New_Line; return; end; Check (Repinfo); end Check_Directories; --------------------- -- Check_Directory -- --------------------- procedure Check_Directory (Label : String; Name_Pattern : Regexp; Directory : String) is Repinfo : Repinfo_Collection; begin Put_Line ("== Dir: " & Label & " =="); New_Line; begin Repinfo := Load_From_Directory (Name_Pattern, Directory); exception when Exc : Loading_Error => Put_Line ("Loading_Error: " & Exception_Message (Exc)); New_Line; return; end; Check (Repinfo); end Check_Directory; ----------- -- Check -- ----------- procedure Check (Repinfo : Repinfo_Collection) is T_Info : constant Type_Representation := Repinfo.Lookup (T); begin if Is_Null (T_Info) then Put_Line ("Cannot find type representation of " & T.Image); New_Line; return; end if; Put_Line ("Kind: " & Kind (T_Info)'Image); New_Line; end Check; Custom_Regexp : constant Regexp := Compile (".*\.json"); begin Check_Directories ("Defaults", Default_JSON_Filename_Regexp, (1 => +"subdir1")); Check_Directories ("No directory", Default_JSON_Filename_Regexp, (1 .. 0 => <>)); Check_Directories ("Two dirs", Default_JSON_Filename_Regexp, (+"subdir1", +"subdir2")); Check_Directories ("Custom regexp", Custom_Regexp, (1 => +"subdir1")); Check_Directory ("Defaults", Default_JSON_Filename_Regexp, "subdir1"); Check_Directory ("Custom regexp", Custom_Regexp, "subdir1"); Put_Line ("Done."); end Main;
ytomino/gnat4drake
Ada
316
ads
pragma License (Unrestricted); with Ada.Calendar; package GNAT.Calendar is No_Time : constant Ada.Calendar.Time := Ada.Calendar.Time_Of ( Year => Ada.Calendar.Year_Number'First, Month => Ada.Calendar.Month_Number'First, Day => Ada.Calendar.Day_Number'First); end GNAT.Calendar;
rveenker/sdlada
Ada
3,798
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2020, Luke A. Guest -- -- 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.Strings; package body SDL.Events.Keyboards is package C renames Interfaces.C; function Value (Name : in String) return SDL.Events.Keyboards.Scan_Codes is function SDL_Get_Scan_Code_From_Name (Name : in C.char_array) return SDL.Events.Keyboards.Scan_Codes with Import => True, Convention => C, External_Name => "SDL_GetScancodeFromName"; begin return SDL_Get_Scan_Code_From_Name (C.To_C (Name)); end Value; function Image (Scan_Code : in SDL.Events.Keyboards.Scan_Codes) return String is function SDL_Get_Scan_Code_Name (Scan_Code : in SDL.Events.Keyboards.Scan_Codes) return C.Strings.chars_ptr with Import => True, Convention => C, External_Name => "SDL_GetScancodeName"; begin return C.Strings.Value (SDL_Get_Scan_Code_Name (Scan_Code)); end Image; function Value (Name : in String) return SDL.Events.Keyboards.Key_Codes is function SDL_Get_Key_From_Name (Name : in C.char_array) return SDL.Events.Keyboards.Key_Codes with Import => True, Convention => C, External_Name => "SDL_GetKeyFromName"; begin return SDL_Get_Key_From_Name (C.To_C (Name)); end Value; function Image (Key_Code : in SDL.Events.Keyboards.Key_Codes) return String is function SDL_Get_Key_Name (Key_Code : in SDL.Events.Keyboards.Key_Codes) return C.Strings.chars_ptr with Import => True, Convention => C, External_Name => "SDL_GetKeyName"; begin return C.Strings.Value (SDL_Get_Key_Name (Key_Code)); end Image; function To_Key_Code (Scan_Code : in SDL.Events.Keyboards.Scan_Codes) return SDL.Events.Keyboards.Key_Codes is function SDL_Get_Key_From_Scan_Code (Scan_Code : in SDL.Events.Keyboards.Scan_Codes) return SDL.Events.Keyboards.Key_Codes with Import => True, Convention => C, External_Name => "SDL_GetKeyFromScancode"; begin return SDL_Get_Key_From_Scan_Code (Scan_Code); end To_Key_Code; function To_Scan_Code (Key_Code : in SDL.Events.Keyboards.Key_Codes) return SDL.Events.Keyboards.Scan_Codes is function SDL_Get_Scan_Code_From_Key (Key_Code : in SDL.Events.Keyboards.Key_Codes) return SDL.Events.Keyboards.Scan_Codes with Import => True, Convention => C, External_Name => "SDL_GetScancodeFromKey"; begin return SDL_Get_Scan_Code_From_Key (Key_Code); end To_Scan_Code; end SDL.Events.Keyboards;
DrenfongWong/tkm-rpc
Ada
401
ads
with Ada.Unchecked_Conversion; package Tkmrpc.Response.Cfg.Tkm_Reset.Convert is function To_Response is new Ada.Unchecked_Conversion ( Source => Tkm_Reset.Response_Type, Target => Response.Data_Type); function From_Response is new Ada.Unchecked_Conversion ( Source => Response.Data_Type, Target => Tkm_Reset.Response_Type); end Tkmrpc.Response.Cfg.Tkm_Reset.Convert;
zhmu/ananas
Ada
315
adb
-- { dg-do compile } -- { dg-options "-gnatws" } package body Case_Null is procedure P1 (X : T) is begin case X is when S1 => -- { dg-error "not.*static" } null; when e => null; when others => null; end case; end P1; end Case_Null;