CombinedText
stringlengths
4
3.42M
-- Copyright 2021 S.Merrony -- Permission is hereby granted, free of charge, to any person obtaining a copy of this software -- and associated documentation files (the "Software"), to deal in the Software without restriction, -- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -- subject to the following conditions: -- The above copyright notice and this permission notice shall be included in all copies or substantial -- portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. with Ada.Command_Line; use Ada.Command_Line; with Ada.Directories; use Ada.Directories; with Ada.Exceptions; with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Task_Identification; use Ada.Task_Identification; with Ada.Text_IO; with Interfaces; use Interfaces; with Aosvs_Dump; use Aosvs_Dump; procedure Loada is SemVer : constant String := "v1.4.1"; Dump_File_Name : Unbounded_String; Extracting : Boolean := False; Ignoring_Errors : Boolean := False; Listing : Boolean := False; Summary : Boolean := False; Verbose : Boolean := False; ArgIx : Integer := 1; Dump_File : File_Type; Dump_File_Stream : Stream_Access; Write_File : File_Type; -- dump images can legally contain 'too many' directory pops, so we -- store the starting directory and never traverse above it... Base_Dir : constant String := Current_Directory; Working_Dir : Unbounded_String := To_Unbounded_String (Base_Dir); Buffer : array (1 .. MaxBlockSize) of Unsigned_8; Current_Buff_Len : Integer range 0 .. MaxBlockSize; Current_Buff_In_Use : Unbounded_String; FSB_Type_Indicator : Integer; Current_File_Name : Unbounded_String; SOD : SOD_Type; Record_Header : Record_Header_Type; Total_File_Size, Padding_Size : Unsigned_32 := 0; Done, In_A_File, Load_It : Boolean := False; function symlink (fname, linkname : String) return Integer; pragma Import (C, symlink); procedure Print_Help is begin Ada.Text_IO.Put_Line ("Usage of loada:" ); Ada.Text_IO.Put_Line (" -dumpfile <file> DUMP_II or DUMP_III file to read/load (required)" ); Ada.Text_IO.Put_Line (" -extract extract the files from the DUMP_II/III into the current directory" ); Ada.Text_IO.Put_Line (" -ignoreErrors do not exit if a file or link cannot be created" ); Ada.Text_IO.Put_Line (" -list list the contents of the DUMP_II/III file" ); Ada.Text_IO.Put_Line (" -summary concise summary of the DUMP_II/III file contents (default true)" ); Ada.Text_IO.Put_Line (" -verbose be rather wordy about what loada is doing" ); Ada.Text_IO.Put_Line (" -version show the version number of loada and exit" ); Set_Exit_Status (Failure); end Print_Help; procedure Load_Buffer (Num_Bytes : in Integer; Reason : in Unbounded_String) is Tmp_Blob : Blob_Type (1 .. Num_Bytes); begin Current_Buff_In_Use := Reason; Tmp_Blob := Read_Blob (Num_Bytes, Dump_File_Stream, Reason); for B in 1 .. Num_Bytes loop Buffer (B) := Tmp_Blob (B); end loop; Current_Buff_Len := Num_Bytes; end Load_Buffer; function Process_Name_Block (Record_Header : in Record_Header_Type) return Unbounded_String is Name_Bytes : Blob_Type (1 .. Record_Header.Record_Length); File_Name, Write_Path, Display_Path : Unbounded_String; This_Entry_Type : Fstat_Entry_Rec; begin Name_Bytes := Read_Blob (Record_Header.Record_Length, Dump_File_Stream, To_Unbounded_String ("File Name")); File_Name := Extract_First_String (Name_Bytes); File_Name := To_Linux_Filename (File_Name); if Summary and Verbose then Ada.Text_IO.Put_Line (""); end if; This_Entry_Type := Known_Fstat_Entry_Types (FSB_Type_Indicator); Load_It := This_Entry_Type.Has_Payload; if This_Entry_Type.Is_Dir then Working_Dir := Working_Dir & "/" & File_Name; if Extracting then Create_Directory (To_String (Working_Dir)); end if; end if; if Summary then if Working_Dir = "" then Display_Path := File_Name; else Display_Path := Working_Dir & "/" & File_Name; end if; Ada.Text_IO.Put (To_String (This_Entry_Type.Desc) & " " & To_String (Display_Path)); if Verbose or This_Entry_Type.Is_Dir then Ada.Text_IO.Put_Line (""); else Ada.Text_IO.Put (" "); end if; end if; if Extracting and Load_It then if Working_Dir = "" then Write_Path := File_Name; else Write_Path := Working_Dir & "/" & File_Name; end if; if Verbose then Ada.Text_IO.Put (" Creating file: " & To_String (Write_Path)); end if; Create (Write_File, Out_File, To_String (Write_Path)); -- Ada.Text_IO.Put_Line ("DEBUG: Output file created" ); end if; return File_Name; end Process_Name_Block; procedure Process_Data_Block (Record_Header : in Record_Header_Type) is DHB : Data_Header_Type; FourBytes : Blob_Type (1 .. 4); TwoBytes : Blob_Type (1 .. 2); begin -- first get the address and length FourBytes := Read_Blob (Num_Bytes => 4, Dump_Stream => Dump_File_Stream, Reason => To_Unbounded_String ("Byte Addr")); DHB.Byte_Address := Unsigned_32 (FourBytes (1)); DHB.Byte_Address := Shift_Left (DHB.Byte_Address, 8) + Unsigned_32 (FourBytes (2)); DHB.Byte_Address := Shift_Left (DHB.Byte_Address, 8) + Unsigned_32 (FourBytes (3)); DHB.Byte_Address := Shift_Left (DHB.Byte_Address, 8) + Unsigned_32 (FourBytes (4)); FourBytes := Read_Blob (Num_Bytes => 4, Dump_Stream => Dump_File_Stream, Reason => To_Unbounded_String ("Byte Length")); DHB.Byte_Length := Unsigned_32 (FourBytes (1)); DHB.Byte_Length := Shift_Left (DHB.Byte_Length, 8) + Unsigned_32 (FourBytes (2)); DHB.Byte_Length := Shift_Left (DHB.Byte_Length, 8) + Unsigned_32 (FourBytes (3)); DHB.Byte_Length := Shift_Left (DHB.Byte_Length, 8) + Unsigned_32 (FourBytes (4)); if DHB.Byte_Length > Unsigned_32 (MaxBlockSize) then Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, "ERROR: Maximum Block Size Exceeded."); Set_Exit_Status (Failure); Abort_Task (Current_Task); end if; if Verbose then Ada.Text_IO.Put_Line (" Data block: " & Unsigned_32'Image (DHB.Byte_Length) & " (bytes)"); end if; TwoBytes := Read_Blob (Num_Bytes => 2, Dump_Stream => Dump_File_Stream, Reason => To_Unbounded_String ("Alignment Count")); DHB.Alighnment_Count := Unsigned_16 (TwoBytes (1)); DHB.Alighnment_Count := Shift_Left (DHB.Alighnment_Count, 8) + Unsigned_16 (TwoBytes (2)); -- skip any alignment bytes - usually just one if DHB.Alighnment_Count /= 0 then if Verbose then Ada.Text_IO.Put_Line (" Skipping " & Unsigned_16'Image (DHB.Alighnment_Count) & " alignment byte(s)"); end if; declare t : Blob_Type (1 .. Integer (DHB.Alighnment_Count)); begin --t := Read_Blob (Num_Bytes => , Dump_Stream => Dump_File_Stream, Reason => To_Unbounded_String("Alignment")); t := Read_Blob (Num_Bytes => Integer (DHB.Alighnment_Count), Dump_Stream => Dump_File_Stream, Reason => To_Unbounded_String ("Alignment")); end; end if; declare Data_Blob : Blob_Type (1 .. Integer (DHB.Byte_Length)); begin Data_Blob := Read_Blob (Num_Bytes => Integer (DHB.Byte_Length), Dump_Stream => Dump_File_Stream, Reason => To_Unbounded_String ("Data Block")); -- large areas of NULLs may be skipped over by DUMP_II/III -- this is achieved by simply advancing the byte address so -- we must pad out if byte address is beyond end of last block if DHB.Byte_Address > (Total_File_Size + 1) then Padding_Size := DHB.Byte_Address - Total_File_Size; if Extracting then if Verbose then Ada.Text_IO.Put_Line (" Padding with one block"); end if; declare Padding_Blob : Blob_Type (1 .. Integer (Padding_Size)); begin for B in Padding_Blob'Range loop Padding_Blob (B) := 0; end loop; Blob_Type'Write (Stream(Write_File), Padding_Blob); end; end if; Total_File_Size := Total_File_Size + Padding_Size; end if; if Extracting then -- Ada.Text_IO.Put_Line("Writing " & Unsigned_32'Image(DHB.Byte_Length) & " bytes..."); Blob_Type'Write (Stream(Write_File), Data_Blob); end if; end; Total_File_Size := Total_File_Size + DHB.Byte_Length; In_A_File := True; end Process_Data_Block; procedure Process_End_Block is begin if In_A_File then if Extracting and Load_It then Close (Write_File); -- Ada.Text_IO.Put_Line ("DEBUG: File Closed"); end if; if Summary then Ada.Text_IO.Put_Line (" " & Unsigned_32'Image (Total_File_Size) & " bytes"); end if; Total_File_Size := 0; In_A_File := False; else if Working_Dir /= Base_Dir then -- Don't go up from start dir declare lastSlash : Natural := Ada.Strings.Unbounded.Index (Working_Dir, "/", Ada.Strings.Backward); begin Working_Dir := Head (Working_Dir, lastSlash - 1); end; if Verbose then Ada.Text_IO.Put_Line (" Popped dir - new dir is: "); end if; end if; end if; if Verbose then Ada.Text_IO.Put_Line ("End Block Processed"); end if; end Process_End_Block; procedure Process_Link (Record_Header : in Record_Header_Type; Link_Name : in Unbounded_String) is Link_Target_Blob : Blob_Type (1 .. Record_Header.Record_Length); Link_Target : Unbounded_String; begin Link_Target_Blob := Read_Blob (Record_Header.Record_Length, Dump_File_Stream, To_Unbounded_String ("Link Target")); Link_Target := Extract_First_String (Link_Target_Blob); Link_Target := To_Linux_Filename (Link_Target); if Summary or Verbose then Ada.Text_IO.Put_Line (" -> Link Target: " & To_String (Link_Target)); end if; if Extracting then declare RC : Integer; Target_Str : String := To_String (Link_Target) & ASCII.Nul; Link_Str : String := To_String( Working_Dir ) & "/" & To_String (Link_Name) & ASCII.Nul; begin RC := symlink (Target_Str, Link_Str); if RC /= 0 then Ada.Text_IO.Put_Line ("ERROR: Could not create symbolic link"); end if; end; end if; end Process_Link; ------------------ -- main program -- ------------------ begin if Argument_Count = 0 then Print_Help; return; end if; while ArgIx <= Argument_Count loop if Argument (ArgIx) = "-dumpfile" then Dump_File_Name := To_Unbounded_String (Argument (ArgIx + 1)); ArgIx := ArgIx + 1; elsif Argument (ArgIx) = "-extract" then Extracting := True; elsif Argument (ArgIx) = "-ignoreErrors" then Ignoring_Errors := True; elsif Argument (ArgIx) = "-list" then Listing := True; elsif Argument (ArgIx) = "-summary" then Summary := True; elsif Argument (ArgIx) = "-verbose" then Verbose := True; elsif Argument (ArgIx) = "-version" then Ada.Text_IO.Put ("loada version " & SemVer); return; else Ada.Text_IO.Put_Line ("Ada.Text_IO.Standard_Error, ERROR: Invalid option specified"); Print_Help; return; end if; ArgIx := ArgIx + 1; end loop; begin Open (File => Dump_File, Mode => In_File, Name => To_String (Dump_File_Name)); exception when others => Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, "ERROR: Cannot open the file '" & To_String (Dump_File_Name) & "'. Does it exist?"); Set_Exit_Status (Failure); return; end; Dump_File_Stream := Stream (Dump_File); -- There should always be a Start Of Dump record SOD := Read_SOD (Dump_File_Stream); if Summary or Verbose then Ada.Text_IO.Put_Line ("Summary of dump file : " & To_String (Dump_File_Name)); Ada.Text_IO.Put_Line ("AOS/VS dump version : " & Unsigned_16'Image (SOD.Dump_Format_Version)); Ada.Text_IO.Put_Line ("Dump date (y - m - d): " & Unsigned_16'Image (SOD.Dump_Time_Year) & " -" & Unsigned_16'Image (SOD.Dump_Time_Month) & " -" & Unsigned_16'Image (SOD.Dump_Time_Day)); Ada.Text_IO.Put_Line ("Dump time (h : m : s): " & Unsigned_16'Image (SOD.Dump_Time_Hours) & " :" & Unsigned_16'Image (SOD.Dump_Time_Mins) & " :" & Unsigned_16'Image (SOD.Dump_Time_Secs)); end if; Process_Each_Block : while not Done loop Record_Header := Read_Header (Dump_File_Stream); if Verbose then Ada.Text_IO.Put_Line ("Found block of type: " & Unsigned_8'Image (Record_Header.Record_Type) & ", Length: " & Integer'Image (Record_Header.Record_Length)); end if; case Record_Header.Record_Type is when Start_Dump_Byte => Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, "ERROR: Found another Start-Of-Dump inside dump - this should not happen."); Set_Exit_Status (Failure); Abort_Task (Current_Task); when FSB_Byte => Load_Buffer (Record_Header.Record_Length, To_Unbounded_String ("FSB")); FSB_Type_Indicator := Integer (Buffer (2)); Load_It := False; when Name_Block_Byte => Current_File_Name := Process_Name_Block (Record_Header); when UDA_Byte => -- throw away for now Load_Buffer (Record_Header.Record_Length, To_Unbounded_String ("UDA")); -- TODO Check this is OK when ACL_Byte => -- We don't do anything except report ACLs at the moment Load_Buffer (Record_Header.Record_Length, To_Unbounded_String ("ACL")); if Verbose then Ada.Text_IO.Put_Line (" ACL: "); -- & Unsigned_8'Image(Buffer)); end if; when Link_Byte => Process_Link (Record_Header, Current_File_Name); when Data_Start_Byte => -- nothing to do - it's just a record header null; when Data_Block_Byte => Process_Data_Block (Record_Header); when Data_End_Byte => Process_End_Block; when End_Dump_Byte => Ada.Text_IO.Put_Line ("=== End of Dump ==="); Done := True; when others => Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, "ERROR: Unknown block type: " & Unsigned_8'Image (Record_Header.Record_Type) & " Giving up."); Set_Exit_Status (Failure); Abort_Task (Current_Task); end case; end loop Process_Each_Block; exception when Error : others => Ada.Text_IO.Put ("Unexpected Error: "); Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (Error)); raise; end Loada;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This package provides abstract root type for all reflective collections. -- -- Children packages provides derived types for different types of items. ------------------------------------------------------------------------------ with League.Holders; package AMF.Internals.Collections is pragma Preelaborate; type Shared_Collection is abstract tagged limited null record; type Shared_Collection_Access is access all Shared_Collection'Class; not overriding procedure Reference (Self : not null access Shared_Collection) is abstract; not overriding procedure Unreference (Self : not null access Shared_Collection) is abstract; not overriding function Length (Self : not null access constant Shared_Collection) return Natural is abstract; not overriding function Element (Self : not null access constant Shared_Collection; Index : Positive) return League.Holders.Holder is abstract; not overriding procedure Clear (Self : not null access Shared_Collection) is abstract; end AMF.Internals.Collections;
with Ada.Containers.Ordered_Maps; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; procedure Associative_Array is -- Instantiate the generic package Ada.Containers.Ordered_Maps package Associative_Int is new Ada.Containers.Ordered_Maps(Unbounded_String, Integer); use Associative_Int; Color_Map : Map; Color_Cursor : Cursor; Success : Boolean; Value : Integer; begin -- Add values to the ordered map Color_Map.Insert(To_Unbounded_String("Red"), 10, Color_Cursor, Success); Color_Map.Insert(To_Unbounded_String("Blue"), 20, Color_Cursor, Success); Color_Map.Insert(To_Unbounded_String("Yellow"), 5, Color_Cursor, Success); -- retrieve values from the ordered map and print the value and key -- to the screen Value := Color_Map.Element(To_Unbounded_String("Red")); Ada.Text_Io.Put_Line("Red:" & Integer'Image(Value)); Value := Color_Map.Element(To_Unbounded_String("Blue")); Ada.Text_IO.Put_Line("Blue:" & Integer'Image(Value)); Value := Color_Map.Element(To_Unbounded_String("Yellow")); Ada.Text_IO.Put_Line("Yellow:" & Integer'Image(Value)); end Associative_Array;
-- ----------------------------------------------------------------------------- -- smk, the smart make (http://lionel.draghi.free.fr/smk/) -- © 2018, 2019 Lionel Draghi <lionel.draghi@free.fr> -- SPDX-License-Identifier: APSL-2.0 -- ----------------------------------------------------------------------------- -- 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 Smk.Assertions; with Smk.Definitions; use Smk.Definitions; with Smk.IO; with Smk.Files; with Smk.Files.File_Lists; with Smk.Files.Find_Unused; with Smk.Smkfiles; with Smk.Runfiles; with Smk.Settings; use Smk.Settings; with Ada.Command_Line; with Ada.Directories; with Ada.Containers; with Ada.Strings.Unbounded; with Ada.Text_IO; procedure Smk.Main is -- -------------------------------------------------------------------------- -- Put_Line Utilities: procedure Put_Help is separate; procedure Put_Error (Msg : in String := ""; With_Help : in Boolean := False) is separate; -- -------------------------------------------------------------------------- procedure Analyze_Cmd_Line is separate; -- Cmd line options are then available in the Settings package. -- -------------------------------------------------------------------------- procedure Build is separate; begin -- -------------------------------------------------------------------------- Analyze_Cmd_Line; if IO.Some_Error then -- If some error occurs during command line analysis, stop here, -- even if Ignore_Errors or Keep_Going is set Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); return; end if; case Current_Command is when Read_Smkfile => Smkfiles.Dump; when Status => declare The_Runfile : Runfiles.Runfile; use Files; Updated_List : Assertions.Condition_Lists.List; begin if Runfiles.Runfiles_Found then The_Runfile := Runfiles.Get_Saved_Run (+To_Runfile_Name (Smkfile_Name)); Runfiles.Update_Files_Status (The_Runfile.Run_List, Updated_List); Runfiles.Put_Run (The_Runfile.Run_List); else Put_Error ("No previous run found."); end if; end; when List_Previous_Runs => Runfiles.Put_Run_List; when List_Targets => Runfiles.Put_Files (Runfiles.Load_Runfile, Print_Targets => True); when List_Sources => Runfiles.Put_Files (Runfiles.Load_Runfile, Print_Sources => True); when List_Unused => declare use Runfiles; use Files; use Files.File_Lists; The_Runfile : Runfile; Known_Files : File_Lists.Map; Known_Dirs : File_Lists.Map; Unknown_Files : File_Lists.Map; begin The_Runfile := Load_Runfile; Known_Files := Get_File_List (The_Runfile); Known_Dirs := Get_Dir_List (Known_Files); for F in Known_Dirs.Iterate loop Find_Unused (From => Key (F), Not_In => Known_Files, Put_In => Unknown_Files); end loop; if Settings.Long_Listing_Format then for F in Unknown_Files.Iterate loop IO.Put_Line (+Key (F)); end loop; else for F in Unknown_Files.Iterate loop IO.Put_Line (Shorten (+Key (F))); end loop; end if; end; when Whatsnew => declare use Runfiles; The_Runfile : Runfile; Updated_List : Assertions.Condition_Lists.List; begin The_Runfile := Load_Runfile; Update_Files_Status (The_Runfile.Run_List, Updated_List); Put_Updated (Updated_List); end; when Clean => Runfiles.Delete_Targets (Runfiles.Load_Runfile); when Reset => Runfiles.Clean_Run_Files; when Version => IO.Put_Line (Settings.Smk_Version); when Build => Build; when Add => Smkfiles.Add_To_Smkfile (Command_Line); when Dump => Runfiles.Dump (Runfiles.Load_Runfile); when Run => Smkfiles.Add_To_Smkfile (Command_Line); Build; when Help => Put_Help; when None => Put_Error ("Internal error : exiting Analyze_Cmd_Line without Command"); end case; if IO.Some_Error and not Ignore_Errors then Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); end if; end Smk.Main;
with AUnit.Run; with AUnit.Reporter.Text; with ImageTests; with ShapeMatchingTests; with ShapeDatabaseTest; with HistogramTests; with HistogramDescriptorTests; with NeuralNetTests; with NeuralNetIOTests; with DataBatchTests; with NNClassifierTests; with TrainingSetTests; with CSVTests; with OpenCLTests; with GpuImageTests; with GpuInferenceTests; with GpuComponentLabelingTests; with TensorTests; with LayerModelTests; package body MainTestSuite is use AUnit.Test_Suites; suiteObject: aliased Test_Suite; csvTestCase: aliased CSVTests.TestCase; imageTestCase: aliased ImageTests.ImageTest; shapeTestCase: aliased ShapeMatchingTests.TestCase; histogramTestCase: aliased HistogramTests.TestCase; histogramDescriptorTestCase: aliased HistogramDescriptorTests.TestCase; shapeDbTests: aliased ShapeDatabaseTest.TestCase; nnTests: aliased NeuralNetTests.TestCase; nnioTests: aliased NeuralNetIOTests.TestCase; dataBatchTestCase: aliased DataBatchTests.TestCase; nnClassifyTestCase: aliased NNClassifierTests.TestCase; trainSetTestCase: aliased TrainingSetTests.TestCase; openclTestCase: aliased OpenCLTests.TestCase; gpuImageTestCase: aliased GpuImageTests.TestCase; gpuInferenceTestCase: aliased GpuInferenceTests.TestCase; gpuCCLTestCase: aliased GpuComponentLabelingTests.TestCase; tensorTestCase: aliased TensorTests.TestCase; layerModelTestCase: aliased LayerModelTests.TestCase; function Suite return Access_Test_Suite is begin Add_Test(suiteObject'Access, tensorTestCase'Access); Add_Test(suiteObject'Access, layerModelTestCase'Access); return suiteObject'Access; Add_Test(suiteObject'Access, nnioTests'Access); Add_Test(suiteObject'Access, openclTestCase'Access); Add_Test(suiteObject'Access, gpuImageTestCase'Access); Add_Test(suiteObject'Access, gpuCCLTestCase'Access); Add_Test(suiteObject'Access, gpuInferenceTestCase'Access); Add_Test(suiteObject'Access, csvTestCase'Access); Add_Test(suiteObject'Access, imageTestCase'Access); Add_Test(suiteObject'Access, shapeTestCase'Access); Add_Test(suiteObject'Access, histogramTestCase'Access); Add_Test(suiteObject'Access, histogramDescriptorTestCase'Access); Add_Test(suiteObject'Access, shapeDbTests'Access); Add_Test(suiteObject'Access, nnTests'Access); Add_Test(suiteObject'Access, dataBatchTestCase'Access); Add_Test(suiteObject'Access, nnClassifyTestCase'Access); Add_Test(suiteObject'Access, trainSetTestCase'Access); return suiteObject'Access; end Suite; procedure runAll is procedure Run is new AUnit.Run.Test_Runner (MainTestSuite.Suite); reporter : AUnit.Reporter.Text.Text_Reporter; begin Run(reporter); end runAll; end MainTestSuite;
with Protypo.Api.Engine_Values.Handlers; with Protypo.Api.Engine_Values.Engine_Value_Vectors; -- -- ## What is this? -- -- This package provides a wrapper for a vector of Engine_Value. -- The wrapper implements the `Ambivalent_Interface` that allows for both -- indexed and record-like access. More precisely, it exports the following -- access methods -- -- * _indexed_ access to access a specific element of the array -- * _first_, _last_ and _length_ analoguos to the corresponding Ada -- attributes for arrays. -- * _range_ and _iterate_ iterators to run over the array content. -- _range_ iterates over the set of indexes, _iterate_ over the array -- elements -- -- package Protypo.Api.Engine_Values.Engine_Value_Array_Wrappers is subtype Array_Wrapper_Index is Positive; type Array_Wrapper is new Handlers.Ambivalent_Interface with private; type Array_Wrapper_Access is access Array_Wrapper; function Make_Wrapper (Init : Engine_Value_Vectors.Vector := Engine_Value_Vectors.Empty_Vector) return Handlers.Ambivalent_Interface_Access; function Make_Wrapper (Init : Engine_Value_Vectors.Vector := Engine_Value_Vectors.Empty_Vector) return Array_Wrapper_Access; procedure Set (Container : in out Array_Wrapper; Index : Array_Wrapper_Index; Value : Engine_Value); procedure Append (Container : in out Array_Wrapper; Item : Engine_Value); function Get (X : Array_Wrapper; Index : Engine_Value_Vectors.Vector) return Handler_Value; function Get (X : Array_Wrapper; Field : ID) return Handler_Value; function Is_Field (X : Array_Wrapper; Field : Id) return Boolean; private -- type Vector_Access is access Engine_Value_Vectors.Vector; -- Why do we use an access to the vector, rather then the vector itself? -- Because we need it for the iterators type Array_Wrapper is new Handlers.Ambivalent_Interface with record Vector : Engine_Value_Vectors.Vector; end record; end Protypo.Api.Engine_Values.Engine_Value_Array_Wrappers;
-- -- Copyright (c) 2015, John Leimon <jleimon@gmail.com> -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above copyright -- notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD -- TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN -- NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -- CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -- PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- -- Pixy Tracking Demo - Ada Version -- -- -- To Build: -- -- gnatmake pan_tilt.adb -aO/usr/local/lib -aO/usr/lib/gcc/x86_64-linux-gnu/4.8/ -aO/usr/lib/x86_64-linux-gnu/ -largs -lpthread -lpixyusb -lboost_system -lboost_chrono -lboost_thread -lstdc++ -lusb-1.0 with Ada.Text_IO; use Ada.Text_IO; with Interfaces; use Interfaces; with Interfaces.C; use Interfaces.C; with Pixy; use Pixy; with SIGINT_Handler; use SIGINT_Handler; function Pan_Tilt return int is Pixy_X_Center : constant Sensor_Width := (Sensor_Width'Last - Sensor_Width'First) / 2; Pixy_Y_Center : constant Sensor_Height := (Sensor_Height'Last - Sensor_Height'First) / 2; Pixy_RCS_Center : constant RCS_Position := (RCS_Position'Last - RCS_Position'First) / 2; -- PID Control Parameters -- Azimuth_Proportional_Gain : constant integer := 400; Azimuth_Derivative_Gain : constant integer := 300; Altitude_Proportional_Gain : constant integer := 500; Altitude_Derivative_Gain : constant integer := 400; type Gimbal is record Position : RCS_Position; Error : RCS_Error; Previous_Error : RCS_Error; Previous_Error_Valid : boolean; end record; Block : aliased Pixy.Block; type Azimuth_Type is new Gimbal; type Altitude_Type is new Gimbal; Azimuth : Azimuth_Type; Altitude : Altitude_Type; Pixy_Init_Status : int; Blocks_Copied : int; Result : int; Frame_Index : integer; procedure Initialize_Gimbals is begin Azimuth.Position := Pixy_RCS_Center; Azimuth.Previous_Error_Valid := false; Altitude.Position := Pixy_RCS_Center; Altitude.Previous_Error_Valid := false; end Initialize_Gimbals; procedure Update_Azimuth is P_Gain : integer renames Azimuth_Proportional_Gain; D_Gain : integer renames Azimuth_Derivative_Gain; Velocity : integer; Error_Delta : RCS_Error; begin if Azimuth.Previous_Error_Valid then Error_Delta := Azimuth.Error - Azimuth.Previous_Error; Velocity := (integer(Azimuth.Error) * P_Gain + integer(Error_Delta) * D_Gain) / 1024; -- Update Azimuth Position -- if integer(Azimuth.Position) + Velocity > integer(RCS_Position'Last) then Azimuth.Position := RCS_Position'Last; elsif integer(Azimuth.Position) + Velocity < integer(RCS_Position'First) then Azimuth.Position := RCS_Position'First; else Azimuth.Position := RCS_Position(integer(Azimuth.Position) + Velocity); end if; else Azimuth.Previous_Error_Valid := true; end if; Azimuth.Previous_Error := Azimuth.Error; end Update_Azimuth; procedure Update_Altitude is P_Gain : integer renames Altitude_Proportional_Gain; D_Gain : integer renames Altitude_Derivative_Gain; Velocity : integer; Error_Delta : RCS_Error; begin if Altitude.Previous_Error_Valid then Error_Delta := Altitude.Error - Altitude.Previous_Error; Velocity := (integer(Altitude.Error) * P_Gain + integer(Error_Delta) * D_Gain) / 1024; -- Update Altitude Position -- if integer(Altitude.Position) + Velocity > integer(RCS_Position'Last) then Altitude.Position := RCS_Position'Last; elsif integer(Altitude.Position) + Velocity < integer(RCS_Position'First) then Altitude.Position := RCS_Position'First; else Altitude.Position := RCS_Position(integer(Altitude.Position) + Velocity); end if; else Altitude.Previous_Error_Valid := true; end if; Altitude.Previous_Error := Altitude.Error; end Update_Altitude; begin put_line("+ Pixy Tracking Demo Started +"); Initialize_Gimbals; Pixy_Init_Status := Pixy.Init; Frame_Index := 0; -- Was there an error initializing Pixy? -- if Pixy_Init_Status /= 0 then put("Error: pixy_init() [" & int'image(Pixy_Init_Status) & "] "); Pixy.Error(Pixy_Init_Status); return Pixy_Init_Status; end if; Tracking_Loop: while not SIGINT loop -- Wait for new blocks to be available -- Waiting_Loop: while Pixy.Blocks_Are_New = 0 and not SIGINT loop null; end loop Waiting_Loop; -- Get blocks from Pixy -- blocks_copied := Get_Blocks(1, Block'access); if blocks_copied < 0 then -- Error: Pixy.Get_Blocks -- put("Error: pixy_get_blocks() [" & int'image(blocks_copied) & "]"); Pixy.Error(blocks_copied); end if; if blocks_copied > 0 then -- Calculate the difference between the center of Pixy's -- -- focus and the target. -- Azimuth.Error := RCS_Error(Pixy_X_Center) - RCS_Error(Block.X); Altitude.Error := RCS_Error(Block.Y) - RCS_Error(Pixy_Y_Center); -- Apply corrections to the Azimuth/Elevation with the goal -- -- of putting the target in the center of Pixy's focus. -- Update_Azimuth; Update_Altitude; Result := RCS_Set_Position(RCS_Azimuth_Channel, uint16(Azimuth.Position)); if Result < 0 then put("Error: pixy_rcs_set_position() [" & int'image(Result) & "]"); Pixy.Error(Result); end if; Result := RCS_Set_Position(RCS_Altitude_Channel, uint16(Altitude.Position)); if Result < 0 then put("Error: pixy_rcs_set_position() [" & int'image(Result) & "]"); Pixy.Error(Result); end if; if Frame_Index mod 50 = 0 then put_line("frame " & Integer'image(Frame_Index) & ":"); put_line(" sig: " & uint16'image(Block.Signature) & " x:" & uint16'image(Block.X) & " y:" & uint16'image(Block.Y) & " width:" & uint16'image(Block.Width) & " height:" & uint16'image(Block.Height)); end if; Frame_Index := Frame_Index + 1; end if; end loop Tracking_Loop; Pixy.Close; return 0; end pan_tilt;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- I N T E R F A C E S . C -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- SweetAda SFP cutted-down version -- ------------------------------------------------------------------------------ package body Interfaces.C is ----------------------- -- Is_Nul_Terminated -- ----------------------- -- Case of char_array function Is_Nul_Terminated (Item : char_array) return Boolean is begin for J in Item'Range loop if Item (J) = nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of wchar_array function Is_Nul_Terminated (Item : wchar_array) return Boolean is begin for J in Item'Range loop if Item (J) = wide_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of char16_array function Is_Nul_Terminated (Item : char16_array) return Boolean is begin for J in Item'Range loop if Item (J) = char16_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of char32_array function Is_Nul_Terminated (Item : char32_array) return Boolean is begin for J in Item'Range loop if Item (J) = char32_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; ------------ -- To_Ada -- ------------ -- Convert char to Character function To_Ada (Item : char) return Character is begin return Character'Val (char'Pos (Item)); end To_Ada; -- Convert wchar_t to Wide_Character function To_Ada (Item : wchar_t) return Wide_Character is begin return Wide_Character (Item); end To_Ada; -- Convert char16_t to Wide_Character function To_Ada (Item : char16_t) return Wide_Character is begin return Wide_Character'Val (char16_t'Pos (Item)); end To_Ada; -- Convert char32_t to Wide_Wide_Character function To_Ada (Item : char32_t) return Wide_Wide_Character is begin return Wide_Wide_Character'Val (char32_t'Pos (Item)); end To_Ada; ---------- -- To_C -- ---------- -- Convert Character to char function To_C (Item : Character) return char is begin return char'Val (Character'Pos (Item)); end To_C; -- Convert Wide_Character to wchar_t function To_C (Item : Wide_Character) return wchar_t is begin return wchar_t (Item); end To_C; -- Convert Wide_Character to char16_t function To_C (Item : Wide_Character) return char16_t is begin return char16_t'Val (Wide_Character'Pos (Item)); end To_C; -- Convert Wide_Character to char32_t function To_C (Item : Wide_Wide_Character) return char32_t is begin return char32_t'Val (Wide_Wide_Character'Pos (Item)); end To_C; end Interfaces.C;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_get_tex_parameteriv_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; minor_opcode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; context_tag : aliased xcb.xcb_glx_context_tag_t; target : aliased Interfaces.Unsigned_32; pname : aliased Interfaces.Unsigned_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_glx_get_tex_parameteriv_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_tex_parameteriv_request_t.Item, Element_Array => xcb.xcb_glx_get_tex_parameteriv_request_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_glx_get_tex_parameteriv_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_tex_parameteriv_request_t.Pointer, Element_Array => xcb.xcb_glx_get_tex_parameteriv_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_get_tex_parameteriv_request_t;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 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 <Juergen.Pfeifer@T-Online.de> 1996 -- Version Control -- $Revision: 1.5 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample is procedure Whow; end Sample;
----------------------------------------------------------------------- -- ado-sessions-entities -- Find entity types -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Schemas.Entities; package body ADO.Sessions.Entities is -- ------------------------------ -- Find the entity type object associated with the given database table. -- Raises the No_Entity_Type exception if no such mapping exist. -- ------------------------------ function Find_Entity_Type (Session : in ADO.Sessions.Session'Class; Object : in ADO.Objects.Object_Key) return ADO.Entity_Type is begin Check_Session (Session); return ADO.Schemas.Entities.Find_Entity_Type (Session.Impl.Entities.all, Object.Of_Class); end Find_Entity_Type; -- ------------------------------ -- Find the entity type index associated with the given database table. -- Raises the No_Entity_Type exception if no such mapping exist. -- ------------------------------ function Find_Entity_Type (Session : in ADO.Sessions.Session'Class; Table : in ADO.Schemas.Class_Mapping_Access) return ADO.Entity_Type is begin Check_Session (Session); return ADO.Schemas.Entities.Find_Entity_Type (Session.Impl.Entities.all, Table); end Find_Entity_Type; -- ------------------------------ -- Find the entity type index associated with the given database table. -- Raises the No_Entity_Type exception if no such mapping exist. -- ------------------------------ function Find_Entity_Type (Session : in ADO.Sessions.Session'Class; Name : in Util.Strings.Name_Access) return ADO.Entity_Type is begin Check_Session (Session); return ADO.Schemas.Entities.Find_Entity_Type (Session.Impl.Entities.all, Name); end Find_Entity_Type; -- ------------------------------ -- Find the entity type index associated with the given database table. -- Raises the No_Entity_Type exception if no such mapping exist. -- ------------------------------ function Find_Entity_Type (Session : in ADO.Sessions.Session'Class; Name : in String) return ADO.Entity_Type is begin return Find_Entity_Type (Session, Name'Unrestricted_Access); end Find_Entity_Type; -- ------------------------------ -- Resolve the entity type associated with the database table <b>Table</b> by using -- the <b<Session</b> connection object. Then, bind the parameter identified by -- <b>Name</b> in the parameter list. -- ------------------------------ procedure Bind_Param (Params : in out ADO.Parameters.Abstract_List'Class; Name : in String; Table : in ADO.Schemas.Class_Mapping_Access; Session : in ADO.Sessions.Session'Class) is Value : constant Entity_Type := Find_Entity_Type (Session, Table.Table.all); begin Params.Bind_Param (Name, Value); end Bind_Param; end ADO.Sessions.Entities;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ package AMF.Internals.Tables.OCL_Metamodel is pragma Preelaborate; function MM_OCL_OCL return AMF.Internals.CMOF_Element; function MC_OCL_Collection_Kind return AMF.Internals.CMOF_Element; function MC_OCL_Any_Type return AMF.Internals.CMOF_Element; function MC_OCL_Association_Class_Call_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Bag_Type return AMF.Internals.CMOF_Element; function MC_OCL_Boolean_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Call_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Collection_Item return AMF.Internals.CMOF_Element; function MC_OCL_Collection_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Collection_Literal_Part return AMF.Internals.CMOF_Element; function MC_OCL_Collection_Range return AMF.Internals.CMOF_Element; function MC_OCL_Collection_Type return AMF.Internals.CMOF_Element; function MC_OCL_Enum_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Expression_In_Ocl return AMF.Internals.CMOF_Element; function MC_OCL_Feature_Call_Exp return AMF.Internals.CMOF_Element; function MC_OCL_If_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Integer_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Invalid_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Invalid_Type return AMF.Internals.CMOF_Element; function MC_OCL_Iterate_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Iterator_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Let_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Loop_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Message_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Message_Type return AMF.Internals.CMOF_Element; function MC_OCL_Navigation_Call_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Null_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Numeric_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Ocl_Expression return AMF.Internals.CMOF_Element; function MC_OCL_Operation_Call_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Ordered_Set_Type return AMF.Internals.CMOF_Element; function MC_OCL_Primitive_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Property_Call_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Real_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Sequence_Type return AMF.Internals.CMOF_Element; function MC_OCL_Set_Type return AMF.Internals.CMOF_Element; function MC_OCL_State_Exp return AMF.Internals.CMOF_Element; function MC_OCL_String_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Template_Parameter_Type return AMF.Internals.CMOF_Element; function MC_OCL_Tuple_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Tuple_Literal_Part return AMF.Internals.CMOF_Element; function MC_OCL_Tuple_Type return AMF.Internals.CMOF_Element; function MC_OCL_Type_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Unlimited_Natural_Literal_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Unspecified_Value_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Variable return AMF.Internals.CMOF_Element; function MC_OCL_Variable_Exp return AMF.Internals.CMOF_Element; function MC_OCL_Void_Type return AMF.Internals.CMOF_Element; function MP_OCL_Association_Class_Call_Exp_Referred_Association_Class_A_Referring_Exp return AMF.Internals.CMOF_Element; function MP_OCL_Boolean_Literal_Exp_Boolean_Symbol return AMF.Internals.CMOF_Element; function MP_OCL_Call_Exp_Source_A_Applied_Element return AMF.Internals.CMOF_Element; function MP_OCL_Collection_Item_Item_A_Item1 return AMF.Internals.CMOF_Element; function MP_OCL_Collection_Literal_Exp_Kind return AMF.Internals.CMOF_Element; function MP_OCL_Collection_Literal_Exp_Part_A_Exp1 return AMF.Internals.CMOF_Element; function MP_OCL_Collection_Range_First_A_First_Owner return AMF.Internals.CMOF_Element; function MP_OCL_Collection_Range_Last_A_Last_Owner return AMF.Internals.CMOF_Element; function MP_OCL_Collection_Type_Element_Type_A_Type1 return AMF.Internals.CMOF_Element; function MP_OCL_Enum_Literal_Exp_Referred_Enum_Literal_A_Literal_Exp return AMF.Internals.CMOF_Element; function MP_OCL_Expression_In_Ocl_Body_Expression_A_Top_Expression return AMF.Internals.CMOF_Element; function MP_OCL_Expression_In_Ocl_Context_Variable_A_Self_Owner return AMF.Internals.CMOF_Element; function MP_OCL_Expression_In_Ocl_Generated_Type_A_Owning_Classifier return AMF.Internals.CMOF_Element; function MP_OCL_Expression_In_Ocl_Parameter_Variable_A_Var_Owner return AMF.Internals.CMOF_Element; function MP_OCL_Expression_In_Ocl_Result_Variable_A_Result_Owner return AMF.Internals.CMOF_Element; function MP_OCL_If_Exp_Condition_A_If_Owner return AMF.Internals.CMOF_Element; function MP_OCL_If_Exp_Else_Expression_A_Else_Owner return AMF.Internals.CMOF_Element; function MP_OCL_If_Exp_Then_Expression_A_Then_Owner return AMF.Internals.CMOF_Element; function MP_OCL_Integer_Literal_Exp_Integer_Symbol return AMF.Internals.CMOF_Element; function MP_OCL_Iterate_Exp_Result_A_Base_Exp return AMF.Internals.CMOF_Element; function MP_OCL_Let_Exp_In_A_Exp4 return AMF.Internals.CMOF_Element; function MP_OCL_Let_Exp_Variable_A_Exp5 return AMF.Internals.CMOF_Element; function MP_OCL_Loop_Exp_Body_A_Loop_Body_Owner return AMF.Internals.CMOF_Element; function MP_OCL_Loop_Exp_Iterator_A_Loop_Exp return AMF.Internals.CMOF_Element; function MP_OCL_Message_Exp_Argument_A_Exp2 return AMF.Internals.CMOF_Element; function MP_OCL_Message_Exp_Called_Operation_A_Exp6 return AMF.Internals.CMOF_Element; function MP_OCL_Message_Exp_Sent_Signal_A_Exp7 return AMF.Internals.CMOF_Element; function MP_OCL_Message_Exp_Target_A_Exp8 return AMF.Internals.CMOF_Element; function MP_OCL_Message_Type_Referred_Operation_A_Type2 return AMF.Internals.CMOF_Element; function MP_OCL_Message_Type_Referred_Signal_A_Type3 return AMF.Internals.CMOF_Element; function MP_OCL_Navigation_Call_Exp_Navigation_Source_A_Exp9 return AMF.Internals.CMOF_Element; function MP_OCL_Navigation_Call_Exp_Qualifier_A_Parent_Nav return AMF.Internals.CMOF_Element; function MP_OCL_Operation_Call_Exp_Argument_A_Parent_Call return AMF.Internals.CMOF_Element; function MP_OCL_Operation_Call_Exp_Referred_Operation_A_Refering_Exp return AMF.Internals.CMOF_Element; function MP_OCL_Property_Call_Exp_Referred_Property_A_Refering_Exp return AMF.Internals.CMOF_Element; function MP_OCL_Real_Literal_Exp_Real_Symbol return AMF.Internals.CMOF_Element; function MP_OCL_State_Exp_Referred_State_A_Exp9 return AMF.Internals.CMOF_Element; function MP_OCL_String_Literal_Exp_String_Symbol return AMF.Internals.CMOF_Element; function MP_OCL_Template_Parameter_Type_Specification return AMF.Internals.CMOF_Element; function MP_OCL_Tuple_Literal_Exp_Part_A_Exp3 return AMF.Internals.CMOF_Element; function MP_OCL_Tuple_Literal_Part_Attribute_A_Part2 return AMF.Internals.CMOF_Element; function MP_OCL_Type_Exp_Referred_Type_A_Exp11 return AMF.Internals.CMOF_Element; function MP_OCL_Unlimited_Natural_Literal_Exp_Unlimited_Natural_Symbol return AMF.Internals.CMOF_Element; function MP_OCL_Variable_Init_Expression_A_Initialized_Element return AMF.Internals.CMOF_Element; function MP_OCL_Variable_Represented_Parameter_A_Variable return AMF.Internals.CMOF_Element; function MP_OCL_Variable_Exp_Referred_Variable_A_Refering_Exp return AMF.Internals.CMOF_Element; function MP_OCL_A_First_Owner_Collection_Range_First return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp9_State_Exp_Referred_State return AMF.Internals.CMOF_Element; function MP_OCL_A_Last_Owner_Collection_Range_Last return AMF.Internals.CMOF_Element; function MP_OCL_A_Refering_Exp_Property_Call_Exp_Referred_Property return AMF.Internals.CMOF_Element; function MP_OCL_A_Type1_Collection_Type_Element_Type return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp3_Tuple_Literal_Exp_Part return AMF.Internals.CMOF_Element; function MP_OCL_A_Refering_Exp_Variable_Exp_Referred_Variable return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp11_Type_Exp_Referred_Type return AMF.Internals.CMOF_Element; function MP_OCL_A_Applied_Element_Call_Exp_Source return AMF.Internals.CMOF_Element; function MP_OCL_A_Top_Expression_Expression_In_Ocl_Body_Expression return AMF.Internals.CMOF_Element; function MP_OCL_A_Loop_Body_Owner_Loop_Exp_Body return AMF.Internals.CMOF_Element; function MP_OCL_A_Self_Owner_Expression_In_Ocl_Context_Variable return AMF.Internals.CMOF_Element; function MP_OCL_A_Loop_Exp_Loop_Exp_Iterator return AMF.Internals.CMOF_Element; function MP_OCL_A_Type3_Message_Type_Referred_Signal return AMF.Internals.CMOF_Element; function MP_OCL_A_Result_Owner_Expression_In_Ocl_Result_Variable return AMF.Internals.CMOF_Element; function MP_OCL_A_Type2_Message_Type_Referred_Operation return AMF.Internals.CMOF_Element; function MP_OCL_A_Var_Owner_Expression_In_Ocl_Parameter_Variable return AMF.Internals.CMOF_Element; function MP_OCL_A_Owning_Classifier_Expression_In_Ocl_Generated_Type return AMF.Internals.CMOF_Element; function MP_OCL_A_Literal_Exp_Enum_Literal_Exp_Referred_Enum_Literal return AMF.Internals.CMOF_Element; function MP_OCL_A_Part2_Tuple_Literal_Part_Attribute return AMF.Internals.CMOF_Element; function MP_OCL_A_Parent_Nav_Navigation_Call_Exp_Qualifier return AMF.Internals.CMOF_Element; function MP_OCL_A_Parent_Call_Operation_Call_Exp_Argument return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp9_Navigation_Call_Exp_Navigation_Source return AMF.Internals.CMOF_Element; function MP_OCL_A_Refering_Exp_Operation_Call_Exp_Referred_Operation return AMF.Internals.CMOF_Element; function MP_OCL_A_If_Owner_If_Exp_Condition return AMF.Internals.CMOF_Element; function MP_OCL_A_Then_Owner_If_Exp_Then_Expression return AMF.Internals.CMOF_Element; function MP_OCL_A_Referring_Exp_Association_Class_Call_Exp_Referred_Association_Class return AMF.Internals.CMOF_Element; function MP_OCL_A_Else_Owner_If_Exp_Else_Expression return AMF.Internals.CMOF_Element; function MP_OCL_A_Base_Exp_Iterate_Exp_Result return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp4_Let_Exp_In return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp8_Message_Exp_Target return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp1_Collection_Literal_Exp_Part return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp2_Message_Exp_Argument return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp5_Let_Exp_Variable return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp6_Message_Exp_Called_Operation return AMF.Internals.CMOF_Element; function MP_OCL_A_Item1_Collection_Item_Item return AMF.Internals.CMOF_Element; function MP_OCL_A_Initialized_Element_Variable_Init_Expression return AMF.Internals.CMOF_Element; function MP_OCL_A_Exp7_Message_Exp_Sent_Signal return AMF.Internals.CMOF_Element; function MP_OCL_A_Variable_Variable_Represented_Parameter return AMF.Internals.CMOF_Element; function MA_OCL_Collection_Range_First_First_Owner return AMF.Internals.CMOF_Element; function MA_OCL_State_Exp_Referred_State_Exp9 return AMF.Internals.CMOF_Element; function MA_OCL_Collection_Range_Last_Last_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Property_Call_Exp_Referred_Property_Refering_Exp return AMF.Internals.CMOF_Element; function MA_OCL_Collection_Type_Element_Type_Type1 return AMF.Internals.CMOF_Element; function MA_OCL_Tuple_Literal_Exp_Part_Exp3 return AMF.Internals.CMOF_Element; function MA_OCL_Variable_Exp_Referred_Variable_Refering_Exp return AMF.Internals.CMOF_Element; function MA_OCL_Type_Exp_Referred_Type_Exp11 return AMF.Internals.CMOF_Element; function MA_OCL_Call_Exp_Source_Applied_Element return AMF.Internals.CMOF_Element; function MA_OCL_Expression_In_Ocl_Body_Expression_Top_Expression return AMF.Internals.CMOF_Element; function MA_OCL_Loop_Exp_Body_Loop_Body_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Expression_In_Ocl_Context_Variable_Self_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Loop_Exp_Iterator_Loop_Exp return AMF.Internals.CMOF_Element; function MA_OCL_Message_Type_Referred_Signal_Type3 return AMF.Internals.CMOF_Element; function MA_OCL_Expression_In_Ocl_Result_Variable_Result_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Message_Type_Referred_Operation_Type2 return AMF.Internals.CMOF_Element; function MA_OCL_Expression_In_Ocl_Parameter_Variable_Var_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Expression_In_Ocl_Generated_Type_Owning_Classifier return AMF.Internals.CMOF_Element; function MA_OCL_Enum_Literal_Exp_Referred_Enum_Literal_Literal_Exp return AMF.Internals.CMOF_Element; function MA_OCL_Tuple_Literal_Part_Attribute_Part2 return AMF.Internals.CMOF_Element; function MA_OCL_Navigation_Call_Exp_Qualifier_Parent_Nav return AMF.Internals.CMOF_Element; function MA_OCL_Operation_Call_Exp_Argument_Parent_Call return AMF.Internals.CMOF_Element; function MA_OCL_Navigation_Call_Exp_Navigation_Source_Exp9 return AMF.Internals.CMOF_Element; function MA_OCL_Operation_Call_Exp_Referred_Operation_Refering_Exp return AMF.Internals.CMOF_Element; function MA_OCL_If_Exp_Condition_If_Owner return AMF.Internals.CMOF_Element; function MA_OCL_If_Exp_Then_Expression_Then_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Association_Class_Call_Exp_Referred_Association_Class_Referring_Exp return AMF.Internals.CMOF_Element; function MA_OCL_If_Exp_Else_Expression_Else_Owner return AMF.Internals.CMOF_Element; function MA_OCL_Iterate_Exp_Result_Base_Exp return AMF.Internals.CMOF_Element; function MA_OCL_Let_Exp_In_Exp4 return AMF.Internals.CMOF_Element; function MA_OCL_Message_Exp_Target_Exp8 return AMF.Internals.CMOF_Element; function MA_OCL_Collection_Literal_Exp_Part_Exp1 return AMF.Internals.CMOF_Element; function MA_OCL_Message_Exp_Argument_Exp2 return AMF.Internals.CMOF_Element; function MA_OCL_Let_Exp_Variable_Exp5 return AMF.Internals.CMOF_Element; function MA_OCL_Message_Exp_Called_Operation_Exp6 return AMF.Internals.CMOF_Element; function MA_OCL_Collection_Item_Item_Item1 return AMF.Internals.CMOF_Element; function MA_OCL_Variable_Init_Expression_Initialized_Element return AMF.Internals.CMOF_Element; function MA_OCL_Message_Exp_Sent_Signal_Exp7 return AMF.Internals.CMOF_Element; function MA_OCL_Variable_Represented_Parameter_Variable return AMF.Internals.CMOF_Element; function MB_OCL return AMF.Internals.AMF_Element; function ML_OCL return AMF.Internals.AMF_Element; private Base : AMF.Internals.CMOF_Element := 0; end AMF.Internals.Tables.OCL_Metamodel;
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: License.txt with Ada.Command_Line; with Ada.Text_IO; with Parameters; with Pilot; with Unix; procedure Ravenadm is package CLI renames Ada.Command_Line; package TIO renames Ada.Text_IO; type mandate_type is (unset, help, dev, build, build_everything, force, test, test_everything, status, status_everything, configure, locate, purge, changeopts, checkports, portsnap, repository, list_subpackages, website, purgelogs); type dev_mandate is (unset, dump, makefile, distinfo, buildsheet, template, genindex, web, repatch, sort_plist, confinfo, genconspiracy, jump); procedure scan_first_command_word; function scan_dev_command_word return dev_mandate; function get_arg (arg_number : Positive) return String; mandate : mandate_type := unset; low_rights : Boolean := False; reg_user : Boolean; reg_error : constant String := "This command requires root permissions to execute."; procedure scan_first_command_word is first : constant String := CLI.Argument (1); begin if first = "help" then mandate := help; elsif first = "dev" then mandate := dev; elsif first = "build" then mandate := build; elsif first = "build-everything" then mandate := build_everything; elsif first = "force" then mandate := force; elsif first = "test" then mandate := test; elsif first = "test-everything" then mandate := test_everything; elsif first = "status" then mandate := status; elsif first = "status-everything" then mandate := status_everything; elsif first = "configure" then mandate := configure; elsif first = "locate" then mandate := locate; elsif first = "purge-distfiles" then mandate := purge; elsif first = "purge-logs" then mandate := purgelogs; elsif first = "set-options" then mandate := changeopts; elsif first = "check-ports" then mandate := checkports; elsif first = "update-ports" then mandate := portsnap; elsif first = "generate-repository" then mandate := repository; elsif first = "subpackages" then mandate := list_subpackages; elsif first = "generate-website" then mandate := website; end if; end scan_first_command_word; function scan_dev_command_word return dev_mandate is -- Check argument count before calling second : constant String := CLI.Argument (2); begin if second = "dump" then return dump; elsif second = "makefile" then return makefile; elsif second = "distinfo" then return distinfo; elsif second = "buildsheet" then return buildsheet; elsif second = "template" then return template; elsif second = "generate-index" then return genindex; elsif second = "generate-conspiracy" then return genconspiracy; elsif second = "web" then return web; elsif second = "repatch" then return repatch; elsif second = "sort" then return sort_plist; elsif second = "info" then return confinfo; elsif second = "jump" then return jump; else return unset; end if; end scan_dev_command_word; function get_arg (arg_number : Positive) return String is begin if CLI.Argument_Count >= arg_number then return CLI.Argument (arg_number); else return ""; end if; end get_arg; begin if CLI.Argument_Count = 0 then Pilot.display_usage; return; end if; scan_first_command_word; if mandate = unset then Pilot.react_to_unknown_first_level_command (CLI.Argument (1)); return; end if; -------------------------------------------------------------------------------------------- -- Validation block start -------------------------------------------------------------------------------------------- case mandate is when help | locate | list_subpackages => low_rights := True; when others => if Pilot.already_running then return; end if; end case; reg_user := Pilot.insufficient_privileges; if not Parameters.configuration_exists and then reg_user then TIO.Put_Line ("No configuration file found."); TIO.Put_Line ("Please switch to root permissions and retry the command."); return; end if; if not Parameters.load_configuration then return; end if; case mandate is when build | force | build_everything | test | status | status_everything => -- All commands involving replicant slaves if Pilot.launch_clash_detected then return; end if; when others => null; end case; case mandate is when build | force | build_everything | test => if Parameters.configuration.avec_ncurses and then not Pilot.TERM_defined_in_environment then return; end if; when others => null; end case; case mandate is when configure | help => null; when portsnap => if not Parameters.all_paths_valid (skip_mk_check => True) then return; end if; when others => if not Parameters.all_paths_valid (skip_mk_check => False) then return; end if; end case; case mandate is when help | locate | list_subpackages => null; when dev => declare dev_subcmd : dev_mandate := unset; begin if CLI.Argument_Count > 1 then dev_subcmd := scan_dev_command_word; end if; case dev_subcmd is when template | sort_plist | confinfo | jump | unset => low_rights := True; when dump | makefile | distinfo | buildsheet | web | repatch | genindex | genconspiracy => if reg_user then TIO.Put_Line (reg_error); return; end if; end case; end; when others => if reg_user then TIO.Put_Line (reg_error); return; end if; end case; if not low_rights then if Pilot.previous_run_mounts_detected and then not Pilot.old_mounts_successfully_removed then return; end if; if Pilot.previous_realfs_work_detected and then not Pilot.old_realfs_work_successfully_removed then return; end if; if Pilot.ravenexec_missing then return; end if; end if; case mandate is when build | force | test | changeopts | list_subpackages => if not Pilot.store_origins (start_from => 2) then return; end if; when status => if CLI.Argument_Count > 1 then if not Pilot.store_origins (start_from => 2) then return; end if; end if; when others => null; end case; case mandate is when build | build_everything | force | test | test_everything | status | status_everything => Pilot.check_that_ravenadm_is_modern_enough; if not Pilot.slave_platform_determined then return; end if; when others => null; end case; if not low_rights then Pilot.create_pidfile; Unix.ignore_background_tty; end if; if mandate /= configure then Unix.cone_of_silence (deploy => True); end if; -------------------------------------------------------------------------------------------- -- Validation block end -------------------------------------------------------------------------------------------- case mandate is when status => -------------------------------- -- status command -------------------------------- if CLI.Argument_Count > 1 then if Pilot.install_compiler_packages and then Pilot.scan_stack_of_single_ports (always_build => False) and then Pilot.sanity_check_then_prefail (delete_first => False, dry_run => True) then Pilot.display_results_of_dry_run; end if; else null; -- reserved for upgrade_system_everything maybe end if; when status_everything => -------------------------------- -- status_everything command -------------------------------- if Pilot.install_compiler_packages and then Pilot.fully_scan_ports_tree and then Pilot.sanity_check_then_prefail (delete_first => False, dry_run => True) then Pilot.display_results_of_dry_run; end if; when build => -------------------------------- -- build command -------------------------------- if Pilot.install_compiler_packages and then Pilot.scan_stack_of_single_ports (always_build => False) and then Pilot.sanity_check_then_prefail (delete_first => False, dry_run => False) then Pilot.perform_bulk_run (testmode => False); end if; when build_everything => -------------------------------- -- build-everything command -------------------------------- if Pilot.install_compiler_packages and then Pilot.fully_scan_ports_tree and then Pilot.sanity_check_then_prefail (delete_first => False, dry_run => False) then Pilot.perform_bulk_run (testmode => False); end if; when test_everything => -------------------------------- -- test-everything command -------------------------------- if Pilot.install_compiler_packages and then Pilot.fully_scan_ports_tree and then Pilot.sanity_check_then_prefail (delete_first => True, dry_run => False) then Pilot.perform_bulk_run (testmode => True); end if; when website => -------------------------------- -- generate-website command -------------------------------- Pilot.generate_website; when force => -------------------------------- -- force command -------------------------------- if Pilot.install_compiler_packages and then Pilot.scan_stack_of_single_ports (always_build => False) and then Pilot.sanity_check_then_prefail (delete_first => True, dry_run => False) then Pilot.perform_bulk_run (testmode => False); end if; when dev => -------------------------------- -- dev command -------------------------------- if CLI.Argument_Count > 1 then declare dev_subcmd : dev_mandate := scan_dev_command_word; begin case dev_subcmd is when unset => Pilot.react_to_unknown_second_level_command (CLI.Argument (1), CLI.Argument (2)); when dump => Pilot.dump_ravensource (get_arg (3)); when distinfo => Pilot.generate_distinfo; when buildsheet => Pilot.generate_buildsheet (get_arg (3), get_arg (4)); when makefile => Pilot.generate_makefile (get_arg (3), get_arg (4)); when web => Pilot.generate_webpage (get_arg (3), get_arg (4)); when repatch => Pilot.regenerate_patches (get_arg (3), get_arg (4)); when sort_plist => Pilot.resort_manifests (get_arg (3)); when template => Pilot.print_spec_template (get_arg (3)); when genindex => Pilot.generate_ports_index; when genconspiracy => Pilot.generate_conspiracy (get_arg (3)); when confinfo => Pilot.show_config_value (get_arg (3)); when jump => Pilot.jump (get_arg (3)); end case; end; else Pilot.react_to_unknown_second_level_command (CLI.Argument (1), ""); end if; when help => -------------------------------- -- help command -------------------------------- if CLI.Argument_Count > 1 then Pilot.launch_man_page (CLI.Argument (2)); else Pilot.show_short_help; end if; when test => -------------------------------- -- test command -------------------------------- if Pilot.install_compiler_packages and then Pilot.scan_stack_of_single_ports (always_build => True) and then Pilot.sanity_check_then_prefail (delete_first => True, dry_run => False) then if Pilot.interact_with_single_builder then Pilot.bulk_run_then_interact_with_final_port; else Pilot.perform_bulk_run (testmode => True); end if; end if; when configure => -------------------------------- -- configure -------------------------------- Pilot.launch_configure_menu; when locate => -------------------------------- -- locate -------------------------------- Pilot.locate (get_arg (2)); when list_subpackages => -------------------------------- -- subpackages -------------------------------- Pilot.list_subpackages; when purge => -------------------------------- -- purge-distfiles -------------------------------- Pilot.purge_distfiles; when purgelogs => -------------------------------- -- purge-logs -------------------------------- Pilot.purge_logs; when changeopts => -------------------------------- -- set-options -------------------------------- Pilot.change_options; when checkports => -------------------------------- -- check-ports -------------------------------- Pilot.check_ravenports_version; when portsnap => -------------------------------- -- update-ports -------------------------------- Pilot.update_to_latest_ravenports; when repository => -------------------------------- -- generate-repository -------------------------------- Pilot.generate_repository; when unset => null; end case; Unix.cone_of_silence (deploy => False); if not low_rights then Pilot.destroy_pidfile; end if; end Ravenadm;
-- Abstract : -- -- Generalized LALR parse table generator. -- -- Copyright (C) 2002 - 2003, 2009 - 2010, 2013 - 2015, 2017 - 2020 Free Software Foundation, Inc. -- -- This file is part of the WisiToken package. -- -- The WisiToken package 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 library 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. -- -- 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. pragma License (Modified_GPL); with WisiToken.Generate.LR1_Items; with WisiToken.Productions; package WisiToken.Generate.LR.LALR_Generate is function Generate (Grammar : in out WisiToken.Productions.Prod_Arrays.Vector; Descriptor : in WisiToken.Descriptor; Known_Conflicts : in Conflict_Lists.List := Conflict_Lists.Empty_List; McKenzie_Param : in McKenzie_Param_Type := Default_McKenzie_Param; Parse_Table_File_Name : in String := ""; Include_Extra : in Boolean := False; Ignore_Conflicts : in Boolean := False; Partial_Recursion : in Boolean := True) return Parse_Table_Ptr with Pre => Descriptor.Last_Lookahead = Descriptor.First_Nonterminal and Descriptor.First_Nonterminal = Descriptor.Accept_ID; -- Generate a generalized LALR parse table for Grammar. The -- grammar start symbol is the LHS of the first production in -- Grammar. -- -- Unless Ignore_Unused_Tokens is True, raise Grammar_Error if -- there are unused tokens. -- -- Unless Ignore_Unknown_Conflicts is True, raise Grammar_Error if there -- are unknown conflicts. ---------- -- Visible for unit tests function LALR_Goto_Transitions (Kernel : in LR1_Items.Item_Set; Symbol : in Token_ID; First_Nonterm_Set : in Token_Array_Token_Set; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Descriptor : in WisiToken.Descriptor) return LR1_Items.Item_Set; -- Return the Item_Set that is the goto for Symbol from Kernel. -- If there is no such Item_Set, Result.Set is null. function LALR_Kernels (Grammar : in WisiToken.Productions.Prod_Arrays.Vector; First_Nonterm_Set : in Token_Array_Token_Set; Descriptor : in WisiToken.Descriptor) return LR1_Items.Item_Set_List; procedure Fill_In_Lookaheads (Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Has_Empty_Production : in Token_ID_Set; First_Terminal_Sequence : in Token_Sequence_Arrays.Vector; Kernels : in out LR1_Items.Item_Set_List; Descriptor : in WisiToken.Descriptor); procedure Add_Actions (Kernels : in LR1_Items.Item_Set_List; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Has_Empty_Production : in Token_ID_Set; First_Nonterm_Set : in Token_Array_Token_Set; First_Terminal_Sequence : in Token_Sequence_Arrays.Vector; Conflict_Counts : out Conflict_Count_Lists.List; Conflicts : out Conflict_Lists.List; Table : in out Parse_Table; Descriptor : in WisiToken.Descriptor); end WisiToken.Generate.LR.LALR_Generate;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of STMicroelectronics nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- -- -- -- This file is based on: -- -- -- -- @file stm32f407xx.h et al. -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief CMSIS STM32F407xx Device Peripheral Access Layer Header File. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ -- This file provides register definitions for the STM32 (ARM Cortex M4/7F) -- microcontrollers from ST Microelectronics. package STM32.EXTI is type External_Line_Number is (EXTI_Line_0, EXTI_Line_1, EXTI_Line_2, EXTI_Line_3, EXTI_Line_4, EXTI_Line_5, EXTI_Line_6, EXTI_Line_7, EXTI_Line_8, EXTI_Line_9, EXTI_Line_10, EXTI_Line_11, EXTI_Line_12, EXTI_Line_13, EXTI_Line_14, EXTI_Line_15, EXTI_Line_16, EXTI_Line_17, EXTI_Line_18, EXTI_Line_19, EXTI_Line_20, EXTI_Line_21, EXTI_Line_22); type External_Triggers is (Interrupt_Rising_Edge, Interrupt_Falling_Edge, Interrupt_Rising_Falling_Edge, Event_Rising_Edge, Event_Falling_Edge, Event_Rising_Falling_Edge); subtype Interrupt_Triggers is External_Triggers range Interrupt_Rising_Edge .. Interrupt_Rising_Falling_Edge; subtype Event_Triggers is External_Triggers range Event_Rising_Edge .. Event_Rising_Falling_Edge; procedure Enable_External_Interrupt (Line : External_Line_Number; Trigger : Interrupt_Triggers) with Inline; procedure Disable_External_Interrupt (Line : External_Line_Number) with Inline; procedure Enable_External_Event (Line : External_Line_Number; Trigger : Event_Triggers) with Inline; procedure Disable_External_Event (Line : External_Line_Number) with Inline; procedure Generate_SWI (Line : External_Line_Number) with Inline; function External_Interrupt_Pending (Line : External_Line_Number) return Boolean with Inline; procedure Clear_External_Interrupt (Line : External_Line_Number) with Inline; end STM32.EXTI;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Containers; function AMF.Extents.Hash (Item : Extent_Access) return Ada.Containers.Hash_Type;
with physics.Model, Physics, openGL.Model.terrain, openGL.IO, ada.unchecked_Deallocation, ada.unchecked_Conversion; package body gel.Terrain is type Heightfield_view is access all physics.Heightfield; type height_Map_view is access all opengl.height_Map; type height_map_Grid is array (math.Index range <>, math.Index range <>) of height_Map_view; function Width (Self : in opengl.height_Map) return math.Real is begin return math.Real (self'Length (2) - 1); end Width; function Depth (Self : in opengl.height_Map) return math.Real is begin return math.Real (self'Length (1) - 1); end Depth; function new_Terrain (World : in gel.World.view; heights_File : in String; texture_File : in String := ""; Scale : in math.Vector_3 := (1.0, 1.0, 1.0)) return access gel.Sprite.Grid is use Math; the_Pixels : opengl.IO.height_Map_view := opengl.IO.to_height_Map (openGL.to_Asset (heights_File)); tile_Width : constant Positive := 8 * 32 - 1; tile_Depth : constant Positive := 8 * 32 - 1; total_Width : constant Real := Real (the_Pixels'Length (2) - 1) * Scale (1); total_Depth : constant Real := Real (the_Pixels'Length (1) - 1) * Scale (3); base_Centre : constant Vector_3 := (0.0, 0.0, 0.0); function Grid_last (total_Size, tile_Size : in Positive) return math.Index is Last : constant math.Index := math.Index ( 1 + (total_Size - 1) / tile_Size); begin return Last; end Grid_last; the_heightmap_Grid : height_map_Grid (1 .. Grid_last (the_Pixels'Length (1), tile_Depth), 1 .. Grid_last (the_Pixels'Length (2), tile_Width)); the_Sprite_Grid : constant gel.Sprite.Grid_view := new gel.Sprite.Grid (the_heightmap_Grid'Range (1), the_heightmap_Grid'Range (2)); procedure free is new ada.unchecked_Deallocation (opengl.height_Map, opengl.IO.height_Map_view); procedure flip (Self : opengl.IO.height_Map_view) is use type opengl.Index_t; the_Map : opengl.IO.height_Map_view := new opengl.height_Map' (Self.all); begin for Row in Self'Range (1) loop for Col in Self'Range (2) loop Self (Row, Col) := the_Map (Self'Last (1) - Row + 1, Col); end loop; end loop; free (the_Map); end flip; begin flip (the_Pixels.all'unchecked_Access); -- Create each grid elements 'heightmap'. -- declare use openGL; row_First, row_Last, col_First, col_Last : math.Index; -- Row and col ranges for each sub-matrix. begin for Row in the_sprite_Grid'Range (1) loop row_First := math.Index (tile_Depth - 1) * (Row - 1) + 1; row_Last := math.Index'Min (row_First + math.Index (tile_Depth - 1), math.Index (the_Pixels'Last (1))); for Col in the_sprite_Grid'Range (2) loop col_First := math.Index (tile_Width - 1) * (Col - 1) + 1; col_Last := math.Index'Min (col_First + math.Index (tile_Width - 1), math.Index (the_Pixels'Last (2))); the_heightmap_Grid (Row, Col) := new opengl.height_Map' (Region (the_Pixels.all, (Index_t (row_First), Index_t (row_Last)), (Index_t (col_First), Index_t (col_Last)))); end loop; end loop; end; -- Create the Sprite for each grid element. -- declare site_X_offset, site_Z_offset : Real := 0.0; site_Y_Offset : Real; tile_X_Offset : Real := 0.0; tile_Z_Offset : Real := total_Depth; tile_X_Scale : Real; tile_Z_Scale : Real; begin for Row in the_sprite_Grid'Range (1) loop site_X_offset := 0.0; tile_X_Offset := 0.0; tile_Z_Offset := tile_Z_Offset - Depth (the_heightmap_Grid (Row, 1).all) * Scale (3); for Col in the_sprite_Grid'Range (2) loop tile_Z_Scale := Depth (the_heightmap_Grid (Row, 1).all) / total_Depth; tile_X_Scale := Width (the_heightmap_Grid (Row, Col).all) / total_Width; declare the_Region : constant height_Map_view := the_heightmap_Grid (Row, Col); the_height_Range : constant opengl.Vector_2 := openGL.height_Extent (the_Region.all); Tiling : constant opengl.texture_Transform_2d := (S => (opengl.Real (tile_X_Offset / total_Width) / opengl.Real (tile_X_Scale * Scale (1)), opengl.Real (tile_X_Scale * Scale (1))), T => (opengl.Real (tile_Z_Offset / total_Depth) / opengl.Real (tile_Z_Scale * Scale (3)), opengl.Real (tile_Z_Scale * Scale (3)))); the_ground_Model : constant access openGL.Model.terrain.item := openGL.Model.terrain.new_Terrain (heights_Asset => openGL.to_Asset (heights_File), Row => Row, Col => Col, Heights => the_Region.all'Access, color_Map => openGL.to_Asset (texture_File), Tiling => Tiling); function to_Physics is new ada.unchecked_Conversion (height_Map_view, Heightfield_view); the_ground_physics_Model : constant physics.Model.view := new physics.Model.item' (Id => physics.null_model_Id, -- Site => Origin_3d, Scale => Scale, shape_Info => (physics.Model.Heightfield, Heights => to_Physics (the_Region), height_range => (the_height_Range (1), the_height_Range (2))), Shape => null, Mass => 0.0, Friction => 0.5, Restitution => 0.5, is_Tangible => True); the_height_Extents : constant opengl.Vector_2 := opengl.height_Extent (the_Region.all); the_Sprite : gel.Sprite.view renames the_sprite_Grid (Row, Col); the_Site : vector_3; begin -- the_ground_Model.Scale := (Scale (1), -- Scale (2), -- Scale (3)); the_Site := (0.0, 0.0, 0.0); the_Sprite := gel.Sprite.Forge.new_Sprite ("Terrain" & Row'Image & Col'Image, sprite.World_view (World), the_Site, the_ground_Model, the_ground_physics_Model, owns_Graphics => True, owns_Physics => True); site_y_Offset := math.Real ( the_height_Extents (1) + (the_height_Extents (2) - the_height_Extents (1)) / 2.0); -- the_sprite_Grid (Row, Col).Site_is (the_Site + base_Centre); the_Sprite. Site_is (the_Site + base_Centre); the_Sprite.Scale_is (Scale); tile_X_Offset := tile_X_Offset + Width (the_heightmap_Grid (Row, Col).all) * Scale (1); if Col /= the_sprite_Grid'Last (2) then site_X_offset := site_X_offset + Width (the_heightmap_Grid (Row, Col ).all) * Scale (1) / 2.0 + Width (the_heightmap_Grid (Row, Col + 1).all) * Scale (1) / 2.0; end if; end; end loop; if Row /= the_sprite_Grid'Last (1) then site_Z_offset := site_Z_offset + Depth (the_heightmap_Grid (Row, 1).all) * Scale (3) / 2.0 + Depth (the_heightmap_Grid (Row + 1, 1).all) * Scale (3) / 2.0; end if; end loop; end; free (the_Pixels); return the_Sprite_Grid; end new_Terrain; end gel.Terrain;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Defining_Identifiers; with Program.Lexical_Elements; with Program.Elements.Loop_Parameter_Specifications; with Program.Elements.Generalized_Iterator_Specifications; with Program.Elements.Element_Iterator_Specifications; with Program.Element_Vectors; with Program.Elements.Identifiers; with Program.Elements.For_Loop_Statements; with Program.Element_Visitors; package Program.Nodes.For_Loop_Statements is pragma Preelaborate; type For_Loop_Statement is new Program.Nodes.Node and Program.Elements.For_Loop_Statements.For_Loop_Statement and Program.Elements.For_Loop_Statements.For_Loop_Statement_Text with private; function Create (Statement_Identifier : Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Colon_Token : Program.Lexical_Elements .Lexical_Element_Access; For_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Loop_Parameter : Program.Elements.Loop_Parameter_Specifications .Loop_Parameter_Specification_Access; Generalized_Iterator : Program.Elements .Generalized_Iterator_Specifications .Generalized_Iterator_Specification_Access; Element_Iterator : Program.Elements .Element_Iterator_Specifications .Element_Iterator_Specification_Access; Loop_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Statements : not null Program.Element_Vectors .Element_Vector_Access; End_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Loop_Token_2 : not null Program.Lexical_Elements .Lexical_Element_Access; End_Statement_Identifier : Program.Elements.Identifiers.Identifier_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return For_Loop_Statement; type Implicit_For_Loop_Statement is new Program.Nodes.Node and Program.Elements.For_Loop_Statements.For_Loop_Statement with private; function Create (Statement_Identifier : Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Loop_Parameter : Program.Elements.Loop_Parameter_Specifications .Loop_Parameter_Specification_Access; Generalized_Iterator : Program.Elements .Generalized_Iterator_Specifications .Generalized_Iterator_Specification_Access; Element_Iterator : Program.Elements .Element_Iterator_Specifications .Element_Iterator_Specification_Access; Statements : not null Program.Element_Vectors .Element_Vector_Access; End_Statement_Identifier : Program.Elements.Identifiers.Identifier_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_For_Loop_Statement with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_For_Loop_Statement is abstract new Program.Nodes.Node and Program.Elements.For_Loop_Statements.For_Loop_Statement with record Statement_Identifier : Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Loop_Parameter : Program.Elements .Loop_Parameter_Specifications.Loop_Parameter_Specification_Access; Generalized_Iterator : Program.Elements .Generalized_Iterator_Specifications .Generalized_Iterator_Specification_Access; Element_Iterator : Program.Elements .Element_Iterator_Specifications .Element_Iterator_Specification_Access; Statements : not null Program.Element_Vectors .Element_Vector_Access; End_Statement_Identifier : Program.Elements.Identifiers .Identifier_Access; end record; procedure Initialize (Self : aliased in out Base_For_Loop_Statement'Class); overriding procedure Visit (Self : not null access Base_For_Loop_Statement; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Statement_Identifier (Self : Base_For_Loop_Statement) return Program.Elements.Defining_Identifiers.Defining_Identifier_Access; overriding function Loop_Parameter (Self : Base_For_Loop_Statement) return Program.Elements.Loop_Parameter_Specifications .Loop_Parameter_Specification_Access; overriding function Generalized_Iterator (Self : Base_For_Loop_Statement) return Program.Elements.Generalized_Iterator_Specifications .Generalized_Iterator_Specification_Access; overriding function Element_Iterator (Self : Base_For_Loop_Statement) return Program.Elements.Element_Iterator_Specifications .Element_Iterator_Specification_Access; overriding function Statements (Self : Base_For_Loop_Statement) return not null Program.Element_Vectors.Element_Vector_Access; overriding function End_Statement_Identifier (Self : Base_For_Loop_Statement) return Program.Elements.Identifiers.Identifier_Access; overriding function Is_For_Loop_Statement_Element (Self : Base_For_Loop_Statement) return Boolean; overriding function Is_Statement_Element (Self : Base_For_Loop_Statement) return Boolean; type For_Loop_Statement is new Base_For_Loop_Statement and Program.Elements.For_Loop_Statements.For_Loop_Statement_Text with record Colon_Token : Program.Lexical_Elements.Lexical_Element_Access; For_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Loop_Token : not null Program.Lexical_Elements .Lexical_Element_Access; End_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Loop_Token_2 : not null Program.Lexical_Elements .Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_For_Loop_Statement_Text (Self : aliased in out For_Loop_Statement) return Program.Elements.For_Loop_Statements .For_Loop_Statement_Text_Access; overriding function Colon_Token (Self : For_Loop_Statement) return Program.Lexical_Elements.Lexical_Element_Access; overriding function For_Token (Self : For_Loop_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Loop_Token (Self : For_Loop_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function End_Token (Self : For_Loop_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Loop_Token_2 (Self : For_Loop_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : For_Loop_Statement) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_For_Loop_Statement is new Base_For_Loop_Statement with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_For_Loop_Statement_Text (Self : aliased in out Implicit_For_Loop_Statement) return Program.Elements.For_Loop_Statements .For_Loop_Statement_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_For_Loop_Statement) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_For_Loop_Statement) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_For_Loop_Statement) return Boolean; end Program.Nodes.For_Loop_Statements;
------------------------------------------------------------------------------ -- AGAR CORE LIBRARY -- -- A G A R . D A T A _ S O U R C E -- -- B o d y -- -- -- -- Copyright (c) 2018-2019, Julien Nadeau Carriere (vedge@csoft.net) -- -- Copyright (c) 2010, coreland (mark@coreland.ath.cx) -- -- -- -- Permission to use, copy, modify, and/or distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ package body Agar.Data_Source is procedure Open_File (Path : in String; Mode : in String; Source : out Data_Source_Access) is Ch_Path : aliased C.char_array := C.To_C (Path); Ch_Mode : aliased C.char_array := C.To_C (Mode); begin Source := AG_OpenFile (Path => To_Chars_Ptr(Ch_Path'Unchecked_Access), Mode => To_Chars_Ptr(Ch_Mode'Unchecked_Access)); end; package body IO is Element_Bytes : constant AG_Size := Element_Type'Size / System.Storage_Unit; procedure Read (Source : in Data_Source_Not_Null_Access; Buffer : out Element_Array_Type; Read : out Element_Count_Type; Status : out IO_Status) is begin Status := AG_Read (Source => Source, Buffer => Buffer (Buffer'First)'Address, Size => Element_Bytes, Members => Buffer'Length); if Status = Success then Read := Buffer'Length; end if; end Read; procedure Read_At_Offset (Source : in Data_Source_Not_Null_Access; Offset : in AG_Offset; Buffer : out Element_Array_Type; Read : out Element_Count_Type; Status : out IO_Status) is begin Status := AG_ReadAt (Source => Source, Buffer => Buffer (Buffer'First)'Address, Size => Element_Bytes, Members => Buffer'Length, Offset => Offset); if Status = Success then Read := Buffer'Length; end if; end Read_At_Offset; procedure Write (Source : in Data_Source_Not_Null_Access; Buffer : in Element_Array_Type; Wrote : out Element_Count_Type; Status : out IO_Status) is begin Status := AG_Write (Source => Source, Buffer => Buffer (Buffer'First)'Address, Size => Element_Bytes, Members => Buffer'Length); if Status = Success then Wrote := Buffer'Length; end if; end; procedure Write_At_Offset (Source : in Data_Source_Not_Null_Access; Offset : in AG_Offset; Buffer : in Element_Array_Type; Wrote : out Element_Count_Type; Status : out IO_Status) is begin Status := AG_WriteAt (Source => Source, Buffer => Buffer (Buffer'First)'Address, Size => Element_Bytes, Offset => Offset, Members => Buffer'Length); if Status = Success then Wrote := Buffer'Length; else Wrote := 0; end if; end; end IO; function Read_String (Source : in Data_Source_Access) return String is Result : chars_ptr; begin Result := AG_ReadStringLen(Source, AG_Size(LOAD_STRING_MAX)); if Result = Null_Ptr then raise Program_Error with ERR.Get_Error; end if; -- XXX FIXME leak return C.To_Ada(Value(Result)); end; function Read_String (Source : in Data_Source_Access; Max_Length : in Natural) return String is Result : chars_ptr; begin Result := AG_ReadStringLen(Source, AG_Size(Max_Length)); if Result = Null_Ptr then raise Program_Error with ERR.Get_Error; end if; -- XXX FIXME leak return C.To_Ada(Value(Result)); end; function Read_Padded_String (Source : in Data_Source_Access; Length : in Natural) return String is Ch_Name : aliased C.char_array := (1 .. C.size_t(Length) => C.nul); Result : AG_Size; begin Result := AG_CopyStringPadded (Buffer => To_Chars_Ptr(Ch_Name'Unchecked_Access), Source => Source, Size => Ch_Name'Length); if Integer(Result) = 0 then raise Program_Error with ERR.Get_Error; end if; return C.To_Ada(Ch_Name); end; procedure Write_String (Source : in Data_Source_Access; Data : in String) is Ch_Data : aliased C.char_array := C.To_C(Data); begin AG_WriteString (Source => Source, Data => To_Chars_Ptr(Ch_Data'Unchecked_Access)); end; procedure Write_Padded_String (Source : in Data_Source_Access; Data : in String; Length : in Natural) is Ch_Data : aliased C.char_array := C.To_C(Data); begin AG_WriteStringPadded (Source => Source, Data => To_Chars_Ptr(Ch_Data'Unchecked_Access), Length => AG_Size(Length)); end; end Agar.Data_Source;
----------------------------------------------------------------------- -- awa-images-modules -- Image management module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Applications; with AWA.Modules; with AWA.Storages.Models; with AWA.Storages.Services; with AWA.Images.Services; -- == Image Module == -- The <tt>Image_Module</tt> type represents the image module. An instance of the image -- module must be declared and registered when the application is created and initialized. -- The image module is associated with the image service which provides and implements -- the image management operations. -- -- When the image module is initialized, it registers itself as a listener to the storage -- module to be notified when a storage file is created, updated or removed. When a file -- is added, it looks at the file type and extracts the image information if the storage file -- is an image. package AWA.Images.Modules is NAME : constant String := "images"; type Image_Module is new AWA.Modules.Module and AWA.Storages.Services.Listener with private; type Image_Module_Access is access all Image_Module'Class; -- Initialize the image module. overriding procedure Initialize (Plugin : in out Image_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config); -- Configures the module after its initialization and after having read its XML configuration. overriding procedure Configure (Plugin : in out Image_Module; Props : in ASF.Applications.Config); -- Get the image manager. function Get_Image_Manager (Plugin : in Image_Module) return Services.Image_Service_Access; -- Create an image manager. This operation can be overridden to provide another -- image service implementation. function Create_Image_Manager (Plugin : in Image_Module) return Services.Image_Service_Access; -- The `On_Create` procedure is called by `Notify_Create` to notify the creation of the item. overriding procedure On_Create (Instance : in Image_Module; Item : in AWA.Storages.Models.Storage_Ref'Class); -- The `On_Update` procedure is called by `Notify_Update` to notify the update of the item. overriding procedure On_Update (Instance : in Image_Module; Item : in AWA.Storages.Models.Storage_Ref'Class); -- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion of the item. overriding procedure On_Delete (Instance : in Image_Module; Item : in AWA.Storages.Models.Storage_Ref'Class); -- Get the image module instance associated with the current application. function Get_Image_Module return Image_Module_Access; -- Get the image manager instance associated with the current application. function Get_Image_Manager return Services.Image_Service_Access; -- Returns true if the storage file has an image mime type. function Is_Image (File : in AWA.Storages.Models.Storage_Ref'Class) return Boolean; private type Image_Module is new AWA.Modules.Module and AWA.Storages.Services.Listener with record Manager : Services.Image_Service_Access := null; end record; end AWA.Images.Modules;
-- Copyright 2018-2020 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 Enum_With_Gap; use Enum_With_Gap; procedure Enum_With_Gap_Main is Indexed_By_Enum : AR_Access := new AR'(LIT1 => 1, LIT2 => 43, LIT3 => 42, LIT4 => 41); S : String_Access := new String'("Hello!"); V : Enum_Subrange := LIT3; begin Do_Nothing (Indexed_By_Enum); -- BREAK Do_Nothing (S); end Enum_With_Gap_Main;
-- SipHash.General_SPARK -- Implementing SipHash over a general private type -- Copyright (c) 2015, James Humphry - see LICENSE file for details with System.Storage_Elements; -- Rather than simply writing the object into a buffer and calling the main -- SipHash routine, this implementation takes advantage of the fact that the -- padding required is always constant and does not need to be recalculated -- each time, giving a minor speed increase. function SipHash.General_SPARK (m : T) return Hash_Type is use System.Storage_Elements; Padded_Blocks : constant Storage_Count := ((Buffer_Size / 8) + 1); Padded_Buffer_Size : constant Storage_Count := Padded_Blocks * 8; B : Storage_Array(1..Padded_Buffer_Size) := (others => 0); m_pos : Storage_Offset := 1; m_i : U64; v : SipHash_State := Get_Initial_State; begin -- This compile-time check is useful for GNAT but in GNATprove it currently -- just generates a warning that it can not yet prove them correct. pragma Warnings (GNATprove, Off, "Compile_Time_Error"); pragma Compile_Time_Error (Storage_Element'Size /= 8, "This implementation of SipHash cannot work " & "with Storage_Element'Size /= 8."); pragma Warnings (GNATprove, On, "Compile_Time_Error"); Write(Buffer => B(1..Buffer_Size), Item => m); B(B'Last) := Storage_Element(Buffer_Size mod 256); for I in 1..Padded_Blocks loop pragma Loop_Invariant (m_pos = (I-1) * 8 + 1); m_i := SArray8_to_U64_LE(B(m_pos..m_pos+7)); v(3) := v(3) xor m_i; for J in 1..c_rounds loop Sip_Round(v); end loop; v(0) := v(0) xor m_i; m_pos := m_pos + 8; end loop; return Hash_Type'Mod(Sip_Finalization(v)); end SipHash.General_SPARK;
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ -- Purpose: -- Asis.Gela starts package hierarhy where implemented Object-Oriented Asis. -- Standard procedural Asis implemented as set of wrappers over dispatching -- calls of tagged type methods. -- -- Root of AST nodes Element_Node is declared in private part of Asis -- package. Its primitive operations correspond to functions defined -- in ASIS standard. Their default implementations raise -- Inappropriate_Element exception. Types in Asis.Gela.Elements -- extend Element_Node and provide operations correspond to particular -- Element_Kind. -- -- When context is openned parser read units and construct AST from -- children of Element_Node. A few passes over resulting AST -- fix syntax simplification, apply resolution rules, creates -- implicit elements and expands generic instantiations. with Ada.Strings.Wide_Unbounded; private package Asis.Gela is pragma Preelaborate; type Fuzzy_Boolean is (False, True, Unknown); function Next_Hash return Asis.ASIS_Integer; package W renames Ada.Strings.Wide_Unbounded; subtype Unbounded_Wide_String is W.Unbounded_Wide_String; end Asis.Gela; ------------------------------------------------------------------------------ -- Copyright (c) 2006-2013, Maxim Reznik -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of the Maxim Reznik, IE nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------
-- C45220D.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT '<' , '<=' , '>' , '>=' PRODUCE CORRECT RESULTS ON -- OPERANDS OF A TYPE DERIVED FROM THE TYPE 'BOOLEAN' -- (IN PARTICULAR, FOR OPERANDS HAVING DIFFERENT SUBTYPES). -- THIS TEST IS DERIVED FROM C45220B.ADA , C45220C.ADA . -- RM 28 OCTOBER 1980 -- JWC 7/8/85 RENAMED TO -AB WITH REPORT ; PROCEDURE C45220D IS USE REPORT; TYPE NB IS NEW BOOLEAN ; SUBTYPE T1 IS NB RANGE NB'(FALSE)..NB'(FALSE) ; SUBTYPE T2 IS NB RANGE NB'(TRUE )..NB'(TRUE ); SUBTYPE T3 IS NB RANGE NB'(FALSE)..NB'(TRUE ); SUBTYPE T4 IS T3 RANGE NB'(TRUE )..NB'(TRUE ); FVAR1 : T1 := NB'(FALSE) ; TVAR1 : T2 := NB'(TRUE ); FVAR2 : T3 := NB'(FALSE) ; TVAR2 : T4 := NB'(TRUE ); ERROR_COUNT : INTEGER := 0 ; PROCEDURE BUMP IS BEGIN ERROR_COUNT := ERROR_COUNT + 1 ; END BUMP ; FUNCTION IDENT_NEW_BOOL( THE_ARGUMENT : NB ) RETURN NB IS BEGIN IF EQUAL(2,2) THEN RETURN THE_ARGUMENT; ELSE RETURN NB'(FALSE) ; END IF; END ; BEGIN TEST( "C45220D" , "CHECK THAT '<' , '<=' , '>' , '>=' PRODUCE" & " CORRECT RESULTS ON DERIVED-BOOLEAN-TYPE" & " OPERANDS" ) ; -- 64 CASES ( 2 * 2 ORDERED PAIRS OF OPERAND VALUES, -- 4 OPERATORS : '<' , <=' , '>' , '>=' -- 4 VARIABLE/LITERAL FOR LEFT OPERAND, -- VARIABLE/LITERAL FOR RIGHT OPERAND. -- 'BUMP' MEANS 'BUMP THE ERROR COUNT' FVAR1 := IDENT_NEW_BOOL( NB'(FALSE) ) ; TVAR1 := IDENT_NEW_BOOL( NB'(TRUE )) ; FVAR2 := IDENT_NEW_BOOL( NB'(FALSE) ) ; TVAR2 := IDENT_NEW_BOOL( NB'(TRUE )) ; ERROR_COUNT := 0 ; IF NB'(FALSE) < NB'(FALSE) THEN BUMP ; END IF; IF FVAR1 < NB'(FALSE) THEN BUMP ; END IF; IF NB'(FALSE) < FVAR2 THEN BUMP ; END IF; IF FVAR2 < FVAR1 THEN BUMP ; END IF; IF NB'(FALSE) < NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF FVAR1 < NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF NB'(FALSE) < TVAR2 THEN NULL ; ELSE BUMP ; END IF; IF FVAR2 < TVAR1 THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) < NB'(FALSE) THEN BUMP ; END IF; IF NB'(TRUE ) < FVAR1 THEN BUMP ; END IF; IF TVAR2 < NB'(FALSE) THEN BUMP ; END IF; IF TVAR1 < FVAR2 THEN BUMP ; END IF; IF NB'(TRUE ) < NB'(TRUE ) THEN BUMP ; END IF; IF TVAR1 < NB'(TRUE ) THEN BUMP ; END IF; IF NB'(TRUE ) < TVAR2 THEN BUMP ; END IF; IF TVAR2 < TVAR1 THEN BUMP ; END IF; IF ERROR_COUNT > 0 THEN FAILED( "ORDERING OF N_BOOLEAN VALUES - FAILURE '<'" ); END IF; ERROR_COUNT := 0 ; IF NB'(FALSE) <= NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF FVAR1 <= NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF NB'(FALSE) <= FVAR2 THEN NULL ; ELSE BUMP ; END IF; IF FVAR2 <= FVAR1 THEN NULL ; ELSE BUMP ; END IF; IF NB'(FALSE) <= NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF FVAR1 <= NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF NB'(FALSE) <= TVAR2 THEN NULL ; ELSE BUMP ; END IF; IF FVAR2 <= TVAR1 THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) <= NB'(FALSE) THEN BUMP ; END IF; IF NB'(TRUE ) <= FVAR1 THEN BUMP ; END IF; IF TVAR2 <= NB'(FALSE) THEN BUMP ; END IF; IF TVAR1 <= FVAR2 THEN BUMP ; END IF; IF NB'(TRUE ) <= NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF TVAR1 <= NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) <= TVAR2 THEN NULL ; ELSE BUMP ; END IF; IF TVAR2 <= TVAR1 THEN NULL ; ELSE BUMP ; END IF; IF ERROR_COUNT > 0 THEN FAILED( "ORDERING OF N_BOOLEAN VALUES - FAILURE '<='" ); END IF; ERROR_COUNT := 0 ; IF NB'(FALSE) > NB'(FALSE) THEN BUMP ; END IF; IF FVAR1 > NB'(FALSE) THEN BUMP ; END IF; IF NB'(FALSE) > FVAR2 THEN BUMP ; END IF; IF FVAR2 > FVAR1 THEN BUMP ; END IF; IF NB'(FALSE) > NB'(TRUE ) THEN BUMP ; END IF; IF FVAR1 > NB'(TRUE ) THEN BUMP ; END IF; IF NB'(FALSE) > TVAR2 THEN BUMP ; END IF; IF FVAR2 > TVAR1 THEN BUMP ; END IF; IF NB'(TRUE ) > NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) > FVAR1 THEN NULL ; ELSE BUMP ; END IF; IF TVAR2 > NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF TVAR1 > FVAR2 THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) > NB'(TRUE ) THEN BUMP ; END IF; IF TVAR1 > NB'(TRUE ) THEN BUMP ; END IF; IF NB'(TRUE ) > TVAR2 THEN BUMP ; END IF; IF TVAR2 > TVAR1 THEN BUMP ; END IF; IF ERROR_COUNT > 0 THEN FAILED( "ORDERING OF N_BOOLEAN VALUES - FAILURE '>'" ); END IF; ERROR_COUNT := 0 ; IF NB'(FALSE) >= NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF FVAR1 >= NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF NB'(FALSE) >= FVAR2 THEN NULL ; ELSE BUMP ; END IF; IF FVAR2 >= FVAR1 THEN NULL ; ELSE BUMP ; END IF; IF NB'(FALSE) >= NB'(TRUE ) THEN BUMP ; END IF; IF FVAR1 >= NB'(TRUE ) THEN BUMP ; END IF; IF NB'(FALSE) >= TVAR2 THEN BUMP ; END IF; IF FVAR2 >= TVAR1 THEN BUMP ; END IF; IF NB'(TRUE ) >= NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) >= FVAR1 THEN NULL ; ELSE BUMP ; END IF; IF TVAR2 >= NB'(FALSE) THEN NULL ; ELSE BUMP ; END IF; IF TVAR1 >= FVAR2 THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) >= NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF TVAR1 >= NB'(TRUE ) THEN NULL ; ELSE BUMP ; END IF; IF NB'(TRUE ) >= TVAR2 THEN NULL ; ELSE BUMP ; END IF; IF TVAR2 >= TVAR1 THEN NULL ; ELSE BUMP ; END IF; IF ERROR_COUNT > 0 THEN FAILED( "ORDERING OF N_BOOLEAN VALUES - FAILURE '>='" ); END IF; RESULT ; END C45220D;
pragma License (Unrestricted); with Ada.Text_IO; package Ada.Float_Text_IO is new Text_IO.Float_IO (Float);
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . T A B L E -- -- -- -- S p e c -- -- -- -- Copyright (C) 1998-2020, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides a singleton version of GNAT.Dynamic_Tables -- (g-dyntab.ads). See that package for documentation. This package just -- declares a single instance of GNAT.Dynamic_Tables.Instance, and provides -- wrappers for all the subprograms, passing that single instance. -- Note that these three interfaces should remain synchronized to keep as much -- coherency as possible among these related units: -- -- GNAT.Dynamic_Tables -- GNAT.Table -- Table (the compiler unit) with GNAT.Dynamic_Tables; generic type Table_Component_Type is private; type Table_Index_Type is range <>; Table_Low_Bound : Table_Index_Type := Table_Index_Type'First; Table_Initial : Positive := 8; Table_Increment : Natural := 100; Table_Name : String := ""; -- for debugging printouts pragma Unreferenced (Table_Name); Release_Threshold : Natural := 0; package GNAT.Table is pragma Elaborate_Body; package Tab is new GNAT.Dynamic_Tables (Table_Component_Type, Table_Index_Type, Table_Low_Bound, Table_Initial, Table_Increment, Release_Threshold); subtype Valid_Table_Index_Type is Tab.Valid_Table_Index_Type; subtype Table_Last_Type is Tab.Table_Last_Type; subtype Table_Type is Tab.Table_Type; function "=" (X, Y : Table_Type) return Boolean renames Tab."="; subtype Table_Ptr is Tab.Table_Ptr; The_Instance : Tab.Instance; Table : Table_Ptr renames The_Instance.Table; Locked : Boolean renames The_Instance.Locked; function Is_Empty return Boolean; procedure Init; pragma Inline (Init); procedure Free; pragma Inline (Free); function First return Table_Index_Type; pragma Inline (First); function Last return Table_Last_Type; pragma Inline (Last); procedure Release; pragma Inline (Release); procedure Set_Last (New_Val : Table_Last_Type); pragma Inline (Set_Last); procedure Increment_Last; pragma Inline (Increment_Last); procedure Decrement_Last; pragma Inline (Decrement_Last); procedure Append (New_Val : Table_Component_Type); pragma Inline (Append); procedure Append_All (New_Vals : Table_Type); pragma Inline (Append_All); procedure Set_Item (Index : Valid_Table_Index_Type; Item : Table_Component_Type); pragma Inline (Set_Item); subtype Saved_Table is Tab.Instance; -- Type used for Save/Restore subprograms function Save return Saved_Table; pragma Inline (Save); -- Resets table to empty, but saves old contents of table in returned -- value, for possible later restoration by a call to Restore. procedure Restore (T : in out Saved_Table); pragma Inline (Restore); -- Given a Saved_Table value returned by a prior call to Save, restores -- the table to the state it was in at the time of the Save call. procedure Allocate (Num : Integer := 1); function Allocate (Num : Integer := 1) return Valid_Table_Index_Type; pragma Inline (Allocate); -- Adds Num to Last. The function version also returns the old value of -- Last + 1. Note that this function has the possible side effect of -- reallocating the table. This means that a reference X.Table (X.Allocate) -- is incorrect, since the call to X.Allocate may modify the results of -- calling X.Table. generic with procedure Action (Index : Valid_Table_Index_Type; Item : Table_Component_Type; Quit : in out Boolean) is <>; procedure For_Each; pragma Inline (For_Each); generic with function Lt (Comp1, Comp2 : Table_Component_Type) return Boolean; procedure Sort_Table; pragma Inline (Sort_Table); end GNAT.Table;
with Extraction.Graph_Operations; private package Extraction.Deferred_Constants is procedure Extract_Edges (Node : LAL.Ada_Node'Class; Graph : Graph_Operations.Graph_Context); end Extraction.Deferred_Constants;
package body Pack22_Pkg is package body Bit_Map_Generic is function "xor" (L, R : List) return List is Temp : List; for Temp'address use Temp_buffer'address; begin Temp.Bits := L.Bits xor R.Bits; Temp.Counter.Counter := 0; return Temp; end; end Bit_Map_Generic; end Pack22_Pkg;
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ -- Purpose: -- Represent information about a type and operations to classify it. package Asis.Gela.Classes is type Type_Info is private; function Type_From_Declaration (Tipe : Asis.Declaration; Place : Asis.Element) return Type_Info; -- Return information about a type given by type_declaration. -- Place element is used to provide "point of view", because -- type could be private from one point, but concrete from -- another. -- If Place is null, return last completion in the same enclosing -- declaration function Type_From_Subtype_Mark (Mark : Asis.Expression; Place : Asis.Element) return Type_Info; -- Return information about a type given by subtype_mark function Type_From_Indication (Ind : Asis.Definition; Place : Asis.Element) return Type_Info; -- Return information about a type given by subtype_indication -- Ind should be subtype_indication -- (or access_definition from parameter_and_result_profile) function Type_From_Discrete_Def (Def : Asis.Definition; Place : Asis.Element) return Type_Info; -- Return information about a type given by discrete_definition function Type_Of_Declaration (Decl : Asis.Declaration; Place : Asis.Element) return Type_Info; -- Return information about a type used in object declaration function Type_Of_Name (Name : Asis.Defining_Name; Place : Asis.Element) return Type_Info; -- Return information about a type given by defining_name function Type_Of_Range (Lower, Upper : Asis.Expression) return Type_Info; function Type_Of_Range (Lower, Upper : Type_Info) return Type_Info; procedure Set_Class_Wide (Info : in out Type_Info); -- Turn type into class-wide function Drop_Class (Info : Type_Info) return Type_Info; -- Remove 'Class from Type_Info procedure Set_Access (Info : in out Type_Info; Value : Boolean); -- Turn type into anonymouse access -- Clasification requests function Is_Not_Type (Info : Type_Info) return Boolean; function Is_Declaration (Info : Type_Info) return Boolean; function Is_Definition (Info : Type_Info) return Boolean; function Is_Class_Wide (Info : Type_Info) return Boolean; function Is_Anonymous_Access (Info : Type_Info) return Boolean; function Is_Limited (Info : Type_Info) return Boolean; function Is_Elementary (Info : Type_Info) return Boolean; function Is_Scalar (Info : Type_Info) return Boolean; function Is_Discrete (Info : Type_Info) return Boolean; function Is_Enumeration (Info : Type_Info) return Boolean; function Is_Character (Info : Type_Info) return Boolean; function Is_Boolean (Info : Type_Info) return Boolean; function Is_Signed_Integer (Info : Type_Info) return Boolean; function Is_Modular_Integer (Info : Type_Info) return Boolean; function Is_Float_Point (Info : Type_Info) return Boolean; function Is_Ordinary_Fixed_Point (Info : Type_Info) return Boolean; function Is_Decimal_Fixed_Point (Info : Type_Info) return Boolean; function Is_Constant_Access (Info : Type_Info) return Boolean; function Is_Variable_Access (Info : Type_Info) return Boolean; function Is_Object_Access (Info : Type_Info) return Boolean; function Is_General_Access (Info : Type_Info) return Boolean; function Is_Procedure_Access (Info : Type_Info) return Boolean; function Is_Function_Access (Info : Type_Info) return Boolean; function Is_Subprogram_Access (Info : Type_Info) return Boolean; function Is_String (Info : Type_Info) return Boolean; function Is_Array (Info : Type_Info) return Boolean; function Is_Boolean_Array (Info : Type_Info) return Boolean; function Is_Discrete_Array (Info : Type_Info) return Boolean; function Is_Untagged_Record (Info : Type_Info) return Boolean; function Is_Tagged (Info : Type_Info) return Boolean; function Is_Task (Info : Type_Info) return Boolean; function Is_Protected (Info : Type_Info) return Boolean; function Is_Integer (Info : Type_Info) return Boolean; function Is_Real (Info : Type_Info) return Boolean; function Is_Fixed_Point (Info : Type_Info) return Boolean; function Is_Numeric (Info : Type_Info) return Boolean; function Is_Access (Info : Type_Info) return Boolean; function Is_Composite (Info : Type_Info) return Boolean; function Is_Universal (Info : Type_Info) return Boolean; function Is_Incomplete (Info : Type_Info) return Boolean; function Is_Array (Tipe : Type_Info; Length : Asis.List_Index) return Boolean; function Get_Subtype (Info : Type_Info) return Asis.Declaration; -- Misc functions function Is_Equal (Left, Right : Type_Info) return Boolean; function Is_Equal_Class (Left, Right : Type_Info) return Boolean; function Hash (Info : Type_Info) return Asis.ASIS_Integer; function Is_Covered (Specific : Type_Info; Class_Wide : Type_Info) return Boolean; function Is_Expected_Type (Specific : Type_Info; Expected : Type_Info) return Boolean; function Is_Subtype_Mark (Mark : Asis.Expression) return Boolean; function Is_Type_Declaration (Decl : Asis.Declaration) return Boolean; function Debug_Image (Info : Type_Info) return Wide_String; function Destination_Type (Tipe : Type_Info) return Type_Info; function Get_Array_Element_Type (Tipe : Type_Info) return Type_Info; function Get_Array_Index_Type (Tipe : Type_Info; Index : Asis.List_Index := 1) return Type_Info; function Parent_Type (Tipe : Type_Info) return Type_Info; function Top_Parent_Type (Tipe : Type_Info) return Type_Info; function Function_Result_Type (Tipe : Type_Info) return Type_Info; function Subprogram_Parameters (Tipe : Type_Info) return Asis.Parameter_Specification_List; function Conform_Access_Type (Decl : Asis.Declaration; Tipe : Type_Info) return Boolean; function Destinated_Are_Type_Conformant (Left, Right : Type_Info) return Boolean; -- Left, Right should be Is_Subprogram_Access and Is_Anonymous_Access function Find_Component (Tipe : Type_Info; Name : Asis.Program_Text) return Asis.Declaration; function Get_Declaration (Info : Type_Info) return Asis.Declaration; function Get_Type_View (Info : Type_Info) return Asis.Declaration; function Get_Place (Info : Type_Info) return Asis.Element; function Get_Type_Def (Tipe : Type_Info) return Asis.Definition; function Is_Child_Of (Child, Parent : Type_Info) return Boolean; Not_A_Type : constant Type_Info; private type Class_Kinds is (An_Incomplete, A_Character, A_Boolean, An_Other_Enum, An_Universal_Integer, A_Signed_Integer, A_Modular_Integer, An_Universal_Real, A_Float_Point, An_Universal_Fixed, A_Ordinary_Fixed_Point, A_Decimal_Fixed_Point, A_Constant_Access, A_Variable_Access, A_Pool_Access, A_Procedure_Access, A_Function_Access, A_Universal_Access, A_String, A_Boolean_Array, A_Other_Discrete_Array, An_Other_Array, A_Untagged_Record, A_Tagged, A_Task, A_Protected, A_Private); subtype An_Elementary is Class_Kinds range A_Character .. A_Universal_Access; subtype A_Scalar is Class_Kinds range A_Character .. A_Decimal_Fixed_Point; subtype A_Discrete is Class_Kinds range A_Character .. A_Modular_Integer; subtype An_Enumeration is Class_Kinds range A_Character .. An_Other_Enum; subtype An_Integer is Class_Kinds range An_Universal_Integer .. A_Modular_Integer; subtype A_Real is Class_Kinds range An_Universal_Real .. A_Decimal_Fixed_Point; subtype A_Fixed_Point is Class_Kinds range An_Universal_Fixed .. A_Decimal_Fixed_Point; subtype A_Numeric is Class_Kinds range An_Universal_Integer .. A_Decimal_Fixed_Point; subtype An_Access is Class_Kinds range A_Constant_Access .. A_Universal_Access; subtype A_Subprogram_Access is Class_Kinds range A_Procedure_Access .. A_Function_Access; subtype An_Object_Access is Class_Kinds range A_Constant_Access .. A_Pool_Access; subtype A_General_Access is Class_Kinds range A_Constant_Access .. A_Variable_Access; subtype A_Composite is Class_Kinds range A_String .. A_Private; subtype An_Array is Class_Kinds range A_String .. An_Other_Array; subtype A_Discrete_Array is Class_Kinds range A_String .. A_Other_Discrete_Array; type Info_Kinds is (Declaration_Info, -- Ordinary type declaration Defining_Name_Info, -- Anonymous type other then in return Return_Info); -- Anonymous type in function return type Type_Info (Kind : Info_Kinds := Declaration_Info) is record Class_Kind : Class_Kinds; Is_Class_Wide : Boolean := False; Is_Access : Boolean := False; Is_Limited : Boolean := False; Place : Asis.Element; -- type viewed from Place case Kind is when Declaration_Info => Base_Type : Asis.Declaration; Type_View : Asis.Declaration; Subtipe : Asis.Declaration; when Defining_Name_Info => Object_Name : Asis.Defining_Name; -- name of object of anon type when Return_Info => Access_Definition : Asis.Definition; end case; end record; Not_A_Type : constant Type_Info := (Declaration_Info, Class_Kinds'First, False, False, False, others => Asis.Nil_Element); end Asis.Gela.Classes; ------------------------------------------------------------------------------ -- Copyright (c) 2006-2013, Maxim Reznik -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of the Maxim Reznik, IE nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------
-- This spec has been automatically generated from STM32F429x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with HAL; with System; package STM32_SVD.WWDG is pragma Preelaborate; --------------- -- Registers -- --------------- ----------------- -- CR_Register -- ----------------- subtype CR_T_Field is HAL.UInt7; -- Control register type CR_Register is record -- 7-bit counter (MSB to LSB) T : CR_T_Field := 16#7F#; -- Activation bit WDGA : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record T at 0 range 0 .. 6; WDGA at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------ -- CFR_Register -- ------------------ subtype CFR_W_Field is HAL.UInt7; --------------- -- CFR.WDGTB -- --------------- -- CFR_WDGTB array type CFR_WDGTB_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for CFR_WDGTB type CFR_WDGTB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- WDGTB as a value Val : HAL.UInt2; when True => -- WDGTB as an array Arr : CFR_WDGTB_Field_Array; end case; end record with Unchecked_Union, Size => 2; for CFR_WDGTB_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Configuration register type CFR_Register is record -- 7-bit window value W : CFR_W_Field := 16#7F#; -- Timer base WDGTB : CFR_WDGTB_Field := (As_Array => False, Val => 16#0#); -- Early wakeup interrupt EWI : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CFR_Register use record W at 0 range 0 .. 6; WDGTB at 0 range 7 .. 8; EWI at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; ----------------- -- SR_Register -- ----------------- -- Status register type SR_Register is record -- Early wakeup interrupt flag EWIF : Boolean := False; -- unspecified Reserved_1_31 : HAL.UInt31 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record EWIF at 0 range 0 .. 0; Reserved_1_31 at 0 range 1 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Window watchdog type WWDG_Peripheral is record -- Control register CR : CR_Register; -- Configuration register CFR : CFR_Register; -- Status register SR : SR_Register; end record with Volatile; for WWDG_Peripheral use record CR at 0 range 0 .. 31; CFR at 4 range 0 .. 31; SR at 8 range 0 .. 31; end record; -- Window watchdog WWDG_Periph : aliased WWDG_Peripheral with Import, Address => WWDG_Base; end STM32_SVD.WWDG;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . B I T _ O P S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1996-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; with System; use System; with System.Unsigned_Types; use System.Unsigned_Types; with Ada.Exceptions; use Ada.Exceptions; with Ada.Unchecked_Conversion; package body System.Bit_Ops is subtype Bits_Array is System.Unsigned_Types.Packed_Bytes1 (Positive); -- Dummy array type used to interpret the address values. We use the -- unaligned version always, since this will handle both the aligned and -- unaligned cases, and we always do these operations by bytes anyway. -- Note: we use a ones origin array here so that the computations of the -- length in bytes work correctly (give a non-negative value) for the -- case of zero length bit strings). Note that we never allocate any -- objects of this type (we can't because they would be absurdly big). type Bits is access Bits_Array; -- This is the actual type into which address values are converted function To_Bits is new Ada.Unchecked_Conversion (Address, Bits); LE : constant := Standard'Default_Bit_Order; -- Static constant set to 0 for big-endian, 1 for little-endian -- The following is an array of masks used to mask the final byte, either -- at the high end (big-endian case) or the low end (little-endian case). Masks : constant array (1 .. 7) of Packed_Byte := ( (1 - LE) * 2#1000_0000# + LE * 2#0000_0001#, (1 - LE) * 2#1100_0000# + LE * 2#0000_0011#, (1 - LE) * 2#1110_0000# + LE * 2#0000_0111#, (1 - LE) * 2#1111_0000# + LE * 2#0000_1111#, (1 - LE) * 2#1111_1000# + LE * 2#0001_1111#, (1 - LE) * 2#1111_1100# + LE * 2#0011_1111#, (1 - LE) * 2#1111_1110# + LE * 2#0111_1111#); ----------------------- -- Local Subprograms -- ----------------------- procedure Raise_Error; pragma No_Return (Raise_Error); -- Raise Constraint_Error, complaining about unequal lengths ------------- -- Bit_And -- ------------- procedure Bit_And (Left : Address; Llen : Natural; Right : Address; Rlen : Natural; Result : Address) is LeftB : constant Bits := To_Bits (Left); RightB : constant Bits := To_Bits (Right); ResultB : constant Bits := To_Bits (Result); begin if Llen /= Rlen then Raise_Error; end if; for J in 1 .. (Rlen + 7) / 8 loop ResultB (J) := LeftB (J) and RightB (J); end loop; end Bit_And; ------------ -- Bit_Eq -- ------------ function Bit_Eq (Left : Address; Llen : Natural; Right : Address; Rlen : Natural) return Boolean is LeftB : constant Bits := To_Bits (Left); RightB : constant Bits := To_Bits (Right); begin if Llen /= Rlen then return False; else declare BLen : constant Natural := Llen / 8; Bitc : constant Natural := Llen mod 8; begin if LeftB (1 .. BLen) /= RightB (1 .. BLen) then return False; elsif Bitc /= 0 then return ((LeftB (BLen + 1) xor RightB (BLen + 1)) and Masks (Bitc)) = 0; else -- Bitc = 0 return True; end if; end; end if; end Bit_Eq; ------------- -- Bit_Not -- ------------- procedure Bit_Not (Opnd : System.Address; Len : Natural; Result : System.Address) is OpndB : constant Bits := To_Bits (Opnd); ResultB : constant Bits := To_Bits (Result); begin for J in 1 .. (Len + 7) / 8 loop ResultB (J) := not OpndB (J); end loop; end Bit_Not; ------------ -- Bit_Or -- ------------ procedure Bit_Or (Left : Address; Llen : Natural; Right : Address; Rlen : Natural; Result : Address) is LeftB : constant Bits := To_Bits (Left); RightB : constant Bits := To_Bits (Right); ResultB : constant Bits := To_Bits (Result); begin if Llen /= Rlen then Raise_Error; end if; for J in 1 .. (Rlen + 7) / 8 loop ResultB (J) := LeftB (J) or RightB (J); end loop; end Bit_Or; ------------- -- Bit_Xor -- ------------- procedure Bit_Xor (Left : Address; Llen : Natural; Right : Address; Rlen : Natural; Result : Address) is LeftB : constant Bits := To_Bits (Left); RightB : constant Bits := To_Bits (Right); ResultB : constant Bits := To_Bits (Result); begin if Llen /= Rlen then Raise_Error; end if; for J in 1 .. (Rlen + 7) / 8 loop ResultB (J) := LeftB (J) xor RightB (J); end loop; end Bit_Xor; ----------------- -- Raise_Error -- ----------------- procedure Raise_Error is begin Raise_Exception (Constraint_Error'Identity, "operand lengths are unequal"); end Raise_Error; end System.Bit_Ops;
package body Plunderer is task body PlundererTask is targetIndex: Natural; target: pNodeObj; n: Natural := nodes'Length; exitTask: Boolean := False; begin loop select accept Stop do exitTask := True; end Stop; else SleepForSomeTime(maxSleep, intervals); -- pick a node targetIndex := RAD.Next(n); target := nodes(targetIndex); -- setup a trap target.all.nodeTask.all.SetupTrap; end select; if exitTask then exit; end if; end loop; end PlundererTask; end Plunderer;
with Ada.Directories; with Ada.Sequential_IO; with Ada.Text_IO; with GNAT.Current_Exception; with Emulator_8080.Processor; with Emulator_8080.Disassembler; with Emulator_8080.Vram_Sender; procedure Emulator_Main is package Rom_IO is new Ada.Sequential_IO(Element_Type => Emulator_8080.Byte_Type); Rom_Directory_Path : constant String := Ada.Directories.Current_Directory & "/rom/"; Rom_File_Size : constant Natural := Natural(Ada.Directories.Size(Rom_Directory_Path & "invaders.h")) + Natural(Ada.Directories.Size(Rom_Directory_Path & "invaders.g")) + Natural(Ada.Directories.Size(Rom_Directory_Path & "invaders.f")) + Natural(Ada.Directories.Size(Rom_Directory_Path & "invaders.e")); Rom_File : Rom_IO.File_Type; Rom_File_Content : Emulator_8080.Byte_Array_Type( 0 .. Rom_File_Size); Rom_Byte_Index : Natural := 0; Processor : Emulator_8080.Processor.Processor_Type; procedure Read_Rom_File(Rom_File_Path : in String) is Current_Rom_Byte : Emulator_8080.Byte_Type := 0; begin Rom_IO.Open(File => Rom_File, Mode => Rom_IO.In_File, Name => Rom_File_Path); while not Rom_IO.End_Of_File(Rom_File) loop Rom_IO.Read(File => Rom_File, Item => Current_Rom_Byte); Rom_File_Content(Rom_Byte_Index) := Current_Rom_Byte; Rom_Byte_Index := Rom_Byte_Index + 1; end loop; Rom_IO.Close(Rom_File); end Read_Rom_File; procedure Write_Invaders_Rom(Rom_File_Path : in String) is begin Rom_IO.Open(File => Rom_File, Mode => Rom_IO.Out_File, Name => Rom_File_Path); for I in Rom_File_Content'Range loop Rom_IO.Write(File => Rom_File, Item => Rom_File_Content(I)); end loop; Rom_IO.Close(Rom_File); end Write_Invaders_Rom; begin Ada.Text_IO.Put_Line("Starting emulator_8080."); Ada.Text_IO.Put_Line("Reading Rom..."); Read_Rom_File(Rom_Directory_Path & "invaders.h"); Read_Rom_File(Rom_Directory_Path & "invaders.g"); Read_Rom_File(Rom_Directory_Path & "invaders.f"); Read_Rom_File(Rom_Directory_Path & "invaders.e"); if not Ada.Directories.Exists(Rom_Directory_Path & "invaders.rom") then Write_Invaders_Rom(Rom_Directory_Path & "invaders.rom"); end if; Ada.Text_IO.Put_Line("File read successfully."); Ada.Text_IO.Put_Line("--> File size: " & Rom_File_Size'Img); Ada.Text_IO.Put_Line("--> last Index: " & Rom_Byte_Index'Img); Ada.Text_IO.Put_Line("Initializing CPU"); Emulator_8080.Vram_Sender.Initialize(Port => 4242, Ip_Address => "192.168.178.32"); Processor := Emulator_8080.Processor.Initialize(Rom_File_Content); Ada.Text_IO.Put_Line("Running emulation..."); Emulator_8080.Disassembler.Read_Rom(Render_Step_Callback => Emulator_8080.Vram_Sender.Send_Vram'Access, Execution_Mode => Emulator_8080.Disassembler.Execute_And_Print, Processor => Processor); Emulator_8080.Vram_Sender.Close; exception when others => Ada.Text_IO.Put_Line("EXCEPTION CAUGHT IN MAIN"); Ada.Text_IO.Put_Line(GNAT.Current_Exception.Exception_Information); end Emulator_Main;
------------------------------------------------------------------------------ -- -- -- WAVEFILES -- -- -- -- Quick Wave Data I/O Check -- -- -- -- The MIT License (MIT) -- -- -- -- Copyright (c) 2020 Gustavo A. Hoffmann -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining -- -- a copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, sublicense, and / or sell copies of the Software, and to -- -- permit persons to whom the Software is furnished to do so, subject to -- -- the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be -- -- included in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -- -- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -- -- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -- -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- ------------------------------------------------------------------------------ with Ada.Command_Line; use Ada.Command_Line; with Quick_Wav_Data_Checks; use Quick_Wav_Data_Checks; function Quick_Wav_Data_Check return Integer is Success : Boolean; begin if Argument_Count >= 1 then Success := Wav_IO_OK (Argument (1)); else Success := Wav_IO_OK ("quick_"); end if; if Success then return 0; else return 1; end if; end Quick_Wav_Data_Check;
with GESTE; with GESTE.Grid; pragma Style_Checks (Off); package Game_Assets.inside is -- inside Width : constant := 20; Height : constant := 15; Tile_Width : constant := 16; Tile_Height : constant := 16; -- ground package ground is Width : constant := 20; Height : constant := 20; Data : aliased GESTE.Grid.Grid_Data := (( 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3), ( 4, 5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 12, 13, 14), ( 11, 5, 6, 7, 8, 15, 16, 11, 17, 18, 19, 20, 21, 22, 23), ( 24, 17, 18, 19, 20, 25, 26, 24, 27, 28, 29, 30, 31, 32, 14), ( 11, 27, 28, 29, 30, 33, 34, 24, 35, 36, 37, 38, 39, 40, 23), ( 24, 35, 36, 37, 38, 9, 10, 41, 42, 43, 44, 9, 10, 41, 14), ( 11, 5, 6, 7, 8, 15, 16, 45, 46, 47, 48, 15, 16, 45, 23), ( 24, 17, 18, 19, 20, 25, 26, 49, 50, 51, 52, 53, 26, 49, 23), ( 11, 27, 28, 29, 30, 33, 34, 54, 55, 56, 57, 58, 34, 54, 59), ( 24, 35, 36, 37, 38, 9, 10, 41, 60, 61, 62, 63, 10, 41, 42), ( 11, 5, 6, 7, 8, 15, 16, 45, 55, 56, 57, 58, 16, 45, 46), ( 24, 17, 18, 19, 20, 25, 26, 49, 64, 65, 66, 67, 26, 49, 68), ( 11, 27, 28, 29, 30, 33, 34, 54, 69, 70, 71, 33, 34, 54, 14), ( 24, 35, 36, 37, 38, 9, 10, 41, 42, 43, 44, 9, 10, 41, 14), ( 11, 5, 6, 7, 8, 72, 73, 74, 74, 75, 48, 15, 16, 45, 14), ( 24, 17, 18, 19, 20, 76, 77, 78, 78, 79, 80, 25, 26, 49, 14), ( 11, 27, 28, 29, 30, 76, 77, 77, 78, 79, 71, 33, 34, 54, 14), ( 24, 35, 36, 37, 38, 81, 82, 82, 83, 84, 44, 9, 85, 86, 14), ( 87, 35, 36, 37, 38, 88, 89, 89, 90, 91, 48, 15, 92, 93, 23), ( 94, 95, 95, 95, 96, 97, 96, 97, 96, 97, 96, 97, 96, 97, 98)) ; end ground; -- walls package walls is Width : constant := 20; Height : constant := 20; Data : aliased GESTE.Grid.Grid_Data := (( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 99, 100, 101, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 103, 104, 105, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 107, 108, 109, 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 112, 113, 114, 115, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 117, 118, 119, 120, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 122, 123, 124, 125, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 132, 133, 134, 135, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 137, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) ; end walls; -- objects package objects is Width : constant := 20; Height : constant := 20; Data : aliased GESTE.Grid.Grid_Data := (( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 24, 0, 0, 0, 141, 142, 143, 0, 0, 144, 145, 146, 147, 0, 0), ( 0, 0, 0, 0, 148, 149, 150, 0, 0, 151, 152, 153, 154, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 155, 156, 157, 158, 159, 160, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 161, 162, 163, 164, 165, 166, 0, 0), ( 0, 167, 168, 169, 170, 171, 172, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 173, 174, 175, 176, 177, 178, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 181, 0, 0, 0, 0), ( 0, 0, 0, 182, 183, 184, 0, 0, 185, 186, 187, 0, 0, 0, 0), ( 0, 0, 0, 188, 189, 190, 0, 0, 191, 192, 193, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 194, 195, 196, 0, 0, 0, 0), ( 0, 167, 168, 0, 0, 0, 0, 0, 197, 198, 199, 0, 0, 0, 0), ( 0, 173, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 200, 201, 202, 203, 204, 205, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 206, 207, 208, 209, 210, 211, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 212, 213, 214, 215, 216, 217, 0, 0, 0, 0, 0, 0), ( 24, 0, 0, 218, 219, 220, 221, 222, 223, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) ; end objects; -- objects2 package objects2 is Width : constant := 20; Height : constant := 20; Data : aliased GESTE.Grid.Grid_Data := (( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 224, 225, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 226, 227, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 228, 229, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 230, 231, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 0, 0, 0), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) ; end objects2; -- collisions package collisions is Width : constant := 20; Height : constant := 20; Data : aliased GESTE.Grid.Grid_Data := (( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 234, 234, 234), ( 0, 0, 0, 0, 0, 234, 234, 0, 0, 0, 0, 234, 0, 0, 234), ( 0, 0, 0, 0, 234, 234, 234, 234, 0, 0, 0, 234, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 234, 0, 0, 0, 234, 235, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 234, 234, 234, 234, 234, 235, 0, 234), ( 0, 0, 0, 0, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 0, 236, 236, 237, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 238, 234, 234, 235, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 238, 234, 234, 235, 0, 0, 0, 0), ( 0, 0, 0, 0, 234, 235, 0, 0, 234, 234, 235, 0, 0, 0, 0), ( 0, 0, 0, 0, 234, 0, 0, 0, 239, 239, 240, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 236, 236, 236, 236, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 234, 234, 234, 234, 234, 0, 0, 0, 0, 0, 234), ( 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 241, 234, 234), ( 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 242, 234, 234), ( 0, 0, 0, 0, 0, 0, 0, 0, 234, 234, 234, 234, 234, 234, 234)) ; end collisions; package gates is Objects : Object_Array := ( 0 => ( Kind => RECTANGLE_OBJ, Id => 1, Name => new String'("To_Outside"), X => 1.44000E+02, Y => 2.24000E+02, Width => 3.20000E+01, Height => 1.60000E+01, Tile_Id => 0, Str => null ), 1 => ( Kind => RECTANGLE_OBJ, Id => 2, Name => new String'("To_Cave"), X => 2.76000E+02, Y => 1.84000E+02, Width => 2.80000E+01, Height => 3.60000E+01, Tile_Id => 0, Str => null ), 2 => ( Kind => POINT_OBJ, Id => 4, Name => new String'("From_Cave"), X => 2.72000E+02, Y => 1.68000E+02, Width => 0.00000E+00, Height => 0.00000E+00, Tile_Id => 0, Str => null ), 3 => ( Kind => POINT_OBJ, Id => 5, Name => new String'("From_Outside"), X => 1.60000E+02, Y => 2.12000E+02, Width => 0.00000E+00, Height => 0.00000E+00, Tile_Id => 0, Str => null ) ); To_Outside : aliased constant Object := ( Kind => RECTANGLE_OBJ, Id => 1, Name => new String'("To_Outside"), X => 1.44000E+02, Y => 2.24000E+02, Width => 3.20000E+01, Height => 1.60000E+01, Tile_Id => 0, Str => null ); To_Cave : aliased constant Object := ( Kind => RECTANGLE_OBJ, Id => 2, Name => new String'("To_Cave"), X => 2.76000E+02, Y => 1.84000E+02, Width => 2.80000E+01, Height => 3.60000E+01, Tile_Id => 0, Str => null ); From_Cave : aliased constant Object := ( Kind => POINT_OBJ, Id => 4, Name => new String'("From_Cave"), X => 2.72000E+02, Y => 1.68000E+02, Width => 0.00000E+00, Height => 0.00000E+00, Tile_Id => 0, Str => null ); From_Outside : aliased constant Object := ( Kind => POINT_OBJ, Id => 5, Name => new String'("From_Outside"), X => 1.60000E+02, Y => 2.12000E+02, Width => 0.00000E+00, Height => 0.00000E+00, Tile_Id => 0, Str => null ); end gates; end Game_Assets.inside;
procedure Enumeration is type MyColor is (Blue, Red, Green, Yellow); for MyColor use (Blue => 11, Red => 22, Green => 33, Yellow => 44); type YourColor is (Blue, White, Red); for YourColor use (0, 1, 2); begin null; end Enumeration;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses2.trace_set -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2008,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 <aldomel@ix.netcom.com> 2000 -- Version Control -- $Revision: 1.5 $ -- $Date: 2011/03/23 00:40:33 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace; with Terminal_Interface.Curses.Menus; use Terminal_Interface.Curses.Menus; with Ada.Strings.Bounded; -- interactively set the trace level procedure ncurses2.trace_set is function menu_virtualize (c : Key_Code) return Key_Code; function subset (super, sub : Trace_Attribute_Set) return Boolean; function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set; function trace_num (tlevel : Trace_Attribute_Set) return String; function tracetrace (tlevel : Trace_Attribute_Set) return String; function run_trace_menu (m : Menu; count : Integer) return Boolean; function menu_virtualize (c : Key_Code) return Key_Code is begin case c is when Character'Pos (newl) | Key_Exit => return Menu_Request_Code'Last + 1; -- MAX_COMMAND? TODO when Character'Pos ('u') => return M_ScrollUp_Line; when Character'Pos ('d') => return M_ScrollDown_Line; when Character'Pos ('b') | Key_Next_Page => return M_ScrollUp_Page; when Character'Pos ('f') | Key_Previous_Page => return M_ScrollDown_Page; when Character'Pos ('n') | Key_Cursor_Down => return M_Next_Item; when Character'Pos ('p') | Key_Cursor_Up => return M_Previous_Item; when Character'Pos (' ') => return M_Toggle_Item; when Key_Mouse => return c; when others => Beep; return c; end case; end menu_virtualize; type string_a is access String; type tbl_entry is record name : string_a; mask : Trace_Attribute_Set; end record; t_tbl : constant array (Positive range <>) of tbl_entry := ( (new String'("Disable"), Trace_Disable), (new String'("Times"), Trace_Attribute_Set'(Times => True, others => False)), (new String'("Tputs"), Trace_Attribute_Set'(Tputs => True, others => False)), (new String'("Update"), Trace_Attribute_Set'(Update => True, others => False)), (new String'("Cursor_Move"), Trace_Attribute_Set'(Cursor_Move => True, others => False)), (new String'("Character_Output"), Trace_Attribute_Set'(Character_Output => True, others => False)), (new String'("Ordinary"), Trace_Ordinary), (new String'("Calls"), Trace_Attribute_Set'(Calls => True, others => False)), (new String'("Virtual_Puts"), Trace_Attribute_Set'(Virtual_Puts => True, others => False)), (new String'("Input_Events"), Trace_Attribute_Set'(Input_Events => True, others => False)), (new String'("TTY_State"), Trace_Attribute_Set'(TTY_State => True, others => False)), (new String'("Internal_Calls"), Trace_Attribute_Set'(Internal_Calls => True, others => False)), (new String'("Character_Calls"), Trace_Attribute_Set'(Character_Calls => True, others => False)), (new String'("Termcap_TermInfo"), Trace_Attribute_Set'(Termcap_TermInfo => True, others => False)), (new String'("Maximium"), Trace_Maximum) ); package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (300); function subset (super, sub : Trace_Attribute_Set) return Boolean is begin if (super.Times or not sub.Times) and (super.Tputs or not sub.Tputs) and (super.Update or not sub.Update) and (super.Cursor_Move or not sub.Cursor_Move) and (super.Character_Output or not sub.Character_Output) and (super.Calls or not sub.Calls) and (super.Virtual_Puts or not sub.Virtual_Puts) and (super.Input_Events or not sub.Input_Events) and (super.TTY_State or not sub.TTY_State) and (super.Internal_Calls or not sub.Internal_Calls) and (super.Character_Calls or not sub.Character_Calls) and (super.Termcap_TermInfo or not sub.Termcap_TermInfo) and True then return True; else return False; end if; end subset; function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set is retval : Trace_Attribute_Set := Trace_Disable; begin retval.Times := (a.Times or b.Times); retval.Tputs := (a.Tputs or b.Tputs); retval.Update := (a.Update or b.Update); retval.Cursor_Move := (a.Cursor_Move or b.Cursor_Move); retval.Character_Output := (a.Character_Output or b.Character_Output); retval.Calls := (a.Calls or b.Calls); retval.Virtual_Puts := (a.Virtual_Puts or b.Virtual_Puts); retval.Input_Events := (a.Input_Events or b.Input_Events); retval.TTY_State := (a.TTY_State or b.TTY_State); retval.Internal_Calls := (a.Internal_Calls or b.Internal_Calls); retval.Character_Calls := (a.Character_Calls or b.Character_Calls); retval.Termcap_TermInfo := (a.Termcap_TermInfo or b.Termcap_TermInfo); return retval; end trace_or; -- Print the hexadecimal value of the mask so -- users can set it from the command line. function trace_num (tlevel : Trace_Attribute_Set) return String is result : Integer := 0; m : Integer := 1; begin if tlevel.Times then result := result + m; end if; m := m * 2; if tlevel.Tputs then result := result + m; end if; m := m * 2; if tlevel.Update then result := result + m; end if; m := m * 2; if tlevel.Cursor_Move then result := result + m; end if; m := m * 2; if tlevel.Character_Output then result := result + m; end if; m := m * 2; if tlevel.Calls then result := result + m; end if; m := m * 2; if tlevel.Virtual_Puts then result := result + m; end if; m := m * 2; if tlevel.Input_Events then result := result + m; end if; m := m * 2; if tlevel.TTY_State then result := result + m; end if; m := m * 2; if tlevel.Internal_Calls then result := result + m; end if; m := m * 2; if tlevel.Character_Calls then result := result + m; end if; m := m * 2; if tlevel.Termcap_TermInfo then result := result + m; end if; m := m * 2; return result'Img; end trace_num; function tracetrace (tlevel : Trace_Attribute_Set) return String is use BS; buf : Bounded_String := To_Bounded_String (""); begin -- The C version prints the hexadecimal value of the mask, we -- won't do that here because this is Ada. if tlevel = Trace_Disable then Append (buf, "Trace_Disable"); else if subset (tlevel, Trace_Attribute_Set'(Times => True, others => False)) then Append (buf, "Times"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Tputs => True, others => False)) then Append (buf, "Tputs"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Update => True, others => False)) then Append (buf, "Update"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Cursor_Move => True, others => False)) then Append (buf, "Cursor_Move"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Character_Output => True, others => False)) then Append (buf, "Character_Output"); Append (buf, ", "); end if; if subset (tlevel, Trace_Ordinary) then Append (buf, "Ordinary"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Calls => True, others => False)) then Append (buf, "Calls"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Virtual_Puts => True, others => False)) then Append (buf, "Virtual_Puts"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Input_Events => True, others => False)) then Append (buf, "Input_Events"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(TTY_State => True, others => False)) then Append (buf, "TTY_State"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Internal_Calls => True, others => False)) then Append (buf, "Internal_Calls"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Character_Calls => True, others => False)) then Append (buf, "Character_Calls"); Append (buf, ", "); end if; if subset (tlevel, Trace_Attribute_Set'(Termcap_TermInfo => True, others => False)) then Append (buf, "Termcap_TermInfo"); Append (buf, ", "); end if; if subset (tlevel, Trace_Maximum) then Append (buf, "Maximium"); Append (buf, ", "); end if; end if; if To_String (buf) (Length (buf) - 1) = ',' then Delete (buf, Length (buf) - 1, Length (buf)); end if; return To_String (buf); end tracetrace; function run_trace_menu (m : Menu; count : Integer) return Boolean is i, p : Item; changed : Boolean; c, v : Key_Code; begin loop changed := (count /= 0); c := Getchar (Get_Window (m)); v := menu_virtualize (c); case Driver (m, v) is when Unknown_Request => return False; when others => i := Current (m); if i = Menus.Items (m, 1) then -- the first item for n in t_tbl'First + 1 .. t_tbl'Last loop if Value (i) then Set_Value (i, False); changed := True; end if; end loop; else for n in t_tbl'First + 1 .. t_tbl'Last loop p := Menus.Items (m, n); if Value (p) then Set_Value (Menus.Items (m, 1), False); changed := True; exit; end if; end loop; end if; if not changed then return True; end if; end case; end loop; end run_trace_menu; nc_tracing, mask : Trace_Attribute_Set; pragma Import (C, nc_tracing, "_nc_tracing"); items_a : constant Item_Array_Access := new Item_Array (t_tbl'First .. t_tbl'Last + 1); mrows : Line_Count; mcols : Column_Count; menuwin : Window; menu_y : constant Line_Position := 8; menu_x : constant Column_Position := 8; ip : Item; m : Menu; count : Integer; newtrace : Trace_Attribute_Set; begin Add (Line => 0, Column => 0, Str => "Interactively set trace level:"); Add (Line => 2, Column => 0, Str => " Press space bar to toggle a selection."); Add (Line => 3, Column => 0, Str => " Use up and down arrow to move the select bar."); Add (Line => 4, Column => 0, Str => " Press return to set the trace level."); Add (Line => 6, Column => 0, Str => "(Current trace level is "); Add (Str => tracetrace (nc_tracing) & " numerically: " & trace_num (nc_tracing)); Add (Ch => ')'); Refresh; for n in t_tbl'Range loop items_a.all (n) := New_Item (t_tbl (n).name.all); end loop; items_a.all (t_tbl'Last + 1) := Null_Item; m := New_Menu (items_a); Set_Format (m, 16, 2); Scale (m, mrows, mcols); Switch_Options (m, (One_Valued => True, others => False), On => False); menuwin := New_Window (mrows + 2, mcols + 2, menu_y, menu_x); Set_Window (m, menuwin); Set_KeyPad_Mode (menuwin, SwitchOn => True); Box (menuwin); Set_Sub_Window (m, Derived_Window (menuwin, mrows, mcols, 1, 1)); Post (m); for n in t_tbl'Range loop ip := Items (m, n); mask := t_tbl (n).mask; if mask = Trace_Disable then Set_Value (ip, nc_tracing = Trace_Disable); elsif subset (sub => mask, super => nc_tracing) then Set_Value (ip, True); end if; end loop; count := 1; while run_trace_menu (m, count) loop count := count + 1; end loop; newtrace := Trace_Disable; for n in t_tbl'Range loop ip := Items (m, n); if Value (ip) then mask := t_tbl (n).mask; newtrace := trace_or (newtrace, mask); end if; end loop; Trace_On (newtrace); Trace_Put ("trace level interactively set to " & tracetrace (nc_tracing)); Move_Cursor (Line => Lines - 4, Column => 0); Add (Str => "Trace level is "); Add (Str => tracetrace (nc_tracing)); Add (Ch => newl); Pause; -- was just Add(); Getchar Post (m, False); -- menuwin has subwindows I think, which makes an error. declare begin Delete (menuwin); exception when Curses_Exception => null; end; -- free_menu(m); -- free_item() end ncurses2.trace_set;
with AUnit; use AUnit; with AUnit.Run; with AUnit.Reporter.Text; with GNAT.OS_Lib; with Tests; with Tests.Device.HID; with Tests.Utils; procedure Run_Tests is function Runner is new AUnit.Run.Test_Runner_With_Status (Tests.Get_Suite); Reporter : AUnit.Reporter.Text.Text_Reporter; begin Reporter.Set_Use_ANSI_Colors (True); if Runner (Reporter, (Global_Timer => True, Test_Case_Timer => True, Report_Successes => True, others => <>)) /= AUnit.Success then GNAT.OS_Lib.OS_Exit (1); end if; end Run_Tests;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.UMLDI.UML_Keyword_Labels.Collections is pragma Preelaborate; package UMLDI_UML_Keyword_Label_Collections is new AMF.Generic_Collections (UMLDI_UML_Keyword_Label, UMLDI_UML_Keyword_Label_Access); type Set_Of_UMLDI_UML_Keyword_Label is new UMLDI_UML_Keyword_Label_Collections.Set with null record; Empty_Set_Of_UMLDI_UML_Keyword_Label : constant Set_Of_UMLDI_UML_Keyword_Label; type Ordered_Set_Of_UMLDI_UML_Keyword_Label is new UMLDI_UML_Keyword_Label_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UMLDI_UML_Keyword_Label : constant Ordered_Set_Of_UMLDI_UML_Keyword_Label; type Bag_Of_UMLDI_UML_Keyword_Label is new UMLDI_UML_Keyword_Label_Collections.Bag with null record; Empty_Bag_Of_UMLDI_UML_Keyword_Label : constant Bag_Of_UMLDI_UML_Keyword_Label; type Sequence_Of_UMLDI_UML_Keyword_Label is new UMLDI_UML_Keyword_Label_Collections.Sequence with null record; Empty_Sequence_Of_UMLDI_UML_Keyword_Label : constant Sequence_Of_UMLDI_UML_Keyword_Label; private Empty_Set_Of_UMLDI_UML_Keyword_Label : constant Set_Of_UMLDI_UML_Keyword_Label := (UMLDI_UML_Keyword_Label_Collections.Set with null record); Empty_Ordered_Set_Of_UMLDI_UML_Keyword_Label : constant Ordered_Set_Of_UMLDI_UML_Keyword_Label := (UMLDI_UML_Keyword_Label_Collections.Ordered_Set with null record); Empty_Bag_Of_UMLDI_UML_Keyword_Label : constant Bag_Of_UMLDI_UML_Keyword_Label := (UMLDI_UML_Keyword_Label_Collections.Bag with null record); Empty_Sequence_Of_UMLDI_UML_Keyword_Label : constant Sequence_Of_UMLDI_UML_Keyword_Label := (UMLDI_UML_Keyword_Label_Collections.Sequence with null record); end AMF.UMLDI.UML_Keyword_Labels.Collections;
with Shell.Directory_Iteration, Ada.Directories, Ada.Text_IO; procedure Test_Iterate_Directory is use Ada.Text_IO; begin Put_Line ("Begin 'Iterate_Directory' test."); New_Line (2); declare use Shell.Directory_Iteration, Ada .Directories; begin for Each of To_Directory ("..", Recurse => True) loop Put_Line (Full_Name (Each)); -- Display the full name of each file. end loop; end; New_Line (2); Put_Line ("End 'Iterate_Directory' test."); end Test_Iterate_Directory;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T R A C E S . S E N D -- -- -- -- B o d y -- -- -- -- Copyright (C) 2001-2016, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This version is for all targets, provided that System.IO.Put_Line is -- functional. It prints debug information to Standard Output with System.IO; use System.IO; with System.Regpat; use System.Regpat; ---------------- -- Send_Trace -- ---------------- -- Prints debug information both in a human readable form -- and in the form they are sent from upper layers. separate (System.Traces.Format) procedure Send_Trace (Id : Trace_T; Info : String) is type Param_Type is (Name_Param, Caller_Param, Entry_Param, Timeout_Param, Acceptor_Param, Parent_Param, Number_Param); -- Type of parameter found in the message Info_Trace : String_Trace := Format_Trace (Info); function Get_Param (Input : String_Trace; Param : Param_Type; How_Many : Integer) return String; -- Extract a parameter from the given input string --------------- -- Get_Param -- --------------- function Get_Param (Input : String_Trace; Param : Param_Type; How_Many : Integer) return String is pragma Unreferenced (How_Many); Matches : Match_Array (1 .. 2); begin -- We need comments here ??? case Param is when Name_Param => Match ("/N:([\w]+)", Input, Matches); when Caller_Param => Match ("/C:([\w]+)", Input, Matches); when Entry_Param => Match ("/E:([\s]*) +([0-9 ,]+)", Input, Matches); when Timeout_Param => Match ("/T:([\s]*) +([0-9]+.[0-9]+)", Input, Matches); when Acceptor_Param => Match ("/A:([\w]+)", Input, Matches); when Parent_Param => Match ("/P:([\w]+)", Input, Matches); when Number_Param => Match ("/#:([\s]*) +([0-9]+)", Input, Matches); end case; if Matches (1).First < Input'First then return ""; end if; case Param is when Entry_Param | Number_Param | Timeout_Param => return Input (Matches (2).First .. Matches (2).Last); when others => return Input (Matches (1).First .. Matches (1).Last); end case; end Get_Param; -- Start of processing for Send_Trace begin New_Line; Put_Line ("- Trace Debug Info ----------------"); Put ("Caught event Id : "); case Id is when M_Accept_Complete => Put ("M_Accept_Complete"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " completes accept on entry " & Get_Param (Info_Trace, Entry_Param, 1) & " with " & Get_Param (Info_Trace, Caller_Param, 1)); when M_Select_Else => Put ("M_Select_Else"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " selects else statement"); when M_RDV_Complete => Put ("M_RDV_Complete"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " completes rendezvous with " & Get_Param (Info_Trace, Caller_Param, 1)); when M_Call_Complete => Put ("M_Call_Complete"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " completes call"); when M_Delay => Put ("M_Delay"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " completes delay " & Get_Param (Info_Trace, Timeout_Param, 1)); when E_Missed => Put ("E_Missed"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " got an invalid acceptor " & Get_Param (Info_Trace, Acceptor_Param, 1)); when E_Timeout => Put ("E_Timeout"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " ends select due to timeout "); when E_Kill => Put ("E_Kill"); New_Line; Put_Line ("Asynchronous Transfer of Control on task " & Get_Param (Info_Trace, Name_Param, 1)); when W_Delay => Put ("W_Delay"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " sleeping " & Get_Param (Info_Trace, Timeout_Param, 1) & " seconds"); when WU_Delay => Put ("WU_Delay"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " sleeping until " & Get_Param (Info_Trace, Timeout_Param, 1)); when W_Call => Put ("W_Call"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " calling entry " & Get_Param (Info_Trace, Entry_Param, 1) & " of " & Get_Param (Info_Trace, Acceptor_Param, 1)); when W_Accept => Put ("W_Accept"); New_Line; Put ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " waiting on " & Get_Param (Info_Trace, Number_Param, 1) & " accept(s)" & ", " & Get_Param (Info_Trace, Entry_Param, 1)); New_Line; when W_Select => Put ("W_Select"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " waiting on " & Get_Param (Info_Trace, Number_Param, 1) & " select(s)" & ", " & Get_Param (Info_Trace, Entry_Param, 1)); New_Line; when W_Completion => Put ("W_Completion"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " waiting for completion "); when WT_Select => Put ("WT_Select"); New_Line; Put ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " waiting " & Get_Param (Info_Trace, Timeout_Param, 1) & " seconds on " & Get_Param (Info_Trace, Number_Param, 1) & " select(s)"); if Get_Param (Info_Trace, Number_Param, 1) /= "" then Put (", " & Get_Param (Info_Trace, Entry_Param, 1)); end if; New_Line; when WT_Call => Put ("WT_Call"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " calling entry " & Get_Param (Info_Trace, Entry_Param, 1) & " of " & Get_Param (Info_Trace, Acceptor_Param, 1) & " with timeout " & Get_Param (Info_Trace, Timeout_Param, 1)); when WT_Completion => Put ("WT_Completion"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " waiting " & Get_Param (Info_Trace, Timeout_Param, 1) & " for call completion"); when PO_Call => Put ("PO_Call"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " calling protected entry " & Get_Param (Info_Trace, Entry_Param, 1)); when POT_Call => Put ("POT_Call"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " calling protected entry " & Get_Param (Info_Trace, Entry_Param, 1) & " with timeout " & Get_Param (Info_Trace, Timeout_Param, 1)); when PO_Run => Put ("PO_Run"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " running entry " & Get_Param (Info_Trace, Entry_Param, 1) & " for " & Get_Param (Info_Trace, Caller_Param, 1)); when PO_Done => Put ("PO_Done"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " finished call from " & Get_Param (Info_Trace, Caller_Param, 1)); when PO_Lock => Put ("PO_Lock"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " took lock"); when PO_Unlock => Put ("PO_Unlock"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " released lock"); when T_Create => Put ("T_Create"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " created"); when T_Activate => Put ("T_Activate"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " activated"); when T_Abort => Put ("T_Abort"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " aborted by " & Get_Param (Info_Trace, Parent_Param, 1)); when T_Terminate => Put ("T_Terminate"); New_Line; Put_Line ("Task " & Get_Param (Info_Trace, Name_Param, 1) & " terminated"); when others => Put ("Invalid Id"); end case; Put_Line (" --> " & Info_Trace); Put_Line ("-----------------------------------"); New_Line; end Send_Trace;
-- A55B12A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT THE SUBTYPE OF A LOOP PARAMETER IN A LOOP OF THE FORM -- -- FOR I IN ST RANGE L..R LOOP -- -- IS CORRECTLY DETERMINED SO THAT WHEN THE LOOP PARAMETER IS USED -- IN A CASE STATEMENT AN 'OTHERS' ALTERNATIVE IS NOT REQUIRED IF -- THE CHOICES COVER THE APPROPRIATE RANGE OF SUBTYPE VALUES. -- CASE A : -- L AND R ARE BOTH STATIC EXPRESSIONS, AND ST IS A STATIC -- SUBTYPE COVERING A RANGE GREATER THAN L..R . -- RM 02/02/80 -- JRK 03/02/83 WITH REPORT ; PROCEDURE A55B12A IS USE REPORT ; BEGIN TEST("A55B12A" , "CHECK THAT THE SUBTYPE OF A LOOP PARAMETER" & " IN A LOOP OF THE FORM 'FOR I IN ST RANGE" & " L..R LOOP' IS CORRECTLY DETERMINED (A)" ); DECLARE SUBTYPE STAT IS INTEGER RANGE 1..10 ; TYPE NEW_STAT IS NEW INTEGER RANGE 1..10 ; TYPE ENUMERATION IS ( A,B,C,D,E,F,G,H,K,L,M,N ); SUBTYPE STAT_E IS ENUMERATION RANGE A..L ; SUBTYPE STAT_B IS BOOLEAN RANGE FALSE..TRUE ; SUBTYPE STAT_C IS CHARACTER RANGE 'A'..'L' ; BEGIN FOR I IN STAT RANGE 1..5 LOOP CASE I IS WHEN 1 | 3 | 5 => NULL ; WHEN 2 | 4 => NULL ; END CASE; END LOOP; FOR I IN NEW_STAT RANGE 1..5 LOOP CASE I IS WHEN 1 | 3 | 5 => NULL ; WHEN 2 | 4 => NULL ; END CASE; END LOOP; FOR I IN INTEGER RANGE 1..5 LOOP CASE I IS WHEN 1 | 3 | 5 => NULL ; WHEN 2 | 4 => NULL ; END CASE; END LOOP; FOR I IN REVERSE STAT RANGE 1..5 LOOP CASE I IS WHEN 1 | 3 | 5 => NULL ; WHEN 2 | 4 => NULL ; END CASE; END LOOP; FOR I IN STAT_E RANGE A..E LOOP CASE I IS WHEN C..E => NULL ; WHEN A..B => NULL ; END CASE; END LOOP; FOR I IN STAT_B RANGE TRUE..TRUE LOOP CASE I IS WHEN TRUE => NULL ; END CASE; END LOOP; FOR I IN STAT_C RANGE 'A'..'E' LOOP CASE I IS WHEN 'A'..'C' => NULL ; WHEN 'D'..'E' => NULL ; END CASE; END LOOP; FOR I IN STAT_C RANGE 'E'..'B' LOOP CASE I IS WHEN 'D'..'C' => NULL ; WHEN 'E'..'B' => NULL ; WHEN 'F'..'A' => NULL ; WHEN 'M'..'A' => NULL ; END CASE; END LOOP; END ; RESULT ; END A55B12A ;
with ada.Containers.Vectors; generic with package Vectors is new ada.Containers.Vectors (<>); procedure lace.Containers.shuffle_Vector (the_Vector : in out vectors.Vector);
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure pathfindList is type stringptr is access all char_array; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; procedure SkipSpaces is C : Character; Eol : Boolean; begin loop Look_Ahead(C, Eol); exit when Eol or C /= ' '; Get(C); end loop; end; type a is Array (Integer range <>) of Integer; type a_PTR is access a; function pathfind_aux(cache : in a_PTR; tab : in a_PTR; len : in Integer; pos : in Integer) return Integer is posval : Integer; out0 : Integer; oneval : Integer; begin if pos >= len - 1 then return 0; else if cache(pos) /= (-1) then return cache(pos); else cache(pos) := len * 2; posval := pathfind_aux(cache, tab, len, tab(pos)); oneval := pathfind_aux(cache, tab, len, pos + 1); out0 := 0; if posval < oneval then out0 := 1 + posval; else out0 := 1 + oneval; end if; cache(pos) := out0; return out0; end if; end if; end; function pathfind(tab : in a_PTR; len : in Integer) return Integer is cache : a_PTR; begin cache := new a (0..len - 1); for i in integer range 0..len - 1 loop cache(i) := (-1); end loop; return pathfind_aux(cache, tab, len, 0); end; tmp : Integer; tab : a_PTR; result : Integer; len : Integer; begin len := 0; Get(len); SkipSpaces; tab := new a (0..len - 1); for i in integer range 0..len - 1 loop tmp := 0; Get(tmp); SkipSpaces; tab(i) := tmp; end loop; result := pathfind(tab, len); PInt(result); end;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of STMicroelectronics nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with System; use System; pragma Warnings (Off, "* is an internal GNAT unit"); with System.BB.Parameters; pragma Warnings (On, "* is an internal GNAT unit"); with STM32_SVD.RCC; use STM32_SVD.RCC; package body STM32.Device with SPARK_Mode => Off is HSE_VALUE : constant Word := Word (System.BB.Parameters.HSE_Clock); -- External oscillator in Hz HSI_VALUE : constant := 16_000_000; -- Internal oscillator in Hz HPRE_Presc_Table : constant array (UInt4) of Word := (1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 64, 128, 256, 512); PPRE_Presc_Table : constant array (UInt3) of Word := (1, 1, 1, 1, 2, 4, 8, 16); ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out Internal_GPIO_Port) is begin if This'Address = GPIOA_Base then RCC_Periph.AHB1ENR.GPIOAEN := True; elsif This'Address = GPIOB_Base then RCC_Periph.AHB1ENR.GPIOBEN := True; elsif This'Address = GPIOC_Base then RCC_Periph.AHB1ENR.GPIOCEN := True; elsif This'Address = GPIOD_Base then RCC_Periph.AHB1ENR.GPIODEN := True; elsif This'Address = GPIOE_Base then RCC_Periph.AHB1ENR.GPIOEEN := True; elsif This'Address = GPIOF_Base then RCC_Periph.AHB1ENR.GPIOFEN := True; elsif This'Address = GPIOG_Base then RCC_Periph.AHB1ENR.GPIOGEN := True; elsif This'Address = GPIOH_Base then RCC_Periph.AHB1ENR.GPIOHEN := True; elsif This'Address = GPIOI_Base then RCC_Periph.AHB1ENR.GPIOIEN := True; elsif This'Address = GPIOJ_Base then RCC_Periph.AHB1ENR.GPIOJEN := True; elsif This'Address = GPIOK_Base then RCC_Periph.AHB1ENR.GPIOKEN := True; else raise Unknown_Device; end if; end Enable_Clock; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (Point : GPIO_Point) is begin Enable_Clock (Point.Periph.all); end Enable_Clock; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (Points : GPIO_Points) is begin for Point of Points loop Enable_Clock (Point.Periph.all); end loop; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out Internal_GPIO_Port) is begin if This'Address = GPIOA_Base then RCC_Periph.AHB1RSTR.GPIOARST := True; RCC_Periph.AHB1RSTR.GPIOARST := False; elsif This'Address = GPIOB_Base then RCC_Periph.AHB1RSTR.GPIOBRST := True; RCC_Periph.AHB1RSTR.GPIOBRST := False; elsif This'Address = GPIOC_Base then RCC_Periph.AHB1RSTR.GPIOCRST := True; RCC_Periph.AHB1RSTR.GPIOCRST := False; elsif This'Address = GPIOD_Base then RCC_Periph.AHB1RSTR.GPIODRST := True; RCC_Periph.AHB1RSTR.GPIODRST := False; elsif This'Address = GPIOE_Base then RCC_Periph.AHB1RSTR.GPIOERST := True; RCC_Periph.AHB1RSTR.GPIOERST := False; elsif This'Address = GPIOF_Base then RCC_Periph.AHB1RSTR.GPIOFRST := True; RCC_Periph.AHB1RSTR.GPIOFRST := False; elsif This'Address = GPIOG_Base then RCC_Periph.AHB1RSTR.GPIOGRST := True; RCC_Periph.AHB1RSTR.GPIOGRST := False; elsif This'Address = GPIOH_Base then RCC_Periph.AHB1RSTR.GPIOHRST := True; RCC_Periph.AHB1RSTR.GPIOHRST := False; elsif This'Address = GPIOI_Base then RCC_Periph.AHB1RSTR.GPIOIRST := True; RCC_Periph.AHB1RSTR.GPIOIRST := False; elsif This'Address = GPIOJ_Base then RCC_Periph.AHB1RSTR.GPIOJRST := True; RCC_Periph.AHB1RSTR.GPIOJRST := False; elsif This'Address = GPIOK_Base then RCC_Periph.AHB1RSTR.GPIOKRST := True; RCC_Periph.AHB1RSTR.GPIOKRST := False; else raise Unknown_Device; end if; end Reset; ----------- -- Reset -- ----------- procedure Reset (Point : GPIO_Point) is begin Reset (Point.Periph.all); end Reset; ----------- -- Reset -- ----------- procedure Reset (Points : GPIO_Points) is Do_Reset : Boolean; begin for J in Points'Range loop Do_Reset := True; for K in Points'First .. J - 1 loop if Points (K).Periph = Points (J).Periph then Do_Reset := False; exit; end if; end loop; if Do_Reset then Reset (Points (J).Periph.all); end if; end loop; end Reset; --------------------- -- As_GPIO_Port_Id -- --------------------- function As_GPIO_Port_Id (Port : Internal_GPIO_Port) return GPIO_Port_Id is begin -- TODO: rather ugly to have this board-specific range here if Port'Address = GPIOA_Base then return GPIO_Port_A; elsif Port'Address = GPIOB_Base then return GPIO_Port_B; elsif Port'Address = GPIOC_Base then return GPIO_Port_C; elsif Port'Address = GPIOD_Base then return GPIO_Port_D; elsif Port'Address = GPIOE_Base then return GPIO_Port_E; elsif Port'Address = GPIOF_Base then return GPIO_Port_F; elsif Port'Address = GPIOG_Base then return GPIO_Port_G; elsif Port'Address = GPIOH_Base then return GPIO_Port_H; elsif Port'Address = GPIOI_Base then return GPIO_Port_I; elsif Port'Address = GPIOJ_Base then return GPIO_Port_J; elsif Port'Address = GPIOK_Base then return GPIO_Port_K; else raise Program_Error; end if; end As_GPIO_Port_Id; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out Analog_To_Digital_Converter) is begin if This'Address = ADC1_Base then RCC_Periph.APB2ENR.ADC1EN := True; elsif This'Address = ADC2_Base then RCC_Periph.APB2ENR.ADC2EN := True; elsif This'Address = ADC3_Base then RCC_Periph.APB2ENR.ADC3EN := True; else raise Unknown_Device; end if; end Enable_Clock; ------------------------- -- Reset_All_ADC_Units -- ------------------------- procedure Reset_All_ADC_Units is begin RCC_Periph.APB2RSTR.ADCRST := True; RCC_Periph.APB2RSTR.ADCRST := False; end Reset_All_ADC_Units; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out Digital_To_Analog_Converter) is pragma Unreferenced (This); begin RCC_Periph.APB1ENR.DACEN := True; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out Digital_To_Analog_Converter) is pragma Unreferenced (This); begin RCC_Periph.APB1RSTR.DACRST := True; RCC_Periph.APB1RSTR.DACRST := False; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out USART) is begin if This'Address = USART1_Base then RCC_Periph.APB2ENR.USART1EN := True; elsif This'Address = USART2_Base then RCC_Periph.APB1ENR.USART2EN := True; elsif This'Address = USART3_Base then RCC_Periph.APB1ENR.USART3EN := True; elsif This'Address = UART4_Base then RCC_Periph.APB1ENR.UART4EN := True; elsif This'Address = UART5_Base then RCC_Periph.APB1ENR.UART5EN := True; elsif This'Address = USART6_Base then RCC_Periph.APB2ENR.USART6EN := True; elsif This'Address = UART7_Base then RCC_Periph.APB1ENR.UART7ENR := True; elsif This'Address = UART8_Base then RCC_Periph.APB1ENR.UART8ENR := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out USART) is begin if This'Address = USART1_Base then RCC_Periph.APB2RSTR.USART1RST := True; RCC_Periph.APB2RSTR.USART1RST := False; elsif This'Address = USART2_Base then RCC_Periph.APB1RSTR.UART2RST := True; RCC_Periph.APB1RSTR.UART2RST := False; elsif This'Address = USART3_Base then RCC_Periph.APB1RSTR.UART3RST := True; RCC_Periph.APB1RSTR.UART3RST := False; elsif This'Address = UART4_Base then RCC_Periph.APB1RSTR.UART4RST := True; RCC_Periph.APB1RSTR.UART4RST := False; elsif This'Address = UART5_Base then RCC_Periph.APB1RSTR.UART5RST := True; RCC_Periph.APB1RSTR.UART5RST := False; elsif This'Address = USART6_Base then RCC_Periph.APB2RSTR.USART6RST := True; RCC_Periph.APB2RSTR.USART6RST := False; elsif This'Address = UART7_Base then RCC_Periph.APB1RSTR.UART7RST := True; RCC_Periph.APB1RSTR.UART7RST := False; elsif This'Address = UART8_Base then RCC_Periph.APB1RSTR.UART8RST := True; RCC_Periph.APB1RSTR.UART8RST := False; else raise Unknown_Device; end if; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out DMA_Controller) is begin if This'Address = STM32_SVD.DMA1_Base then RCC_Periph.AHB1ENR.DMA1EN := True; elsif This'Address = STM32_SVD.DMA2_Base then RCC_Periph.AHB1ENR.DMA2EN := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out DMA_Controller) is begin if This'Address = STM32_SVD.DMA1_Base then RCC_Periph.AHB1RSTR.DMA1RST := True; RCC_Periph.AHB1RSTR.DMA1RST := False; elsif This'Address = STM32_SVD.DMA2_Base then RCC_Periph.AHB1RSTR.DMA2RST := True; RCC_Periph.AHB1RSTR.DMA2RST := False; else raise Unknown_Device; end if; end Reset; ---------------- -- As_Port_Id -- ---------------- function As_Port_Id (Port : I2C_Port) return I2C_Port_Id is begin if Port.Periph.all'Address = I2C1_Base then return I2C_Id_1; elsif Port.Periph.all'Address = I2C2_Base then return I2C_Id_2; elsif Port.Periph.all'Address = I2C3_Base then return I2C_Id_3; else raise Unknown_Device; end if; end As_Port_Id; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : I2C_Port) is begin Enable_Clock (As_Port_Id (This)); end Enable_Clock; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : I2C_Port_Id) is begin case This is when I2C_Id_1 => RCC_Periph.APB1ENR.I2C1EN := True; when I2C_Id_2 => RCC_Periph.APB1ENR.I2C2EN := True; when I2C_Id_3 => RCC_Periph.APB1ENR.I2C3EN := True; end case; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : I2C_Port) is begin Reset (As_Port_Id (This)); end Reset; ----------- -- Reset -- ----------- procedure Reset (This : I2C_Port_Id) is begin case This is when I2C_Id_1 => RCC_Periph.APB1RSTR.I2C1RST := True; RCC_Periph.APB1RSTR.I2C1RST := False; when I2C_Id_2 => RCC_Periph.APB1RSTR.I2C2RST := True; RCC_Periph.APB1RSTR.I2C2RST := False; when I2C_Id_3 => RCC_Periph.APB1RSTR.I2C3RST := True; RCC_Periph.APB1RSTR.I2C3RST := False; end case; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : SPI_Port) is begin if This.Periph.all'Address = SPI1_Base then RCC_Periph.APB2ENR.SPI1EN := True; elsif This.Periph.all'Address = SPI2_Base then RCC_Periph.APB1ENR.SPI2EN := True; elsif This.Periph.all'Address = SPI3_Base then RCC_Periph.APB1ENR.SPI3EN := True; elsif This.Periph.all'Address = SPI4_Base then RCC_Periph.APB2ENR.SPI4ENR := True; elsif This.Periph.all'Address = SPI5_Base then RCC_Periph.APB2ENR.SPI5ENR := True; elsif This.Periph.all'Address = SPI6_Base then RCC_Periph.APB2ENR.SPI6ENR := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : SPI_Port) is begin if This.Periph.all'Address = SPI1_Base then RCC_Periph.APB2RSTR.SPI1RST := True; RCC_Periph.APB2RSTR.SPI1RST := False; elsif This.Periph.all'Address = SPI2_Base then RCC_Periph.APB1RSTR.SPI2RST := True; RCC_Periph.APB1RSTR.SPI2RST := False; elsif This.Periph.all'Address = SPI3_Base then RCC_Periph.APB1RSTR.SPI3RST := True; RCC_Periph.APB1RSTR.SPI3RST := False; elsif This.Periph.all'Address = SPI4_Base then RCC_Periph.APB2RSTR.SPI4RST := True; RCC_Periph.APB2RSTR.SPI4RST := False; elsif This.Periph.all'Address = SPI5_Base then RCC_Periph.APB2RSTR.SPI5RST := True; RCC_Periph.APB2RSTR.SPI5RST := False; elsif This.Periph.all'Address = SPI6_Base then RCC_Periph.APB2RSTR.SPI6RST := True; RCC_Periph.APB2RSTR.SPI6RST := False; else raise Unknown_Device; end if; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : in out Timer) is begin if This'Address = TIM1_Base then RCC_Periph.APB2ENR.TIM1EN := True; elsif This'Address = TIM2_Base then RCC_Periph.APB1ENR.TIM2EN := True; elsif This'Address = TIM3_Base then RCC_Periph.APB1ENR.TIM3EN := True; elsif This'Address = TIM4_Base then RCC_Periph.APB1ENR.TIM4EN := True; elsif This'Address = TIM5_Base then RCC_Periph.APB1ENR.TIM5EN := True; elsif This'Address = TIM6_Base then RCC_Periph.APB1ENR.TIM6EN := True; elsif This'Address = TIM7_Base then RCC_Periph.APB1ENR.TIM7EN := True; elsif This'Address = TIM8_Base then RCC_Periph.APB2ENR.TIM8EN := True; elsif This'Address = TIM9_Base then RCC_Periph.APB2ENR.TIM9EN := True; elsif This'Address = TIM10_Base then RCC_Periph.APB2ENR.TIM10EN := True; elsif This'Address = TIM11_Base then RCC_Periph.APB2ENR.TIM11EN := True; elsif This'Address = TIM12_Base then RCC_Periph.APB1ENR.TIM12EN := True; elsif This'Address = TIM13_Base then RCC_Periph.APB1ENR.TIM13EN := True; elsif This'Address = TIM14_Base then RCC_Periph.APB1ENR.TIM14EN := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : in out Timer) is begin if This'Address = TIM1_Base then RCC_Periph.APB2RSTR.TIM1RST := True; RCC_Periph.APB2RSTR.TIM1RST := False; elsif This'Address = TIM2_Base then RCC_Periph.APB1RSTR.TIM2RST := True; RCC_Periph.APB1RSTR.TIM2RST := False; elsif This'Address = TIM3_Base then RCC_Periph.APB1RSTR.TIM3RST := True; RCC_Periph.APB1RSTR.TIM3RST := False; elsif This'Address = TIM4_Base then RCC_Periph.APB1RSTR.TIM4RST := True; RCC_Periph.APB1RSTR.TIM4RST := False; elsif This'Address = TIM5_Base then RCC_Periph.APB1RSTR.TIM5RST := True; RCC_Periph.APB1RSTR.TIM5RST := False; elsif This'Address = TIM6_Base then RCC_Periph.APB1RSTR.TIM6RST := True; RCC_Periph.APB1RSTR.TIM6RST := False; elsif This'Address = TIM7_Base then RCC_Periph.APB1RSTR.TIM7RST := True; RCC_Periph.APB1RSTR.TIM7RST := False; elsif This'Address = TIM8_Base then RCC_Periph.APB2RSTR.TIM8RST := True; RCC_Periph.APB2RSTR.TIM8RST := False; elsif This'Address = TIM9_Base then RCC_Periph.APB2RSTR.TIM9RST := True; RCC_Periph.APB2RSTR.TIM9RST := False; elsif This'Address = TIM10_Base then RCC_Periph.APB2RSTR.TIM10RST := True; RCC_Periph.APB2RSTR.TIM10RST := False; elsif This'Address = TIM11_Base then RCC_Periph.APB2RSTR.TIM11RST := True; RCC_Periph.APB2RSTR.TIM11RST := False; elsif This'Address = TIM12_Base then RCC_Periph.APB1RSTR.TIM12RST := True; RCC_Periph.APB1RSTR.TIM12RST := False; elsif This'Address = TIM13_Base then RCC_Periph.APB1RSTR.TIM13RST := True; RCC_Periph.APB1RSTR.TIM13RST := False; elsif This'Address = TIM14_Base then RCC_Periph.APB1RSTR.TIM14RST := True; RCC_Periph.APB1RSTR.TIM14RST := False; else raise Unknown_Device; end if; end Reset; ------------------------------ -- System_Clock_Frequencies -- ------------------------------ function System_Clock_Frequencies return RCC_System_Clocks is Source : constant CFGR_SWS_Field := RCC_Periph.CFGR.SWS; Result : RCC_System_Clocks; begin case Source.Val is when 0 => -- HSI as source Result.SYSCLK := HSI_VALUE; when 1 => -- HSE as source Result.SYSCLK := HSE_VALUE; when 2 => -- PLL as source declare HSE_Source : constant Boolean := RCC_Periph.PLLCFGR.PLLSRC; Pllm : constant Word := Word (RCC_Periph.PLLCFGR.PLLM.Val); Plln : constant Word := Word (RCC_Periph.PLLCFGR.PLLN.Val); Pllp : constant Word := (Word (RCC_Periph.PLLCFGR.PLLP.Val) + 1) * 2; Pllvco : Word; begin if not HSE_Source then Pllvco := (HSI_VALUE / Pllm) * Plln; else Pllvco := (HSE_VALUE / Pllm) * Plln; end if; Result.SYSCLK := Pllvco / Pllp; end; when others => Result.SYSCLK := HSI_VALUE; end case; declare HPRE : constant UInt4 := RCC_Periph.CFGR.HPRE; PPRE1 : constant UInt3 := RCC_Periph.CFGR.PPRE.Arr (1); PPRE2 : constant UInt3 := RCC_Periph.CFGR.PPRE.Arr (2); begin Result.HCLK := Result.SYSCLK / HPRE_Presc_Table (HPRE); Result.PCLK1 := Result.HCLK / PPRE_Presc_Table (PPRE1); Result.PCLK2 := Result.HCLK / PPRE_Presc_Table (PPRE2); -- Timer clocks -- See Dedicated clock cfg register documentation. if not RCC_Periph.DCKCFGR.TIMPRE then -- Mode 0: -- If the APB prescaler (PPRE1, PPRE2 in the RCC_CFGR register) -- is configured to a division factor of 1, TIMxCLK = PCLKx. -- Otherwise, the timer clock frequencies are set to twice to the -- frequency of the APB domain to which the timers are connected : -- TIMxCLK = 2xPCLKx. if PPRE_Presc_Table (PPRE1) = 1 then Result.TIMCLK1 := Result.PCLK1; else Result.TIMCLK1 := Result.PCLK1 * 2; end if; if PPRE_Presc_Table (PPRE2) = 1 then Result.TIMCLK2 := Result.PCLK2; else Result.TIMCLK2 := Result.PCLK2 * 2; end if; else -- Mpde 1: -- If the APB prescaler (PPRE1, PPRE2 in the RCC_CFGR register) is -- configured to a division factor of 1, 2 or 4, TIMxCLK = HCLK. -- Otherwise, the timer clock frequencies are set to four times -- to the frequency of the APB domain to which the timers are -- connected : TIMxCLK = 4xPCLKx. if PPRE_Presc_Table (PPRE1) in 1 .. 4 then Result.TIMCLK1 := Result.HCLK; else Result.TIMCLK1 := Result.PCLK1 * 4; end if; if PPRE_Presc_Table (PPRE2) in 1 .. 4 then Result.TIMCLK2 := Result.HCLK; else Result.TIMCLK2 := Result.PCLK1 * 4; end if; end if; end; return Result; end System_Clock_Frequencies; ------------------ -- PLLSAI_Ready -- ------------------ function PLLSAI_Ready return Boolean is begin -- SHould be PLLSAIRDY, but not binded by the SVD file -- PLLSAIRDY: bit 29 return (RCC_Periph.CR.Reserved_28_31 and 2) /= 0; end PLLSAI_Ready; ------------------- -- Enable_PLLSAI -- -------------------; procedure Enable_PLLSAI is begin -- Should be PLLSAION, but not binded by the SVD file -- PLLSAION: bit 28 RCC_Periph.CR.Reserved_28_31 := RCC_Periph.CR.Reserved_28_31 or 1; -- Wait for PLLSAI activation loop exit when PLLSAI_Ready; end loop; end Enable_PLLSAI; ------------------- -- Enable_PLLSAI -- -------------------; procedure Disable_PLLSAI is begin -- Should be PLLSAION, but not binded by the SVD file -- PLLSAION: bit 28 RCC_Periph.CR.Reserved_28_31 := RCC_Periph.CR.Reserved_28_31 and not 1; end Disable_PLLSAI; ------------------------ -- Set_PLLSAI_Factors -- ------------------------ procedure Set_PLLSAI_Factors (LCD : UInt3; VCO : UInt9; DivR : PLLSAI_DivR) is PLLSAICFGR : PLLSAICFGR_Register; begin PLLSAICFGR.PLLSAIR := LCD; PLLSAICFGR.PLLSAIN := VCO; RCC_Periph.PLLSAICFGR := PLLSAICFGR; -- The exact bit name is device-specific RCC_Periph.DCKCFGR.PLLSAIDIVR := UInt2 (DivR); end Set_PLLSAI_Factors; ----------------------- -- Enable_DCMI_Clock -- ----------------------- procedure Enable_DCMI_Clock is begin RCC_Periph.AHB2ENR.DCMIEN := True; end Enable_DCMI_Clock; ---------------- -- Reset_DCMI -- ---------------- procedure Reset_DCMI is begin RCC_Periph.AHB2RSTR.DCMIRST := True; RCC_Periph.AHB2RSTR.DCMIRST := False; end Reset_DCMI; end STM32.Device;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S N A M E S -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Types; use Types; package Snames is -- This package contains definitions of standard names (i.e. entries in the -- Names table) that are used throughout the GNAT compiler). It also contains -- the definitions of some enumeration types whose definitions are tied to -- the order of these preset names. -- WARNING: There is a C file, a-snames-h which duplicates some of the -- definitions in this file and must be kept properly synchronized. ------------------ -- Preset Names -- ------------------ -- The following are preset entries in the names table, which are -- entered at the start of every compilation for easy access. Note -- that the order of initialization of these names in the body must -- be coordinated with the order of names in this table. -- Note: a name may not appear more than once in the following list. -- If additional pragmas or attributes are introduced which might -- otherwise cause a duplicate, then list it only once in this table, -- and adjust the definition of the functions for testing for pragma -- names and attribute names, and returning their ID values. Of course -- everything is simpler if no such duplications occur! -- First we have the one character names used to optimize the lookup -- process for one character identifiers (avoid the hashing in this case) -- There are a full 256 of these, but only the entries for lower case -- and upper case letters have identifiers -- The lower case letter entries are used for one character identifiers -- appearing in the source, for example in pragma Interface (C). Name_A : constant Name_Id := First_Name_Id + Character'Pos ('a'); Name_B : constant Name_Id := First_Name_Id + Character'Pos ('b'); Name_C : constant Name_Id := First_Name_Id + Character'Pos ('c'); Name_D : constant Name_Id := First_Name_Id + Character'Pos ('d'); Name_E : constant Name_Id := First_Name_Id + Character'Pos ('e'); Name_F : constant Name_Id := First_Name_Id + Character'Pos ('f'); Name_G : constant Name_Id := First_Name_Id + Character'Pos ('g'); Name_H : constant Name_Id := First_Name_Id + Character'Pos ('h'); Name_I : constant Name_Id := First_Name_Id + Character'Pos ('i'); Name_J : constant Name_Id := First_Name_Id + Character'Pos ('j'); Name_K : constant Name_Id := First_Name_Id + Character'Pos ('k'); Name_L : constant Name_Id := First_Name_Id + Character'Pos ('l'); Name_M : constant Name_Id := First_Name_Id + Character'Pos ('m'); Name_N : constant Name_Id := First_Name_Id + Character'Pos ('n'); Name_O : constant Name_Id := First_Name_Id + Character'Pos ('o'); Name_P : constant Name_Id := First_Name_Id + Character'Pos ('p'); Name_Q : constant Name_Id := First_Name_Id + Character'Pos ('q'); Name_R : constant Name_Id := First_Name_Id + Character'Pos ('r'); Name_S : constant Name_Id := First_Name_Id + Character'Pos ('s'); Name_T : constant Name_Id := First_Name_Id + Character'Pos ('t'); Name_U : constant Name_Id := First_Name_Id + Character'Pos ('u'); Name_V : constant Name_Id := First_Name_Id + Character'Pos ('v'); Name_W : constant Name_Id := First_Name_Id + Character'Pos ('w'); Name_X : constant Name_Id := First_Name_Id + Character'Pos ('x'); Name_Y : constant Name_Id := First_Name_Id + Character'Pos ('y'); Name_Z : constant Name_Id := First_Name_Id + Character'Pos ('z'); -- The upper case letter entries are used by expander code for local -- variables that do not require unique names (e.g. formal parameter -- names in constructed procedures) Name_uA : constant Name_Id := First_Name_Id + Character'Pos ('A'); Name_uB : constant Name_Id := First_Name_Id + Character'Pos ('B'); Name_uC : constant Name_Id := First_Name_Id + Character'Pos ('C'); Name_uD : constant Name_Id := First_Name_Id + Character'Pos ('D'); Name_uE : constant Name_Id := First_Name_Id + Character'Pos ('E'); Name_uF : constant Name_Id := First_Name_Id + Character'Pos ('F'); Name_uG : constant Name_Id := First_Name_Id + Character'Pos ('G'); Name_uH : constant Name_Id := First_Name_Id + Character'Pos ('H'); Name_uI : constant Name_Id := First_Name_Id + Character'Pos ('I'); Name_uJ : constant Name_Id := First_Name_Id + Character'Pos ('J'); Name_uK : constant Name_Id := First_Name_Id + Character'Pos ('K'); Name_uL : constant Name_Id := First_Name_Id + Character'Pos ('L'); Name_uM : constant Name_Id := First_Name_Id + Character'Pos ('M'); Name_uN : constant Name_Id := First_Name_Id + Character'Pos ('N'); Name_uO : constant Name_Id := First_Name_Id + Character'Pos ('O'); Name_uP : constant Name_Id := First_Name_Id + Character'Pos ('P'); Name_uQ : constant Name_Id := First_Name_Id + Character'Pos ('Q'); Name_uR : constant Name_Id := First_Name_Id + Character'Pos ('R'); Name_uS : constant Name_Id := First_Name_Id + Character'Pos ('S'); Name_uT : constant Name_Id := First_Name_Id + Character'Pos ('T'); Name_uU : constant Name_Id := First_Name_Id + Character'Pos ('U'); Name_uV : constant Name_Id := First_Name_Id + Character'Pos ('V'); Name_uW : constant Name_Id := First_Name_Id + Character'Pos ('W'); Name_uX : constant Name_Id := First_Name_Id + Character'Pos ('X'); Name_uY : constant Name_Id := First_Name_Id + Character'Pos ('Y'); Name_uZ : constant Name_Id := First_Name_Id + Character'Pos ('Z'); -- Note: the following table is read by the utility program XSNAMES and -- its format should not be changed without coordinating with this program. N : constant Name_Id := First_Name_Id + 256; -- Synonym used in standard name definitions -- Some names that are used by gigi, and whose definitions are reflected -- in the C header file a-snames.h. They are placed at the start so that -- the need to modify a-snames.h is minimized. Name_uParent : constant Name_Id := N + 000; Name_uTag : constant Name_Id := N + 001; Name_Off : constant Name_Id := N + 002; Name_Space : constant Name_Id := N + 003; Name_Time : constant Name_Id := N + 004; Name_uInit_Proc : constant Name_Id := N + 005; Name_uSize : constant Name_Id := N + 006; -- Some special names used by the expander. Note that the lower case u's -- at the start of these names get translated to extra underscores. These -- names are only referenced internally by expander generated code. Name_uAbort_Signal : constant Name_Id := N + 007; Name_uAddress_Resolver : constant Name_Id := N + 008; Name_uAssign : constant Name_Id := N + 009; Name_uChain : constant Name_Id := N + 010; Name_uClean : constant Name_Id := N + 011; Name_uController : constant Name_Id := N + 012; Name_uEntry_Bodies : constant Name_Id := N + 013; Name_uExpunge : constant Name_Id := N + 014; Name_uFinal_List : constant Name_Id := N + 015; Name_uIdepth : constant Name_Id := N + 016; Name_uInit : constant Name_Id := N + 017; Name_uLocal_Final_List : constant Name_Id := N + 018; Name_uMaster : constant Name_Id := N + 019; Name_uObject : constant Name_Id := N + 020; Name_uPriority : constant Name_Id := N + 021; Name_uService : constant Name_Id := N + 022; Name_uTags : constant Name_Id := N + 023; Name_uTask : constant Name_Id := N + 024; Name_uTask_Id : constant Name_Id := N + 025; Name_uTask_Info : constant Name_Id := N + 026; Name_uTask_Name : constant Name_Id := N + 027; Name_uTrace_Sp : constant Name_Id := N + 028; -- Names of routines in Ada.Finalization, needed by expander Name_Initialize : constant Name_Id := N + 029; Name_Adjust : constant Name_Id := N + 030; Name_Finalize : constant Name_Id := N + 031; -- Names of fields declared in System.Finalization_Implementation, -- needed by the expander when generating code for finalization. Name_Next : constant Name_Id := N + 032; Name_Prev : constant Name_Id := N + 033; -- Names of TSS routines (see Exp_TSS); Name_uInit_Proc above is also -- one of these. Name_uDeep_Adjust : constant Name_Id := N + 034; Name_uEquality : constant Name_Id := N + 035; Name_uDeep_Finalize : constant Name_Id := N + 036; Name_uDeep_Initialize : constant Name_Id := N + 037; Name_uInput : constant Name_Id := N + 038; Name_uOutput : constant Name_Id := N + 039; Name_uRAS_Access : constant Name_Id := N + 040; Name_uRAS_Dereference : constant Name_Id := N + 041; Name_uRead : constant Name_Id := N + 042; Name_uRep_To_Pos : constant Name_Id := N + 043; Name_uWrite : constant Name_Id := N + 044; -- Names of allocation routines, also needed by expander Name_Allocate : constant Name_Id := N + 045; Name_Deallocate : constant Name_Id := N + 046; Name_Dereference : constant Name_Id := N + 047; -- Names of Text_IO generic subpackages (see Rtsfind.Text_IO_Kludge) First_Text_IO_Package : constant Name_Id := N + 048; Name_Decimal_IO : constant Name_Id := N + 048; Name_Enumeration_IO : constant Name_Id := N + 049; Name_Fixed_IO : constant Name_Id := N + 050; Name_Float_IO : constant Name_Id := N + 051; Name_Integer_IO : constant Name_Id := N + 052; Name_Modular_IO : constant Name_Id := N + 053; Last_Text_IO_Package : constant Name_Id := N + 053; subtype Text_IO_Package_Name is Name_Id range First_Text_IO_Package .. Last_Text_IO_Package; -- Names of files in library for Ada.Text_IO and Ada.Wide_Text_IO Name_a_textio : constant Name_Id := N + 054; Name_a_witeio : constant Name_Id := N + 055; -- Some miscellaneous names used for error detection/recovery Name_Const : constant Name_Id := N + 056; Name_Error : constant Name_Id := N + 057; Name_Go : constant Name_Id := N + 058; Name_Put : constant Name_Id := N + 059; Name_Put_Line : constant Name_Id := N + 060; Name_To : constant Name_Id := N + 061; -- Names for packages that are treated specially by the compiler Name_Finalization : constant Name_Id := N + 062; Name_Finalization_Root : constant Name_Id := N + 063; Name_Interfaces : constant Name_Id := N + 064; Name_Standard : constant Name_Id := N + 065; Name_System : constant Name_Id := N + 066; Name_Text_IO : constant Name_Id := N + 067; Name_Wide_Text_IO : constant Name_Id := N + 068; -- Names of identifiers used in expanding distribution stubs Name_Addr : constant Name_Id := N + 069; Name_Async : constant Name_Id := N + 070; Name_Get_Active_Partition_ID : constant Name_Id := N + 071; Name_Get_RCI_Package_Receiver : constant Name_Id := N + 072; Name_Origin : constant Name_Id := N + 073; Name_Params : constant Name_Id := N + 074; Name_Partition : constant Name_Id := N + 075; Name_Partition_Interface : constant Name_Id := N + 076; Name_Ras : constant Name_Id := N + 077; Name_RCI_Name : constant Name_Id := N + 078; Name_Receiver : constant Name_Id := N + 079; Name_Result : constant Name_Id := N + 080; Name_Rpc : constant Name_Id := N + 081; Name_Subp_Id : constant Name_Id := N + 082; -- Operator Symbol entries. The actual names have an upper case O at -- the start in place of the Op_ prefix (e.g. the actual name that -- corresponds to Name_Op_Abs is "Oabs". First_Operator_Name : constant Name_Id := N + 083; Name_Op_Abs : constant Name_Id := N + 083; -- "abs" Name_Op_And : constant Name_Id := N + 084; -- "and" Name_Op_Mod : constant Name_Id := N + 085; -- "mod" Name_Op_Not : constant Name_Id := N + 086; -- "not" Name_Op_Or : constant Name_Id := N + 087; -- "or" Name_Op_Rem : constant Name_Id := N + 088; -- "rem" Name_Op_Xor : constant Name_Id := N + 089; -- "xor" Name_Op_Eq : constant Name_Id := N + 090; -- "=" Name_Op_Ne : constant Name_Id := N + 091; -- "/=" Name_Op_Lt : constant Name_Id := N + 092; -- "<" Name_Op_Le : constant Name_Id := N + 093; -- "<=" Name_Op_Gt : constant Name_Id := N + 094; -- ">" Name_Op_Ge : constant Name_Id := N + 095; -- ">=" Name_Op_Add : constant Name_Id := N + 096; -- "+" Name_Op_Subtract : constant Name_Id := N + 097; -- "-" Name_Op_Concat : constant Name_Id := N + 098; -- "&" Name_Op_Multiply : constant Name_Id := N + 099; -- "*" Name_Op_Divide : constant Name_Id := N + 100; -- "/" Name_Op_Expon : constant Name_Id := N + 101; -- "**" Last_Operator_Name : constant Name_Id := N + 101; -- Names for all pragmas recognized by GNAT. The entries with the comment -- "Ada 83" are pragmas that are defined in Ada 83, but not in Ada 95. -- These pragmas are fully implemented in both Ada 83 and Ada 95 modes -- in GNAT. -- The entries marked GNAT are pragmas that are defined by GNAT -- and implemented in both Ada 83 and Ada 95 modes. Full descriptions -- of these implementation dependent pragmas may be found in the -- appropriate section in unit Sem_Prag in file sem-prag.adb. -- The entries marked VMS are VMS specific pragmas that are recognized -- only in OpenVMS versions of GNAT. They are ignored in other versions -- with an appropriate warning. First_Pragma_Name : constant Name_Id := N + 102; -- Configuration pragmas are grouped at start Name_Ada_83 : constant Name_Id := N + 102; -- GNAT Name_Ada_95 : constant Name_Id := N + 103; -- GNAT Name_C_Pass_By_Copy : constant Name_Id := N + 104; -- GNAT Name_Component_Alignment : constant Name_Id := N + 105; -- GNAT Name_Discard_Names : constant Name_Id := N + 106; Name_Elaboration_Checks : constant Name_Id := N + 107; -- GNAT Name_Eliminate : constant Name_Id := N + 108; -- GNAT Name_Extend_System : constant Name_Id := N + 109; -- GNAT Name_Extensions_Allowed : constant Name_Id := N + 110; -- GNAT Name_External_Name_Casing : constant Name_Id := N + 111; -- GNAT Name_Float_Representation : constant Name_Id := N + 112; -- GNAT Name_Initialize_Scalars : constant Name_Id := N + 113; -- GNAT Name_License : constant Name_Id := N + 114; -- GNAT Name_Locking_Policy : constant Name_Id := N + 115; Name_Long_Float : constant Name_Id := N + 116; -- VMS Name_No_Run_Time : constant Name_Id := N + 117; -- GNAT Name_Normalize_Scalars : constant Name_Id := N + 118; Name_Polling : constant Name_Id := N + 119; -- GNAT Name_Propagate_Exceptions : constant Name_Id := N + 120; -- GNAT Name_Queuing_Policy : constant Name_Id := N + 121; Name_Ravenscar : constant Name_Id := N + 122; Name_Restricted_Run_Time : constant Name_Id := N + 123; Name_Restrictions : constant Name_Id := N + 124; Name_Reviewable : constant Name_Id := N + 125; Name_Source_File_Name : constant Name_Id := N + 126; -- GNAT Name_Style_Checks : constant Name_Id := N + 127; -- GNAT Name_Suppress : constant Name_Id := N + 128; Name_Task_Dispatching_Policy : constant Name_Id := N + 129; Name_Unsuppress : constant Name_Id := N + 130; -- GNAT Name_Use_VADS_Size : constant Name_Id := N + 131; -- GNAT Name_Warnings : constant Name_Id := N + 132; -- GNAT Name_Validity_Checks : constant Name_Id := N + 133; -- GNAT Last_Configuration_Pragma_Name : constant Name_Id := N + 133; -- Remaining pragma names Name_Abort_Defer : constant Name_Id := N + 134; -- GNAT Name_All_Calls_Remote : constant Name_Id := N + 135; Name_Annotate : constant Name_Id := N + 136; -- GNAT -- Note: AST_Entry is not in this list because its name matches the -- name of the corresponding attribute. However, it is included in the -- definition of the type Attribute_Id, and the functions Get_Pragma_Id -- and Check_Pragma_Id correctly recognize and process Name_AST_Entry. -- AST_Entry is a VMS specific pragma. Name_Assert : constant Name_Id := N + 137; -- GNAT Name_Asynchronous : constant Name_Id := N + 138; Name_Atomic : constant Name_Id := N + 139; Name_Atomic_Components : constant Name_Id := N + 140; Name_Attach_Handler : constant Name_Id := N + 141; Name_Comment : constant Name_Id := N + 142; -- GNAT Name_Common_Object : constant Name_Id := N + 143; -- GNAT Name_Complex_Representation : constant Name_Id := N + 144; -- GNAT Name_Controlled : constant Name_Id := N + 145; Name_Convention : constant Name_Id := N + 146; Name_CPP_Class : constant Name_Id := N + 147; -- GNAT Name_CPP_Constructor : constant Name_Id := N + 148; -- GNAT Name_CPP_Virtual : constant Name_Id := N + 149; -- GNAT Name_CPP_Vtable : constant Name_Id := N + 150; -- GNAT Name_Debug : constant Name_Id := N + 151; -- GNAT Name_Elaborate : constant Name_Id := N + 152; -- Ada 83 Name_Elaborate_All : constant Name_Id := N + 153; Name_Elaborate_Body : constant Name_Id := N + 154; Name_Export : constant Name_Id := N + 155; Name_Export_Exception : constant Name_Id := N + 156; -- VMS Name_Export_Function : constant Name_Id := N + 157; -- GNAT Name_Export_Object : constant Name_Id := N + 158; -- GNAT Name_Export_Procedure : constant Name_Id := N + 159; -- GNAT Name_Export_Valued_Procedure : constant Name_Id := N + 160; -- GNAT Name_External : constant Name_Id := N + 161; -- GNAT Name_Finalize_Storage_Only : constant Name_Id := N + 162; -- GNAT Name_Ident : constant Name_Id := N + 163; -- VMS Name_Import : constant Name_Id := N + 164; Name_Import_Exception : constant Name_Id := N + 165; -- VMS Name_Import_Function : constant Name_Id := N + 166; -- GNAT Name_Import_Object : constant Name_Id := N + 167; -- GNAT Name_Import_Procedure : constant Name_Id := N + 168; -- GNAT Name_Import_Valued_Procedure : constant Name_Id := N + 169; -- GNAT Name_Inline : constant Name_Id := N + 170; Name_Inline_Always : constant Name_Id := N + 171; -- GNAT Name_Inline_Generic : constant Name_Id := N + 172; -- GNAT Name_Inspection_Point : constant Name_Id := N + 173; Name_Interface : constant Name_Id := N + 174; -- Ada 83 Name_Interface_Name : constant Name_Id := N + 175; -- GNAT Name_Interrupt_Handler : constant Name_Id := N + 176; Name_Interrupt_Priority : constant Name_Id := N + 177; Name_Java_Constructor : constant Name_Id := N + 178; -- GNAT Name_Java_Interface : constant Name_Id := N + 179; -- GNAT Name_Link_With : constant Name_Id := N + 180; -- GNAT Name_Linker_Alias : constant Name_Id := N + 181; -- GNAT Name_Linker_Options : constant Name_Id := N + 182; Name_Linker_Section : constant Name_Id := N + 183; -- GNAT Name_List : constant Name_Id := N + 184; Name_Machine_Attribute : constant Name_Id := N + 185; -- GNAT Name_Main : constant Name_Id := N + 186; -- GNAT Name_Main_Storage : constant Name_Id := N + 187; -- GNAT Name_Memory_Size : constant Name_Id := N + 188; -- Ada 83 Name_No_Return : constant Name_Id := N + 189; -- GNAT Name_Optimize : constant Name_Id := N + 190; Name_Pack : constant Name_Id := N + 191; Name_Page : constant Name_Id := N + 192; Name_Passive : constant Name_Id := N + 193; -- GNAT Name_Preelaborate : constant Name_Id := N + 194; Name_Priority : constant Name_Id := N + 195; Name_Psect_Object : constant Name_Id := N + 196; -- VMS Name_Pure : constant Name_Id := N + 197; Name_Pure_Function : constant Name_Id := N + 198; -- GNAT Name_Remote_Call_Interface : constant Name_Id := N + 199; Name_Remote_Types : constant Name_Id := N + 200; Name_Share_Generic : constant Name_Id := N + 201; -- GNAT Name_Shared : constant Name_Id := N + 202; -- Ada 83 Name_Shared_Passive : constant Name_Id := N + 203; -- Note: Storage_Size is not in this list because its name matches the -- name of the corresponding attribute. However, it is included in the -- definition of the type Attribute_Id, and the functions Get_Pragma_Id -- and Check_Pragma_Id correctly recognize and process Name_Storage_Size. -- Note: Storage_Unit is also omitted from the list because of a clash -- with an attribute name, and is treated similarly. Name_Source_Reference : constant Name_Id := N + 204; -- GNAT Name_Stream_Convert : constant Name_Id := N + 205; -- GNAT Name_Subtitle : constant Name_Id := N + 206; -- GNAT Name_Suppress_All : constant Name_Id := N + 207; -- GNAT Name_Suppress_Debug_Info : constant Name_Id := N + 208; -- GNAT Name_Suppress_Initialization : constant Name_Id := N + 209; -- GNAT Name_System_Name : constant Name_Id := N + 210; -- Ada 83 Name_Task_Info : constant Name_Id := N + 211; -- GNAT Name_Task_Name : constant Name_Id := N + 212; -- GNAT Name_Task_Storage : constant Name_Id := N + 213; -- VMS Name_Time_Slice : constant Name_Id := N + 214; -- GNAT Name_Title : constant Name_Id := N + 215; -- GNAT Name_Unchecked_Union : constant Name_Id := N + 216; -- GNAT Name_Unimplemented_Unit : constant Name_Id := N + 217; -- GNAT Name_Unreserve_All_Interrupts : constant Name_Id := N + 218; -- GNAT Name_Volatile : constant Name_Id := N + 219; Name_Volatile_Components : constant Name_Id := N + 220; Name_Weak_External : constant Name_Id := N + 221; -- GNAT Last_Pragma_Name : constant Name_Id := N + 221; -- Language convention names for pragma Convention/Export/Import/Interface -- Note that Name_C is not included in this list, since it was already -- declared earlier in the context of one-character identifier names -- (where the order is critical to the fast look up process). -- Note: there are no convention names corresponding to the conventions -- Entry and Protected, this is because these conventions cannot be -- specified by a pragma. -- Note: The convention name C_Pass_By_Copy is treated as entirely -- equivalent to C except when it is specified on a record type. In -- this case the convention of the record type is set to C, but in -- addition the flag C_Pass_By_Copy is set on the record type. First_Convention_Name : constant Name_Id := N + 222; Name_Ada : constant Name_Id := N + 222; Name_Asm : constant Name_Id := N + 223; Name_Assembler : constant Name_Id := N + 224; Name_COBOL : constant Name_Id := N + 225; Name_CPP : constant Name_Id := N + 226; Name_DLL : constant Name_Id := N + 227; Name_Fortran : constant Name_Id := N + 228; Name_Intrinsic : constant Name_Id := N + 229; Name_Java : constant Name_Id := N + 230; Name_Stdcall : constant Name_Id := N + 231; Name_Stubbed : constant Name_Id := N + 232; Name_Win32 : constant Name_Id := N + 233; Last_Convention_Name : constant Name_Id := N + 233; -- Other special names used in processing pragma arguments Name_As_Is : constant Name_Id := N + 234; Name_Body_File_Name : constant Name_Id := N + 235; Name_Casing : constant Name_Id := N + 236; Name_Code : constant Name_Id := N + 237; Name_Component : constant Name_Id := N + 238; Name_Component_Size_4 : constant Name_Id := N + 239; Name_Copy : constant Name_Id := N + 240; Name_D_Float : constant Name_Id := N + 241; Name_Descriptor : constant Name_Id := N + 242; Name_Default : constant Name_Id := N + 243; Name_Dot_Replacement : constant Name_Id := N + 244; Name_Dynamic : constant Name_Id := N + 245; Name_Entity : constant Name_Id := N + 246; Name_External_Name : constant Name_Id := N + 247; Name_First_Optional_Parameter : constant Name_Id := N + 248; Name_Form : constant Name_Id := N + 249; Name_G_Float : constant Name_Id := N + 250; Name_Gcc : constant Name_Id := N + 251; Name_Gnat : constant Name_Id := N + 252; Name_GPL : constant Name_Id := N + 253; Name_IEEE_Float : constant Name_Id := N + 254; Name_Internal : constant Name_Id := N + 255; Name_Link_Name : constant Name_Id := N + 256; Name_Lowercase : constant Name_Id := N + 257; Name_Max_Size : constant Name_Id := N + 258; Name_Mechanism : constant Name_Id := N + 259; Name_Mixedcase : constant Name_Id := N + 260; Name_Modified_GPL : constant Name_Id := N + 261; Name_Name : constant Name_Id := N + 262; Name_NCA : constant Name_Id := N + 263; Name_No : constant Name_Id := N + 264; Name_On : constant Name_Id := N + 265; Name_Parameter_Types : constant Name_Id := N + 266; Name_Reference : constant Name_Id := N + 267; Name_Restricted : constant Name_Id := N + 268; Name_Result_Mechanism : constant Name_Id := N + 269; Name_Result_Type : constant Name_Id := N + 270; Name_SB : constant Name_Id := N + 271; Name_Section : constant Name_Id := N + 272; Name_Semaphore : constant Name_Id := N + 273; Name_Spec_File_Name : constant Name_Id := N + 274; Name_Static : constant Name_Id := N + 275; Name_Stack_Size : constant Name_Id := N + 276; Name_Subunit_File_Name : constant Name_Id := N + 277; Name_Task_Stack_Size_Default : constant Name_Id := N + 278; Name_Task_Type : constant Name_Id := N + 279; Name_Time_Slicing_Enabled : constant Name_Id := N + 280; Name_Top_Guard : constant Name_Id := N + 281; Name_UBA : constant Name_Id := N + 282; Name_UBS : constant Name_Id := N + 283; Name_UBSB : constant Name_Id := N + 284; Name_Unit_Name : constant Name_Id := N + 285; Name_Unknown : constant Name_Id := N + 286; Name_Unrestricted : constant Name_Id := N + 287; Name_Uppercase : constant Name_Id := N + 288; Name_VAX_Float : constant Name_Id := N + 289; Name_VMS : constant Name_Id := N + 290; Name_Working_Storage : constant Name_Id := N + 291; -- Names of recognized attributes. The entries with the comment "Ada 83" -- are attributes that are defined in Ada 83, but not in Ada 95. These -- attributes are implemented in both Ada 83 and Ada 95 modes in GNAT. -- The entries marked GNAT are attributes that are defined by GNAT -- and implemented in both Ada 83 and Ada 95 modes. Full descriptions -- of these implementation dependent attributes may be found in the -- appropriate section in package Sem_Attr in file sem-attr.ads. -- The entries marked VMS are recognized only in OpenVMS implementations -- of GNAT, and are treated as illegal in all other contexts. First_Attribute_Name : constant Name_Id := N + 292; Name_Abort_Signal : constant Name_Id := N + 292; -- GNAT Name_Access : constant Name_Id := N + 293; Name_Address : constant Name_Id := N + 294; Name_Address_Size : constant Name_Id := N + 295; -- GNAT Name_Aft : constant Name_Id := N + 296; Name_Alignment : constant Name_Id := N + 297; Name_Asm_Input : constant Name_Id := N + 298; -- GNAT Name_Asm_Output : constant Name_Id := N + 299; -- GNAT Name_AST_Entry : constant Name_Id := N + 300; -- VMS Name_Bit : constant Name_Id := N + 301; -- GNAT Name_Bit_Order : constant Name_Id := N + 302; Name_Bit_Position : constant Name_Id := N + 303; -- GNAT Name_Body_Version : constant Name_Id := N + 304; Name_Callable : constant Name_Id := N + 305; Name_Caller : constant Name_Id := N + 306; Name_Code_Address : constant Name_Id := N + 307; -- GNAT Name_Component_Size : constant Name_Id := N + 308; Name_Compose : constant Name_Id := N + 309; Name_Constrained : constant Name_Id := N + 310; Name_Count : constant Name_Id := N + 311; Name_Default_Bit_Order : constant Name_Id := N + 312; -- GNAT Name_Definite : constant Name_Id := N + 313; Name_Delta : constant Name_Id := N + 314; Name_Denorm : constant Name_Id := N + 315; Name_Digits : constant Name_Id := N + 316; Name_Elaborated : constant Name_Id := N + 317; -- GNAT Name_Emax : constant Name_Id := N + 318; -- Ada 83 Name_Enum_Rep : constant Name_Id := N + 319; -- GNAT Name_Epsilon : constant Name_Id := N + 320; -- Ada 83 Name_Exponent : constant Name_Id := N + 321; Name_External_Tag : constant Name_Id := N + 322; Name_First : constant Name_Id := N + 323; Name_First_Bit : constant Name_Id := N + 324; Name_Fixed_Value : constant Name_Id := N + 325; -- GNAT Name_Fore : constant Name_Id := N + 326; Name_Has_Discriminants : constant Name_Id := N + 327; -- GNAT Name_Identity : constant Name_Id := N + 328; Name_Img : constant Name_Id := N + 329; -- GNAT Name_Integer_Value : constant Name_Id := N + 330; -- GNAT Name_Large : constant Name_Id := N + 331; -- Ada 83 Name_Last : constant Name_Id := N + 332; Name_Last_Bit : constant Name_Id := N + 333; Name_Leading_Part : constant Name_Id := N + 334; Name_Length : constant Name_Id := N + 335; Name_Machine_Emax : constant Name_Id := N + 336; Name_Machine_Emin : constant Name_Id := N + 337; Name_Machine_Mantissa : constant Name_Id := N + 338; Name_Machine_Overflows : constant Name_Id := N + 339; Name_Machine_Radix : constant Name_Id := N + 340; Name_Machine_Rounds : constant Name_Id := N + 341; Name_Machine_Size : constant Name_Id := N + 342; -- GNAT Name_Mantissa : constant Name_Id := N + 343; -- Ada 83 Name_Max_Interrupt_Priority : constant Name_Id := N + 344; -- GNAT Name_Max_Priority : constant Name_Id := N + 345; -- GNAT Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 346; Name_Maximum_Alignment : constant Name_Id := N + 347; -- GNAT Name_Mechanism_Code : constant Name_Id := N + 348; -- GNAT Name_Model_Emin : constant Name_Id := N + 349; Name_Model_Epsilon : constant Name_Id := N + 350; Name_Model_Mantissa : constant Name_Id := N + 351; Name_Model_Small : constant Name_Id := N + 352; Name_Modulus : constant Name_Id := N + 353; Name_Null_Parameter : constant Name_Id := N + 354; -- GNAT Name_Object_Size : constant Name_Id := N + 355; -- GNAT Name_Partition_ID : constant Name_Id := N + 356; Name_Passed_By_Reference : constant Name_Id := N + 357; -- GNAT Name_Pos : constant Name_Id := N + 358; Name_Position : constant Name_Id := N + 359; Name_Range : constant Name_Id := N + 360; Name_Range_Length : constant Name_Id := N + 361; -- GNAT Name_Round : constant Name_Id := N + 362; Name_Safe_Emax : constant Name_Id := N + 363; -- Ada 83 Name_Safe_First : constant Name_Id := N + 364; Name_Safe_Large : constant Name_Id := N + 365; -- Ada 83 Name_Safe_Last : constant Name_Id := N + 366; Name_Safe_Small : constant Name_Id := N + 367; -- Ada 83 Name_Scale : constant Name_Id := N + 368; Name_Scaling : constant Name_Id := N + 369; Name_Signed_Zeros : constant Name_Id := N + 370; Name_Size : constant Name_Id := N + 371; Name_Small : constant Name_Id := N + 372; Name_Storage_Size : constant Name_Id := N + 373; Name_Storage_Unit : constant Name_Id := N + 374; -- GNAT Name_Tag : constant Name_Id := N + 375; Name_Terminated : constant Name_Id := N + 376; Name_Tick : constant Name_Id := N + 377; -- GNAT Name_To_Address : constant Name_Id := N + 378; -- GNAT Name_Type_Class : constant Name_Id := N + 379; -- GNAT Name_UET_Address : constant Name_Id := N + 380; -- GNAT Name_Unbiased_Rounding : constant Name_Id := N + 381; Name_Unchecked_Access : constant Name_Id := N + 382; Name_Universal_Literal_String : constant Name_Id := N + 383; -- GNAT Name_Unrestricted_Access : constant Name_Id := N + 384; -- GNAT Name_VADS_Size : constant Name_Id := N + 385; -- GNAT Name_Val : constant Name_Id := N + 386; Name_Valid : constant Name_Id := N + 387; Name_Value_Size : constant Name_Id := N + 388; -- GNAT Name_Version : constant Name_Id := N + 389; Name_Wchar_T_Size : constant Name_Id := N + 390; -- GNAT Name_Wide_Width : constant Name_Id := N + 391; Name_Width : constant Name_Id := N + 392; Name_Word_Size : constant Name_Id := N + 393; -- GNAT -- Attributes that designate attributes returning renamable functions, -- i.e. functions that return other than a universal value. First_Renamable_Function_Attribute : constant Name_Id := N + 394; Name_Adjacent : constant Name_Id := N + 394; Name_Ceiling : constant Name_Id := N + 395; Name_Copy_Sign : constant Name_Id := N + 396; Name_Floor : constant Name_Id := N + 397; Name_Fraction : constant Name_Id := N + 398; Name_Image : constant Name_Id := N + 399; Name_Input : constant Name_Id := N + 400; Name_Machine : constant Name_Id := N + 401; Name_Max : constant Name_Id := N + 402; Name_Min : constant Name_Id := N + 403; Name_Model : constant Name_Id := N + 404; Name_Pred : constant Name_Id := N + 405; Name_Remainder : constant Name_Id := N + 406; Name_Rounding : constant Name_Id := N + 407; Name_Succ : constant Name_Id := N + 408; Name_Truncation : constant Name_Id := N + 409; Name_Value : constant Name_Id := N + 410; Name_Wide_Image : constant Name_Id := N + 411; Name_Wide_Value : constant Name_Id := N + 412; Last_Renamable_Function_Attribute : constant Name_Id := N + 412; -- Attributes that designate procedures First_Procedure_Attribute : constant Name_Id := N + 413; Name_Output : constant Name_Id := N + 413; Name_Read : constant Name_Id := N + 414; Name_Write : constant Name_Id := N + 415; Last_Procedure_Attribute : constant Name_Id := N + 415; -- Remaining attributes are ones that return entities First_Entity_Attribute_Name : constant Name_Id := N + 416; Name_Elab_Body : constant Name_Id := N + 416; -- GNAT Name_Elab_Spec : constant Name_Id := N + 417; -- GNAT Name_Storage_Pool : constant Name_Id := N + 418; -- These attributes are the ones that return types First_Type_Attribute_Name : constant Name_Id := N + 419; Name_Base : constant Name_Id := N + 419; Name_Class : constant Name_Id := N + 420; Last_Type_Attribute_Name : constant Name_Id := N + 420; Last_Entity_Attribute_Name : constant Name_Id := N + 420; Last_Attribute_Name : constant Name_Id := N + 420; -- Names of recognized locking policy identifiers -- Note: policies are identified by the first character of the -- name (e.g. C for Ceiling_Locking). If new policy names are added, -- the first character must be distinct. First_Locking_Policy_Name : constant Name_Id := N + 421; Name_Ceiling_Locking : constant Name_Id := N + 421; Name_Inheritance_Locking : constant Name_Id := N + 422; Last_Locking_Policy_Name : constant Name_Id := N + 422; -- Names of recognized queuing policy identifiers. -- Note: policies are identified by the first character of the -- name (e.g. F for FIFO_Queuing). If new policy names are added, -- the first character must be distinct. First_Queuing_Policy_Name : constant Name_Id := N + 423; Name_FIFO_Queuing : constant Name_Id := N + 423; Name_Priority_Queuing : constant Name_Id := N + 424; Last_Queuing_Policy_Name : constant Name_Id := N + 424; -- Names of recognized task dispatching policy identifiers -- Note: policies are identified by the first character of the -- name (e.g. F for FIFO_WIthinn_Priorities). If new policy names -- are added, the first character must be distinct. First_Task_Dispatching_Policy_Name : constant Name_Id := N + 425; Name_Fifo_Within_Priorities : constant Name_Id := N + 425; Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 425; -- Names of recognized checks for pragma Suppress First_Check_Name : constant Name_Id := N + 426; Name_Access_Check : constant Name_Id := N + 426; Name_Accessibility_Check : constant Name_Id := N + 427; Name_Discriminant_Check : constant Name_Id := N + 428; Name_Division_Check : constant Name_Id := N + 429; Name_Elaboration_Check : constant Name_Id := N + 430; Name_Index_Check : constant Name_Id := N + 431; Name_Length_Check : constant Name_Id := N + 432; Name_Overflow_Check : constant Name_Id := N + 433; Name_Range_Check : constant Name_Id := N + 434; Name_Storage_Check : constant Name_Id := N + 435; Name_Tag_Check : constant Name_Id := N + 436; Name_All_Checks : constant Name_Id := N + 437; Last_Check_Name : constant Name_Id := N + 437; -- Names corresponding to reserved keywords, excluding those already -- declared in the attribute list (Access, Delta, Digits, Range). Name_Abort : constant Name_Id := N + 438; Name_Abs : constant Name_Id := N + 439; Name_Accept : constant Name_Id := N + 440; Name_And : constant Name_Id := N + 441; Name_All : constant Name_Id := N + 442; Name_Array : constant Name_Id := N + 443; Name_At : constant Name_Id := N + 444; Name_Begin : constant Name_Id := N + 445; Name_Body : constant Name_Id := N + 446; Name_Case : constant Name_Id := N + 447; Name_Constant : constant Name_Id := N + 448; Name_Declare : constant Name_Id := N + 449; Name_Delay : constant Name_Id := N + 450; Name_Do : constant Name_Id := N + 451; Name_Else : constant Name_Id := N + 452; Name_Elsif : constant Name_Id := N + 453; Name_End : constant Name_Id := N + 454; Name_Entry : constant Name_Id := N + 455; Name_Exception : constant Name_Id := N + 456; Name_Exit : constant Name_Id := N + 457; Name_For : constant Name_Id := N + 458; Name_Function : constant Name_Id := N + 459; Name_Generic : constant Name_Id := N + 460; Name_Goto : constant Name_Id := N + 461; Name_If : constant Name_Id := N + 462; Name_In : constant Name_Id := N + 463; Name_Is : constant Name_Id := N + 464; Name_Limited : constant Name_Id := N + 465; Name_Loop : constant Name_Id := N + 466; Name_Mod : constant Name_Id := N + 467; Name_New : constant Name_Id := N + 468; Name_Not : constant Name_Id := N + 469; Name_Null : constant Name_Id := N + 470; Name_Of : constant Name_Id := N + 471; Name_Or : constant Name_Id := N + 472; Name_Others : constant Name_Id := N + 473; Name_Out : constant Name_Id := N + 474; Name_Package : constant Name_Id := N + 475; Name_Pragma : constant Name_Id := N + 476; Name_Private : constant Name_Id := N + 477; Name_Procedure : constant Name_Id := N + 478; Name_Raise : constant Name_Id := N + 479; Name_Record : constant Name_Id := N + 480; Name_Rem : constant Name_Id := N + 481; Name_Renames : constant Name_Id := N + 482; Name_Return : constant Name_Id := N + 483; Name_Reverse : constant Name_Id := N + 484; Name_Select : constant Name_Id := N + 485; Name_Separate : constant Name_Id := N + 486; Name_Subtype : constant Name_Id := N + 487; Name_Task : constant Name_Id := N + 488; Name_Terminate : constant Name_Id := N + 489; Name_Then : constant Name_Id := N + 490; Name_Type : constant Name_Id := N + 491; Name_Use : constant Name_Id := N + 492; Name_When : constant Name_Id := N + 493; Name_While : constant Name_Id := N + 494; Name_With : constant Name_Id := N + 495; Name_Xor : constant Name_Id := N + 496; -- Names of intrinsic subprograms -- Note: Asm is missing from this list, since Asm is a legitimate -- convention name. First_Intrinsic_Name : constant Name_Id := N + 497; Name_Divide : constant Name_Id := N + 497; Name_Enclosing_Entity : constant Name_Id := N + 498; Name_Exception_Information : constant Name_Id := N + 499; Name_Exception_Message : constant Name_Id := N + 500; Name_Exception_Name : constant Name_Id := N + 501; Name_File : constant Name_Id := N + 502; Name_Import_Address : constant Name_Id := N + 503; Name_Import_Largest_Value : constant Name_Id := N + 504; Name_Import_Value : constant Name_Id := N + 505; Name_Is_Negative : constant Name_Id := N + 506; Name_Line : constant Name_Id := N + 507; Name_Rotate_Left : constant Name_Id := N + 508; Name_Rotate_Right : constant Name_Id := N + 509; Name_Shift_Left : constant Name_Id := N + 510; Name_Shift_Right : constant Name_Id := N + 511; Name_Shift_Right_Arithmetic : constant Name_Id := N + 512; Name_Source_Location : constant Name_Id := N + 513; Name_Unchecked_Conversion : constant Name_Id := N + 514; Name_Unchecked_Deallocation : constant Name_Id := N + 515; Last_Intrinsic_Name : constant Name_Id := N + 515; -- Reserved words used only in Ada 95 First_95_Reserved_Word : constant Name_Id := N + 516; Name_Abstract : constant Name_Id := N + 516; Name_Aliased : constant Name_Id := N + 517; Name_Protected : constant Name_Id := N + 518; Name_Until : constant Name_Id := N + 519; Name_Requeue : constant Name_Id := N + 520; Name_Tagged : constant Name_Id := N + 521; Last_95_Reserved_Word : constant Name_Id := N + 521; subtype Ada_95_Reserved_Words is Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word; -- Miscellaneous names used in semantic checking Name_Raise_Exception : constant Name_Id := N + 522; -- Additional reserved words in GNAT Project Files -- Note that Name_External is already previously declared Name_Binder : constant Name_Id := N + 523; Name_Builder : constant Name_Id := N + 524; Name_Compiler : constant Name_Id := N + 525; Name_Cross_Reference : constant Name_Id := N + 526; Name_Default_Switches : constant Name_Id := N + 527; Name_Exec_Dir : constant Name_Id := N + 528; Name_Extends : constant Name_Id := N + 529; Name_Finder : constant Name_Id := N + 530; Name_Gnatls : constant Name_Id := N + 531; Name_Gnatstub : constant Name_Id := N + 532; Name_Implementation : constant Name_Id := N + 533; Name_Implementation_Exceptions : constant Name_Id := N + 534; Name_Implementation_Suffix : constant Name_Id := N + 535; Name_Languages : constant Name_Id := N + 536; Name_Library_Dir : constant Name_Id := N + 537; Name_Library_Elaboration : constant Name_Id := N + 538; Name_Library_Kind : constant Name_Id := N + 539; Name_Library_Name : constant Name_Id := N + 540; Name_Library_Version : constant Name_Id := N + 541; Name_Linker : constant Name_Id := N + 542; Name_Naming : constant Name_Id := N + 543; Name_Object_Dir : constant Name_Id := N + 544; Name_Project : constant Name_Id := N + 545; Name_Separate_Suffix : constant Name_Id := N + 546; Name_Source_Dirs : constant Name_Id := N + 547; Name_Source_Files : constant Name_Id := N + 548; Name_Source_List_File : constant Name_Id := N + 549; Name_Specification : constant Name_Id := N + 550; Name_Specification_Exceptions : constant Name_Id := N + 551; Name_Specification_Suffix : constant Name_Id := N + 552; Name_Switches : constant Name_Id := N + 553; -- Mark last defined name for consistency check in Snames body Last_Predefined_Name : constant Name_Id := N + 553; subtype Any_Operator_Name is Name_Id range First_Operator_Name .. Last_Operator_Name; ------------------------------ -- Attribute ID Definitions -- ------------------------------ type Attribute_Id is ( Attribute_Abort_Signal, Attribute_Access, Attribute_Address, Attribute_Address_Size, Attribute_Aft, Attribute_Alignment, Attribute_Asm_Input, Attribute_Asm_Output, Attribute_AST_Entry, Attribute_Bit, Attribute_Bit_Order, Attribute_Bit_Position, Attribute_Body_Version, Attribute_Callable, Attribute_Caller, Attribute_Code_Address, Attribute_Component_Size, Attribute_Compose, Attribute_Constrained, Attribute_Count, Attribute_Default_Bit_Order, Attribute_Definite, Attribute_Delta, Attribute_Denorm, Attribute_Digits, Attribute_Elaborated, Attribute_Emax, Attribute_Enum_Rep, Attribute_Epsilon, Attribute_Exponent, Attribute_External_Tag, Attribute_First, Attribute_First_Bit, Attribute_Fixed_Value, Attribute_Fore, Attribute_Has_Discriminants, Attribute_Identity, Attribute_Img, Attribute_Integer_Value, Attribute_Large, Attribute_Last, Attribute_Last_Bit, Attribute_Leading_Part, Attribute_Length, Attribute_Machine_Emax, Attribute_Machine_Emin, Attribute_Machine_Mantissa, Attribute_Machine_Overflows, Attribute_Machine_Radix, Attribute_Machine_Rounds, Attribute_Machine_Size, Attribute_Mantissa, Attribute_Max_Interrupt_Priority, Attribute_Max_Priority, Attribute_Max_Size_In_Storage_Elements, Attribute_Maximum_Alignment, Attribute_Mechanism_Code, Attribute_Model_Emin, Attribute_Model_Epsilon, Attribute_Model_Mantissa, Attribute_Model_Small, Attribute_Modulus, Attribute_Null_Parameter, Attribute_Object_Size, Attribute_Partition_ID, Attribute_Passed_By_Reference, Attribute_Pos, Attribute_Position, Attribute_Range, Attribute_Range_Length, Attribute_Round, Attribute_Safe_Emax, Attribute_Safe_First, Attribute_Safe_Large, Attribute_Safe_Last, Attribute_Safe_Small, Attribute_Scale, Attribute_Scaling, Attribute_Signed_Zeros, Attribute_Size, Attribute_Small, Attribute_Storage_Size, Attribute_Storage_Unit, Attribute_Tag, Attribute_Terminated, Attribute_Tick, Attribute_To_Address, Attribute_Type_Class, Attribute_UET_Address, Attribute_Unbiased_Rounding, Attribute_Unchecked_Access, Attribute_Universal_Literal_String, Attribute_Unrestricted_Access, Attribute_VADS_Size, Attribute_Val, Attribute_Valid, Attribute_Value_Size, Attribute_Version, Attribute_Wchar_T_Size, Attribute_Wide_Width, Attribute_Width, Attribute_Word_Size, -- Attributes designating renamable functions Attribute_Adjacent, Attribute_Ceiling, Attribute_Copy_Sign, Attribute_Floor, Attribute_Fraction, Attribute_Image, Attribute_Input, Attribute_Machine, Attribute_Max, Attribute_Min, Attribute_Model, Attribute_Pred, Attribute_Remainder, Attribute_Rounding, Attribute_Succ, Attribute_Truncation, Attribute_Value, Attribute_Wide_Image, Attribute_Wide_Value, -- Attributes designating procedures Attribute_Output, Attribute_Read, Attribute_Write, -- Entity attributes (includes type attributes) Attribute_Elab_Body, Attribute_Elab_Spec, Attribute_Storage_Pool, -- Type attributes Attribute_Base, Attribute_Class); ------------------------------- -- Check Name ID Definitions -- ------------------------------- type Check_Id is ( Access_Check, Accessibility_Check, Discriminant_Check, Division_Check, Elaboration_Check, Index_Check, Length_Check, Overflow_Check, Range_Check, Storage_Check, Tag_Check, All_Checks); ------------------------------------ -- Convention Name ID Definitions -- ------------------------------------ type Convention_Id is ( -- The conventions that are defined by the RM come first Convention_Ada, Convention_Intrinsic, Convention_Entry, Convention_Protected, -- The remaining conventions are foreign language conventions Convention_Assembler, Convention_C, Convention_COBOL, Convention_CPP, Convention_Fortran, Convention_Java, Convention_Stdcall, Convention_Stubbed); -- Note: Conventions C_Pass_By_Copy, External, and Default are all -- treated as synonyms for convention C (with an appropriate flag -- being set in a record type in the case of C_Pass_By_Copy). See -- processing in Sem_Prag for details. -- Note: convention Win32 has the same effect as convention Stdcall -- and as a special exception to normal rules is considered to be -- conformant with convention Stdcall. Therefore if the convention -- Win32 is encountered, it is translated into Convention_Stdcall. for Convention_Id'Size use 8; -- Plenty of space for expansion subtype Foreign_Convention is Convention_Id range Convention_Assembler .. Convention_Stdcall; ----------------------------------- -- Locking Policy ID Definitions -- ----------------------------------- type Locking_Policy_Id is ( Locking_Policy_Inheritance_Locking, Locking_Policy_Ceiling_Locking); --------------------------- -- Pragma ID Definitions -- --------------------------- type Pragma_Id is ( -- Configuration pragmas Pragma_Ada_83, Pragma_Ada_95, Pragma_C_Pass_By_Copy, Pragma_Component_Alignment, Pragma_Discard_Names, Pragma_Elaboration_Checks, Pragma_Eliminate, Pragma_Extend_System, Pragma_Extensions_Allowed, Pragma_External_Name_Casing, Pragma_Float_Representation, Pragma_Initialize_Scalars, Pragma_License, Pragma_Locking_Policy, Pragma_Long_Float, Pragma_No_Run_Time, Pragma_Normalize_Scalars, Pragma_Polling, Pragma_Propagate_Exceptions, Pragma_Queuing_Policy, Pragma_Ravenscar, Pragma_Restricted_Run_Time, Pragma_Restrictions, Pragma_Reviewable, Pragma_Source_File_Name, Pragma_Style_Checks, Pragma_Suppress, Pragma_Task_Dispatching_Policy, Pragma_Unsuppress, Pragma_Use_VADS_Size, Pragma_Warnings, Pragma_Validity_Checks, -- Remaining (non-configuration) pragmas Pragma_Abort_Defer, Pragma_All_Calls_Remote, Pragma_Annotate, Pragma_Assert, Pragma_Asynchronous, Pragma_Atomic, Pragma_Atomic_Components, Pragma_Attach_Handler, Pragma_Comment, Pragma_Common_Object, Pragma_Complex_Representation, Pragma_Controlled, Pragma_Convention, Pragma_CPP_Class, Pragma_CPP_Constructor, Pragma_CPP_Virtual, Pragma_CPP_Vtable, Pragma_Debug, Pragma_Elaborate, Pragma_Elaborate_All, Pragma_Elaborate_Body, Pragma_Export, Pragma_Export_Exception, Pragma_Export_Function, Pragma_Export_Object, Pragma_Export_Procedure, Pragma_Export_Valued_Procedure, Pragma_External, Pragma_Finalize_Storage_Only, Pragma_Ident, Pragma_Import, Pragma_Import_Exception, Pragma_Import_Function, Pragma_Import_Object, Pragma_Import_Procedure, Pragma_Import_Valued_Procedure, Pragma_Inline, Pragma_Inline_Always, Pragma_Inline_Generic, Pragma_Inspection_Point, Pragma_Interface, Pragma_Interface_Name, Pragma_Interrupt_Handler, Pragma_Interrupt_Priority, Pragma_Java_Constructor, Pragma_Java_Interface, Pragma_Link_With, Pragma_Linker_Alias, Pragma_Linker_Options, Pragma_Linker_Section, Pragma_List, Pragma_Machine_Attribute, Pragma_Main, Pragma_Main_Storage, Pragma_Memory_Size, Pragma_No_Return, Pragma_Optimize, Pragma_Pack, Pragma_Page, Pragma_Passive, Pragma_Preelaborate, Pragma_Priority, Pragma_Psect_Object, Pragma_Pure, Pragma_Pure_Function, Pragma_Remote_Call_Interface, Pragma_Remote_Types, Pragma_Share_Generic, Pragma_Shared, Pragma_Shared_Passive, Pragma_Source_Reference, Pragma_Stream_Convert, Pragma_Subtitle, Pragma_Suppress_All, Pragma_Suppress_Debug_Info, Pragma_Suppress_Initialization, Pragma_System_Name, Pragma_Task_Info, Pragma_Task_Name, Pragma_Task_Storage, Pragma_Time_Slice, Pragma_Title, Pragma_Unchecked_Union, Pragma_Unimplemented_Unit, Pragma_Unreserve_All_Interrupts, Pragma_Volatile, Pragma_Volatile_Components, Pragma_Weak_External, -- The following pragmas are on their own, out of order, because of -- the special processing required to deal with the fact that their -- names match existing attribute names. Pragma_AST_Entry, Pragma_Storage_Size, Pragma_Storage_Unit); ----------------------------------- -- Queuing Policy ID definitions -- ----------------------------------- type Queuing_Policy_Id is ( Queuing_Policy_FIFO_Queuing, Queuing_Policy_Priority_Queuing); -------------------------------------------- -- Task Dispatching Policy ID definitions -- -------------------------------------------- type Task_Dispatching_Policy_Id is ( Task_Dispatching_FIFO_Within_Priorities); -- Id values used to identify task dispatching policies ----------------- -- Subprograms -- ----------------- procedure Initialize; -- Called to initialize the preset names in the names table. function Is_Attribute_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized attribute function Is_Entity_Attribute_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized entity attribute, -- i.e. an attribute reference that returns an entity. function Is_Procedure_Attribute_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized attribute that -- designates a procedure (and can therefore appear as a statement). function Is_Function_Attribute_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized attribute -- that designates a renameable function, and can therefore appear in -- a renaming statement. Note that not all attributes designating -- functions are renamable, in particular, thos returning a universal -- value cannot be renamed. function Is_Type_Attribute_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized type attribute, -- i.e. an attribute reference that returns a type function Is_Check_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized suppress check -- as required by pragma Suppress. function Is_Convention_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of one of the recognized language -- conventions, as required by pragma Convention, Import, Export, Interface function Is_Locking_Policy_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized locking policy function Is_Operator_Symbol_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of an operator symbol function Is_Pragma_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized pragma. Note -- that pragmas AST_Entry, Storage_Size, and Storage_Unit are recognized -- as pragmas by this function even though their names are separate from -- the other pragma names. function Is_Queuing_Policy_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized queuing policy function Is_Task_Dispatching_Policy_Name (N : Name_Id) return Boolean; -- Test to see if the name N is the name of a recognized -- task dispatching policy function Get_Attribute_Id (N : Name_Id) return Attribute_Id; -- Returns Id of attribute corresponding to given name. It is an error to -- call this function with a name that is not the name of a attribute. function Get_Convention_Id (N : Name_Id) return Convention_Id; -- Returns Id of language convention corresponding to given name. It is an -- to call this function with a name that is not the name of a check. function Get_Check_Id (N : Name_Id) return Check_Id; -- Returns Id of suppress check corresponding to given name. It is an error -- to call this function with a name that is not the name of a check. function Get_Locking_Policy_Id (N : Name_Id) return Locking_Policy_Id; -- Returns Id of locking policy corresponding to given name. It is an error -- to call this function with a name that is not the name of a check. function Get_Pragma_Id (N : Name_Id) return Pragma_Id; -- Returns Id of pragma corresponding to given name. It is an error to -- call this function with a name that is not the name of a pragma. Note -- that the function also works correctly for names of pragmas that are -- not in the main list of pragma Names (AST_Entry, Storage_Size, and -- Storage_Unit (e.g. Name_Storage_Size returns Pragma_Storage_Size). function Get_Queuing_Policy_Id (N : Name_Id) return Queuing_Policy_Id; -- Returns Id of queuing policy corresponding to given name. It is an error -- to call this function with a name that is not the name of a check. function Get_Task_Dispatching_Policy_Id (N : Name_Id) return Task_Dispatching_Policy_Id; -- Returns Id of task dispatching policy corresponding to given name. It -- is an error to call this function with a name that is not the name -- of a check. private pragma Inline (Is_Attribute_Name); pragma Inline (Is_Entity_Attribute_Name); pragma Inline (Is_Type_Attribute_Name); pragma Inline (Is_Check_Name); pragma Inline (Is_Convention_Name); pragma Inline (Is_Locking_Policy_Name); pragma Inline (Is_Operator_Symbol_Name); pragma Inline (Is_Queuing_Policy_Name); pragma Inline (Is_Pragma_Name); pragma Inline (Is_Task_Dispatching_Policy_Name); end Snames;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016-2020, 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 nRF.GPIO; use nRF.GPIO; with nRF.RTC; use nRF.RTC; with NRF_SVD.RTC; with nRF.TWI; use nRF.TWI; with NRF_SVD.TWI; with nRF.SPI_Master; use nRF.SPI_Master; with NRF_SVD.SPI; with nRF.Timers; use nRF.Timers; with NRF_SVD.TIMER; with nRF.UART; use nRF.UART; with NRF_SVD.UART; package nRF.Device is pragma Elaborate_Body; P00 : aliased GPIO_Point := (Pin => 00); P01 : aliased GPIO_Point := (Pin => 01); P02 : aliased GPIO_Point := (Pin => 02); P03 : aliased GPIO_Point := (Pin => 03); P04 : aliased GPIO_Point := (Pin => 04); P05 : aliased GPIO_Point := (Pin => 05); P06 : aliased GPIO_Point := (Pin => 06); P07 : aliased GPIO_Point := (Pin => 07); P08 : aliased GPIO_Point := (Pin => 08); P09 : aliased GPIO_Point := (Pin => 09); P10 : aliased GPIO_Point := (Pin => 10); P11 : aliased GPIO_Point := (Pin => 11); P12 : aliased GPIO_Point := (Pin => 12); P13 : aliased GPIO_Point := (Pin => 13); P14 : aliased GPIO_Point := (Pin => 14); P15 : aliased GPIO_Point := (Pin => 15); P16 : aliased GPIO_Point := (Pin => 16); P17 : aliased GPIO_Point := (Pin => 17); P18 : aliased GPIO_Point := (Pin => 18); P19 : aliased GPIO_Point := (Pin => 19); P20 : aliased GPIO_Point := (Pin => 20); P21 : aliased GPIO_Point := (Pin => 21); P22 : aliased GPIO_Point := (Pin => 22); P23 : aliased GPIO_Point := (Pin => 23); P24 : aliased GPIO_Point := (Pin => 24); P25 : aliased GPIO_Point := (Pin => 25); P26 : aliased GPIO_Point := (Pin => 26); P27 : aliased GPIO_Point := (Pin => 27); P28 : aliased GPIO_Point := (Pin => 28); P29 : aliased GPIO_Point := (Pin => 29); P30 : aliased GPIO_Point := (Pin => 30); P31 : aliased GPIO_Point := (Pin => 31); RTC_0 : aliased Real_Time_Counter (NRF_SVD.RTC.RTC0_Periph'Access); RTC_1 : aliased Real_Time_Counter (NRF_SVD.RTC.RTC1_Periph'Access); RTC_2 : aliased Real_Time_Counter (NRF_SVD.RTC.RTC2_Periph'Access); -- Be carefull of shared resources between the TWI and SPI controllers. -- TWI_O and SPI_Master_0 cannot be used at the same time. -- TWI_1 and SPI_Master_1 cannot be used at the same time. -- -- See nRF Series Reference Manual, chapter Memory.Instantiation. TWI_0 : aliased TWI_Master (NRF_SVD.TWI.TWI0_Periph'Access); TWI_1 : aliased TWI_Master (NRF_SVD.TWI.TWI1_Periph'Access); SPI_Master_0 : aliased nRF.SPI_Master.SPI_Master (NRF_SVD.SPI.SPI0_Periph'Access); SPI_Master_1 : aliased nRF.SPI_Master.SPI_Master (NRF_SVD.SPI.SPI1_Periph'Access); SPI_Master_2 : aliased nRF.SPI_Master.SPI_Master (NRF_SVD.SPI.SPI2_Periph'Access); Timer_0 : aliased Timer (NRF_SVD.TIMER.TIMER0_Periph'Access); Timer_1 : aliased Timer (NRF_SVD.TIMER.TIMER1_Periph'Access); Timer_2 : aliased Timer (NRF_SVD.TIMER.TIMER2_Periph'Access); Timer_3 : aliased Timer (NRF_SVD.TIMER.TIMER3_Periph'Access); Timer_4 : aliased Timer (NRF_SVD.TIMER.TIMER4_Periph'Access); UART_0 : aliased UART_Device (NRF_SVD.UART.UART0_Periph'Access); end nRF.Device;
-- see OpenUxAS\src\Communications\ZeroMqReceiverBase.h with ZMQ.Sockets; use ZMQ.Sockets; with UxAS.Comms.Transport.ZeroMQ_Socket_Configurations; use UxAS.Comms.Transport.ZeroMQ_Socket_Configurations; package UxAS.Comms.Transport.Receiver.ZeroMQ is type ZeroMq_Receiver_Base is abstract new Transport_Receiver_Base with private; -- Note: we don't implement the dtor -- void -- initialize(uint32_t entityId, uint32_t serviceId, SocketConfiguration& zeroMqSocketConfiguration); procedure Initialize (This : in out ZeroMq_Receiver_Base; Entity_Id : UInt32; Service_Id : UInt32; Socket_Configuration : ZeroMq_Socket_Configuration); -- Note: not a reference. TODO: check this -- bool -- addSubscriptionAddressToSocket(const std::string& address) override; overriding procedure Add_Subscription_Address_To_Socket (This : in out ZeroMq_Receiver_Base; Address : String; Result : out Boolean); -- bool -- removeSubscriptionAddressFromSocket(const std::string& address) override; overriding procedure Remove_Subscription_Address_From_Socket (This : in out ZeroMq_Receiver_Base; Address : String; Result : out Boolean); private type ZeroMq_Receiver_Base is new Transport_Receiver_Base with record Entity_Id_String : Dynamic_String (Capacity => Entity_Id_String_Max_Length); Service_Id_String : Dynamic_String (Capacity => Service_Id_String_Max_Length); Socket_Configuration : ZeroMq_Socket_Configuration; -- std::unique_ptr<zmq::socket_t> m_zmqSocket; Zmq_Socket : ZMQ.Sockets.Socket; -- NOTE: not a pointer (TODO: change??) end record; end UxAS.Comms.Transport.Receiver.ZeroMQ;
pragma License (Unrestricted); -- extended unit generic type Index_Type is range <>; type Element_Type is private; type Array_Type is array (Index_Type range <>) of Element_Type; -- diff (Array_Access) -- diff (Free) package Ada.Containers.Generic_Array_Types is -- Ada.Containers.Vectors-like utilities for array types. pragma Preelaborate; subtype Extended_Index is Index_Type'Base range Index_Type'Base'Pred (Index_Type'First) .. Index_Type'Last; function Length (Container : Array_Type) return Count_Type; -- diff (Set_Length) -- -- -- diff (Clear) -- procedure Assign (Target : in out Array_Type; Source : Array_Type); procedure Move ( Target : in out Array_Type; Source : in out Array_Type); -- diff (Insert) -- -- -- -- diff (Insert) -- -- -- -- diff (Insert) -- -- -- -- -- diff (Insert) -- -- -- -- diff (Prepend) -- -- -- diff (Prepend) -- -- -- diff (Prepend) -- -- -- -- diff (Prepend) -- -- -- diff (Append) -- -- -- diff (Append) -- -- -- diff (Append) -- -- -- -- diff (Append) -- -- -- diff (Delete) -- -- -- -- diff (Delete_First) -- -- -- diff (Delete_Last) -- -- procedure Swap (Container : in out Array_Type; I, J : Index_Type); function First_Index (Container : Array_Type) return Index_Type; function Last_Index (Container : Array_Type) return Extended_Index; generic with procedure Swap ( Container : in out Array_Type; I, J : Index_Type) is Generic_Array_Types.Swap; package Generic_Reversing is procedure Reverse_Elements (Container : in out Array_Type); procedure Reverse_Rotate_Elements ( Container : in out Array_Type; Before : Extended_Index); procedure Juggling_Rotate_Elements ( Container : in out Array_Type; Before : Extended_Index); procedure Rotate_Elements ( Container : in out Array_Type; Before : Extended_Index) renames Juggling_Rotate_Elements; end Generic_Reversing; generic with function "<" (Left, Right : Element_Type) return Boolean is <>; with procedure Swap ( Container : in out Array_Type; I, J : Index_Type) is Generic_Array_Types.Swap; package Generic_Sorting is function Is_Sorted (Container : Array_Type) return Boolean; procedure Insertion_Sort (Container : in out Array_Type); procedure Merge_Sort (Container : in out Array_Type); procedure Sort (Container : in out Array_Type) renames Merge_Sort; -- diff (Merge) -- -- end Generic_Sorting; end Ada.Containers.Generic_Array_Types;
-- Generated at 2014-10-01 17:18:35 +0000 by Natools.Static_Hash_Maps -- from src/natools-s_expressions-templates-generic_integers-maps.sx package Natools.Static_Maps.S_Expressions.Templates.Integers is pragma Pure; type Main_Command is (Error, Align, Align_Center, Align_Left, Align_Right, Base, Image_Range, Images, Padding, Padding_Left, Padding_Right, Prefix, Sign, Suffix, Width, Width_Max, Width_Min); type Align_Command is (Unknown_Align, Set_Left, Set_Center, Set_Right); function Main (Key : String) return Main_Command; function To_Align_Command (Key : String) return Align_Command; private Map_1_Key_0 : aliased constant String := "align"; Map_1_Key_1 : aliased constant String := "align-center"; Map_1_Key_2 : aliased constant String := "centered"; Map_1_Key_3 : aliased constant String := "align-left"; Map_1_Key_4 : aliased constant String := "left-align"; Map_1_Key_5 : aliased constant String := "align-right"; Map_1_Key_6 : aliased constant String := "right-align"; Map_1_Key_7 : aliased constant String := "base"; Map_1_Key_8 : aliased constant String := "image-range"; Map_1_Key_9 : aliased constant String := "image"; Map_1_Key_10 : aliased constant String := "images"; Map_1_Key_11 : aliased constant String := "padding"; Map_1_Key_12 : aliased constant String := "padding-left"; Map_1_Key_13 : aliased constant String := "left-padding"; Map_1_Key_14 : aliased constant String := "padding-right"; Map_1_Key_15 : aliased constant String := "right-padding"; Map_1_Key_16 : aliased constant String := "prefix"; Map_1_Key_17 : aliased constant String := "sign"; Map_1_Key_18 : aliased constant String := "signs"; Map_1_Key_19 : aliased constant String := "suffix"; Map_1_Key_20 : aliased constant String := "width"; Map_1_Key_21 : aliased constant String := "width-max"; Map_1_Key_22 : aliased constant String := "max-width"; Map_1_Key_23 : aliased constant String := "width-min"; Map_1_Key_24 : aliased constant String := "min-width"; Map_1_Keys : constant array (0 .. 24) of access constant String := (Map_1_Key_0'Access, Map_1_Key_1'Access, Map_1_Key_2'Access, Map_1_Key_3'Access, Map_1_Key_4'Access, Map_1_Key_5'Access, Map_1_Key_6'Access, Map_1_Key_7'Access, Map_1_Key_8'Access, Map_1_Key_9'Access, Map_1_Key_10'Access, Map_1_Key_11'Access, Map_1_Key_12'Access, Map_1_Key_13'Access, Map_1_Key_14'Access, Map_1_Key_15'Access, Map_1_Key_16'Access, Map_1_Key_17'Access, Map_1_Key_18'Access, Map_1_Key_19'Access, Map_1_Key_20'Access, Map_1_Key_21'Access, Map_1_Key_22'Access, Map_1_Key_23'Access, Map_1_Key_24'Access); Map_1_Elements : constant array (0 .. 24) of Main_Command := (Align, Align_Center, Align_Center, Align_Left, Align_Left, Align_Right, Align_Right, Base, Image_Range, Images, Images, Padding, Padding_Left, Padding_Left, Padding_Right, Padding_Right, Prefix, Sign, Sign, Suffix, Width, Width_Max, Width_Max, Width_Min, Width_Min); Map_2_Key_0 : aliased constant String := "left"; Map_2_Key_1 : aliased constant String := "center"; Map_2_Key_2 : aliased constant String := "right"; Map_2_Keys : constant array (0 .. 2) of access constant String := (Map_2_Key_0'Access, Map_2_Key_1'Access, Map_2_Key_2'Access); Map_2_Elements : constant array (0 .. 2) of Align_Command := (Set_Left, Set_Center, Set_Right); end Natools.Static_Maps.S_Expressions.Templates.Integers;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2017, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with Matreshka.Internals.Strings; package AMF.Internals.Tables.UML_String_Data_0C is -- "The query unlimitedValue() gives a single UnlimitedNatural value when one can be computed." MS_0C00 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 90, Length => 90, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0075#, 16#006E#, 16#006C#, 16#0069#, 16#006D#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#0056#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0028#, 16#0029#, 16#0020#, 16#0067#, 16#0069#, 16#0076#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#006C#, 16#0065#, 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#0020#, 16#0077#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#0075#, 16#0074#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "A_deferrableTrigger_state" MS_0C01 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 25, Length => 25, Value => (16#0041#, 16#005F#, 16#0064#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0072#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0054#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#005F#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, others => 16#0000#), others => <>); -- "LinkEndDestructionData for ordered nonunique association ends must have a single destroyAt input pin if isDestroyDuplicates is false. It must be of type UnlimitedNatural and have a multiplicity of 1..1. Otherwise, the action has no input pin for the removal position." MS_0C02 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 279, Unused => 267, Length => 267, 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#0066#, 16#006F#, 16#0072#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#006E#, 16#006F#, 16#006E#, 16#0075#, 16#006E#, 16#0069#, 16#0071#, 16#0075#, 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#0065#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#006C#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#0041#, 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#0066#, 16#0020#, 16#0069#, 16#0073#, 16#0044#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#0044#, 16#0075#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0066#, 16#0061#, 16#006C#, 16#0073#, 16#0065#, 16#002E#, 16#0020#, 16#0049#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 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#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 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#0031#, 16#002E#, 16#002E#, 16#0031#, 16#002E#, 16#0020#, 16#004F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0077#, 16#0069#, 16#0073#, 16#0065#, 16#002C#, 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#0068#, 16#0061#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#006D#, 16#006F#, 16#0076#, 16#0061#, 16#006C#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description." MS_0C03 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 335, Unused => 323, Length => 323, Value => (16#0041#, 16#0020#, 16#0073#, 16#006C#, 16#006F#, 16#0074#, 16#0020#, 16#0067#, 16#0069#, 16#0076#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 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#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#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#002E#, 16#0020#, 16#0041#, 16#006E#, 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#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 16#0020#, 16#0073#, 16#006C#, 16#006F#, 16#0074#, 16#0020#, 16#0070#, 16#0065#, 16#0072#, 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#0069#, 16#0074#, 16#0073#, 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#0069#, 16#006E#, 16#0063#, 16#006C#, 16#0075#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0069#, 16#006E#, 16#0068#, 16#0065#, 16#0072#, 16#0069#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0073#, 16#002E#, 16#0020#, 16#0049#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 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#006D#, 16#006F#, 16#0064#, 16#0065#, 16#006C#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#006C#, 16#006F#, 16#0074#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 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#002C#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 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#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0061#, 16#006C#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0063#, 16#0072#, 16#0069#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "A_observation_duration" MS_0C04 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0041#, 16#005F#, 16#006F#, 16#0062#, 16#0073#, 16#0065#, 16#0072#, 16#0076#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0064#, 16#0075#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "direction" MS_0C05 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0064#, 16#0069#, 16#0072#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "incoming_edges_structured_only" MS_0C06 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 30, Length => 30, Value => (16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0073#, 16#005F#, 16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#005F#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, others => 16#0000#), others => <>); -- "destroyObjectAction" MS_0C07 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0064#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 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 => <>); -- "dimension_not_contained" MS_0C08 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 23, Length => 23, Value => (16#0064#, 16#0069#, 16#006D#, 16#0065#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#006E#, 16#006F#, 16#0074#, 16#005F#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0061#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, others => 16#0000#), others => <>); -- "An enumeration literal is a user-defined data value for an enumeration." MS_0C09 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 71, Length => 71, Value => (16#0041#, 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#006C#, 16#0069#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0072#, 16#002D#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0064#, 16#0061#, 16#0074#, 16#0061#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 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#002E#, others => 16#0000#), others => <>); -- "importedPackage" MS_0C0A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 15, Length => 15, Value => (16#0069#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0065#, 16#0064#, 16#0050#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, others => 16#0000#), others => <>); -- "condition" MS_0C0B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "max" MS_0C0C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 3, Length => 3, Value => (16#006D#, 16#0061#, 16#0078#, others => 16#0000#), others => <>); -- "Constraint of the operand." MS_0C0D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 26, Length => 26, Value => (16#0043#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0074#, 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#006E#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "Missing derivation for ProtocolTransition::/referred : Operation" MS_0C0E : 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#0050#, 16#0072#, 16#006F#, 16#0074#, 16#006F#, 16#0063#, 16#006F#, 16#006C#, 16#0054#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#003A#, 16#003A#, 16#002F#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#003A#, 16#0020#, 16#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "A_elementImport_importingNamespace" MS_0C0F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#0041#, 16#005F#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0049#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#005F#, 16#0069#, 16#006D#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, others => 16#0000#), others => <>); -- "A_realizingClassifier_componentRealization" MS_0C10 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 42, Length => 42, Value => (16#0041#, 16#005F#, 16#0072#, 16#0065#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0069#, 16#006E#, 16#0067#, 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#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 => <>); -- "A_ownedAttribute_structuredClassifier" MS_0C11 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 37, Length => 37, Value => (16#0041#, 16#005F#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0041#, 16#0074#, 16#0074#, 16#0072#, 16#0069#, 16#0062#, 16#0075#, 16#0074#, 16#0065#, 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_object_readIsClassifiedObjectAction" MS_0C12 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 37, Length => 37, Value => (16#0041#, 16#005F#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#005F#, 16#0072#, 16#0065#, 16#0061#, 16#0064#, 16#0049#, 16#0073#, 16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0064#, 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 => <>); -- "A_qualifier_associationEnd" MS_0C13 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 26, Length => 26, Value => (16#0041#, 16#005F#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#005F#, 16#0061#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0045#, 16#006E#, 16#0064#, others => 16#0000#), others => <>); -- "sequential" MS_0C14 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0073#, 16#0065#, 16#0071#, 16#0075#, 16#0065#, 16#006E#, 16#0074#, 16#0069#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "The enclosing Interaction owning the Message" MS_0C15 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 44, Length => 44, Value => (16#0054#, 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#006F#, 16#0077#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 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 => <>); -- "The fromAction of an action input pin must have exactly one output pin." MS_0C16 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 71, Length => 71, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0041#, 16#0063#, 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#006F#, 16#006E#, 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#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0061#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 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#0069#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The type and ordering of the result output pin of a read-variable action are the same as the type and ordering of the variable." MS_0C17 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 127, Length => 127, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 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#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 16#0064#, 16#002D#, 16#0076#, 16#0061#, 16#0072#, 16#0069#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 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#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#0072#, 16#0069#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "object" MS_0C18 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 6, Length => 6, Value => (16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, others => 16#0000#), others => <>); -- "ownedUseCase" MS_0C19 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 12, Length => 12, Value => (16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0055#, 16#0073#, 16#0065#, 16#0043#, 16#0061#, 16#0073#, 16#0065#, others => 16#0000#), others => <>); -- "gates_match" MS_0C1A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0067#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#005F#, 16#006D#, 16#0061#, 16#0074#, 16#0063#, 16#0068#, others => 16#0000#), others => <>); -- "durationObservation" MS_0C1B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (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 => <>); -- "actionInputPin" MS_0C1C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0049#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0050#, 16#0069#, 16#006E#, others => 16#0000#), others => <>); -- "An execution environment is a node that offers an execution environment for specific types of components that are deployed on it in the form of executable artifacts." MS_0C1D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 175, Unused => 165, Length => 165, Value => (16#0041#, 16#006E#, 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#0076#, 16#0069#, 16#0072#, 16#006F#, 16#006E#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0066#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 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#0076#, 16#0069#, 16#0072#, 16#006F#, 16#006E#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 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#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0070#, 16#006C#, 16#006F#, 16#0079#, 16#0065#, 16#0064#, 16#0020#, 16#006F#, 16#006E#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0066#, 16#0061#, 16#0063#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "endMessage" MS_0C1E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0065#, 16#006E#, 16#0064#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, others => 16#0000#), others => <>); -- "The query stringValue() returns the string that concatenates, in order, all the component string literals of all the subexpressions that are part of the StringExpression." MS_0C1F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 175, Unused => 170, Length => 170, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0056#, 16#0061#, 16#006C#, 16#0075#, 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#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#006E#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#002C#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#002C#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#006E#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0073#, 16#0074#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006C#, 16#0069#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0062#, 16#0065#, 16#0078#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 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#0053#, 16#0074#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0045#, 16#0078#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The query allOwnedElements() gives all of the direct and indirect owned elements of an element." MS_0C20 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 103, Unused => 95, Length => 95, 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#004F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0045#, 16#006C#, 16#0065#, 16#006D#, 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#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#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "A structured classifier is an abstract metaclass that represents any classifier whose behavior can be fully or partly described by the collaboration of owned or referenced instances." MS_0C21 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 191, Unused => 182, Length => 182, Value => (16#0041#, 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#0063#, 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#0061#, 16#006E#, 16#0020#, 16#0061#, 16#0062#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0020#, 16#006D#, 16#0065#, 16#0074#, 16#0061#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 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#0077#, 16#0068#, 16#006F#, 16#0073#, 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#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0066#, 16#0075#, 16#006C#, 16#006C#, 16#0079#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0063#, 16#0072#, 16#0069#, 16#0062#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 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#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Actor" MS_0C22 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 5, Length => 5, Value => (16#0041#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, others => 16#0000#), others => <>); -- "A_ownedReception_class" MS_0C23 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0041#, 16#005F#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0064#, 16#0052#, 16#0065#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, others => 16#0000#), others => <>); -- "A_specification_owningInstanceSpec" MS_0C24 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#0041#, 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#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#, 16#0053#, 16#0070#, 16#0065#, 16#0063#, others => 16#0000#), others => <>); -- "If two (or more) InteractionUses within one Interaction, refer to Interactions with 'common Lifelines,' those Lifelines must also appear in the Interaction with the InteractionUses. By common Lifelines we mean Lifelines with the same selector and represents associations." MS_0C25 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 279, Unused => 271, Length => 271, Value => (16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#0028#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0029#, 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#0055#, 16#0073#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#006F#, 16#006E#, 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#, 16#002C#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 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#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0027#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#006F#, 16#006E#, 16#0020#, 16#004C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#002C#, 16#0027#, 16#0020#, 16#0074#, 16#0068#, 16#006F#, 16#0073#, 16#0065#, 16#0020#, 16#004C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0061#, 16#0070#, 16#0070#, 16#0065#, 16#0061#, 16#0072#, 16#0020#, 16#0069#, 16#006E#, 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#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 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#, 16#0055#, 16#0073#, 16#0065#, 16#0073#, 16#002E#, 16#0020#, 16#0042#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#006F#, 16#006E#, 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#0065#, 16#0020#, 16#006D#, 16#0065#, 16#0061#, 16#006E#, 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#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#006C#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 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#002E#, others => 16#0000#), others => <>); -- "parameters" MS_0C26 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, others => 16#0000#), others => <>); -- "Specifies whether the existing links emanating from the object on this end should be destroyed before creating a new link." MS_0C27 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 122, Length => 122, Value => (16#0053#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0073#, 16#0020#, 16#0065#, 16#006D#, 16#0061#, 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#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#0073#, 16#0068#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0074#, 16#0072#, 16#006F#, 16#0079#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0066#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0063#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#0020#, 16#006E#, 16#0065#, 16#0077#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#002E#, others => 16#0000#), others => <>); -- "one_incoming_edge" MS_0C28 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#006F#, 16#006E#, 16#0065#, 16#005F#, 16#0069#, 16#006E#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#005F#, 16#0065#, 16#0064#, 16#0067#, 16#0065#, others => 16#0000#), others => <>); -- "A_protocol_port" MS_0C29 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 15, Length => 15, Value => (16#0041#, 16#005F#, 16#0070#, 16#0072#, 16#006F#, 16#0074#, 16#006F#, 16#0063#, 16#006F#, 16#006C#, 16#005F#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, others => 16#0000#), others => <>); -- "The query isDistinguishableFrom() determines whether two BehavioralFeatures may coexist in the same Namespace. It specifies that they have to have different signatures." MS_0C2A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 175, Unused => 168, Length => 168, 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#0044#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0075#, 16#0069#, 16#0073#, 16#0068#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0046#, 16#0072#, 16#006F#, 16#006D#, 16#0028#, 16#0029#, 16#0020#, 16#0064#, 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#0074#, 16#0077#, 16#006F#, 16#0020#, 16#0042#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0061#, 16#006C#, 16#0046#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#0065#, 16#0078#, 16#0069#, 16#0073#, 16#0074#, 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#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#002E#, 16#0020#, 16#0049#, 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#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0079#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 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#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Nodes coordinated by the activity." MS_0C2B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 34, Length => 34, Value => (16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006F#, 16#0072#, 16#0064#, 16#0069#, 16#006E#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 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 => <>); -- "A transformation behavior has one input parameter and one output parameter. The input parameter must be the same as or a supertype of the type of object token coming from the source end. The output parameter must be the same or a subtype of the type of object token expected downstream. The behavior cannot have side effects." MS_0C2C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 335, Unused => 325, Length => 325, Value => (16#0041#, 16#0020#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0068#, 16#0061#, 16#0073#, 16#0020#, 16#006F#, 16#006E#, 16#0065#, 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#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#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 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#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#006F#, 16#0072#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0075#, 16#0070#, 16#0065#, 16#0072#, 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#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#006B#, 16#0065#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 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#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#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#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0020#, 16#0074#, 16#006F#, 16#006B#, 16#0065#, 16#006E#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#0065#, 16#0063#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0064#, 16#006F#, 16#0077#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0065#, 16#0061#, 16#006D#, 16#002E#, 16#0020#, 16#0054#, 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#0061#, 16#006E#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0073#, 16#0069#, 16#0064#, 16#0065#, 16#0020#, 16#0065#, 16#0066#, 16#0066#, 16#0065#, 16#0063#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "A deployment target is the location for a deployed artifact." MS_0C2D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 60, Length => 60, Value => (16#0041#, 16#0020#, 16#0064#, 16#0065#, 16#0070#, 16#006C#, 16#006F#, 16#0079#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#006F#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#0020#, 16#0064#, 16#0065#, 16#0070#, 16#006C#, 16#006F#, 16#0079#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0066#, 16#0061#, 16#0063#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "An abstraction is a relationship that relates two elements or sets of elements that represent the same concept at different levels of abstraction or from different viewpoints." MS_0C2E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 183, Unused => 175, Length => 175, Value => (16#0041#, 16#006E#, 16#0020#, 16#0061#, 16#0062#, 16#0073#, 16#0074#, 16#0072#, 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#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0068#, 16#0069#, 16#0070#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0073#, 16#0065#, 16#0074#, 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#0074#, 16#0068#, 16#0061#, 16#0074#, 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#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#0064#, 16#0069#, 16#0066#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006C#, 16#0065#, 16#0076#, 16#0065#, 16#006C#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0062#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0064#, 16#0069#, 16#0066#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0076#, 16#0069#, 16#0065#, 16#0077#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Feature" MS_0C2F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#0046#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, others => 16#0000#), others => <>); -- "LCA" MS_0C30 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 3, Length => 3, Value => (16#004C#, 16#0043#, 16#0041#, others => 16#0000#), others => <>); -- "Every Generalization associated with a given GeneralizationSet must have the same general Classifier. That is, all Generalizations for a particular GeneralizationSet must have the same superclass." MS_0C31 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 207, Unused => 196, Length => 196, Value => (16#0045#, 16#0076#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 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#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#0067#, 16#0069#, 16#0076#, 16#0065#, 16#006E#, 16#0020#, 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#0053#, 16#0065#, 16#0074#, 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#0020#, 16#0073#, 16#0061#, 16#006D#, 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#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#002C#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 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#0073#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 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#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#0053#, 16#0065#, 16#0074#, 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#0020#, 16#0073#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0073#, 16#0075#, 16#0070#, 16#0065#, 16#0072#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "Indicates (via the associated Generalizations) whether or not the set of specific Classifiers are covering for a particular general classifier. When isCovering is true, every instance of a particular general Classifier is also an instance of at least one of its specific Classifiers for the GeneralizationSet. When isCovering is false, there are one or more instances of the particular general Classifier that are not instances of at least one of its specific Classifiers defined for the GeneralizationSet." MS_0C32 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 527, Unused => 506, Length => 506, Value => (16#0049#, 16#006E#, 16#0064#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0028#, 16#0076#, 16#0069#, 16#0061#, 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#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#0073#, 16#0029#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006E#, 16#006F#, 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#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 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#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 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#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#002E#, 16#0020#, 16#0057#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0043#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#002C#, 16#0020#, 16#0065#, 16#0076#, 16#0065#, 16#0072#, 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#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#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#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 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#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#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 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#0065#, 16#0020#, 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#0053#, 16#0065#, 16#0074#, 16#002E#, 16#0020#, 16#0057#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#0069#, 16#0073#, 16#0043#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 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#0072#, 16#0065#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 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#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#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0069#, 16#0063#, 16#0075#, 16#006C#, 16#0061#, 16#0072#, 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#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#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#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#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0063#, 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#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#0065#, 16#0020#, 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#0053#, 16#0065#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "Physical definition of a graphical image." MS_0C33 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 41, Length => 41, Value => (16#0050#, 16#0068#, 16#0079#, 16#0073#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0067#, 16#0072#, 16#0061#, 16#0070#, 16#0068#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#0020#, 16#0069#, 16#006D#, 16#0061#, 16#0067#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "The exitPoints kind pseudo states corresponding to this connection point." MS_0C34 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 73, Length => 73, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0069#, 16#0074#, 16#0050#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#0070#, 16#0073#, 16#0065#, 16#0075#, 16#0064#, 16#006F#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 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#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 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#002E#, others => 16#0000#), others => <>); -- "The classifier that is the context for the execution of the behavior. If the behavior is owned by a BehavioredClassifier, that classifier is the context. Otherwise, the context is the first BehavioredClassifier reached by following the chain of owner relationships. For example, following this algorithm, the context of an entry action in a state machine is the classifier that owns the state machine. The features of the context classifier as well as the elements visible to the context classifier are visible to the behavior." MS_0C35 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 543, Unused => 527, Length => 527, Value => (16#0054#, 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#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 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#0066#, 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#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#002E#, 16#0020#, 16#0049#, 16#0066#, 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#0069#, 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#0042#, 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#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 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#0069#, 16#0073#, 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#002E#, 16#0020#, 16#004F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0077#, 16#0069#, 16#0073#, 16#0065#, 16#002C#, 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#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#0042#, 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#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 16#0063#, 16#0068#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0066#, 16#006F#, 16#006C#, 16#006C#, 16#006F#, 16#0077#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#0068#, 16#0061#, 16#0069#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0077#, 16#006E#, 16#0065#, 16#0072#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0068#, 16#0069#, 16#0070#, 16#0073#, 16#002E#, 16#0020#, 16#0046#, 16#006F#, 16#0072#, 16#0020#, 16#0065#, 16#0078#, 16#0061#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#002C#, 16#0020#, 16#0066#, 16#006F#, 16#006C#, 16#006C#, 16#006F#, 16#0077#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006C#, 16#0067#, 16#006F#, 16#0072#, 16#0069#, 16#0074#, 16#0068#, 16#006D#, 16#002C#, 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#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0079#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 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#0069#, 16#0073#, 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#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#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#0020#, 16#0066#, 16#0065#, 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#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 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#0073#, 16#0020#, 16#0077#, 16#0065#, 16#006C#, 16#006C#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0076#, 16#0069#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 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#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#0076#, 16#0069#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 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#002E#, others => 16#0000#), others => <>); -- "reentrant_behaviors" MS_0C36 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0072#, 16#0065#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0074#, 16#005F#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0073#, others => 16#0000#), others => <>); -- "The type input pin is the same as the type of the variable." MS_0C37 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 59, Length => 59, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 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#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#0076#, 16#0061#, 16#0072#, 16#0069#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "A conditional node is a structured activity node that represents an exclusive choice among some number of alternatives." MS_0C38 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 119, Length => 119, Value => (16#0041#, 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#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 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#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#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#0078#, 16#0063#, 16#006C#, 16#0075#, 16#0073#, 16#0069#, 16#0076#, 16#0065#, 16#0020#, 16#0063#, 16#0068#, 16#006F#, 16#0069#, 16#0063#, 16#0065#, 16#0020#, 16#0061#, 16#006D#, 16#006F#, 16#006E#, 16#0067#, 16#0020#, 16#0073#, 16#006F#, 16#006D#, 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#006C#, 16#0074#, 16#0065#, 16#0072#, 16#006E#, 16#0061#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "finish" MS_0C39 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 6, Length => 6, Value => (16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0073#, 16#0068#, others => 16#0000#), others => <>); -- "A multiplicity of a composite aggregation must not have an upper bound greater than 1." MS_0C3A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 86, Length => 86, Value => (16#0041#, 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#0020#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0069#, 16#0074#, 16#0065#, 16#0020#, 16#0061#, 16#0067#, 16#0067#, 16#0072#, 16#0065#, 16#0067#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 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#0061#, 16#006E#, 16#0020#, 16#0075#, 16#0070#, 16#0070#, 16#0065#, 16#0072#, 16#0020#, 16#0062#, 16#006F#, 16#0075#, 16#006E#, 16#0064#, 16#0020#, 16#0067#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#006E#, 16#0020#, 16#0031#, 16#002E#, others => 16#0000#), others => <>); -- "A_represents_lifeline" MS_0C3B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0041#, 16#005F#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#005F#, 16#006C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, others => 16#0000#), others => <>); -- "connectionPointReference" MS_0C3C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#0063#, 16#006F#, 16#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0050#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0052#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, others => 16#0000#), others => <>); -- "ReadSelfAction" MS_0C3D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#0052#, 16#0065#, 16#0061#, 16#0064#, 16#0053#, 16#0065#, 16#006C#, 16#0066#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "References the general classifier in the Generalization relationship." MS_0C3E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 69, Length => 69, 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#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#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 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#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0068#, 16#0069#, 16#0070#, 16#002E#, others => 16#0000#), others => <>); -- "LiteralInteger" MS_0C3F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (16#004C#, 16#0069#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0049#, 16#006E#, 16#0074#, 16#0065#, 16#0067#, 16#0065#, 16#0072#, others => 16#0000#), others => <>); -- "A_provided_port" MS_0C40 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 15, Length => 15, Value => (16#0041#, 16#005F#, 16#0070#, 16#0072#, 16#006F#, 16#0076#, 16#0069#, 16#0064#, 16#0065#, 16#0064#, 16#005F#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, others => 16#0000#), others => <>); -- "The input pins have no type." MS_0C41 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 28, Length => 28, Value => (16#0054#, 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#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "The decisionInputFlow of a decision node must be an incoming edge of the decision node." MS_0C42 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 87, Length => 87, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0063#, 16#0069#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0049#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0046#, 16#006C#, 16#006F#, 16#0077#, 16#0020#, 16#006F#, 16#0066#, 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#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 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#0065#, 16#0064#, 16#0067#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 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#002E#, others => 16#0000#), others => <>); -- "Specifies the PackageableElement whose name is to be added to a Namespace." MS_0C43 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 74, Length => 74, 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#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#0077#, 16#0068#, 16#006F#, 16#0073#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 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#0061#, 16#0020#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "activity_parameter_node" MS_0C44 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 23, Length => 23, Value => (16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 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#, others => 16#0000#), others => <>); -- "List of qualifier values" MS_0C45 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#004C#, 16#0069#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 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#0073#, others => 16#0000#), others => <>); -- "interfaceRealization" MS_0C46 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0066#, 16#0061#, 16#0063#, 16#0065#, 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 => <>); -- "LiteralReal" MS_0C47 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#004C#, 16#0069#, 16#0074#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0052#, 16#0065#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "References the Package that is to be merged with the receiving package of the PackageMerge." MS_0C48 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 91, Length => 91, 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#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#006D#, 16#0065#, 16#0072#, 16#0067#, 16#0065#, 16#0064#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0063#, 16#0065#, 16#0069#, 16#0076#, 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#006F#, 16#0066#, 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#002E#, others => 16#0000#), others => <>); -- "An expression represents a node in an expression tree, which may be non-terminal or terminal. It defines a symbol, and has a possibly empty sequence of operands which are value specifications." MS_0C49 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 199, Unused => 192, Length => 192, Value => (16#0041#, 16#006E#, 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#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#006E#, 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#0074#, 16#0072#, 16#0065#, 16#0065#, 16#002C#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#006E#, 16#002D#, 16#0074#, 16#0065#, 16#0072#, 16#006D#, 16#0069#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0065#, 16#0072#, 16#006D#, 16#0069#, 16#006E#, 16#0061#, 16#006C#, 16#002E#, 16#0020#, 16#0049#, 16#0074#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0079#, 16#006D#, 16#0062#, 16#006F#, 16#006C#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0068#, 16#0061#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0079#, 16#0020#, 16#0065#, 16#006D#, 16#0070#, 16#0074#, 16#0079#, 16#0020#, 16#0073#, 16#0065#, 16#0071#, 16#0075#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 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#0073#, 16#002E#, others => 16#0000#), others => <>); -- "ActivityGroup" MS_0C4A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 13, Length => 13, Value => (16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0047#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, others => 16#0000#), others => <>); -- "A_signal_reception" MS_0C4B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#0041#, 16#005F#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#006C#, 16#005F#, 16#0072#, 16#0065#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "The upper bound must be greater than or equal to the lower bound." MS_0C4C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 65, Length => 65, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0075#, 16#0070#, 16#0070#, 16#0065#, 16#0072#, 16#0020#, 16#0062#, 16#006F#, 16#0075#, 16#006E#, 16#0064#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0067#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0065#, 16#0071#, 16#0075#, 16#0061#, 16#006C#, 16#0020#, 16#0074#, 16#006F#, 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#002E#, others => 16#0000#), others => <>); -- "Transitions outgoing pseudostates may not have a trigger." MS_0C4D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 57, Length => 57, Value => (16#0054#, 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#0075#, 16#0074#, 16#0067#, 16#006F#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0070#, 16#0073#, 16#0065#, 16#0075#, 16#0064#, 16#006F#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 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#0061#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "generalization" MS_0C4E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 14, Length => 14, Value => (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#, others => 16#0000#), others => <>); -- "structured_node" MS_0C4F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 15, Length => 15, Value => (16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#005F#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, others => 16#0000#), others => <>); -- "language_body_size" MS_0C50 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#006C#, 16#0061#, 16#006E#, 16#0067#, 16#0075#, 16#0061#, 16#0067#, 16#0065#, 16#005F#, 16#0062#, 16#006F#, 16#0064#, 16#0079#, 16#005F#, 16#0073#, 16#0069#, 16#007A#, 16#0065#, others => 16#0000#), others => <>); -- "executionOccurrenceSpecification" MS_0C51 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 32, Length => 32, Value => (16#0065#, 16#0078#, 16#0065#, 16#0063#, 16#0075#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#004F#, 16#0063#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 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 test and body parts must be disjoint." MS_0C52 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 41, Length => 41, Value => (16#0054#, 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#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0073#, 16#006A#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "A read self action is an action that retrieves the host object of an action." MS_0C53 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 76, Length => 76, Value => (16#0041#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 16#0064#, 16#0020#, 16#0073#, 16#0065#, 16#006C#, 16#0066#, 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#0072#, 16#0065#, 16#0074#, 16#0072#, 16#0069#, 16#0065#, 16#0076#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0068#, 16#006F#, 16#0073#, 16#0074#, 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#006E#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The number of argument pins and the number of parameters of the behavior of type in and in-out must be equal." MS_0C54 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 119, Unused => 109, Length => 109, 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#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#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 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 => <>); -- "A transition with kind external can source any vertex except entry points." MS_0C55 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 74, Length => 74, Value => (16#0041#, 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#0069#, 16#0074#, 16#0068#, 16#0020#, 16#006B#, 16#0069#, 16#006E#, 16#0064#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#0072#, 16#006E#, 16#0061#, 16#006C#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#0076#, 16#0065#, 16#0072#, 16#0074#, 16#0065#, 16#0078#, 16#0020#, 16#0065#, 16#0078#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0079#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "The Boolean query membersAreDistinguishable() determines whether all of the namespace's members are distinguishable within it." MS_0C56 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 126, Length => 126, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0042#, 16#006F#, 16#006F#, 16#006C#, 16#0065#, 16#0061#, 16#006E#, 16#0020#, 16#0071#, 16#0075#, 16#0065#, 16#0072#, 16#0079#, 16#0020#, 16#006D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0073#, 16#0041#, 16#0072#, 16#0065#, 16#0044#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0075#, 16#0069#, 16#0073#, 16#0068#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0028#, 16#0029#, 16#0020#, 16#0064#, 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#006C#, 16#006C#, 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#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#0027#, 16#0073#, 16#0020#, 16#006D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0075#, 16#0069#, 16#0073#, 16#0068#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0069#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "A_provided_component" MS_0C57 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0041#, 16#005F#, 16#0070#, 16#0072#, 16#006F#, 16#0076#, 16#0069#, 16#0064#, 16#0065#, 16#0064#, 16#005F#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#006E#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "join_segment_state" MS_0C58 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#006A#, 16#006F#, 16#0069#, 16#006E#, 16#005F#, 16#0073#, 16#0065#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#005F#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, others => 16#0000#), others => <>); -- "Specifies a ValueSpecification that represents a value to be used when no argument is supplied for the Parameter." MS_0C59 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 119, Unused => 113, Length => 113, 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#0056#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 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#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#006E#, 16#0020#, 16#006E#, 16#006F#, 16#0020#, 16#0061#, 16#0072#, 16#0067#, 16#0075#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0073#, 16#0075#, 16#0070#, 16#0070#, 16#006C#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0050#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "membersAreDistinguishable" MS_0C5A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 25, Length => 25, Value => (16#006D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0073#, 16#0041#, 16#0072#, 16#0065#, 16#0044#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0075#, 16#0069#, 16#0073#, 16#0068#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, others => 16#0000#), others => <>); -- "out" MS_0C5B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 3, Length => 3, Value => (16#006F#, 16#0075#, 16#0074#, others => 16#0000#), others => <>); -- "The unmarshall classifier must have at least one structural feature." MS_0C5C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 71, Unused => 68, Length => 68, Value => (16#0054#, 16#0068#, 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#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 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#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#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#002E#, others => 16#0000#), others => <>); -- "A template parameter substitution relates the actual parameter to a formal template parameter as part of a template binding." MS_0C5D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 124, Length => 124, Value => (16#0041#, 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#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#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0075#, 16#0061#, 16#006C#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#006F#, 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#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 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#0062#, 16#0069#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#002E#, others => 16#0000#), others => <>); -- "A package is used to group elements, and provides a namespace for the grouped elements." MS_0C5E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 87, Length => 87, Value => (16#0041#, 16#0020#, 16#0070#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 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#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 16#0065#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0065#, 16#0064#, 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 states of a protocol state machine cannot have entry, exit, or do activity actions." MS_0C5F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 87, Length => 87, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 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#0063#, 16#0061#, 16#006E#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0079#, 16#002C#, 16#0020#, 16#0065#, 16#0078#, 16#0069#, 16#0074#, 16#002C#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0064#, 16#006F#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "The association ends of the link end data must not be static." MS_0C60 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 61, Length => 61, Value => (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#0065#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#0069#, 16#006E#, 16#006B#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#0064#, 16#0061#, 16#0074#, 16#0061#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0069#, 16#0063#, 16#002E#, others => 16#0000#), others => <>); -- "A pin is an object node for inputs and outputs to actions." MS_0C61 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 58, Length => 58, Value => (16#0041#, 16#0020#, 16#0070#, 16#0069#, 16#006E#, 16#0020#, 16#0069#, 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#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0069#, 16#006E#, 16#0070#, 16#0075#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "In the case where the property is one navigable end of a binary association with both ends navigable, this gives the other end." MS_0C62 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 127, Length => 127, Value => (16#0049#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 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#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#0076#, 16#0069#, 16#0067#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0062#, 16#0069#, 16#006E#, 16#0061#, 16#0072#, 16#0079#, 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#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0062#, 16#006F#, 16#0074#, 16#0068#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#006E#, 16#0061#, 16#0076#, 16#0069#, 16#0067#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0067#, 16#0069#, 16#0076#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0065#, 16#006E#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "A trigger for an AnyReceiveEvent is triggered by the receipt of any message that is not explicitly handled by any related trigger." MS_0C63 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 135, Unused => 130, Length => 130, Value => (16#0041#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0041#, 16#006E#, 16#0079#, 16#0052#, 16#0065#, 16#0063#, 16#0065#, 16#0069#, 16#0076#, 16#0065#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 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#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0063#, 16#0065#, 16#0069#, 16#0070#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#006D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0074#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#006C#, 16#0079#, 16#0020#, 16#0068#, 16#0061#, 16#006E#, 16#0064#, 16#006C#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0067#, 16#0067#, 16#0065#, 16#0072#, 16#002E#, others => 16#0000#), others => <>); -- "isReentrant" MS_0C64 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 11, Length => 11, Value => (16#0069#, 16#0073#, 16#0052#, 16#0065#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "doActivity" MS_0C65 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0064#, 16#006F#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, others => 16#0000#), others => <>); -- "DurationConstraint" MS_0C66 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 18, Length => 18, Value => (16#0044#, 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_fragment_enclosingInteraction" MS_0C67 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 39, Unused => 31, Length => 31, Value => (16#0041#, 16#005F#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#005F#, 16#0065#, 16#006E#, 16#0063#, 16#006C#, 16#006F#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 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 => <>); -- "self_part_with_port" MS_0C68 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0073#, 16#0065#, 16#006C#, 16#0066#, 16#005F#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#005F#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#005F#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, others => 16#0000#), others => <>); -- "The InteractionConstraint with minint and maxint only apply when attached to an InteractionOperand where the interactionOperator is loop." MS_0C69 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 143, Unused => 137, Length => 137, Value => (16#0054#, 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#, 16#0043#, 16#006F#, 16#006E#, 16#0073#, 16#0074#, 16#0072#, 16#0061#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#006D#, 16#0069#, 16#006E#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006D#, 16#0061#, 16#0078#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0061#, 16#0070#, 16#0070#, 16#006C#, 16#0079#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#006E#, 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#006E#, 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#0077#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 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#006C#, 16#006F#, 16#006F#, 16#0070#, 16#002E#, others => 16#0000#), others => <>); -- "References a list of parameters to the behavior which describes the order and type of arguments that can be given when the behavior is invoked and of the values which will be returned when the behavior completes its execution." MS_0C6A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 239, Unused => 226, Length => 226, 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#006C#, 16#0069#, 16#0073#, 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#0073#, 16#0020#, 16#0074#, 16#006F#, 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#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0063#, 16#0072#, 16#0069#, 16#0062#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 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#0073#, 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#0067#, 16#0069#, 16#0076#, 16#0065#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#006E#, 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#0069#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0076#, 16#006F#, 16#006B#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0065#, 16#0064#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#006E#, 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#006F#, 16#006D#, 16#0070#, 16#006C#, 16#0065#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0069#, 16#0074#, 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 => <>); -- "If the trigger events are all TimeEvents, there is exactly one output pin." MS_0C6B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 74, Length => 74, Value => (16#0049#, 16#0066#, 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#0020#, 16#0065#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0054#, 16#0069#, 16#006D#, 16#0065#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0061#, 16#0063#, 16#0074#, 16#006C#, 16#0079#, 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#0069#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "The element that is owned by this template parameter for the purpose of providing a default." MS_0C6C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 92, Length => 92, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 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#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#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0075#, 16#0072#, 16#0070#, 16#006F#, 16#0073#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0076#, 16#0069#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0061#, 16#0075#, 16#006C#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "inActivity" MS_0C6D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#0069#, 16#006E#, 16#0041#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, others => 16#0000#), others => <>); -- "Specifies the way that the provided and required interfaces are derived from the Port’s Type. The default value is false." MS_0C6E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 127, Unused => 121, Length => 121, 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#0077#, 16#0061#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0076#, 16#0069#, 16#0064#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0071#, 16#0075#, 16#0069#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0066#, 16#0061#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 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#0050#, 16#006F#, 16#0072#, 16#0074#, 16#2019#, 16#0073#, 16#0020#, 16#0054#, 16#0079#, 16#0070#, 16#0065#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 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 => <>); -- "The general ordering relationships contained in this fragment." MS_0C6F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 63, Unused => 62, Length => 62, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0065#, 16#006E#, 16#0065#, 16#0072#, 16#0061#, 16#006C#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0068#, 16#0069#, 16#0070#, 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#0069#, 16#0073#, 16#0020#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "transformation_behaviour" MS_0C70 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 24, Length => 24, Value => (16#0074#, 16#0072#, 16#0061#, 16#006E#, 16#0073#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0075#, 16#0072#, others => 16#0000#), others => <>); -- "powertype" MS_0C71 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 9, Length => 9, Value => (16#0070#, 16#006F#, 16#0077#, 16#0065#, 16#0072#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, others => 16#0000#), others => <>); -- "The groups of an activity have no supergroups." MS_0C72 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 46, Length => 46, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0073#, 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#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#006E#, 16#006F#, 16#0020#, 16#0073#, 16#0075#, 16#0070#, 16#0065#, 16#0072#, 16#0067#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "References the Profiles that are applied to a Package through this ProfileApplication." MS_0C73 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 86, Length => 86, 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#0072#, 16#006F#, 16#0066#, 16#0069#, 16#006C#, 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#0061#, 16#0070#, 16#0070#, 16#006C#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0061#, 16#0020#, 16#0050#, 16#0061#, 16#0063#, 16#006B#, 16#0061#, 16#0067#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0072#, 16#006F#, 16#0075#, 16#0067#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0050#, 16#0072#, 16#006F#, 16#0066#, 16#0069#, 16#006C#, 16#0065#, 16#0041#, 16#0070#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "A read link object end action is an action that retrieves an end object from a link object." MS_0C74 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 91, Length => 91, Value => (16#0041#, 16#0020#, 16#0072#, 16#0065#, 16#0061#, 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#0020#, 16#0065#, 16#006E#, 16#0064#, 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#0072#, 16#0065#, 16#0074#, 16#0072#, 16#0069#, 16#0065#, 16#0076#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 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#0066#, 16#0072#, 16#006F#, 16#006D#, 16#0020#, 16#0061#, 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#002E#, others => 16#0000#), others => <>); -- "behavioredClassifier" MS_0C75 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (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 => <>); -- "A_include_includingCase" MS_0C76 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 23, Length => 23, Value => (16#0041#, 16#005F#, 16#0069#, 16#006E#, 16#0063#, 16#006C#, 16#0075#, 16#0064#, 16#0065#, 16#005F#, 16#0069#, 16#006E#, 16#0063#, 16#006C#, 16#0075#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0043#, 16#0061#, 16#0073#, 16#0065#, others => 16#0000#), others => <>); -- "source_and_target" MS_0C77 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#005F#, 16#0061#, 16#006E#, 16#0064#, 16#005F#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, others => 16#0000#), others => <>); -- "The interactionOperator alt designates that the CombinedFragment represents a choice of behavior. At most one of the operands will be chosen. The chosen operand must have an explicit or implicit guard expression that evaluates to true at this point in the interaction. An implicit true guard is implied if the operand has no guard." MS_0C78 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 343, Unused => 331, Length => 331, Value => (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#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#006C#, 16#0074#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 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#0043#, 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#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#0068#, 16#006F#, 16#0069#, 16#0063#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#002E#, 16#0020#, 16#0041#, 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#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0063#, 16#0068#, 16#006F#, 16#0073#, 16#0065#, 16#006E#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#0068#, 16#006F#, 16#0073#, 16#0065#, 16#006E#, 16#0020#, 16#006F#, 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#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#0078#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0020#, 16#0067#, 16#0075#, 16#0061#, 16#0072#, 16#0064#, 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#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0065#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#0020#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 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#002E#, 16#0020#, 16#0041#, 16#006E#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006C#, 16#0069#, 16#0063#, 16#0069#, 16#0074#, 16#0020#, 16#0074#, 16#0072#, 16#0075#, 16#0065#, 16#0020#, 16#0067#, 16#0075#, 16#0061#, 16#0072#, 16#0064#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0069#, 16#006D#, 16#0070#, 16#006C#, 16#0069#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0068#, 16#0061#, 16#0073#, 16#0020#, 16#006E#, 16#006F#, 16#0020#, 16#0067#, 16#0075#, 16#0061#, 16#0072#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "external" MS_0C79 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 8, Length => 8, Value => (16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#0072#, 16#006E#, 16#0061#, 16#006C#, others => 16#0000#), others => <>); -- "FIFO" MS_0C7A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 4, Length => 4, Value => (16#0046#, 16#0049#, 16#0046#, 16#004F#, others => 16#0000#), others => <>); -- "The query isRedefinitionContextValid() specifies whether the redefinition contexts of this RedefinableElement are properly related to the redefinition contexts of the specified RedefinableElement to allow this element to redefine the other. By default at least one of the redefinition contexts of this element must be a specialization of at least one of the redefinition contexts of the specified element." MS_0C7B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 423, Unused => 405, Length => 405, 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#0052#, 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#0056#, 16#0061#, 16#006C#, 16#0069#, 16#0064#, 16#0028#, 16#0029#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 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#0069#, 16#0073#, 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#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0070#, 16#0072#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#006C#, 16#0079#, 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#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#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0064#, 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#0074#, 16#006F#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#006F#, 16#0077#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 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#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 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#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#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 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#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#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 => <>); -- "A templateable element is an element that can optionally be defined as a template and bound to other templates." MS_0C7C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 119, Unused => 111, Length => 111, Value => (16#0041#, 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#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0020#, 16#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#006F#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0061#, 16#006C#, 16#006C#, 16#0079#, 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#0061#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0062#, 16#006F#, 16#0075#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#006F#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "clause_no_predecessor" MS_0C7D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0063#, 16#006C#, 16#0061#, 16#0075#, 16#0073#, 16#0065#, 16#005F#, 16#006E#, 16#006F#, 16#005F#, 16#0070#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0063#, 16#0065#, 16#0073#, 16#0073#, 16#006F#, 16#0072#, others => 16#0000#), others => <>); -- "A protocol state machine is always defined in the context of a classifier. It specifies which operations of the classifier can be called in which state and under which condition, thus specifying the allowed call sequences on the classifier's operations. A protocol state machine presents the possible and permitted transitions on the instances of its context classifier, together with the operations which carry the transitions. In this manner, an instance lifecycle can be created for a classifier, by specifying the order in which the operations can be activated and the states through which an instance progresses during its existence." MS_0C7E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 663, Unused => 638, Length => 638, Value => (16#0041#, 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#0061#, 16#006C#, 16#0077#, 16#0061#, 16#0079#, 16#0073#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 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#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#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#002E#, 16#0020#, 16#0049#, 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#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 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#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#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0075#, 16#006E#, 16#0064#, 16#0065#, 16#0072#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0075#, 16#0073#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0061#, 16#006C#, 16#006C#, 16#006F#, 16#0077#, 16#0065#, 16#0064#, 16#0020#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0020#, 16#0073#, 16#0065#, 16#0071#, 16#0075#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#006E#, 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#0027#, 16#0073#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#002E#, 16#0020#, 16#0041#, 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#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0070#, 16#0065#, 16#0072#, 16#006D#, 16#0069#, 16#0074#, 16#0074#, 16#0065#, 16#0064#, 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#006E#, 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#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 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#002C#, 16#0020#, 16#0074#, 16#006F#, 16#0067#, 16#0065#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 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#0073#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0063#, 16#0061#, 16#0072#, 16#0072#, 16#0079#, 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#0073#, 16#002E#, 16#0020#, 16#0049#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#006D#, 16#0061#, 16#006E#, 16#006E#, 16#0065#, 16#0072#, 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#006C#, 16#0069#, 16#0066#, 16#0065#, 16#0063#, 16#0079#, 16#0063#, 16#006C#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0063#, 16#0072#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 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#002C#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 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#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#0020#, 16#0063#, 16#0061#, 16#006E#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#0073#, 16#0020#, 16#0074#, 16#0068#, 16#0072#, 16#006F#, 16#0075#, 16#0067#, 16#0068#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 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#0070#, 16#0072#, 16#006F#, 16#0067#, 16#0072#, 16#0065#, 16#0073#, 16#0073#, 16#0065#, 16#0073#, 16#0020#, 16#0064#, 16#0075#, 16#0072#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0069#, 16#0074#, 16#0073#, 16#0020#, 16#0065#, 16#0078#, 16#0069#, 16#0073#, 16#0074#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "The multiplicity of the object input pin is 1..1" MS_0C7F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 48, Length => 48, 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#0069#, 16#0073#, 16#0020#, 16#0031#, 16#002E#, 16#002E#, 16#0031#, others => 16#0000#), others => <>); -- "TemplateSignature" MS_0C80 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 17, Length => 17, Value => (16#0054#, 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 => <>); -- "A_method_specification" MS_0C81 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0041#, 16#005F#, 16#006D#, 16#0065#, 16#0074#, 16#0068#, 16#006F#, 16#0064#, 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#, others => 16#0000#), others => <>); -- "The query isConsistentWith() specifies, for any two RedefinableTemplateSignatures in a context in which redefinition is possible, whether redefinition would be logically consistent. A redefining template signature is always consistent with a redefined template signature, since redefinition only adds new formal parameters." MS_0C82 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 335, Unused => 323, Length => 323, 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#0043#, 16#006F#, 16#006E#, 16#0073#, 16#0069#, 16#0073#, 16#0074#, 16#0065#, 16#006E#, 16#0074#, 16#0057#, 16#0069#, 16#0074#, 16#0068#, 16#0028#, 16#0029#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0073#, 16#002C#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0061#, 16#006E#, 16#0079#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 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#0054#, 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#, 16#0073#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 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#0069#, 16#0073#, 16#0020#, 16#0070#, 16#006F#, 16#0073#, 16#0073#, 16#0069#, 16#0062#, 16#006C#, 16#0065#, 16#002C#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 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#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0077#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#006C#, 16#006F#, 16#0067#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0073#, 16#0069#, 16#0073#, 16#0074#, 16#0065#, 16#006E#, 16#0074#, 16#002E#, 16#0020#, 16#0041#, 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#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#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0061#, 16#006C#, 16#0077#, 16#0061#, 16#0079#, 16#0073#, 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#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0061#, 16#0020#, 16#0072#, 16#0065#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0065#, 16#0064#, 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#002C#, 16#0020#, 16#0073#, 16#0069#, 16#006E#, 16#0063#, 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#006F#, 16#006E#, 16#006C#, 16#0079#, 16#0020#, 16#0061#, 16#0064#, 16#0064#, 16#0073#, 16#0020#, 16#006E#, 16#0065#, 16#0077#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#006D#, 16#0061#, 16#006C#, 16#0020#, 16#0070#, 16#0061#, 16#0072#, 16#0061#, 16#006D#, 16#0065#, 16#0074#, 16#0065#, 16#0072#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "An ordered list of extension points belonging to the extended use case, specifying where the respective behavioral fragments of the extending use case are to be inserted. The first fragment in the extending use case is associated with the first extension point in the list, the second fragment with the second point, and so on. (Note that, in most practical cases, the extending use case has just a single behavior fragment, so that the list of extension points is trivial.)" MS_0C83 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 495, Unused => 474, Length => 474, Value => (16#0041#, 16#006E#, 16#0020#, 16#006F#, 16#0072#, 16#0064#, 16#0065#, 16#0072#, 16#0065#, 16#0064#, 16#0020#, 16#006C#, 16#0069#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0062#, 16#0065#, 16#006C#, 16#006F#, 16#006E#, 16#0067#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0064#, 16#0065#, 16#0064#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#002C#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0077#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 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#0072#, 16#0061#, 16#0067#, 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#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 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#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0020#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0020#, 16#0069#, 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#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0066#, 16#0069#, 16#0072#, 16#0073#, 16#0074#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#0069#, 16#0073#, 16#0074#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0020#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0073#, 16#0065#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0073#, 16#006F#, 16#0020#, 16#006F#, 16#006E#, 16#002E#, 16#0020#, 16#0028#, 16#004E#, 16#006F#, 16#0074#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#002C#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#006D#, 16#006F#, 16#0073#, 16#0074#, 16#0020#, 16#0070#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0073#, 16#002C#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0075#, 16#0073#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0073#, 16#0065#, 16#0020#, 16#0068#, 16#0061#, 16#0073#, 16#0020#, 16#006A#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0061#, 16#0020#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#006C#, 16#0065#, 16#0020#, 16#0062#, 16#0065#, 16#0068#, 16#0061#, 16#0076#, 16#0069#, 16#006F#, 16#0072#, 16#0020#, 16#0066#, 16#0072#, 16#0061#, 16#0067#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002C#, 16#0020#, 16#0073#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#0069#, 16#0073#, 16#0074#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0065#, 16#0078#, 16#0074#, 16#0065#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0070#, 16#006F#, 16#0069#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0074#, 16#0072#, 16#0069#, 16#0076#, 16#0069#, 16#0061#, 16#006C#, 16#002E#, 16#0029#, others => 16#0000#), others => <>); -- "A_precondition_preContext" MS_0C84 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 25, Length => 25, Value => (16#0041#, 16#005F#, 16#0070#, 16#0072#, 16#0065#, 16#0063#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#005F#, 16#0070#, 16#0072#, 16#0065#, 16#0043#, 16#006F#, 16#006E#, 16#0074#, 16#0065#, 16#0078#, 16#0074#, others => 16#0000#), others => <>); -- "A feature declares a behavioral or structural characteristic of instances of classifiers." MS_0C85 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 89, Length => 89, Value => (16#0041#, 16#0020#, 16#0066#, 16#0065#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0063#, 16#006C#, 16#0061#, 16#0072#, 16#0065#, 16#0073#, 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#006F#, 16#0072#, 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#0063#, 16#0068#, 16#0061#, 16#0072#, 16#0061#, 16#0063#, 16#0074#, 16#0065#, 16#0072#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#0063#, 16#0020#, 16#006F#, 16#0066#, 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#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0069#, 16#0066#, 16#0069#, 16#0065#, 16#0072#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "deep_history_vertex" MS_0C86 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0064#, 16#0065#, 16#0065#, 16#0070#, 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 => <>); -- "Groups containing the edge." MS_0C87 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0047#, 16#0072#, 16#006F#, 16#0075#, 16#0070#, 16#0073#, 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#0065#, 16#0064#, 16#0067#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "allIncludedUseCases" MS_0C88 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 19, Length => 19, Value => (16#0061#, 16#006C#, 16#006C#, 16#0049#, 16#006E#, 16#0063#, 16#006C#, 16#0075#, 16#0064#, 16#0065#, 16#0064#, 16#0055#, 16#0073#, 16#0065#, 16#0043#, 16#0061#, 16#0073#, 16#0065#, 16#0073#, others => 16#0000#), others => <>); -- "The interactionOperator loop designates that the CombinedFragment represents a loop. The loop operand will be repeated a number of times." MS_0C89 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 143, Unused => 137, Length => 137, Value => (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#004F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#006C#, 16#006F#, 16#006F#, 16#0070#, 16#0020#, 16#0064#, 16#0065#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 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#0043#, 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#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#0020#, 16#006C#, 16#006F#, 16#006F#, 16#0070#, 16#002E#, 16#0020#, 16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#006C#, 16#006F#, 16#006F#, 16#0070#, 16#0020#, 16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0065#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0061#, 16#0020#, 16#006E#, 16#0075#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0074#, 16#0069#, 16#006D#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "A_signature_templateBinding" MS_0C8A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 31, Unused => 27, Length => 27, Value => (16#0041#, 16#005F#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#005F#, 16#0074#, 16#0065#, 16#006D#, 16#0070#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0042#, 16#0069#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, others => 16#0000#), others => <>); -- "Class" MS_0C8B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 7, Unused => 5, Length => 5, Value => (16#0043#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, others => 16#0000#), others => <>); -- "operand" MS_0C8C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 7, Length => 7, Value => (16#006F#, 16#0070#, 16#0065#, 16#0072#, 16#0061#, 16#006E#, 16#0064#, others => 16#0000#), others => <>); -- "binaryAssociationsOnly" MS_0C8D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 22, Length => 22, Value => (16#0062#, 16#0069#, 16#006E#, 16#0061#, 16#0072#, 16#0079#, 16#0041#, 16#0073#, 16#0073#, 16#006F#, 16#0063#, 16#0069#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0073#, 16#004F#, 16#006E#, 16#006C#, 16#0079#, others => 16#0000#), others => <>); -- "The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names." MS_0C8E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 263, Unused => 249, Length => 249, 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#0044#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0075#, 16#0069#, 16#0073#, 16#0068#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0046#, 16#0072#, 16#006F#, 16#006D#, 16#0028#, 16#0029#, 16#0020#, 16#0064#, 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#0074#, 16#0077#, 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#0073#, 16#0020#, 16#006D#, 16#0061#, 16#0079#, 16#0020#, 16#006C#, 16#006F#, 16#0067#, 16#0069#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0079#, 16#0020#, 16#0063#, 16#006F#, 16#002D#, 16#0065#, 16#0078#, 16#0069#, 16#0073#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0061#, 16#0020#, 16#004E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#0070#, 16#0061#, 16#0063#, 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#0074#, 16#0077#, 16#006F#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 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#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0064#, 16#0069#, 16#0073#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0075#, 16#0069#, 16#0073#, 16#0068#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#0069#, 16#0066#, 16#0020#, 16#0028#, 16#0061#, 16#0029#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0079#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0075#, 16#006E#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0073#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#0028#, 16#0062#, 16#0029#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0079#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#006C#, 16#0061#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#0079#, 16#0070#, 16#0065#, 16#0073#, 16#0020#, 16#0062#, 16#0075#, 16#0074#, 16#0020#, 16#0064#, 16#0069#, 16#0066#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "location" MS_0C8F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 8, Length => 8, Value => (16#006C#, 16#006F#, 16#0063#, 16#0061#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "stream_and_exception" MS_0C90 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0073#, 16#0074#, 16#0072#, 16#0065#, 16#0061#, 16#006D#, 16#005F#, 16#0061#, 16#006E#, 16#0064#, 16#005F#, 16#0065#, 16#0078#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, others => 16#0000#), others => <>); -- "history_vertices" MS_0C91 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 16, Length => 16, Value => (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#0069#, 16#0063#, 16#0065#, 16#0073#, others => 16#0000#), others => <>); -- "Assume that within Interaction X, Lifeline L is of class C and decomposed to D. Assume also that there is within X an InteractionUse (say) U that covers L. According to the constraint above U will have a counterpart CU within D. Within the Interaction referenced by U, L should also be decomposed, and the decomposition should reference CU. (This rule is called commutativity of decomposition)" MS_0C92 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 407, Unused => 393, Length => 393, Value => (16#0041#, 16#0073#, 16#0073#, 16#0075#, 16#006D#, 16#0065#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 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#0058#, 16#002C#, 16#0020#, 16#004C#, 16#0069#, 16#0066#, 16#0065#, 16#006C#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#004C#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0063#, 16#006C#, 16#0061#, 16#0073#, 16#0073#, 16#0020#, 16#0043#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0064#, 16#0065#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0044#, 16#002E#, 16#0020#, 16#0041#, 16#0073#, 16#0073#, 16#0075#, 16#006D#, 16#0065#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0072#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0058#, 16#0020#, 16#0061#, 16#006E#, 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#0055#, 16#0073#, 16#0065#, 16#0020#, 16#0028#, 16#0073#, 16#0061#, 16#0079#, 16#0029#, 16#0020#, 16#0055#, 16#0020#, 16#0074#, 16#0068#, 16#0061#, 16#0074#, 16#0020#, 16#0063#, 16#006F#, 16#0076#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#004C#, 16#002E#, 16#0020#, 16#0041#, 16#0063#, 16#0063#, 16#006F#, 16#0072#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0074#, 16#0068#, 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#0061#, 16#0062#, 16#006F#, 16#0076#, 16#0065#, 16#0020#, 16#0055#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0063#, 16#006F#, 16#0075#, 16#006E#, 16#0074#, 16#0065#, 16#0072#, 16#0070#, 16#0061#, 16#0072#, 16#0074#, 16#0020#, 16#0043#, 16#0055#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 16#0020#, 16#0044#, 16#002E#, 16#0020#, 16#0057#, 16#0069#, 16#0074#, 16#0068#, 16#0069#, 16#006E#, 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#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0055#, 16#002C#, 16#0020#, 16#004C#, 16#0020#, 16#0073#, 16#0068#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0061#, 16#006C#, 16#0073#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0064#, 16#0065#, 16#0063#, 16#006F#, 16#006D#, 16#0070#, 16#006F#, 16#0073#, 16#0065#, 16#0064#, 16#002C#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0064#, 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#0020#, 16#0073#, 16#0068#, 16#006F#, 16#0075#, 16#006C#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0020#, 16#0043#, 16#0055#, 16#002E#, 16#0020#, 16#0028#, 16#0054#, 16#0068#, 16#0069#, 16#0073#, 16#0020#, 16#0072#, 16#0075#, 16#006C#, 16#0065#, 16#0020#, 16#0069#, 16#0073#, 16#0020#, 16#0063#, 16#0061#, 16#006C#, 16#006C#, 16#0065#, 16#0064#, 16#0020#, 16#0063#, 16#006F#, 16#006D#, 16#006D#, 16#0075#, 16#0074#, 16#0061#, 16#0074#, 16#0069#, 16#0076#, 16#0069#, 16#0074#, 16#0079#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0064#, 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#0029#, others => 16#0000#), others => <>); -- "The entry and exit connection points used in conjunction with this (submachine) state, i.e. as targets and sources, respectively, in the region with the submachine state. A connection point reference references the corresponding definition of a connection point pseudostate in the statemachine referenced by the submachinestate." MS_0C93 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 343, Unused => 328, Length => 328, Value => (16#0054#, 16#0068#, 16#0065#, 16#0020#, 16#0065#, 16#006E#, 16#0074#, 16#0072#, 16#0079#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0065#, 16#0078#, 16#0069#, 16#0074#, 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#0075#, 16#0073#, 16#0065#, 16#0064#, 16#0020#, 16#0069#, 16#006E#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#006A#, 16#0075#, 16#006E#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#0077#, 16#0069#, 16#0074#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0069#, 16#0073#, 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#002C#, 16#0020#, 16#0069#, 16#002E#, 16#0065#, 16#002E#, 16#0020#, 16#0061#, 16#0073#, 16#0020#, 16#0074#, 16#0061#, 16#0072#, 16#0067#, 16#0065#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0073#, 16#006F#, 16#0075#, 16#0072#, 16#0063#, 16#0065#, 16#0073#, 16#002C#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#0076#, 16#0065#, 16#006C#, 16#0079#, 16#002C#, 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#0077#, 16#0069#, 16#0074#, 16#0068#, 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#002E#, 16#0020#, 16#0041#, 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#0020#, 16#0072#, 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#0072#, 16#0072#, 16#0065#, 16#0073#, 16#0070#, 16#006F#, 16#006E#, 16#0064#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0064#, 16#0065#, 16#0066#, 16#0069#, 16#006E#, 16#0069#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 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#0070#, 16#0073#, 16#0065#, 16#0075#, 16#0064#, 16#006F#, 16#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 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#006D#, 16#0061#, 16#0063#, 16#0068#, 16#0069#, 16#006E#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0066#, 16#0065#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 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#0073#, 16#0074#, 16#0061#, 16#0074#, 16#0065#, 16#002E#, others => 16#0000#), others => <>); -- "The classifier whose instances are to be retrieved." MS_0C94 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 55, Unused => 51, Length => 51, Value => (16#0054#, 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#0020#, 16#0077#, 16#0068#, 16#006F#, 16#0073#, 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#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0074#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0072#, 16#0069#, 16#0065#, 16#0076#, 16#0065#, 16#0064#, 16#002E#, others => 16#0000#), others => <>); -- "By specializing multiplicity element, it supports a multiplicity that specifies valid cardinalities for the collection of values associated with an instantiation of the structural feature." MS_0C95 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 199, Unused => 188, Length => 188, Value => (16#0042#, 16#0079#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0061#, 16#006C#, 16#0069#, 16#007A#, 16#0069#, 16#006E#, 16#0067#, 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#0065#, 16#006C#, 16#0065#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#002C#, 16#0020#, 16#0069#, 16#0074#, 16#0020#, 16#0073#, 16#0075#, 16#0070#, 16#0070#, 16#006F#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#0061#, 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#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#0076#, 16#0061#, 16#006C#, 16#0069#, 16#0064#, 16#0020#, 16#0063#, 16#0061#, 16#0072#, 16#0064#, 16#0069#, 16#006E#, 16#0061#, 16#006C#, 16#0069#, 16#0074#, 16#0069#, 16#0065#, 16#0073#, 16#0020#, 16#0066#, 16#006F#, 16#0072#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0063#, 16#006F#, 16#006C#, 16#006C#, 16#0065#, 16#0063#, 16#0074#, 16#0069#, 16#006F#, 16#006E#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0076#, 16#0061#, 16#006C#, 16#0075#, 16#0065#, 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#006E#, 16#0020#, 16#0069#, 16#006E#, 16#0073#, 16#0074#, 16#0061#, 16#006E#, 16#0074#, 16#0069#, 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#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#002E#, others => 16#0000#), others => <>); -- "An ExpansionRegion must have one or more argument ExpansionNodes and zero or more result ExpansionNodes." MS_0C96 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 111, Unused => 104, Length => 104, Value => (16#0041#, 16#006E#, 16#0020#, 16#0045#, 16#0078#, 16#0070#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#0052#, 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#006F#, 16#006E#, 16#0065#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0061#, 16#0072#, 16#0067#, 16#0075#, 16#006D#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0045#, 16#0078#, 16#0070#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#007A#, 16#0065#, 16#0072#, 16#006F#, 16#0020#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#006F#, 16#0072#, 16#0065#, 16#0020#, 16#0072#, 16#0065#, 16#0073#, 16#0075#, 16#006C#, 16#0074#, 16#0020#, 16#0045#, 16#0078#, 16#0070#, 16#0061#, 16#006E#, 16#0073#, 16#0069#, 16#006F#, 16#006E#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); -- "A_expr_timeExpression" MS_0C97 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 21, Length => 21, Value => (16#0041#, 16#005F#, 16#0065#, 16#0078#, 16#0070#, 16#0072#, 16#005F#, 16#0074#, 16#0069#, 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 => <>); -- "sendEvent present and receiveEvent absent" MS_0C98 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 41, Length => 41, Value => (16#0073#, 16#0065#, 16#006E#, 16#0064#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0063#, 16#0065#, 16#0069#, 16#0076#, 16#0065#, 16#0045#, 16#0076#, 16#0065#, 16#006E#, 16#0074#, 16#0020#, 16#0061#, 16#0062#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, others => 16#0000#), others => <>); -- "objectFlow" MS_0C99 : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 15, Unused => 10, Length => 10, Value => (16#006F#, 16#0062#, 16#006A#, 16#0065#, 16#0063#, 16#0074#, 16#0046#, 16#006C#, 16#006F#, 16#0077#, others => 16#0000#), others => <>); -- "The invoked behavior. It must be capable of accepting and returning control." MS_0C9A : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 79, Unused => 76, Length => 76, Value => (16#0054#, 16#0068#, 16#0065#, 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#002E#, 16#0020#, 16#0049#, 16#0074#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0062#, 16#0065#, 16#0020#, 16#0063#, 16#0061#, 16#0070#, 16#0061#, 16#0062#, 16#006C#, 16#0065#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0063#, 16#0063#, 16#0065#, 16#0070#, 16#0074#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0061#, 16#006E#, 16#0064#, 16#0020#, 16#0072#, 16#0065#, 16#0074#, 16#0075#, 16#0072#, 16#006E#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0063#, 16#006F#, 16#006E#, 16#0074#, 16#0072#, 16#006F#, 16#006C#, 16#002E#, others => 16#0000#), others => <>); -- "Join nodes have a Boolean value specification using the names of the incoming edges to specify the conditions under which the join will emit a token." MS_0C9B : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 159, Unused => 149, Length => 149, Value => (16#004A#, 16#006F#, 16#0069#, 16#006E#, 16#0020#, 16#006E#, 16#006F#, 16#0064#, 16#0065#, 16#0073#, 16#0020#, 16#0068#, 16#0061#, 16#0076#, 16#0065#, 16#0020#, 16#0061#, 16#0020#, 16#0042#, 16#006F#, 16#006F#, 16#006C#, 16#0065#, 16#0061#, 16#006E#, 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#0075#, 16#0073#, 16#0069#, 16#006E#, 16#0067#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006E#, 16#0061#, 16#006D#, 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#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#0074#, 16#006F#, 16#0020#, 16#0073#, 16#0070#, 16#0065#, 16#0063#, 16#0069#, 16#0066#, 16#0079#, 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#0073#, 16#0020#, 16#0075#, 16#006E#, 16#0064#, 16#0065#, 16#0072#, 16#0020#, 16#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#006A#, 16#006F#, 16#0069#, 16#006E#, 16#0020#, 16#0077#, 16#0069#, 16#006C#, 16#006C#, 16#0020#, 16#0065#, 16#006D#, 16#0069#, 16#0074#, 16#0020#, 16#0061#, 16#0020#, 16#0074#, 16#006F#, 16#006B#, 16#0065#, 16#006E#, 16#002E#, others => 16#0000#), others => <>); -- "CallConcurrencyKind is an enumeration type." MS_0C9C : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 47, Unused => 43, Length => 43, Value => (16#0043#, 16#0061#, 16#006C#, 16#006C#, 16#0043#, 16#006F#, 16#006E#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0079#, 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 => <>); -- "Designates the instances of Generalization which are members of a given GeneralizationSet." MS_0C9D : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 95, Unused => 90, Length => 90, Value => (16#0044#, 16#0065#, 16#0073#, 16#0069#, 16#0067#, 16#006E#, 16#0061#, 16#0074#, 16#0065#, 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#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#0077#, 16#0068#, 16#0069#, 16#0063#, 16#0068#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#006D#, 16#0065#, 16#006D#, 16#0062#, 16#0065#, 16#0072#, 16#0073#, 16#0020#, 16#006F#, 16#0066#, 16#0020#, 16#0061#, 16#0020#, 16#0067#, 16#0069#, 16#0076#, 16#0065#, 16#006E#, 16#0020#, 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#0053#, 16#0065#, 16#0074#, 16#002E#, others => 16#0000#), others => <>); -- "structuredNodeOutput" MS_0C9E : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 23, Unused => 20, Length => 20, Value => (16#0073#, 16#0074#, 16#0072#, 16#0075#, 16#0063#, 16#0074#, 16#0075#, 16#0072#, 16#0065#, 16#0064#, 16#004E#, 16#006F#, 16#0064#, 16#0065#, 16#004F#, 16#0075#, 16#0074#, 16#0070#, 16#0075#, 16#0074#, others => 16#0000#), others => <>); -- "If the MessageEnds are both OccurrenceSpecifications then the connector must go between the Parts represented by the Lifelines of the two MessageEnds." MS_0C9F : aliased Matreshka.Internals.Strings.Shared_String := (Capacity => 159, Unused => 150, Length => 150, Value => (16#0049#, 16#0066#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#0045#, 16#006E#, 16#0064#, 16#0073#, 16#0020#, 16#0061#, 16#0072#, 16#0065#, 16#0020#, 16#0062#, 16#006F#, 16#0074#, 16#0068#, 16#0020#, 16#004F#, 16#0063#, 16#0063#, 16#0075#, 16#0072#, 16#0072#, 16#0065#, 16#006E#, 16#0063#, 16#0065#, 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#, 16#0073#, 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#006E#, 16#006E#, 16#0065#, 16#0063#, 16#0074#, 16#006F#, 16#0072#, 16#0020#, 16#006D#, 16#0075#, 16#0073#, 16#0074#, 16#0020#, 16#0067#, 16#006F#, 16#0020#, 16#0062#, 16#0065#, 16#0074#, 16#0077#, 16#0065#, 16#0065#, 16#006E#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0050#, 16#0061#, 16#0072#, 16#0074#, 16#0073#, 16#0020#, 16#0072#, 16#0065#, 16#0070#, 16#0072#, 16#0065#, 16#0073#, 16#0065#, 16#006E#, 16#0074#, 16#0065#, 16#0064#, 16#0020#, 16#0062#, 16#0079#, 16#0020#, 16#0074#, 16#0068#, 16#0065#, 16#0020#, 16#004C#, 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#0074#, 16#0068#, 16#0065#, 16#0020#, 16#0074#, 16#0077#, 16#006F#, 16#0020#, 16#004D#, 16#0065#, 16#0073#, 16#0073#, 16#0061#, 16#0067#, 16#0065#, 16#0045#, 16#006E#, 16#0064#, 16#0073#, 16#002E#, others => 16#0000#), others => <>); end AMF.Internals.Tables.UML_String_Data_0C;
M:hw1 F:G$SYSCLK_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$UART0_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$Sys_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$putchar$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$getchar$0$0({2}DF,SC:U),C,0,0,0,0,0 F:G$getchar_nw$0$0({2}DF,SC:U),C,0,0,0,0,0 F:G$main$0$0({2}DF,SV:S),C,0,0,0,0,0 S:Lhw1.getchar$c$1$10({1}SC:U),R,0,0,[] S:Lhw1.getchar_nw$c$1$12({1}SC:U),R,0,0,[] S:Lhw1.main$imax$1$28({2}SI:S),R,0,0,[r4,r5] S:Lhw1.main$i$1$28({2}SI:S),R,0,0,[] S:Lhw1.main$count$1$28({2}SI:U),R,0,0,[] S:Lhw1.main$input$1$28({2}SI:U),R,0,0,[r6,r7] S:G$P0$0$0({1}SC:U),I,0,0 S:G$SP$0$0({1}SC:U),I,0,0 S:G$DPL$0$0({1}SC:U),I,0,0 S:G$DPH$0$0({1}SC:U),I,0,0 S:G$P4$0$0({1}SC:U),I,0,0 S:G$P5$0$0({1}SC:U),I,0,0 S:G$P6$0$0({1}SC:U),I,0,0 S:G$PCON$0$0({1}SC:U),I,0,0 S:G$TCON$0$0({1}SC:U),I,0,0 S:G$TMOD$0$0({1}SC:U),I,0,0 S:G$TL0$0$0({1}SC:U),I,0,0 S:G$TL1$0$0({1}SC:U),I,0,0 S:G$TH0$0$0({1}SC:U),I,0,0 S:G$TH1$0$0({1}SC:U),I,0,0 S:G$CKCON$0$0({1}SC:U),I,0,0 S:G$PSCTL$0$0({1}SC:U),I,0,0 S:G$P1$0$0({1}SC:U),I,0,0 S:G$TMR3CN$0$0({1}SC:U),I,0,0 S:G$TMR3RLL$0$0({1}SC:U),I,0,0 S:G$TMR3RLH$0$0({1}SC:U),I,0,0 S:G$TMR3L$0$0({1}SC:U),I,0,0 S:G$TMR3H$0$0({1}SC:U),I,0,0 S:G$P7$0$0({1}SC:U),I,0,0 S:G$SCON$0$0({1}SC:U),I,0,0 S:G$SCON0$0$0({1}SC:U),I,0,0 S:G$SBUF$0$0({1}SC:U),I,0,0 S:G$SBUF0$0$0({1}SC:U),I,0,0 S:G$SPI0CFG$0$0({1}SC:U),I,0,0 S:G$SPI0DAT$0$0({1}SC:U),I,0,0 S:G$ADC1$0$0({1}SC:U),I,0,0 S:G$SPI0CKR$0$0({1}SC:U),I,0,0 S:G$CPT0CN$0$0({1}SC:U),I,0,0 S:G$CPT1CN$0$0({1}SC:U),I,0,0 S:G$P2$0$0({1}SC:U),I,0,0 S:G$EMI0TC$0$0({1}SC:U),I,0,0 S:G$EMI0CF$0$0({1}SC:U),I,0,0 S:G$PRT0CF$0$0({1}SC:U),I,0,0 S:G$P0MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT1CF$0$0({1}SC:U),I,0,0 S:G$P1MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT2CF$0$0({1}SC:U),I,0,0 S:G$P2MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT3CF$0$0({1}SC:U),I,0,0 S:G$P3MDOUT$0$0({1}SC:U),I,0,0 S:G$IE$0$0({1}SC:U),I,0,0 S:G$SADDR0$0$0({1}SC:U),I,0,0 S:G$ADC1CN$0$0({1}SC:U),I,0,0 S:G$ADC1CF$0$0({1}SC:U),I,0,0 S:G$AMX1SL$0$0({1}SC:U),I,0,0 S:G$P3IF$0$0({1}SC:U),I,0,0 S:G$SADEN1$0$0({1}SC:U),I,0,0 S:G$EMI0CN$0$0({1}SC:U),I,0,0 S:G$_XPAGE$0$0({1}SC:U),I,0,0 S:G$P3$0$0({1}SC:U),I,0,0 S:G$OSCXCN$0$0({1}SC:U),I,0,0 S:G$OSCICN$0$0({1}SC:U),I,0,0 S:G$P74OUT$0$0({1}SC:U),I,0,0 S:G$FLSCL$0$0({1}SC:U),I,0,0 S:G$FLACL$0$0({1}SC:U),I,0,0 S:G$IP$0$0({1}SC:U),I,0,0 S:G$SADEN0$0$0({1}SC:U),I,0,0 S:G$AMX0CF$0$0({1}SC:U),I,0,0 S:G$AMX0SL$0$0({1}SC:U),I,0,0 S:G$ADC0CF$0$0({1}SC:U),I,0,0 S:G$P1MDIN$0$0({1}SC:U),I,0,0 S:G$ADC0L$0$0({1}SC:U),I,0,0 S:G$ADC0H$0$0({1}SC:U),I,0,0 S:G$SMB0CN$0$0({1}SC:U),I,0,0 S:G$SMB0STA$0$0({1}SC:U),I,0,0 S:G$SMB0DAT$0$0({1}SC:U),I,0,0 S:G$SMB0ADR$0$0({1}SC:U),I,0,0 S:G$ADC0GTL$0$0({1}SC:U),I,0,0 S:G$ADC0GTH$0$0({1}SC:U),I,0,0 S:G$ADC0LTL$0$0({1}SC:U),I,0,0 S:G$ADC0LTH$0$0({1}SC:U),I,0,0 S:G$T2CON$0$0({1}SC:U),I,0,0 S:G$T4CON$0$0({1}SC:U),I,0,0 S:G$RCAP2L$0$0({1}SC:U),I,0,0 S:G$RCAP2H$0$0({1}SC:U),I,0,0 S:G$TL2$0$0({1}SC:U),I,0,0 S:G$TH2$0$0({1}SC:U),I,0,0 S:G$SMB0CR$0$0({1}SC:U),I,0,0 S:G$PSW$0$0({1}SC:U),I,0,0 S:G$REF0CN$0$0({1}SC:U),I,0,0 S:G$DAC0L$0$0({1}SC:U),I,0,0 S:G$DAC0H$0$0({1}SC:U),I,0,0 S:G$DAC0CN$0$0({1}SC:U),I,0,0 S:G$DAC1L$0$0({1}SC:U),I,0,0 S:G$DAC1H$0$0({1}SC:U),I,0,0 S:G$DAC1CN$0$0({1}SC:U),I,0,0 S:G$PCA0CN$0$0({1}SC:U),I,0,0 S:G$PCA0MD$0$0({1}SC:U),I,0,0 S:G$PCA0CPM0$0$0({1}SC:U),I,0,0 S:G$PCA0CPM1$0$0({1}SC:U),I,0,0 S:G$PCA0CPM2$0$0({1}SC:U),I,0,0 S:G$PCA0CPM3$0$0({1}SC:U),I,0,0 S:G$PCA0CPM4$0$0({1}SC:U),I,0,0 S:G$ACC$0$0({1}SC:U),I,0,0 S:G$XBR0$0$0({1}SC:U),I,0,0 S:G$XBR1$0$0({1}SC:U),I,0,0 S:G$XBR2$0$0({1}SC:U),I,0,0 S:G$RCAP4L$0$0({1}SC:U),I,0,0 S:G$RCAP4H$0$0({1}SC:U),I,0,0 S:G$EIE1$0$0({1}SC:U),I,0,0 S:G$EIE2$0$0({1}SC:U),I,0,0 S:G$ADC0CN$0$0({1}SC:U),I,0,0 S:G$PCA0L$0$0({1}SC:U),I,0,0 S:G$PCA0CPL0$0$0({1}SC:U),I,0,0 S:G$PCA0CPL1$0$0({1}SC:U),I,0,0 S:G$PCA0CPL2$0$0({1}SC:U),I,0,0 S:G$PCA0CPL3$0$0({1}SC:U),I,0,0 S:G$PCA0CPL4$0$0({1}SC:U),I,0,0 S:G$RSTSRC$0$0({1}SC:U),I,0,0 S:G$B$0$0({1}SC:U),I,0,0 S:G$SCON1$0$0({1}SC:U),I,0,0 S:G$SBUF1$0$0({1}SC:U),I,0,0 S:G$SADDR1$0$0({1}SC:U),I,0,0 S:G$TL4$0$0({1}SC:U),I,0,0 S:G$TH4$0$0({1}SC:U),I,0,0 S:G$EIP1$0$0({1}SC:U),I,0,0 S:G$EIP2$0$0({1}SC:U),I,0,0 S:G$SPI0CN$0$0({1}SC:U),I,0,0 S:G$PCA0H$0$0({1}SC:U),I,0,0 S:G$PCA0CPH0$0$0({1}SC:U),I,0,0 S:G$PCA0CPH1$0$0({1}SC:U),I,0,0 S:G$PCA0CPH2$0$0({1}SC:U),I,0,0 S:G$PCA0CPH3$0$0({1}SC:U),I,0,0 S:G$PCA0CPH4$0$0({1}SC:U),I,0,0 S:G$WDTCN$0$0({1}SC:U),I,0,0 S:G$TMR0$0$0({2}SI:U),I,0,0 S:G$TMR1$0$0({2}SI:U),I,0,0 S:G$TMR2$0$0({2}SI:U),I,0,0 S:G$RCAP2$0$0({2}SI:U),I,0,0 S:G$TMR3$0$0({2}SI:U),I,0,0 S:G$TMR3RL$0$0({2}SI:U),I,0,0 S:G$TMR4$0$0({2}SI:U),I,0,0 S:G$RCAP4$0$0({2}SI:U),I,0,0 S:G$ADC0$0$0({2}SI:U),I,0,0 S:G$ADC0GT$0$0({2}SI:U),I,0,0 S:G$ADC0LT$0$0({2}SI:U),I,0,0 S:G$DAC0$0$0({2}SI:U),I,0,0 S:G$DAC1$0$0({2}SI:U),I,0,0 S:G$PCA0$0$0({2}SI:U),I,0,0 S:G$PCA0CP0$0$0({2}SI:U),I,0,0 S:G$PCA0CP1$0$0({2}SI:U),I,0,0 S:G$PCA0CP2$0$0({2}SI:U),I,0,0 S:G$PCA0CP3$0$0({2}SI:U),I,0,0 S:G$PCA0CP4$0$0({2}SI:U),I,0,0 S:G$P0_0$0$0({1}SX:U),J,0,0 S:G$P0_1$0$0({1}SX:U),J,0,0 S:G$P0_2$0$0({1}SX:U),J,0,0 S:G$P0_3$0$0({1}SX:U),J,0,0 S:G$P0_4$0$0({1}SX:U),J,0,0 S:G$P0_5$0$0({1}SX:U),J,0,0 S:G$P0_6$0$0({1}SX:U),J,0,0 S:G$P0_7$0$0({1}SX:U),J,0,0 S:G$IT0$0$0({1}SX:U),J,0,0 S:G$IE0$0$0({1}SX:U),J,0,0 S:G$IT1$0$0({1}SX:U),J,0,0 S:G$IE1$0$0({1}SX:U),J,0,0 S:G$TR0$0$0({1}SX:U),J,0,0 S:G$TF0$0$0({1}SX:U),J,0,0 S:G$TR1$0$0({1}SX:U),J,0,0 S:G$TF1$0$0({1}SX:U),J,0,0 S:G$P1_0$0$0({1}SX:U),J,0,0 S:G$P1_1$0$0({1}SX:U),J,0,0 S:G$P1_2$0$0({1}SX:U),J,0,0 S:G$P1_3$0$0({1}SX:U),J,0,0 S:G$P1_4$0$0({1}SX:U),J,0,0 S:G$P1_5$0$0({1}SX:U),J,0,0 S:G$P1_6$0$0({1}SX:U),J,0,0 S:G$P1_7$0$0({1}SX:U),J,0,0 S:G$RI$0$0({1}SX:U),J,0,0 S:G$RI0$0$0({1}SX:U),J,0,0 S:G$TI$0$0({1}SX:U),J,0,0 S:G$TI0$0$0({1}SX:U),J,0,0 S:G$RB8$0$0({1}SX:U),J,0,0 S:G$RB80$0$0({1}SX:U),J,0,0 S:G$TB8$0$0({1}SX:U),J,0,0 S:G$TB80$0$0({1}SX:U),J,0,0 S:G$REN$0$0({1}SX:U),J,0,0 S:G$REN0$0$0({1}SX:U),J,0,0 S:G$SM2$0$0({1}SX:U),J,0,0 S:G$SM20$0$0({1}SX:U),J,0,0 S:G$MCE0$0$0({1}SX:U),J,0,0 S:G$SM1$0$0({1}SX:U),J,0,0 S:G$SM10$0$0({1}SX:U),J,0,0 S:G$SM0$0$0({1}SX:U),J,0,0 S:G$SM00$0$0({1}SX:U),J,0,0 S:G$S0MODE$0$0({1}SX:U),J,0,0 S:G$P2_0$0$0({1}SX:U),J,0,0 S:G$P2_1$0$0({1}SX:U),J,0,0 S:G$P2_2$0$0({1}SX:U),J,0,0 S:G$P2_3$0$0({1}SX:U),J,0,0 S:G$P2_4$0$0({1}SX:U),J,0,0 S:G$P2_5$0$0({1}SX:U),J,0,0 S:G$P2_6$0$0({1}SX:U),J,0,0 S:G$P2_7$0$0({1}SX:U),J,0,0 S:G$EX0$0$0({1}SX:U),J,0,0 S:G$ET0$0$0({1}SX:U),J,0,0 S:G$EX1$0$0({1}SX:U),J,0,0 S:G$ET1$0$0({1}SX:U),J,0,0 S:G$ES0$0$0({1}SX:U),J,0,0 S:G$ES$0$0({1}SX:U),J,0,0 S:G$ET2$0$0({1}SX:U),J,0,0 S:G$EA$0$0({1}SX:U),J,0,0 S:G$P3_0$0$0({1}SX:U),J,0,0 S:G$P3_1$0$0({1}SX:U),J,0,0 S:G$P3_2$0$0({1}SX:U),J,0,0 S:G$P3_3$0$0({1}SX:U),J,0,0 S:G$P3_4$0$0({1}SX:U),J,0,0 S:G$P3_5$0$0({1}SX:U),J,0,0 S:G$P3_6$0$0({1}SX:U),J,0,0 S:G$P3_7$0$0({1}SX:U),J,0,0 S:G$PX0$0$0({1}SX:U),J,0,0 S:G$PT0$0$0({1}SX:U),J,0,0 S:G$PX1$0$0({1}SX:U),J,0,0 S:G$PT1$0$0({1}SX:U),J,0,0 S:G$PS0$0$0({1}SX:U),J,0,0 S:G$PS$0$0({1}SX:U),J,0,0 S:G$PT2$0$0({1}SX:U),J,0,0 S:G$SMBTOE$0$0({1}SX:U),J,0,0 S:G$SMBFTE$0$0({1}SX:U),J,0,0 S:G$AA$0$0({1}SX:U),J,0,0 S:G$SI$0$0({1}SX:U),J,0,0 S:G$STO$0$0({1}SX:U),J,0,0 S:G$STA$0$0({1}SX:U),J,0,0 S:G$ENSMB$0$0({1}SX:U),J,0,0 S:G$BUSY$0$0({1}SX:U),J,0,0 S:G$CPRL2$0$0({1}SX:U),J,0,0 S:G$CT2$0$0({1}SX:U),J,0,0 S:G$TR2$0$0({1}SX:U),J,0,0 S:G$EXEN2$0$0({1}SX:U),J,0,0 S:G$TCLK$0$0({1}SX:U),J,0,0 S:G$RCLK$0$0({1}SX:U),J,0,0 S:G$EXF2$0$0({1}SX:U),J,0,0 S:G$TF2$0$0({1}SX:U),J,0,0 S:G$P$0$0({1}SX:U),J,0,0 S:G$F1$0$0({1}SX:U),J,0,0 S:G$OV$0$0({1}SX:U),J,0,0 S:G$RS0$0$0({1}SX:U),J,0,0 S:G$RS1$0$0({1}SX:U),J,0,0 S:G$F0$0$0({1}SX:U),J,0,0 S:G$AC$0$0({1}SX:U),J,0,0 S:G$CY$0$0({1}SX:U),J,0,0 S:G$CCF0$0$0({1}SX:U),J,0,0 S:G$CCF1$0$0({1}SX:U),J,0,0 S:G$CCF2$0$0({1}SX:U),J,0,0 S:G$CCF3$0$0({1}SX:U),J,0,0 S:G$CCF4$0$0({1}SX:U),J,0,0 S:G$CR$0$0({1}SX:U),J,0,0 S:G$CF$0$0({1}SX:U),J,0,0 S:G$ADLJST$0$0({1}SX:U),J,0,0 S:G$AD0LJST$0$0({1}SX:U),J,0,0 S:G$ADWINT$0$0({1}SX:U),J,0,0 S:G$AD0WINT$0$0({1}SX:U),J,0,0 S:G$ADSTM0$0$0({1}SX:U),J,0,0 S:G$AD0CM0$0$0({1}SX:U),J,0,0 S:G$ADSTM1$0$0({1}SX:U),J,0,0 S:G$AD0CM1$0$0({1}SX:U),J,0,0 S:G$ADBUSY$0$0({1}SX:U),J,0,0 S:G$AD0BUSY$0$0({1}SX:U),J,0,0 S:G$ADCINT$0$0({1}SX:U),J,0,0 S:G$AD0INT$0$0({1}SX:U),J,0,0 S:G$ADCTM$0$0({1}SX:U),J,0,0 S:G$AD0TM$0$0({1}SX:U),J,0,0 S:G$ADCEN$0$0({1}SX:U),J,0,0 S:G$AD0EN$0$0({1}SX:U),J,0,0 S:G$SPIEN$0$0({1}SX:U),J,0,0 S:G$MSTEN$0$0({1}SX:U),J,0,0 S:G$SLVSEL$0$0({1}SX:U),J,0,0 S:G$TXBSY$0$0({1}SX:U),J,0,0 S:G$RXOVRN$0$0({1}SX:U),J,0,0 S:G$MODF$0$0({1}SX:U),J,0,0 S:G$WCOL$0$0({1}SX:U),J,0,0 S:G$SPIF$0$0({1}SX:U),J,0,0 S:G$SYSCLK_Init$0$0({2}DF,SV:S),C,0,0 S:G$UART0_Init$0$0({2}DF,SV:S),C,0,0 S:G$Sys_Init$0$0({2}DF,SV:S),C,0,0 S:G$getchar_nw$0$0({2}DF,SC:U),C,0,0 S:G$_print_format$0$0({2}DF,SI:S),C,0,0 S:G$printf_small$0$0({2}DF,SV:S),C,0,0 S:G$printf$0$0({2}DF,SI:S),C,0,0 S:G$vprintf$0$0({2}DF,SI:S),C,0,0 S:G$sprintf$0$0({2}DF,SI:S),C,0,0 S:G$vsprintf$0$0({2}DF,SI:S),C,0,0 S:G$puts$0$0({2}DF,SI:S),C,0,0 S:G$getchar$0$0({2}DF,SC:U),C,0,0 S:G$putchar$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast_f$0$0({2}DF,SV:S),C,0,0 S:G$printf_tiny$0$0({2}DF,SV:S),C,0,0 S:G$main$0$0({2}DF,SV:S),C,0,0 S:Fhw1$__str_0$0$0({50}DA50d,SC:S),D,0,0 S:Fhw1$__str_1$0$0({22}DA22d,SC:S),D,0,0 S:Fhw1$__str_2$0$0({20}DA20d,SC:S),D,0,0 S:Fhw1$__str_3$0$0({11}DA11d,SC:S),D,0,0
----------------------------------------------------------------------- -- asf.requests -- ASF Requests -- Copyright (C) 2009, 2010, 2011, 2012, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with AWS.Status; with AWS.Headers; package ASF.Requests.Web is type Request is new ASF.Requests.Request with private; type Request_Access is access all Request'Class; function Get_Parameter (R : Request; Name : String) return String; -- Iterate over the request parameters and executes the <b>Process</b> procedure. procedure Iterate_Parameters (Req : in Request; Process : not null access procedure (Name : in String; Value : in String)); -- Set the AWS data received to initialize the request object. procedure Set_Request (Req : in out Request; Data : access AWS.Status.Data); -- Returns the name of the HTTP method with which this request was made, -- for example, GET, POST, or PUT. Same as the value of the CGI variable -- REQUEST_METHOD. function Get_Method (Req : in Request) return String; -- Returns the name and version of the protocol the request uses in the form -- protocol/majorVersion.minorVersion, for example, HTTP/1.1. For HTTP servlets, -- the value returned is the same as the value of the CGI variable SERVER_PROTOCOL. function Get_Protocol (Req : in Request) return String; -- Returns the part of this request's URL from the protocol name up to the query -- string in the first line of the HTTP request. The web container does not decode -- this String. For example: -- First line of HTTP request Returned Value -- POST /some/path.html HTTP/1.1 /some/path.html -- GET http://foo.bar/a.html HTTP/1.0 /a.html -- HEAD /xyz?a=b HTTP/1.1 /xyz function Get_Request_URI (Req : in Request) return String; -- Returns the value of the specified request header as a String. If the request -- did not include a header of the specified name, this method returns null. -- If there are multiple headers with the same name, this method returns the -- first head in the request. The header name is case insensitive. You can use -- this method with any request header. function Get_Header (Req : in Request; Name : in String) return String; -- Returns all the values of the specified request header as an Enumeration -- of String objects. -- -- Some headers, such as Accept-Language can be sent by clients as several headers -- each with a different value rather than sending the header as a comma -- separated list. -- -- If the request did not include any headers of the specified name, this method -- returns an empty Enumeration. The header name is case insensitive. You can use -- this method with any request header. function Get_Headers (Req : in Request; Name : in String) return String; -- Iterate over the request headers and executes the <b>Process</b> procedure. procedure Iterate_Headers (Req : in Request; Process : not null access procedure (Name : in String; Value : in String)); -- Returns the Internet Protocol (IP) address of the client or last proxy that -- sent the request. For HTTP servlets, same as the value of the CGI variable -- REMOTE_ADDR. function Get_Remote_Addr (Req : in Request) return String; -- Get the number of parts included in the request. function Get_Part_Count (Req : in Request) return Natural; -- Process the part at the given position and executes the <b>Process</b> operation -- with the part object. procedure Process_Part (Req : in out Request; Position : in Positive; Process : not null access procedure (Data : in ASF.Parts.Part'Class)); -- Process the part identifed by <b>Id</b> and executes the <b>Process</b> operation -- with the part object. procedure Process_Part (Req : in out Request; Id : in String; Process : not null access procedure (Data : in ASF.Parts.Part'Class)); private type Request is new ASF.Requests.Request with record Data : access AWS.Status.Data; Headers : AWS.Headers.List; end record; end ASF.Requests.Web;
-- Copyright 2015-2017 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/>. package Pack is type Small is mod 2 ** 6; type Array_Type is array (0 .. 9) of Small with Pack; type Array_Access is access all Array_Type; A : aliased Array_Type := (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); AA : constant Array_Access := A'Access; procedure Do_Nothing (A : Array_Access); end Pack;
-- C35502M.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- CHECK THAT 'POS' AND 'VAL' YIELD THE CORRECT RESULTS WHEN -- THE PREFIX IS AN ENUMERATION TYPE, OTHER THAN A BOOLEAN OR A -- CHARACTER TYPE, WITH AN ENUMERATION REPRESENTATION CLAUSE. -- HISTORY: -- RJW 05/27/86 CREATED ORIGINAL TEST. -- BCB 01/04/88 MODIFIED HEADER. -- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'. WITH REPORT; USE REPORT; PROCEDURE C35502M IS TYPE ENUM IS (A, BC, ABC, A_B_C, ABCD); FOR ENUM USE (A => 2, BC => 4, ABC => 6, A_B_C => 8, ABCD => 10); SUBTYPE SUBENUM IS ENUM RANGE A .. BC; TYPE NEWENUM IS NEW ENUM; SUBTYPE SUBNEW IS NEWENUM RANGE A .. BC; BEGIN TEST ("C35502M", "CHECK THAT 'POS' AND 'VAL' YIELD THE " & "CORRECT RESULTS WHEN THE PREFIX IS AN " & "ENUMERATION TYPE, OTHER THAN A CHARACTER " & "OR A BOOLEAN TYPE, WITH AN ENUMERATION " & "REPRESENTATION CLAUSE" ); DECLARE POSITION : INTEGER; BEGIN POSITION := 0; FOR E IN ENUM LOOP IF SUBENUM'POS (E) /= POSITION THEN FAILED ( "INCORRECT SUBENUM'POS (" & ENUM'IMAGE (E) & ")" ); END IF; IF SUBENUM'VAL (POSITION) /= E THEN FAILED ( "INCORRECT SUBENUM'VAL (" & INTEGER'IMAGE (POSITION) & ")" ); END IF; POSITION := POSITION + 1; END LOOP; POSITION := 0; FOR E IN NEWENUM LOOP IF SUBNEW'POS (E) /= POSITION THEN FAILED ( "INCORRECT SUBNEW'POS (" & NEWENUM'IMAGE (E) & ")" ); END IF; IF SUBNEW'VAL (POSITION) /= E THEN FAILED ( "INCORRECT SUBNEW'VAL (" & INTEGER'IMAGE (POSITION) & ")" ); END IF; POSITION := POSITION + 1; END LOOP; END; DECLARE FUNCTION A_B_C RETURN ENUM IS BEGIN RETURN A; END A_B_C; BEGIN IF ENUM'VAL (0) /= A_B_C THEN FAILED ( "WRONG ENUM'VAL (0) WHEN HIDDEN " & "BY FUNCTION - 1" ); END IF; IF ENUM'VAL (0) = C35502M.A_B_C THEN FAILED ( "WRONG ENUM'VAL (0) WHEN HIDDEN " & "BY FUNCTION - 2" ); END IF; END; BEGIN IF ENUM'VAL (IDENT_INT (-1)) = ENUM'FIRST THEN FAILED ( "NO EXCEPTION RAISED FOR " & "ENUM'VAL (IDENT_INT (-1)) - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED FOR " & "ENUM'VAL (IDENT_INT (-1)) - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED FOR " & "ENUM'VAL (IDENT_INT (-1))" ); END; BEGIN IF NEWENUM'VAL (IDENT_INT (-1)) = NEWENUM'LAST THEN FAILED ( "NO EXCEPTION RAISED FOR " & "NEWENUM'VAL (IDENT_INT (-1)) - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED FOR " & "NEWENUM'VAL (IDENT_INT (-1)) - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED FOR " & "NEWENUM'VAL (IDENT_INT (-1))" ); END; BEGIN IF ENUM'VAL (IDENT_INT (5)) = ENUM'LAST THEN FAILED ( "NO EXCEPTION RAISED FOR " & "ENUM'VAL (IDENT_INT (5)) - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED FOR " & "ENUM'VAL (IDENT_INT (5)) - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED FOR " & "ENUM'VAL (IDENT_INT (5))" ); END; BEGIN IF NEWENUM'VAL (IDENT_INT (5)) = NEWENUM'LAST THEN FAILED ( "NO EXCEPTION RAISED FOR " & "NEWENUM'VAL (IDENT_INT (5)) - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED FOR " & "NEWENUM'VAL (IDENT_INT (5)) - 2" ); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED FOR " & "NEWENUM'VAL (IDENT_INT (5))" ); END; RESULT; END C35502M;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_render_create_picture_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; minor_opcode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; pid : aliased xcb.xcb_render_picture_t; drawable : aliased xcb.xcb_drawable_t; format : aliased xcb.xcb_render_pictformat_t; value_mask : aliased Interfaces.Unsigned_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_render_create_picture_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_create_picture_request_t.Item, Element_Array => xcb.xcb_render_create_picture_request_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_create_picture_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_render_create_picture_request_t.Pointer, Element_Array => xcb.xcb_render_create_picture_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_render_create_picture_request_t;
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with Ada.Containers.Hashed_Maps; with Ada.Exceptions; with Ada.Wide_Wide_Text_IO; with League.JSON.Objects; with League.Stream_Element_Vectors; with League.String_Vectors; with League.Strings; with Spawn.Processes; with Jupyter.Kernels; with Processes; package Ada_Kernels is type Kernel is limited new Jupyter.Kernels.Kernel with private; procedure Initialize (Self : in out Kernel'Class; Top_Dir : League.Strings.Universal_String; Error : out League.Strings.Universal_String); private type Gprbuild_Options is record Path : League.Strings.Universal_String; Gargs : League.String_Vectors.Universal_String_Vector; Cargs : League.String_Vectors.Universal_String_Vector; Largs : League.String_Vectors.Universal_String_Vector; Bargs : League.String_Vectors.Universal_String_Vector; end record; procedure Append (Args : in out League.String_Vectors.Universal_String_Vector; Option : Gprbuild_Options); type Session is limited new Jupyter.Kernels.Session and Spawn.Processes.Process_Listener with record Gprbuild : Gprbuild_Options; Gnatchop : League.Strings.Universal_String; ALR : League.Strings.Universal_String; Process : Spawn.Processes.Process; Directory : League.Strings.Universal_String; -- Each session has its own directory IO_Pub : Jupyter.Kernels.IO_Pub_Access; Stdout : League.Stream_Element_Vectors.Stream_Element_Vector; Stderr : League.Stream_Element_Vectors.Stream_Element_Vector; Service : League.Stream_Element_Vectors.Stream_Element_Vector; Injected : Boolean := False; Finished : Boolean := True; Ready : Boolean := True; -- Driver's ready to get next Command Clauses : League.String_Vectors.Universal_String_Vector; Runs : League.String_Vectors.Universal_String_Vector; Build_Env : Processes.Environment; Trace : Ada.Wide_Wide_Text_IO.File_Type; end record; overriding procedure Execute (Self : aliased in out Session; IO_Pub : not null Jupyter.Kernels.IO_Pub_Access; Execution_Counter : Positive; Code : League.Strings.Universal_String; Silent : Boolean; User_Expressions : League.JSON.Objects.JSON_Object; Allow_Stdin : Boolean; Stop_On_Error : Boolean; Expression_Values : out League.JSON.Objects.JSON_Object; Error : in out Jupyter.Kernels.Execution_Error); overriding procedure Standard_Output_Available (Self : in out Session); overriding procedure Standard_Error_Available (Self : in out Session); overriding procedure Finished (Self : in out Session; Exit_Status : Spawn.Processes.Process_Exit_Status; Exit_Code : Spawn.Processes.Process_Exit_Code); overriding procedure Error_Occurred (Self : in out Session; Process_Error : Integer); overriding procedure Exception_Occurred (Self : in out Session; Occurrence : Ada.Exceptions.Exception_Occurrence); type Session_Access is access all Session; function Hash (Value : Positive) return Ada.Containers.Hash_Type is (Ada.Containers.Hash_Type'Mod (Value)); package Session_Maps is new Ada.Containers.Hashed_Maps (Key_Type => Positive, Element_Type => Session_Access, Hash => Hash, Equivalent_Keys => "="); type Kernel is limited new Jupyter.Kernels.Kernel with record Top_Dir : League.Strings.Universal_String; Gprbuild : League.Strings.Universal_String; Gnatchop : League.Strings.Universal_String; ALR : League.Strings.Universal_String; Driver : League.Strings.Universal_String; Map : Session_Maps.Map; Last_Id : Natural := 0; end record; overriding procedure Kernel_Info (Self : aliased in out Kernel; Result : out League.JSON.Objects.JSON_Object); overriding procedure Create_Session (Self : aliased in out Kernel; Session_Id : Positive; Result : out Jupyter.Kernels.Session_Access); overriding function Get_Session (Self : aliased in out Kernel; Session_Id : Positive) return Jupyter.Kernels.Session_Access; end Ada_Kernels;
with GMP; private with C.mpfr; package MPFR is pragma Preelaborate; pragma Linker_Options ("-lmpfr"); function Version return String; subtype Number_Base is GMP.Number_Base; type Precision is mod 2 ** GMP.Exponent'Size; type Rounding is ( To_Nearest_With_Ties_Away_From_Zero, To_Nearest, Towards_Zero, Towards_Plus_Infinity, Towards_Minus_Infinity, Away_From_Zero, Faithful); function Default_Precision return Precision; function Default_Rounding return Rounding; private pragma Compile_Time_Error ( Precision'Last /= Precision (C.mpfr.mpfr_uprec_t'Last), "please adjust Precision as mpfr_uprec_t"); for Rounding use ( To_Nearest_With_Ties_Away_From_Zero => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDNA), To_Nearest => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDN), Towards_Zero => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDZ), Towards_Plus_Infinity => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDU), Towards_Minus_Infinity => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDD), Away_From_Zero => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDA), Faithful => C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDF)); end MPFR;
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with types; package soc.layout with spark_mode => on is -- This SoC has two flash bank mapped consecutively, giving access -- to 2MB of flash FLASH_BASE : constant system_address := 16#0800_0000#; FLASH_SIZE : constant := 2 * MBYTE; SRAM_BASE : constant system_address := 16#1000_0000#; SRAM_SIZE : constant := 64 * KBYTE; BOOT_ROM_BASE : constant system_address := 16#1FFF_0000#; RAM_BASE : constant system_address := 16#2000_0000#; -- SRAM RAM_SIZE : constant := 128 * KBYTE; USER_RAM_BASE : constant system_address := 16#2000_0000#; -- SRAM USER_RAM_SIZE : constant := 128 * KBYTE; KERNEL_RAM_BASE : constant system_address := 16#1000_0000#; KERNEL_RAM_SIZE : constant := 64 * KBYTE; PERIPH_BASE : constant system_address := 16#4000_0000#; MEMORY_BANK1_BASE : constant system_address := 16#6000_0000#; MEMORY_BANK2_BASE : constant system_address := MEMORY_BANK1_BASE; APB1PERIPH_BASE : constant system_address := PERIPH_BASE; APB2PERIPH_BASE : constant system_address := PERIPH_BASE + 16#0001_0000#; AHB1PERIPH_BASE : constant system_address := PERIPH_BASE + 16#0002_0000#; AHB2PERIPH_BASE : constant system_address := PERIPH_BASE + 16#1000_0000#; -- -- AHB1 peripherals -- GPIOA_BASE : constant system_address := AHB1PERIPH_BASE + 16#0000#; GPIOB_BASE : constant system_address := AHB1PERIPH_BASE + 16#0400#; GPIOC_BASE : constant system_address := AHB1PERIPH_BASE + 16#0800#; GPIOD_BASE : constant system_address := AHB1PERIPH_BASE + 16#0C00#; GPIOE_BASE : constant system_address := AHB1PERIPH_BASE + 16#1000#; GPIOF_BASE : constant system_address := AHB1PERIPH_BASE + 16#1400#; GPIOG_BASE : constant system_address := AHB1PERIPH_BASE + 16#1800#; GPIOH_BASE : constant system_address := AHB1PERIPH_BASE + 16#1C00#; GPIOI_BASE : constant system_address := AHB1PERIPH_BASE + 16#2000#; DMA1_BASE : constant system_address := AHB1PERIPH_BASE + 16#6000#; DMA2_BASE : constant system_address := AHB1PERIPH_BASE + 16#6400#; -- -- APB2 peripherals -- SYSCFG_BASE : constant system_address := APB2PERIPH_BASE + 16#3800#; -- -- Flash and firmware structure -- -- -- Flip bank FW1_SIZE : constant unsigned_32 := 576*1024; FW1_KERN_BASE : constant unsigned_32 := 16#0802_0000#; FW1_KERN_SIZE : constant unsigned_32 := 64*1024; FW1_USER_BASE : constant unsigned_32 := 16#0808_0000#; FW1_USER_SIZE : constant unsigned_32 := 512*1024; -- DFU 1 DFU1_SIZE : constant unsigned_32 := 320*1024; DFU1_KERN_BASE : constant unsigned_32 := 16#0803_0000#; DFU1_USER_BASE : constant unsigned_32 := 16#0804_0000#; DFU1_KERN_SIZE : constant unsigned_32 := 64*1024; DFU1_USER_SIZE : constant unsigned_32 := 256*1024; -- Flop bank FW2_SIZE : constant unsigned_32 := 576*1024; FW2_KERN_SIZE : constant unsigned_32 := 64*1024; FW2_KERN_BASE : constant unsigned_32 := 16#0812_0000#; FW2_USER_BASE : constant unsigned_32 := 16#0818_0000#; FW2_USER_SIZE : constant unsigned_32 := 512*1024; -- DFU 2 DFU2_SIZE : constant unsigned_32 := 320*1024; DFU2_KERN_BASE : constant unsigned_32 := 16#0813_0000#; DFU2_KERN_SIZE : constant unsigned_32 := 64*1024; DFU2_USER_BASE : constant unsigned_32 := 16#0814_0000#; DFU2_USER_SIZE : constant unsigned_32 := 256*1024; end soc.layout;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2011,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000 -- Version Control -- $Revision: 1.10 $ -- $Date: 2018/07/07 23:30:32 $ -- 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 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;
package body Archive_Searcher is function Search (Self : in out Object; Search_For : in String) return String is begin return "bar"; end Search; end Archive_Searcher;
-------------------------------------------------------------------------------------------------------------------- -- 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. -------------------------------------------------------------------------------------------------------------------- -- SDL.Events.Joysticks -- -- Joystick specific events. -------------------------------------------------------------------------------------------------------------------- package SDL.Events.Joysticks is pragma Preelaborate; -- Joystick events. Axis_Motion : constant Event_Types := 16#0000_0600#; Ball_Motion : constant Event_Types := Axis_Motion + 1; Hat_Motion : constant Event_Types := Axis_Motion + 2; Button_Down : constant Event_Types := Axis_Motion + 3; Button_Up : constant Event_Types := Axis_Motion + 4; Device_Added : constant Event_Types := Axis_Motion + 5; Device_Removed : constant Event_Types := Axis_Motion + 6; type IDs is range -2 ** 31 .. 2 ** 31 - 1 with Convention => C, Size => 32; type Axes is range 0 .. 255 with Convention => C, Size => 8; type Axes_Values is range -32768 .. 32767 with Convention => C, Size => 16; type Axis_Events is record Event_Type : Event_Types; -- Will be set to Axis_Motion. Time_Stamp : Time_Stamps; Which : IDs; Axis : Axes; Padding_1 : Padding_8; Padding_2 : Padding_8; Padding_3 : Padding_8; Value : Axes_Values; Padding_4 : Padding_16; end record with Convention => C; type Balls is range 0 .. 255 with Convention => C, Size => 8; type Ball_Values is range -32768 .. 32767 with Convention => C, Size => 16; type Ball_Events is record Event_Type : Event_Types; -- Will be set to Ball_Motion. Time_Stamp : Time_Stamps; Which : IDs; Ball : Balls; Padding_1 : Padding_8; Padding_2 : Padding_8; Padding_3 : Padding_8; X_Relative : Ball_Values; Y_Relative : Ball_Values; end record with Convention => C; type Hats is range 0 .. 255 with Convention => C, Size => 8; type Hat_Positions is mod 2 ** 8 with Convention => C, Size => 8; Hat_Centred : constant Hat_Positions := 0; Hat_Up : constant Hat_Positions := 1; Hat_Right : constant Hat_Positions := 2; Hat_Down : constant Hat_Positions := 4; Hat_Left : constant Hat_Positions := 8; Hat_Right_Up : constant Hat_Positions := Hat_Right or Hat_Up; Hat_Right_Down : constant Hat_Positions := Hat_Right or Hat_Down; Hat_Left_Up : constant Hat_Positions := Hat_Left or Hat_Up; Hat_Left_Down : constant Hat_Positions := Hat_Left or Hat_Down; type Hat_Events is record Event_Type : Event_Types; -- Will be set to Hat_Motion. Time_Stamp : Time_Stamps; Which : IDs; Hat : Hats; Position : Hat_Positions; Padding_1 : Padding_8; Padding_2 : Padding_8; end record with Convention => C; type Buttons is range 0 .. 255 with Convention => C, Size => 8; type Button_Events is record Event_Type : Event_Types; -- Will be set to Button_Down or Button_Up. Time_Stamp : Time_Stamps; Which : IDs; Button : Buttons; State : Button_State; Padding_1 : Padding_8; Padding_2 : Padding_8; end record with Convention => C; type Device_Events is record Event_Type : Event_Types; -- Will be set to Device_Added or Device_Removed. Time_Stamp : Time_Stamps; Which : IDs; end record with Convention => C; -- Update the joystick event data. This is called by the event loop. procedure Update with Import => True, Convention => C, External_Name => "SDL_JoystickUpdate"; function Is_Polling_Enabled return Boolean with Inline => True; procedure Enable_Polling with Inline => True; procedure Disable_Polling with Inline => True; private for Axis_Events use record Event_Type at 0 * SDL.Word range 0 .. 31; Time_Stamp at 1 * SDL.Word range 0 .. 31; Which at 2 * SDL.Word range 0 .. 31; Axis at 3 * SDL.Word range 0 .. 7; Padding_1 at 3 * SDL.Word range 8 .. 15; Padding_2 at 3 * SDL.Word range 16 .. 23; Padding_3 at 3 * SDL.Word range 24 .. 31; Value at 4 * SDL.Word range 0 .. 15; Padding_4 at 4 * SDL.Word range 16 .. 31; end record; for Ball_Events use record Event_Type at 0 * SDL.Word range 0 .. 31; Time_Stamp at 1 * SDL.Word range 0 .. 31; Which at 2 * SDL.Word range 0 .. 31; Ball at 3 * SDL.Word range 0 .. 7; Padding_1 at 3 * SDL.Word range 8 .. 15; Padding_2 at 3 * SDL.Word range 16 .. 23; Padding_3 at 3 * SDL.Word range 24 .. 31; X_Relative at 4 * SDL.Word range 0 .. 15; Y_Relative at 4 * SDL.Word range 16 .. 31; end record; for Hat_Events use record Event_Type at 0 * SDL.Word range 0 .. 31; Time_Stamp at 1 * SDL.Word range 0 .. 31; Which at 2 * SDL.Word range 0 .. 31; Hat at 3 * SDL.Word range 0 .. 7; Position at 3 * SDL.Word range 8 .. 15; Padding_1 at 3 * SDL.Word range 16 .. 23; Padding_2 at 3 * SDL.Word range 24 .. 31; end record; for Button_Events use record Event_Type at 0 * SDL.Word range 0 .. 31; Time_Stamp at 1 * SDL.Word range 0 .. 31; Which at 2 * SDL.Word range 0 .. 31; Button at 3 * SDL.Word range 0 .. 7; State at 3 * SDL.Word range 8 .. 15; Padding_1 at 3 * SDL.Word range 16 .. 23; Padding_2 at 3 * SDL.Word range 24 .. 31; end record; for Device_Events use record Event_Type at 0 * SDL.Word range 0 .. 31; Time_Stamp at 1 * SDL.Word range 0 .. 31; Which at 2 * SDL.Word range 0 .. 31; end record; end SDL.Events.Joysticks;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (PikeOS 5 AARCH64 Version) -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a Ravenscar sfp version of this package for AARCH64 PikeOS 5 pragma Restrictions (No_Exception_Propagation); -- Only local exception handling is supported in this profile pragma Restrictions (No_Exception_Registration); -- Disable exception name registration. This capability is not used because -- it is only required by exception stream attributes which are not supported -- in this run time. pragma Restrictions (No_Implicit_Dynamic_Code); -- Pointers to nested subprograms are not allowed in this run time, in order -- to prevent the compiler from building "trampolines". pragma Restrictions (No_Finalization); -- Controlled types are not supported in this run time pragma Profile (Ravenscar); -- This is a Ravenscar run time package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). pragma No_Elaboration_Code_All; -- Allow the use of that restriction in units that WITH this unit type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := Standard'Max_Integer_Size - 1; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 0.000_000_001; -- 1 ns -- Storage-related Declarations type Address is private; pragma Preelaborable_Initialization (Address); Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := Standard'Word_Size; Memory_Size : constant := 2 ** Word_Size; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := Low_Order_First; pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning -- Priority-related Declarations (RM D.1) -- For simplicity there is a 1-1 correspondence between Ada and PikeOS -- priorities. PikeOS priority 0 is reserved by the idle thread, so not -- available to Ada. -- PikeOS priorities are 0 .. 255 -- Priorities greather than 245 are reserved to the system software (PSSW) -- This implementation reserves priorities 224-239 to interrupts -- Priorities 240-245 are reserved to HM and PikeOS exception handlers Max_Priority : constant Positive := 223; Max_Interrupt_Priority : constant Positive := 239; subtype Any_Priority is Integer range 1 .. Max_Interrupt_Priority; subtype Priority is Any_Priority range Any_Priority'First .. Max_Priority; subtype Interrupt_Priority is Any_Priority range Priority'Last + 1 .. Any_Priority'Last; Default_Priority : constant Priority := (Priority'First + Priority'Last) / 2; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. Atomic_Sync_Default : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; Command_Line_Args : constant Boolean := False; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; Preallocated_Stacks : constant Boolean := True; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := True; Stack_Check_Limits : constant Boolean := False; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Always_Compatible_Rep : constant Boolean := True; Suppress_Standard_Library : constant Boolean := True; Use_Ada_Main_Program_Name : constant Boolean := False; Frontend_Exceptions : constant Boolean := False; ZCX_By_Default : constant Boolean := True; -- The linker switches ordering comes from a project -- generated with Codeo or pikeos-cloneproject. pragma Linker_Options ("-u_p4_entry" & ASCII.NUL & "-u__cxx_local_dtors" & ASCII.NUL & "-nostdlib" & ASCII.NUL & "-T../ld/arm-pikeos5.ld" & ASCII.NUL & "-T../ld/memory.ld" & ASCII.NUL & "-lp4ext" & ASCII.NUL & "-lgnat" & ASCII.NUL & "-lvm" & ASCII.NUL & "-lstand" & ASCII.NUL & "-lp4" & ASCII.NUL & "-lgcc"); end System;
package FLTK.Widgets.Inputs.Multiline is type Multiline_Input is new Input with private; type Multiline_Input_Reference (Data : not null access Multiline_Input'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Multiline_Input; end Forge; procedure Draw (This : in out Multiline_Input); function Handle (This : in out Multiline_Input; Event : in Event_Kind) return Event_Outcome; private type Multiline_Input is new Input with null record; overriding procedure Finalize (This : in out Multiline_Input); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Inputs.Multiline;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY COMPONENTS -- -- -- -- S Y S T E M . C O M P A R E _ A R R A Y _ S I G N E D _ 1 6 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains functions for runtime comparisons on arrays whose -- elements are 16-bit discrete type values to be treated as signed. package System.Compare_Array_Signed_16 is -- Note: although the functions in this package are in a sense Pure, the -- package cannot be declared as Pure, since the arguments are addresses, -- not the data, and the result is not pure wrt the address values. function Compare_Array_S16 (Left : System.Address; Right : System.Address; Left_Len : Natural; Right_Len : Natural) return Integer; -- Compare the array starting at address Left of length Left_Len -- with the array starting at address Right of length Right_Len. -- The comparison is in the normal Ada semantic sense of array -- comparison. The result is -1,0,+1 for Left<Right, Left=Right, -- Left>Right respectively. This function works with 4 byte words -- if the operands are aligned on 4-byte boundaries and long enough. end System.Compare_Array_Signed_16;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a OpenVMS/Alpha version of this package -- This package contains all the GNULL primitives that interface directly -- with the underlying OS. pragma Polling (Off); -- Turn off polling, we do not want ATC polling to take place during -- tasking operations. It causes infinite loops and other problems. with System.Tasking.Debug; -- used for Known_Tasks with System.OS_Primitives; -- used for Delay_Modes with Interfaces.C; -- used for int -- size_t with System.Soft_Links; -- used for Get_Exc_Stack_Addr -- Abort_Defer/Undefer with Unchecked_Conversion; with Unchecked_Deallocation; package body System.Task_Primitives.Operations is use System.Tasking.Debug; use System.Tasking; use Interfaces.C; use System.OS_Interface; use System.Parameters; use System.OS_Primitives; use type System.OS_Primitives.OS_Time; package SSL renames System.Soft_Links; ---------------- -- Local Data -- ---------------- -- The followings are logically constants, but need to be initialized -- at run time. Single_RTS_Lock : aliased RTS_Lock; -- This is a lock to allow only one thread of control in the RTS at -- a time; it is used to execute in mutual exclusion from all other tasks. -- Used mainly in Single_Lock mode, but also to protect All_Tasks_List ATCB_Key : aliased pthread_key_t; -- Key used to find the Ada Task_Id associated with a thread Environment_Task_Id : Task_Id; -- A variable to hold Task_Id for the environment task. Time_Slice_Val : Integer; pragma Import (C, Time_Slice_Val, "__gl_time_slice_val"); Dispatching_Policy : Character; pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy"); Foreign_Task_Elaborated : aliased Boolean := True; -- Used to identified fake tasks (i.e., non-Ada Threads). -------------------- -- Local Packages -- -------------------- package Specific is procedure Initialize (Environment_Task : Task_Id); pragma Inline (Initialize); -- Initialize various data needed by this package. function Is_Valid_Task return Boolean; pragma Inline (Is_Valid_Task); -- Does executing thread have a TCB? procedure Set (Self_Id : Task_Id); pragma Inline (Set); -- Set the self id for the current task function Self return Task_Id; pragma Inline (Self); -- Return a pointer to the Ada Task Control Block of the calling task end Specific; package body Specific is separate; -- The body of this package is target specific. --------------------------------- -- Support for foreign threads -- --------------------------------- function Register_Foreign_Thread (Thread : Thread_Id) return Task_Id; -- Allocate and Initialize a new ATCB for the current Thread function Register_Foreign_Thread (Thread : Thread_Id) return Task_Id is separate; ----------------------- -- Local Subprograms -- ----------------------- function To_Task_Id is new Unchecked_Conversion (System.Address, Task_Id); function To_Address is new Unchecked_Conversion (Task_Id, System.Address); function Get_Exc_Stack_Addr return Address; -- Replace System.Soft_Links.Get_Exc_Stack_Addr_NT procedure Timer_Sleep_AST (ID : Address); -- Signal the condition variable when AST fires. procedure Timer_Sleep_AST (ID : Address) is Result : Interfaces.C.int; Self_ID : constant Task_Id := To_Task_Id (ID); begin Self_ID.Common.LL.AST_Pending := False; Result := pthread_cond_signal_int_np (Self_ID.Common.LL.CV'Access); pragma Assert (Result = 0); end Timer_Sleep_AST; ----------------- -- Stack_Guard -- ----------------- -- The underlying thread system sets a guard page at the -- bottom of a thread stack, so nothing is needed. -- ??? Check the comment above procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is pragma Unreferenced (T); pragma Unreferenced (On); begin null; end Stack_Guard; -------------------- -- Get_Thread_Id -- -------------------- function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is begin return T.Common.LL.Thread; end Get_Thread_Id; ---------- -- Self -- ---------- function Self return Task_Id renames Specific.Self; --------------------- -- Initialize_Lock -- --------------------- -- Note: mutexes and cond_variables needed per-task basis are -- initialized in Initialize_TCB and the Storage_Error is -- handled. Other mutexes (such as RTS_Lock, Memory_Lock...) -- used in RTS is initialized before any status change of RTS. -- Therefore rasing Storage_Error in the following routines -- should be able to be handled safely. procedure Initialize_Lock (Prio : System.Any_Priority; L : access Lock) is Attributes : aliased pthread_mutexattr_t; Result : Interfaces.C.int; begin Result := pthread_mutexattr_init (Attributes'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = ENOMEM then raise Storage_Error; end if; L.Prio_Save := 0; L.Prio := Interfaces.C.int (Prio); Result := pthread_mutex_init (L.L'Access, Attributes'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = ENOMEM then raise Storage_Error; end if; Result := pthread_mutexattr_destroy (Attributes'Access); pragma Assert (Result = 0); end Initialize_Lock; procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is pragma Unreferenced (Level); Attributes : aliased pthread_mutexattr_t; Result : Interfaces.C.int; begin Result := pthread_mutexattr_init (Attributes'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = ENOMEM then raise Storage_Error; end if; -- Don't use, see comment in s-osinte.ads about ERRORCHECK mutexes??? -- Result := pthread_mutexattr_settype_np -- (Attributes'Access, PTHREAD_MUTEX_ERRORCHECK_NP); -- pragma Assert (Result = 0); -- Result := pthread_mutexattr_setprotocol -- (Attributes'Access, PTHREAD_PRIO_PROTECT); -- pragma Assert (Result = 0); -- Result := pthread_mutexattr_setprioceiling -- (Attributes'Access, Interfaces.C.int (System.Any_Priority'Last)); -- pragma Assert (Result = 0); Result := pthread_mutex_init (L, Attributes'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = ENOMEM then raise Storage_Error; end if; Result := pthread_mutexattr_destroy (Attributes'Access); pragma Assert (Result = 0); end Initialize_Lock; ------------------- -- Finalize_Lock -- ------------------- procedure Finalize_Lock (L : access Lock) is Result : Interfaces.C.int; begin Result := pthread_mutex_destroy (L.L'Access); pragma Assert (Result = 0); end Finalize_Lock; procedure Finalize_Lock (L : access RTS_Lock) is Result : Interfaces.C.int; begin Result := pthread_mutex_destroy (L); pragma Assert (Result = 0); end Finalize_Lock; ---------------- -- Write_Lock -- ---------------- procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is Self_ID : constant Task_Id := Self; All_Tasks_Link : constant Task_Id := Self.Common.All_Tasks_Link; Current_Prio : System.Any_Priority; Result : Interfaces.C.int; begin Current_Prio := Get_Priority (Self_ID); -- If there is no other tasks, no need to check priorities if All_Tasks_Link /= Null_Task and then L.Prio < Interfaces.C.int (Current_Prio) then Ceiling_Violation := True; return; end if; Result := pthread_mutex_lock (L.L'Access); pragma Assert (Result = 0); Ceiling_Violation := False; -- Why is this commented out ??? -- L.Prio_Save := Interfaces.C.int (Current_Prio); -- Set_Priority (Self_ID, System.Any_Priority (L.Prio)); end Write_Lock; procedure Write_Lock (L : access RTS_Lock; Global_Lock : Boolean := False) is Result : Interfaces.C.int; begin if not Single_Lock or else Global_Lock then Result := pthread_mutex_lock (L); pragma Assert (Result = 0); end if; end Write_Lock; procedure Write_Lock (T : Task_Id) is Result : Interfaces.C.int; begin if not Single_Lock then Result := pthread_mutex_lock (T.Common.LL.L'Access); pragma Assert (Result = 0); end if; end Write_Lock; --------------- -- Read_Lock -- --------------- procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is begin Write_Lock (L, Ceiling_Violation); end Read_Lock; ------------ -- Unlock -- ------------ procedure Unlock (L : access Lock) is Result : Interfaces.C.int; begin Result := pthread_mutex_unlock (L.L'Access); pragma Assert (Result = 0); end Unlock; procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is Result : Interfaces.C.int; begin if not Single_Lock or else Global_Lock then Result := pthread_mutex_unlock (L); pragma Assert (Result = 0); end if; end Unlock; procedure Unlock (T : Task_Id) is Result : Interfaces.C.int; begin if not Single_Lock then Result := pthread_mutex_unlock (T.Common.LL.L'Access); pragma Assert (Result = 0); end if; end Unlock; ----------- -- Sleep -- ----------- procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); Result : Interfaces.C.int; begin if Single_Lock then Result := pthread_cond_wait (Self_ID.Common.LL.CV'Access, Single_RTS_Lock'Access); else Result := pthread_cond_wait (Self_ID.Common.LL.CV'Access, Self_ID.Common.LL.L'Access); end if; -- EINTR is not considered a failure pragma Assert (Result = 0 or else Result = EINTR); if Self_ID.Deferral_Level = 0 and then Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level then Unlock (Self_ID); raise Standard'Abort_Signal; end if; end Sleep; ----------------- -- Timed_Sleep -- ----------------- procedure Timed_Sleep (Self_ID : Task_Id; Time : Duration; Mode : ST.Delay_Modes; Reason : System.Tasking.Task_States; Timedout : out Boolean; Yielded : out Boolean) is pragma Unreferenced (Reason); Sleep_Time : OS_Time; Result : Interfaces.C.int; Status : Cond_Value_Type; -- The body below requires more comments ??? begin Timedout := False; Yielded := False; Sleep_Time := To_OS_Time (Time, Mode); if Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level or else Self_ID.Pending_Priority_Change then return; end if; Self_ID.Common.LL.AST_Pending := True; Sys_Setimr (Status, 0, Sleep_Time, Timer_Sleep_AST'Access, To_Address (Self_ID), 0); if (Status and 1) /= 1 then raise Storage_Error; end if; if Single_Lock then Result := pthread_cond_wait (Self_ID.Common.LL.CV'Access, Single_RTS_Lock'Access); pragma Assert (Result = 0); else Result := pthread_cond_wait (Self_ID.Common.LL.CV'Access, Self_ID.Common.LL.L'Access); pragma Assert (Result = 0); end if; Yielded := True; if not Self_ID.Common.LL.AST_Pending then Timedout := True; else Sys_Cantim (Status, To_Address (Self_ID), 0); pragma Assert ((Status and 1) = 1); end if; end Timed_Sleep; ----------------- -- Timed_Delay -- ----------------- procedure Timed_Delay (Self_ID : Task_Id; Time : Duration; Mode : ST.Delay_Modes) is Sleep_Time : OS_Time; Result : Interfaces.C.int; Status : Cond_Value_Type; Yielded : Boolean := False; begin if Single_Lock then Lock_RTS; end if; -- More comments required in body below ??? Write_Lock (Self_ID); if Time /= 0.0 or else Mode /= Relative then Sleep_Time := To_OS_Time (Time, Mode); if Mode = Relative or else OS_Clock < Sleep_Time then Self_ID.Common.State := Delay_Sleep; Self_ID.Common.LL.AST_Pending := True; Sys_Setimr (Status, 0, Sleep_Time, Timer_Sleep_AST'Access, To_Address (Self_ID), 0); if (Status and 1) /= 1 then raise Storage_Error; end if; loop if Self_ID.Pending_Priority_Change then Self_ID.Pending_Priority_Change := False; Self_ID.Common.Base_Priority := Self_ID.New_Base_Priority; Set_Priority (Self_ID, Self_ID.Common.Base_Priority); end if; if Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level then Sys_Cantim (Status, To_Address (Self_ID), 0); pragma Assert ((Status and 1) = 1); exit; end if; if Single_Lock then Result := pthread_cond_wait (Self_ID.Common.LL.CV'Access, Single_RTS_Lock'Access); pragma Assert (Result = 0); else Result := pthread_cond_wait (Self_ID.Common.LL.CV'Access, Self_ID.Common.LL.L'Access); pragma Assert (Result = 0); end if; Yielded := True; exit when not Self_ID.Common.LL.AST_Pending; end loop; Self_ID.Common.State := Runnable; end if; end if; Unlock (Self_ID); if Single_Lock then Unlock_RTS; end if; if not Yielded then Result := sched_yield; pragma Assert (Result = 0); end if; end Timed_Delay; --------------------- -- Monotonic_Clock -- --------------------- function Monotonic_Clock return Duration renames System.OS_Primitives.Monotonic_Clock; ------------------- -- RT_Resolution -- ------------------- function RT_Resolution return Duration is begin return 10#1.0#E-3; end RT_Resolution; ------------ -- Wakeup -- ------------ procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); Result : Interfaces.C.int; begin Result := pthread_cond_signal (T.Common.LL.CV'Access); pragma Assert (Result = 0); end Wakeup; ----------- -- Yield -- ----------- procedure Yield (Do_Yield : Boolean := True) is Result : Interfaces.C.int; pragma Unreferenced (Result); begin if Do_Yield then Result := sched_yield; end if; end Yield; ------------------ -- Set_Priority -- ------------------ procedure Set_Priority (T : Task_Id; Prio : System.Any_Priority; Loss_Of_Inheritance : Boolean := False) is pragma Unreferenced (Loss_Of_Inheritance); Result : Interfaces.C.int; Param : aliased struct_sched_param; begin T.Common.Current_Priority := Prio; Param.sched_priority := Interfaces.C.int (Underlying_Priorities (Prio)); if Time_Slice_Val > 0 then Result := pthread_setschedparam (T.Common.LL.Thread, SCHED_RR, Param'Access); elsif Dispatching_Policy = 'F' or else Time_Slice_Val = 0 then Result := pthread_setschedparam (T.Common.LL.Thread, SCHED_FIFO, Param'Access); else -- SCHED_OTHER priorities are restricted to the range 8 - 15. -- Since the translation from Underlying priorities results -- in a range of 16 - 31, dividing by 2 gives the correct result. Param.sched_priority := Param.sched_priority / 2; Result := pthread_setschedparam (T.Common.LL.Thread, SCHED_OTHER, Param'Access); end if; pragma Assert (Result = 0); end Set_Priority; ------------------ -- Get_Priority -- ------------------ function Get_Priority (T : Task_Id) return System.Any_Priority is begin return T.Common.Current_Priority; end Get_Priority; ---------------- -- Enter_Task -- ---------------- procedure Enter_Task (Self_ID : Task_Id) is begin Self_ID.Common.LL.Thread := pthread_self; Specific.Set (Self_ID); Lock_RTS; for J in Known_Tasks'Range loop if Known_Tasks (J) = null then Known_Tasks (J) := Self_ID; Self_ID.Known_Tasks_Index := J; exit; end if; end loop; Unlock_RTS; end Enter_Task; -------------- -- New_ATCB -- -------------- function New_ATCB (Entry_Num : Task_Entry_Index) return Task_Id is begin return new Ada_Task_Control_Block (Entry_Num); end New_ATCB; ------------------- -- Is_Valid_Task -- ------------------- function Is_Valid_Task return Boolean renames Specific.Is_Valid_Task; ----------------------------- -- Register_Foreign_Thread -- ----------------------------- function Register_Foreign_Thread return Task_Id is begin if Is_Valid_Task then return Self; else return Register_Foreign_Thread (pthread_self); end if; end Register_Foreign_Thread; -------------------- -- Initialize_TCB -- -------------------- procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is Mutex_Attr : aliased pthread_mutexattr_t; Result : Interfaces.C.int; Cond_Attr : aliased pthread_condattr_t; begin -- More comments required in body below ??? if not Single_Lock then Result := pthread_mutexattr_init (Mutex_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = 0 then Result := pthread_mutex_init (Self_ID.Common.LL.L'Access, Mutex_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); end if; if Result /= 0 then Succeeded := False; return; end if; Result := pthread_mutexattr_destroy (Mutex_Attr'Access); pragma Assert (Result = 0); end if; Result := pthread_condattr_init (Cond_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = 0 then Result := pthread_cond_init (Self_ID.Common.LL.CV'Access, Cond_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); end if; if Result = 0 then Succeeded := True; Self_ID.Common.LL.Exc_Stack_Ptr := new Exc_Stack_T; else if not Single_Lock then Result := pthread_mutex_destroy (Self_ID.Common.LL.L'Access); pragma Assert (Result = 0); end if; Succeeded := False; end if; Result := pthread_condattr_destroy (Cond_Attr'Access); pragma Assert (Result = 0); end Initialize_TCB; ------------------------ -- Get_Exc_Stack_Addr -- ------------------------ function Get_Exc_Stack_Addr return Address is begin return Self.Common.LL.Exc_Stack_Ptr (Exc_Stack_T'Last)'Address; end Get_Exc_Stack_Addr; ----------------- -- Create_Task -- ----------------- procedure Create_Task (T : Task_Id; Wrapper : System.Address; Stack_Size : System.Parameters.Size_Type; Priority : System.Any_Priority; Succeeded : out Boolean) is Attributes : aliased pthread_attr_t; Result : Interfaces.C.int; function Thread_Body_Access is new Unchecked_Conversion (System.Address, Thread_Body); begin -- Since the initial signal mask of a thread is inherited from the -- creator, we need to set our local signal mask mask all signals -- during the creation operation, to make sure the new thread is -- not disturbed by signals before it has set its own Task_Id. Result := pthread_attr_init (Attributes'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result /= 0 then Succeeded := False; return; end if; Result := pthread_attr_setdetachstate (Attributes'Access, PTHREAD_CREATE_DETACHED); pragma Assert (Result = 0); Result := pthread_attr_setstacksize (Attributes'Access, Interfaces.C.size_t (Stack_Size)); pragma Assert (Result = 0); -- This call may be unnecessary, not sure. ??? Result := pthread_attr_setinheritsched (Attributes'Access, PTHREAD_EXPLICIT_SCHED); pragma Assert (Result = 0); Result := pthread_create (T.Common.LL.Thread'Access, Attributes'Access, Thread_Body_Access (Wrapper), To_Address (T)); -- ENOMEM is a valid run-time error. Don't shut down. pragma Assert (Result = 0 or else Result = EAGAIN or else Result = ENOMEM); Succeeded := Result = 0; Result := pthread_attr_destroy (Attributes'Access); pragma Assert (Result = 0); if Succeeded then Set_Priority (T, Priority); end if; end Create_Task; ------------------ -- Finalize_TCB -- ------------------ procedure Finalize_TCB (T : Task_Id) is Result : Interfaces.C.int; Tmp : Task_Id := T; Is_Self : constant Boolean := T = Self; procedure Free is new Unchecked_Deallocation (Ada_Task_Control_Block, Task_Id); procedure Free is new Unchecked_Deallocation (Exc_Stack_T, Exc_Stack_Ptr_T); begin if not Single_Lock then Result := pthread_mutex_destroy (T.Common.LL.L'Access); pragma Assert (Result = 0); end if; Result := pthread_cond_destroy (T.Common.LL.CV'Access); pragma Assert (Result = 0); if T.Known_Tasks_Index /= -1 then Known_Tasks (T.Known_Tasks_Index) := null; end if; Free (T.Common.LL.Exc_Stack_Ptr); Free (Tmp); if Is_Self then Specific.Set (null); end if; end Finalize_TCB; --------------- -- Exit_Task -- --------------- procedure Exit_Task is begin null; end Exit_Task; ---------------- -- Abort_Task -- ---------------- procedure Abort_Task (T : Task_Id) is begin -- Interrupt Server_Tasks may be waiting on an event flag if T.Common.State = Interrupt_Server_Blocked_On_Event_Flag then Wakeup (T, Interrupt_Server_Blocked_On_Event_Flag); end if; end Abort_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (S : in out Suspension_Object) is Mutex_Attr : aliased pthread_mutexattr_t; Cond_Attr : aliased pthread_condattr_t; Result : Interfaces.C.int; begin -- Initialize internal state. It is always initialized to False (ARM -- D.10 par. 6). S.State := False; S.Waiting := False; -- Initialize internal mutex Result := pthread_mutexattr_init (Mutex_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = ENOMEM then raise Storage_Error; end if; Result := pthread_mutex_init (S.L'Access, Mutex_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result = ENOMEM then Result := pthread_mutexattr_destroy (Mutex_Attr'Access); pragma Assert (Result = 0); raise Storage_Error; end if; Result := pthread_mutexattr_destroy (Mutex_Attr'Access); pragma Assert (Result = 0); -- Initialize internal condition variable Result := pthread_condattr_init (Cond_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result /= 0 then Result := pthread_mutex_destroy (S.L'Access); pragma Assert (Result = 0); if Result = ENOMEM then raise Storage_Error; end if; end if; Result := pthread_cond_init (S.CV'Access, Cond_Attr'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result /= 0 then Result := pthread_mutex_destroy (S.L'Access); pragma Assert (Result = 0); if Result = ENOMEM then Result := pthread_condattr_destroy (Cond_Attr'Access); pragma Assert (Result = 0); raise Storage_Error; end if; end if; Result := pthread_condattr_destroy (Cond_Attr'Access); pragma Assert (Result = 0); end Initialize; -------------- -- Finalize -- -------------- procedure Finalize (S : in out Suspension_Object) is Result : Interfaces.C.int; begin -- Destroy internal mutex Result := pthread_mutex_destroy (S.L'Access); pragma Assert (Result = 0); -- Destroy internal condition variable Result := pthread_cond_destroy (S.CV'Access); pragma Assert (Result = 0); end Finalize; ------------------- -- Current_State -- ------------------- function Current_State (S : Suspension_Object) return Boolean is begin -- We do not want to use lock on this read operation. State is marked -- as Atomic so that we ensure that the value retrieved is correct. return S.State; end Current_State; --------------- -- Set_False -- --------------- procedure Set_False (S : in out Suspension_Object) is Result : Interfaces.C.int; begin SSL.Abort_Defer.all; Result := pthread_mutex_lock (S.L'Access); pragma Assert (Result = 0); S.State := False; Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; end Set_False; -------------- -- Set_True -- -------------- procedure Set_True (S : in out Suspension_Object) is Result : Interfaces.C.int; begin SSL.Abort_Defer.all; Result := pthread_mutex_lock (S.L'Access); pragma Assert (Result = 0); -- If there is already a task waiting on this suspension object then -- we resume it, leaving the state of the suspension object to False, -- as it is specified in ARM D.10 par. 9. Otherwise, it just leaves -- the state to True. if S.Waiting then S.Waiting := False; S.State := False; Result := pthread_cond_signal (S.CV'Access); pragma Assert (Result = 0); else S.State := True; end if; Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; end Set_True; ------------------------ -- Suspend_Until_True -- ------------------------ procedure Suspend_Until_True (S : in out Suspension_Object) is Result : Interfaces.C.int; begin SSL.Abort_Defer.all; Result := pthread_mutex_lock (S.L'Access); pragma Assert (Result = 0); if S.Waiting then -- Program_Error must be raised upon calling Suspend_Until_True -- if another task is already waiting on that suspension object -- (ARM D.10 par. 10). Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; raise Program_Error; else -- Suspend the task if the state is False. Otherwise, the task -- continues its execution, and the state of the suspension object -- is set to False (ARM D.10 par. 9). if S.State then S.State := False; else S.Waiting := True; Result := pthread_cond_wait (S.CV'Access, S.L'Access); end if; Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; end if; end Suspend_Until_True; ---------------- -- Check_Exit -- ---------------- -- Dummy version function Check_Exit (Self_ID : ST.Task_Id) return Boolean is pragma Unreferenced (Self_ID); begin return True; end Check_Exit; -------------------- -- Check_No_Locks -- -------------------- function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is pragma Unreferenced (Self_ID); begin return True; end Check_No_Locks; ---------------------- -- Environment_Task -- ---------------------- function Environment_Task return Task_Id is begin return Environment_Task_Id; end Environment_Task; -------------- -- Lock_RTS -- -------------- procedure Lock_RTS is begin Write_Lock (Single_RTS_Lock'Access, Global_Lock => True); end Lock_RTS; ---------------- -- Unlock_RTS -- ---------------- procedure Unlock_RTS is begin Unlock (Single_RTS_Lock'Access, Global_Lock => True); end Unlock_RTS; ------------------ -- Suspend_Task -- ------------------ function Suspend_Task (T : ST.Task_Id; Thread_Self : Thread_Id) return Boolean is pragma Unreferenced (T); pragma Unreferenced (Thread_Self); begin return False; end Suspend_Task; ----------------- -- Resume_Task -- ----------------- function Resume_Task (T : ST.Task_Id; Thread_Self : Thread_Id) return Boolean is pragma Unreferenced (T); pragma Unreferenced (Thread_Self); begin return False; end Resume_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (Environment_Task : Task_Id) is begin Environment_Task_Id := Environment_Task; SSL.Get_Exc_Stack_Addr := Get_Exc_Stack_Addr'Access; -- Initialize the lock used to synchronize chain of all ATCBs Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level); Specific.Initialize (Environment_Task); Enter_Task (Environment_Task); end Initialize; end System.Task_Primitives.Operations;
with gel.Window.lumen; package gel.Window.setup renames gel.Window.lumen;
generic package root.child is type Base_Type is abstract new Base_Interface with null record; type Derived_Type is abstract new Base_Type and Derived_Interface with null record; end root.child;
----------------------------------------------------------------------- -- util-systems-os-tests -- Unit tests for OS specific operations -- Copyright (C) 2014, 2015, 2016, 2021 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Directories; with Util.Test_Caller; with Util.Systems.Types; with Interfaces.C.Strings; package body Util.Systems.Os.Tests is package Caller is new Util.Test_Caller (Test, "Systems.OS"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Util.Systems.Os.Sys_Stat (File)", Test_Stat'Access); Caller.Add_Test (Suite, "Test Util.Systems.Os.Sys_Stat (Directory)", Test_Stat_Directory'Access); end Add_Tests; -- ------------------------------ -- Test the Sys_Stat operation. -- ------------------------------ procedure Test_Stat (T : in out Test) is use Interfaces.C; use Util.Systems.Types; Info : array (1 .. 2) of aliased Util.Systems.Types.Stat_Type; Path : constant String := Util.Tests.Get_Path ("regtests/files/test-1.json"); Name : Util.Systems.Os.Ptr := Interfaces.C.Strings.New_String (Path); Res : Integer; begin Info (2).st_dev := 16#12345678#; Res := Sys_Stat (Name, Info (1)'Unchecked_Access); T.Assert (Res = 0, "Sys_Stat must return 0"); T.Assert (Info (1).st_size > 0, "Sys_Stat must return the correct size"); T.Assert (Info (2).st_dev = 16#12345678#, "Suspecting invalid size for Stat_Type"); T.Assert (Info (1).st_size = off_t (Ada.Directories.Size (Path)), "Invalid size returned by Sys_Stat"); T.Assert ((Info (1).st_mode and S_IFMT) = S_IFREG, "st_mode must indicate a regular file"); Interfaces.C.Strings.Free (Name); end Test_Stat; -- ------------------------------ -- Test the Sys_Stat operation. -- ------------------------------ procedure Test_Stat_Directory (T : in out Test) is use Interfaces.C; use Util.Systems.Types; Stat : aliased Util.Systems.Types.Stat_Type; Path : constant String := Util.Tests.Get_Path ("regtests/files"); Name : Util.Systems.Os.Ptr := Interfaces.C.Strings.New_String (Path); Res : Integer; begin Res := Sys_Stat (Name, Stat'Unchecked_Access); T.Assert (Res = 0, "Sys_Stat must return 0"); T.Assert ((Stat.st_mode and S_IFMT) = S_IFDIR, "st_mode must indicate a directory"); Interfaces.C.Strings.Free (Name); end Test_Stat_Directory; end Util.Systems.Os.Tests;
pragma Ada_2012; with Protypo.Code_Trees.Interpreter.Statements; with Protypo.Code_Trees.Interpreter.Expressions; pragma Warnings (Off, "no entities of ""Ada.Text_IO"" are referenced"); with Ada.Text_IO; use Ada.Text_IO; package body Protypo.Code_Trees.Interpreter.Compiled_Functions is ------------- -- Process -- ------------- overriding function Process (Fun : Compiled_Function; Parameter : Engine_Value_Vectors.Vector) return Engine_Value_Vectors.Vector is use type ada.Containers.Count_Type; begin if Parameter.Length /= Fun.Parameters.Names.Length then raise Program_Error; end if; Fun.Status.Symbol_Table.Open_External_Namespace; declare Name_To_Param : constant Integer := Parameter.First_Index - Fun.Parameters.Names.First_Index; begin for Name_Index in Fun.Parameters.Names.First_Index .. Fun.Parameters.Names.Last_Index loop Fun.Status.Symbol_Table.Create (Name => Fun.Parameters.Names (Name_Index), Initial_Value => Parameter (Name_Index + Name_To_Param)); end loop; end; Statements.Run (Fun.Status, Fun.Function_Body); Fun.Status.Symbol_Table.Close_Namespace; case Fun.Status.Break.Breaking_Reason is when Exit_Statement => raise Constraint_Error; when None => return engine_value_vectors.Empty_Vector; when Return_Statement => declare Result : constant Engine_Value_Vectors.Vector := Fun.Status.Break.Result; begin Fun.Status.Break := No_Break; return Result; end; end case; end Process; ------------------------ -- Default_Parameters -- ------------------------ function Signature (Fun : Compiled_Function) return Api.Engine_Values.Parameter_Lists.Parameter_Signature is Result : Parameter_Lists.Parameter_Signature (Fun.Parameters.Default.First_Index .. Fun.Parameters.Default.Last_Index); begin for K in Result'Range loop if Fun.Parameters.Default (K) /= null then Result (K) := Parameter_Lists.Optional (Expressions.Eval_Scalar (Fun.Status, Fun.Parameters.Default (K))); else Result (K) := Parameter_Lists.Mandatory; end if; end loop; return Result; end Signature; end Protypo.Code_Trees.Interpreter.Compiled_Functions;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K I N G . P R O T E C T E D _ O B J E C T S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1991-1994, Florida State University -- -- Copyright (C) 1995-2014, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ pragma Polling (Off); -- Turn off polling, we do not want ATC polling to take place during tasking -- operations. It causes infinite loops and other problems. with System.Task_Primitives.Operations; with System.Parameters; with System.Traces; with System.Soft_Links.Tasking; with System.Secondary_Stack; pragma Elaborate_All (System.Secondary_Stack); pragma Unreferenced (System.Secondary_Stack); -- Make sure the body of Secondary_Stack is elaborated before calling -- Init_Tasking_Soft_Links. See comments for this routine for explanation. package body System.Tasking.Protected_Objects is use System.Task_Primitives.Operations; use System.Traces; ---------------- -- Local Data -- ---------------- Locking_Policy : Character; pragma Import (C, Locking_Policy, "__gl_locking_policy"); ------------------------- -- Finalize_Protection -- ------------------------- procedure Finalize_Protection (Object : in out Protection) is begin Finalize_Lock (Object.L'Unrestricted_Access); end Finalize_Protection; --------------------------- -- Initialize_Protection -- --------------------------- procedure Initialize_Protection (Object : Protection_Access; Ceiling_Priority : Integer) is Init_Priority : Integer := Ceiling_Priority; begin if Init_Priority = Unspecified_Priority then Init_Priority := System.Priority'Last; end if; Initialize_Lock (Init_Priority, Object.L'Access); Object.Ceiling := System.Any_Priority (Init_Priority); Object.New_Ceiling := System.Any_Priority (Init_Priority); Object.Owner := Null_Task; end Initialize_Protection; ----------------- -- Get_Ceiling -- ----------------- function Get_Ceiling (Object : Protection_Access) return System.Any_Priority is begin return Object.New_Ceiling; end Get_Ceiling; ---------- -- Lock -- ---------- procedure Lock (Object : Protection_Access) is Ceiling_Violation : Boolean; begin -- The lock is made without deferring abort -- Therefore the abort has to be deferred before calling this routine. -- This means that the compiler has to generate a Defer_Abort call -- before the call to Lock. -- The caller is responsible for undeferring abort, and compiler -- generated calls must be protected with cleanup handlers to ensure -- that abort is undeferred in all cases. -- If pragma Detect_Blocking is active then, as described in the ARM -- 9.5.1, par. 15, we must check whether this is an external call on a -- protected subprogram with the same target object as that of the -- protected action that is currently in progress (i.e., if the caller -- is already the protected object's owner). If this is the case hence -- Program_Error must be raised. if Detect_Blocking and then Object.Owner = Self then raise Program_Error; end if; Write_Lock (Object.L'Access, Ceiling_Violation); if Parameters.Runtime_Traces then Send_Trace_Info (PO_Lock); end if; if Ceiling_Violation then raise Program_Error; end if; -- We are entering in a protected action, so that we increase the -- protected object nesting level (if pragma Detect_Blocking is -- active), and update the protected object's owner. if Detect_Blocking then declare Self_Id : constant Task_Id := Self; begin -- Update the protected object's owner Object.Owner := Self_Id; -- Increase protected object nesting level Self_Id.Common.Protected_Action_Nesting := Self_Id.Common.Protected_Action_Nesting + 1; end; end if; end Lock; -------------------- -- Lock_Read_Only -- -------------------- procedure Lock_Read_Only (Object : Protection_Access) is Ceiling_Violation : Boolean; begin -- If pragma Detect_Blocking is active then, as described in the ARM -- 9.5.1, par. 15, we must check whether this is an external call on -- protected subprogram with the same target object as that of the -- protected action that is currently in progress (i.e., if the caller -- is already the protected object's owner). If this is the case hence -- Program_Error must be raised. -- -- Note that in this case (getting read access), several tasks may have -- read ownership of the protected object, so that this method of -- storing the (single) protected object's owner does not work reliably -- for read locks. However, this is the approach taken for two major -- reasons: first, this function is not currently being used (it is -- provided for possible future use), and second, it largely simplifies -- the implementation. if Detect_Blocking and then Object.Owner = Self then raise Program_Error; end if; Read_Lock (Object.L'Access, Ceiling_Violation); if Parameters.Runtime_Traces then Send_Trace_Info (PO_Lock); end if; if Ceiling_Violation then raise Program_Error; end if; -- We are entering in a protected action, so we increase the protected -- object nesting level (if pragma Detect_Blocking is active). if Detect_Blocking then declare Self_Id : constant Task_Id := Self; begin -- Update the protected object's owner Object.Owner := Self_Id; -- Increase protected object nesting level Self_Id.Common.Protected_Action_Nesting := Self_Id.Common.Protected_Action_Nesting + 1; end; end if; end Lock_Read_Only; ----------------- -- Set_Ceiling -- ----------------- procedure Set_Ceiling (Object : Protection_Access; Prio : System.Any_Priority) is begin Object.New_Ceiling := Prio; end Set_Ceiling; ------------ -- Unlock -- ------------ procedure Unlock (Object : Protection_Access) is begin -- We are exiting from a protected action, so that we decrease the -- protected object nesting level (if pragma Detect_Blocking is -- active), and remove ownership of the protected object. if Detect_Blocking then declare Self_Id : constant Task_Id := Self; begin -- Calls to this procedure can only take place when being within -- a protected action and when the caller is the protected -- object's owner. pragma Assert (Self_Id.Common.Protected_Action_Nesting > 0 and then Object.Owner = Self_Id); -- Remove ownership of the protected object Object.Owner := Null_Task; -- We are exiting from a protected action, so we decrease the -- protected object nesting level. Self_Id.Common.Protected_Action_Nesting := Self_Id.Common.Protected_Action_Nesting - 1; end; end if; -- Before releasing the mutex we must actually update its ceiling -- priority if it has been changed. if Object.New_Ceiling /= Object.Ceiling then if Locking_Policy = 'C' then System.Task_Primitives.Operations.Set_Ceiling (Object.L'Access, Object.New_Ceiling); end if; Object.Ceiling := Object.New_Ceiling; end if; Unlock (Object.L'Access); if Parameters.Runtime_Traces then Send_Trace_Info (PO_Unlock); end if; end Unlock; begin -- Ensure that tasking is initialized, as well as tasking soft links -- when using protected objects. Tasking.Initialize; System.Soft_Links.Tasking.Init_Tasking_Soft_Links; end System.Tasking.Protected_Objects;
-- CE3202A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT CURRENT_INPUT AND CURRENT_OUTPUT INITIALLY -- CORRESPOND TO STANDARD FILES. -- ABW 8/25/82 -- SPS 11/9/82 -- JBG 3/17/83 -- JBG 5/8/84 WITH REPORT; USE REPORT; WITH TEXT_IO; USE TEXT_IO; PROCEDURE CE3202A IS BEGIN TEST ("CE3202A", "CHECK THAT CURRENT_INPUT AND " & "CURRENT_OUTPUT INITIALLY " & "CORRESPOND TO STANDARD FILES"); IF NAME (CURRENT_INPUT) /= NAME (STANDARD_INPUT) THEN FAILED ("CURRENT_INPUT INCORRECT - NAME"); END IF; IF NAME (CURRENT_OUTPUT) /= NAME (STANDARD_OUTPUT) THEN FAILED ("CURRENT_OUTPUT INCORRECT - NAME"); END IF; RESULT; END CE3202A;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- M D L L -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides the core high level routines used by GNATDLL -- to build Windows DLL with GNAT.OS_Lib; -- Should have USE here ??? package MDLL is subtype Argument_List is GNAT.OS_Lib.Argument_List; subtype Argument_List_Access is GNAT.OS_Lib.Argument_List_Access; Null_Argument_List : constant Argument_List := (1 .. 0 => new String'("")); Null_Argument_List_Access : Argument_List_Access := new Argument_List (1 .. 0); Tools_Error : exception; -- Comment required Verbose : Boolean := False; Quiet : Boolean := False; -- Comment required ??? Kill_Suffix : Boolean := False; -- Kill_Suffix is used by dlltool to know whether or not the @nn suffix -- should be removed from the exported names. When Kill_Suffix is set to -- True then dlltool -k option is used. procedure Build_Dynamic_Library (Ofiles : Argument_List; Afiles : Argument_List; Options : Argument_List; Bargs_Options : Argument_List; Largs_Options : Argument_List; Lib_Filename : String; Def_Filename : String; Lib_Address : String := ""; Build_Import : Boolean := False; Relocatable : Boolean := False; Map_File : Boolean := False); -- Build a DLL and the import library to link against the DLL. -- this function handles relocatable and non relocatable DLL. -- If the Afiles argument list contains some Ada units then it will -- generate the right adainit and adafinal and integrate it in the DLL. -- If the Afiles argument list is empty (there is only some object files -- provided) then it will not try to build a binder file. This is ok to -- build DLL containing no Ada code. If Map_File is set to True, a map -- file named Lib_Filename & ".map" will be created. procedure Build_Import_Library (Lib_Filename : String; Def_Filename : String); -- Build an import library (.a) from a definition files. An import library -- is needed to link against a DLL. end MDLL;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (x86-64 Version) -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Restrictions (No_Exception_Propagation); -- Only local exception handling is supported in this profile pragma Restrictions (No_Exception_Registration); -- Disable exception name registration. This capability is not used because -- it is only required by exception stream attributes which are not supported -- in this run time. pragma Restrictions (No_Implicit_Dynamic_Code); -- Pointers to nested subprograms are not allowed in this run time, in order -- to prevent the compiler from building "trampolines". pragma Restrictions (No_Finalization); -- Controlled types are not supported in this run time pragma Restrictions (No_Tasking); -- Tasking is not supported in this run time pragma Discard_Names; -- Disable explicitly the generation of names associated with entities in -- order to reduce the amount of storage used. These names are not used anyway -- (attributes such as 'Image and 'Value are not supported in this run time). package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). pragma No_Elaboration_Code_All; -- Allow the use of that restriction in units that WITH this unit type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := Standard'Max_Integer_Size - 1; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 0.0; -- Storage-related Declarations type Address is private; pragma Preelaborable_Initialization (Address); Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 64; Memory_Size : constant := 2 ** 64; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := Low_Order_First; pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning -- Priority-related Declarations (RM D.1) Max_Priority : constant Positive := 30; Max_Interrupt_Priority : constant Positive := 31; subtype Any_Priority is Integer range 0 .. 31; subtype Priority is Any_Priority range 0 .. 30; subtype Interrupt_Priority is Any_Priority range 31 .. 31; Default_Priority : constant Priority := 15; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. Atomic_Sync_Default : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; Command_Line_Args : constant Boolean := False; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := False; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := False; Stack_Check_Limits : constant Boolean := False; Support_Aggregates : constant Boolean := True; Support_Atomic_Primitives : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Always_Compatible_Rep : constant Boolean := True; Suppress_Standard_Library : constant Boolean := True; Use_Ada_Main_Program_Name : constant Boolean := False; Frontend_Exceptions : constant Boolean := False; ZCX_By_Default : constant Boolean := True; end System;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- Simulate a disk by readind into a file with HAL.Block_Drivers; use HAL.Block_Drivers; with HAL.Filesystem; use HAL.Filesystem; with HAL; use HAL; package File_Block_Drivers is type File_Block_Driver (File : not null Any_File_Handle) is new Block_Driver with private; overriding function Read (This : in out File_Block_Driver; Block_Number : UInt64; Data : out Block) return Boolean; overriding function Write (This : in out File_Block_Driver; Block_Number : UInt64; Data : Block) return Boolean; private type File_Block_Driver (File : not null Any_File_Handle) is new Block_Driver with null record; end File_Block_Drivers;
pragma License (Unrestricted); -- Ada 2012 private with Ada.Containers.Copy_On_Write; private with Ada.Finalization; private with Ada.Streams; generic type Element_Type (<>) is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Indefinite_Holders is pragma Preelaborate; pragma Remote_Types; type Holder is tagged private; pragma Preelaborable_Initialization (Holder); -- modified -- Empty_Holder : constant Holder; function Empty_Holder return Holder; overriding function "=" (Left, Right : Holder) return Boolean; function To_Holder (New_Item : Element_Type) return Holder; function Is_Empty (Container : Holder) return Boolean; procedure Clear (Container : in out Holder); -- modified function Element (Container : Holder'Class) -- not primitive return Element_Type; procedure Replace_Element ( Container : in out Holder; New_Item : Element_Type); -- modified procedure Query_Element ( Container : Holder'Class; -- not primitive Process : not null access procedure (Element : Element_Type)); -- modified procedure Update_Element ( Container : in out Holder'Class; -- not primitive Process : not null access procedure (Element : in out Element_Type)); type Constant_Reference_Type ( Element : not null access constant Element_Type) is private with Implicit_Dereference => Element; type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; function Constant_Reference (Container : aliased Holder) return Constant_Reference_Type; function Reference (Container : aliased in out Holder) return Reference_Type; procedure Assign (Target : in out Holder; Source : Holder); function Copy (Source : Holder) return Holder; procedure Move (Target : in out Holder; Source : in out Holder); private type Element_Access is access Element_Type; type Data is limited record Super : aliased Copy_On_Write.Data; Element : Element_Access; end record; pragma Suppress_Initialization (Data); type Data_Access is access all Data; type Holder is new Finalization.Controlled with record Super : aliased Copy_On_Write.Container; end record; overriding procedure Adjust (Object : in out Holder); overriding procedure Finalize (Object : in out Holder) renames Clear; type Constant_Reference_Type ( Element : not null access constant Element_Type) is null record; type Reference_Type (Element : not null access Element_Type) is null record; package Streaming is procedure Read ( Stream : not null access Streams.Root_Stream_Type'Class; Item : out Holder); procedure Write ( Stream : not null access Streams.Root_Stream_Type'Class; Item : Holder); procedure Missing_Read ( Stream : access Streams.Root_Stream_Type'Class; Item : out Constant_Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Write ( Stream : access Streams.Root_Stream_Type'Class; Item : Constant_Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Read ( Stream : access Streams.Root_Stream_Type'Class; Item : out Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Missing_Write ( Stream : access Streams.Root_Stream_Type'Class; Item : Reference_Type) with Import, Convention => Ada, External_Name => "__drake_program_error"; end Streaming; for Holder'Read use Streaming.Read; for Holder'Write use Streaming.Write; for Constant_Reference_Type'Read use Streaming.Missing_Read; for Constant_Reference_Type'Write use Streaming.Missing_Write; for Reference_Type'Read use Streaming.Missing_Read; for Reference_Type'Write use Streaming.Missing_Write; end Ada.Containers.Indefinite_Holders;
package body AdaM.Assist.Query.find_Entities.Metrics is procedure dummy is begin null; end dummy; end AdaM.Assist.Query.find_Entities.Metrics;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2018 - 2019 Joakim Strandberg <joakim@mequinox.se> -- -- 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.Containers.Vectors; with Aida.Deepend; package Wayland_XML is subtype String_Ptr is Aida.Deepend.String_Ptr; Empty_String : aliased String := Aida.Deepend.Empty_String; type Version_Number is new Positive; type Arg_Type_Attribute is (Type_Integer, Type_Unsigned_Integer, Type_String, Type_FD, Type_New_Id, Type_Object, Type_Fixed, Type_Array); TYPE_ATTRIBUTE_EXCEPTION : exception; type Arg_Tag is limited private; procedure Set_Name (This : in out Arg_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Arg_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Arg_Tag) return Boolean with Global => null; procedure Set_Type_Attribute (This : in out Arg_Tag; Value : String) with Global => null, Pre => not Exists_Type_Attribute (This), Post => Exists_Type_Attribute (This); -- Raises TYPE_ATTRIBUTE_EXCEPTION if Value cannot be interpreted function Type_Attribute (This : Arg_Tag) return Arg_Type_Attribute with Global => null, Pre => Exists_Type_Attribute (This); function Exists_Type_Attribute (This : Arg_Tag) return Boolean with Global => null; procedure Set_Interface_Attribute (This : in out Arg_Tag; Value : String) with Global => null, Pre => not Exists_Interface_Attribute (This), Post => Exists_Interface_Attribute (This) and Interface_Attribute (This) = Value; function Interface_Attribute (This : Arg_Tag) return String with Global => null, Pre => Exists_Interface_Attribute (This); function Exists_Interface_Attribute (This : Arg_Tag) return Boolean with Global => null; procedure Set_Summary (This : in out Arg_Tag; Value : String) with Global => null, Pre => not Exists_Summary (This), Post => Exists_Summary (This) and Summary (This) = Value; function Summary (This : Arg_Tag) return String with Global => null, Pre => Exists_Summary (This); function Exists_Summary (This : Arg_Tag) return Boolean with Global => null; procedure Set_Allow_Null (This : in out Arg_Tag; Value : Boolean) with Global => null, Pre => not Exists_Allow_Null (This), Post => Exists_Allow_Null (This) and (Allow_Null (This) = Value); function Allow_Null (This : Arg_Tag) return Boolean with Global => null, Pre => Exists_Allow_Null (This); function Exists_Allow_Null (This : Arg_Tag) return Boolean with Global => null; procedure Set_Enum (This : in out Arg_Tag; Value : String) with Global => null, Pre => not Exists_Enum (This), Post => Exists_Enum (This) and Enum (This) = Value; function Enum (This : Arg_Tag) return String with Global => null, Pre => Exists_Enum (This); function Exists_Enum (This : Arg_Tag) return Boolean with Global => null; type Arg_Tag_Ptr is access all Arg_Tag; type Copyright_Tag is limited private; procedure Set_Text (This : in out Copyright_Tag; Value : String) with Global => null, Pre => not Exists_Text (This), Post => Exists_Text (This) and Text (This) = Value; function Text (This : Copyright_Tag) return String with Global => null, Pre => Exists_Text (This); function Exists_Text (This : Copyright_Tag) return Boolean with Global => null; type Copyright_Ptr is access all Copyright_Tag; type Description_Tag is limited private; procedure Set_Text (This : in out Description_Tag; Value : String) with Global => null, Pre => not Exists_Text (This), Post => Exists_Text (This) and Text (This) = Value; function Text (This : Description_Tag) return String with Global => null, Pre => Exists_Text (This); function Exists_Text (This : Description_Tag) return Boolean with Global => null; procedure Set_Summary (This : in out Description_Tag; Value : String) with Global => null, Pre => not Exists_Summary (This), Post => Exists_Summary (This) and Summary (This) = Value; function Summary (This : Description_Tag) return String with Global => null, Pre => Exists_Summary (This); function Exists_Summary (This : Description_Tag) return Boolean with Global => null; type Description_Tag_Ptr is access all Description_Tag; type Entry_Value is new Natural; type Entry_Tag is limited private; procedure Set_Name (This : in out Entry_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Entry_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Entry_Tag) return Boolean with Global => null; procedure Set_Summary (This : in out Entry_Tag; Value : String) with Global => null, -- Pre => not Exists_Summary (This), Post => Exists_Summary (This) and Summary (This) = Value; function Summary (This : Entry_Tag) return String with Global => null, Pre => Exists_Summary (This); function Exists_Summary (This : Entry_Tag) return Boolean with Global => null; procedure Set_Value (This : in out Entry_Tag; V : Entry_Value) with Global => null, Pre => not Exists_Value (This), Post => Exists_Value (This) and Value (This) = V; function Value (This : Entry_Tag) return Entry_Value with Global => null, Pre => Exists_Value (This); function Value_As_String (This : Entry_Tag) return String with Global => null, Pre => Exists_Value (This); function Exists_Value (This : Entry_Tag) return Boolean with Global => null; procedure Set_Since (This : in out Entry_Tag; Value : Version_Number) with Global => null, Pre => not Exists_Since (This), Post => Exists_Since (This) and Since (This) = Value; function Since (This : Entry_Tag) return Version_Number with Global => null, Pre => Exists_Since (This); function Exists_Since (This : Entry_Tag) return Boolean with Global => null; type Entry_Tag_Ptr is access all Entry_Tag; type Enum_Child_Kind_Id is (Child_Dummy, Child_Description, Child_Entry); type Enum_Child (Kind_Id : Enum_Child_Kind_Id := Child_Dummy) is record case Kind_Id is when Child_Dummy => Dummy : not null String_Ptr := Empty_String'Access; when Child_Description => Description_Tag : not null Description_Tag_Ptr; when Child_Entry => Entry_Tag : not null Entry_Tag_Ptr; end case; end record; package Enum_Child_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Enum_Child, "=" => "="); function Is_Smaller_Enum_Value (Left, Right : Enum_Child) return Boolean is (Value (Left.Entry_Tag.all) < Value (Right.Entry_Tag.all)); package Enum_Child_Sorting is new Enum_Child_Vectors.Generic_Sorting (Is_Smaller_Enum_Value); type Enum_Children_Ref (E : not null access constant Enum_Child_Vectors.Vector) is limited null record with Implicit_Dereference => E; type Enum_Tag is limited private; function Children (This : aliased Enum_Tag) return Enum_Children_Ref; function Entries (This : aliased Enum_Tag) return Enum_Children_Ref; procedure Sort_Entries (This : in out Enum_Tag); procedure Append_Child (This : in out Enum_Tag; Item : not null Wayland_XML.Description_Tag_Ptr); procedure Append_Child (This : in out Enum_Tag; Item : not null Entry_Tag_Ptr); procedure Set_Name (This : in out Enum_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Enum_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Enum_Tag) return Boolean with Global => null; procedure Set_Bitfield (This : in out Enum_Tag; Value : Boolean) with Global => null, Pre => not Exists_Bitfield (This), Post => Exists_Bitfield (This) and (Bitfield (This) = Value); function Bitfield (This : Enum_Tag) return Boolean with Global => null, Pre => Exists_Bitfield (This); function Exists_Bitfield (This : Enum_Tag) return Boolean with Global => null; procedure Set_Since (This : in out Enum_Tag; Value : Version_Number) with Global => null, Pre => not Exists_Since (This), Post => Exists_Since (This) and Since (This) = Value; function Since (This : Enum_Tag) return Version_Number with Global => null, Pre => Exists_Since (This); function Exists_Since (This : Enum_Tag) return Boolean with Global => null; type Enum_Tag_Ptr is access all Enum_Tag; type Event_Child_Kind_Id is (Child_Dummy, Child_Description, Child_Arg); type Event_Child (Kind_Id : Event_Child_Kind_Id := Child_Dummy) is record case Kind_Id is when Child_Dummy => Dummy : not null String_Ptr := Empty_String'Access; when Child_Description => Description_Tag : not null Description_Tag_Ptr; when Child_Arg => Arg_Tag : not null Arg_Tag_Ptr; end case; end record; package Event_Child_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Event_Child, "=" => "="); type Event_Children_Ref (E : not null access constant Event_Child_Vectors.Vector) is limited null record with Implicit_Dereference => E; type Event_Tag is limited private; function Children (This : aliased Event_Tag) return Event_Children_Ref; procedure Append_Child (This : in out Event_Tag; Item : not null Description_Tag_Ptr); procedure Append_Child (This : in out Event_Tag; Item : not null Wayland_XML.Arg_Tag_Ptr); procedure Set_Name (This : in out Event_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Event_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Event_Tag) return Boolean with Global => null; procedure Set_Since (This : in out Event_Tag; Value : Version_Number) with Global => null, Pre => not Exists_Since (This), Post => Exists_Since (This) and Since (This) = Value; function Since (This : Event_Tag) return Version_Number with Global => null, Pre => Exists_Since (This); function Since_As_Pos32 (This : Event_Tag) return Positive with Global => null, Pre => Exists_Since (This); function Exists_Since (This : Event_Tag) return Boolean with Global => null; type Event_Tag_Ptr is access all Event_Tag; type Request_Child_Kind_Id is (Child_Dummy, Child_Description, Child_Arg); type Request_Child (Kind_Id : Request_Child_Kind_Id := Child_Dummy) is record case Kind_Id is when Child_Dummy => Dummy : not null String_Ptr := Empty_String'Access; when Child_Description => Description_Tag : not null Description_Tag_Ptr; when Child_Arg => Arg_Tag : not null Arg_Tag_Ptr; end case; end record; package Request_Child_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Request_Child, "=" => "="); type Request_Children_Ref (E : not null access constant Request_Child_Vectors.Vector) is limited null record with Implicit_Dereference => E; type Request_Tag is limited private; function Children (This : aliased Request_Tag) return Request_Children_Ref; procedure Append_Child (This : in out Request_Tag; Item : not null Description_Tag_Ptr); procedure Append_Child (This : in out Request_Tag; Item : not null Arg_Tag_Ptr); procedure Set_Name (This : in out Request_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Request_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Request_Tag) return Boolean with Global => null; procedure Set_Type_Attribute (This : in out Request_Tag; Value : String) with Global => null, Pre => not Exists_Type_Attribute (This), Post => Exists_Type_Attribute (This) and Type_Attribute (This) = Value; function Type_Attribute (This : Request_Tag) return String with Global => null, Pre => Exists_Type_Attribute (This); function Exists_Type_Attribute (This : Request_Tag) return Boolean with Global => null; procedure Set_Since (This : in out Request_Tag; Value : Version_Number) with Global => null, Pre => not Exists_Since (This), Post => Exists_Since (This) and Since (This) = Value; function Since (This : Request_Tag) return Version_Number with Global => null, Pre => Exists_Since (This); function Since_As_Pos32 (This : Request_Tag) return Positive with Global => null, Pre => Exists_Since (This); function Exists_Since (This : Request_Tag) return Boolean with Global => null; function Description (This : aliased Request_Tag) return String with Global => null, Pre => Exists_Description (This); function Exists_Description (This : aliased Request_Tag) return Boolean with Global => null; -- Returns true if there is one unique description type Request_Tag_Ptr is access all Request_Tag; type Interface_Child_Kind_Id is (Child_Dummy, Child_Description, Child_Request, Child_Event, Child_Enum); type Interface_Child (Kind_Id : Interface_Child_Kind_Id := Child_Dummy) is record case Kind_Id is when Child_Dummy => Dummy : not null String_Ptr := Empty_String'Access; when Child_Description => Description_Tag : not null Description_Tag_Ptr; when Child_Request => Request_Tag : not null Request_Tag_Ptr; when Child_Event => Event_Tag : not null Event_Tag_Ptr; when Child_Enum => Enum_Tag : not null Enum_Tag_Ptr; end case; end record; package Interface_Child_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Interface_Child, "=" => "="); type Interface_Children_Ref (E : not null access constant Interface_Child_Vectors.Vector) is limited null record with Implicit_Dereference => E; type Interface_Tag is limited private; function Exists_Events (This : aliased Interface_Tag) return Boolean; procedure Set_Name (This : in out Interface_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Interface_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Interface_Tag) return Boolean with Global => null; procedure Set_Version (This : in out Interface_Tag; Value : Version_Number) with Global => null, Pre => not Exists_Version (This), Post => Exists_Version (This) and Version (This) = Value; function Version (This : Interface_Tag) return Version_Number with Global => null, Pre => Exists_Version (This); function Exists_Version (This : Interface_Tag) return Boolean with Global => null; function Children (This : aliased Interface_Tag) return Interface_Children_Ref; procedure Append_Child (This : in out Interface_Tag; Item : not null Description_Tag_Ptr); procedure Append_Child (This : in out Interface_Tag; Item : not null Request_Tag_Ptr); procedure Append_Child (This : in out Interface_Tag; Item : not null Event_Tag_Ptr); procedure Append_Child (This : in out Interface_Tag; Item : not null Enum_Tag_Ptr); type Interface_Tag_Ptr is access all Interface_Tag; type Protocol_Child_Kind_Id is (Child_Dummy, Child_Copyright, Child_Interface, Child_Description); type Protocol_Child (Kind_Id : Protocol_Child_Kind_Id := Child_Dummy) is record case Kind_Id is when Child_Dummy => Dummy : not null String_Ptr := Empty_String'Access; when Child_Copyright => Copyright_Tag : not null Copyright_Ptr; when Child_Interface => Interface_Tag : not null Interface_Tag_Ptr; when Child_Description => Description_Tag : not null Description_Tag_Ptr; end case; end record; package Protocol_Child_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Protocol_Child, "=" => "="); type Protocol_Children_Ref (E : not null access constant Protocol_Child_Vectors.Vector) is limited null record with Implicit_Dereference => E; type Protocol_Tag is limited private; procedure Set_Name (This : in out Protocol_Tag; Value : String) with Global => null, Pre => not Exists_Name (This), Post => Exists_Name (This) and Name (This) = Value; function Name (This : Protocol_Tag) return String with Global => null, Pre => Exists_Name (This); function Exists_Name (This : Protocol_Tag) return Boolean with Global => null; function Children (This : aliased Protocol_Tag) return Protocol_Children_Ref; procedure Append_Child (This : in out Protocol_Tag; Item : not null Copyright_Ptr); procedure Append_Child (This : in out Protocol_Tag; Item : not null Interface_Tag_Ptr); procedure Append_Child (This : in out Protocol_Tag; Item : not null Description_Tag_Ptr); type Protocol_Tag_Ptr is access all Protocol_Tag; private type Nullable_String_Ptr (Exists : Boolean := False) is record case Exists is when True => Value : not null String_Ptr := Empty_String'Access; when False => null; end case; end record; type Nullable_Boolean (Exists : Boolean := False) is record case Exists is when True => Value : Boolean; when False => null; end case; end record; type Nullable_Version (Exists : Boolean := False) is record case Exists is when True => Value : Version_Number; when False => null; end case; end record; type Nullable_Allow_Null (Exists : Boolean := False) is record case Exists is when True => Value : Boolean; when False => null; end case; end record; type Nullable_Type_Attribute (Exists : Boolean := False) is record case Exists is when True => Value : Arg_Type_Attribute; when False => null; end case; end record; type Arg_Tag is limited record My_Name : Nullable_String_Ptr; My_Type_Attribute : Nullable_Type_Attribute; My_Interface_Attribute : Nullable_String_Ptr; My_Summary : Nullable_String_Ptr; My_Allow_Null : Nullable_Allow_Null; My_Enum : Nullable_String_Ptr; end record; function Name (This : Arg_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Arg_Tag) return Boolean is (This.My_Name.Exists); function Type_Attribute (This : Arg_Tag) return Arg_Type_Attribute is (This.My_Type_Attribute.Value); function Exists_Type_Attribute (This : Arg_Tag) return Boolean is (This.My_Type_Attribute.Exists); function Interface_Attribute (This : Arg_Tag) return String is (This.My_Interface_Attribute.Value.all); function Exists_Interface_Attribute (This : Arg_Tag) return Boolean is (This.My_Interface_Attribute.Exists); function Summary (This : Arg_Tag) return String is (This.My_Summary.Value.all); function Exists_Summary (This : Arg_Tag) return Boolean is (This.My_Summary.Exists); function Allow_Null (This : Arg_Tag) return Boolean is (This.My_Allow_Null.Value); function Exists_Allow_Null (This : Arg_Tag) return Boolean is (This.My_Allow_Null.Exists); function Enum (This : Arg_Tag) return String is (This.My_Enum.Value.all); function Exists_Enum (This : Arg_Tag) return Boolean is (This.My_Enum.Exists); type Copyright_Tag is limited record My_Text : Nullable_String_Ptr; end record; function Text (This : Copyright_Tag) return String is (This.My_Text.Value.all); function Exists_Text (This : Copyright_Tag) return Boolean is (This.My_Text.Exists); type Description_Tag is limited record My_Text : Nullable_String_Ptr; My_Summary : Nullable_String_Ptr; end record; function Text (This : Description_Tag) return String is (This.My_Text.Value.all); function Exists_Text (This : Description_Tag) return Boolean is (This.My_Text.Exists); function Summary (This : Description_Tag) return String is (This.My_Summary.Value.all); function Exists_Summary (This : Description_Tag) return Boolean is (This.My_Summary.Exists); type Nullable_Entry_Value (Exists : Boolean := False) is record case Exists is when True => Value : Entry_Value; when False => null; end case; end record; type Entry_Tag is limited record My_Name : Nullable_String_Ptr; My_Value : Nullable_Entry_Value; My_Summary : Nullable_String_Ptr; My_Since : Nullable_Version; end record; function Name (This : Entry_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Entry_Tag) return Boolean is (This.My_Name.Exists); function Value (This : Entry_Tag) return Entry_Value is (This.My_Value.Value); function Value_As_String (This : Entry_Tag) return String is (Aida.To_String (Natural (This.My_Value.Value))); function Exists_Value (This : Entry_Tag) return Boolean is (This.My_Value.Exists); function Summary (This : Entry_Tag) return String is (This.My_Summary.Value.all); function Exists_Summary (This : Entry_Tag) return Boolean is (This.My_Summary.Exists); function Since (This : Entry_Tag) return Version_Number is (This.My_Since.Value); function Exists_Since (This : Entry_Tag) return Boolean is (This.My_Since.Exists); type Enum_Tag is limited record My_Name : Nullable_String_Ptr; My_Bitfield : Nullable_Boolean; My_Since : Nullable_Version; My_Children : aliased Enum_Child_Vectors.Vector; My_Entries : aliased Enum_Child_Vectors.Vector; end record; function Name (This : Enum_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Enum_Tag) return Boolean is (This.My_Name.Exists); function Bitfield (This : Enum_Tag) return Boolean is (This.My_Bitfield.Value); function Exists_Bitfield (This : Enum_Tag) return Boolean is (This.My_Bitfield.Exists); function Since (This : Enum_Tag) return Version_Number is (This.My_Since.Value); function Exists_Since (This : Enum_Tag) return Boolean is (This.My_Since.Exists); function Children (This : aliased Enum_Tag) return Enum_Children_Ref is ((E => This.My_Children'Access)); function Entries (This : aliased Enum_Tag) return Enum_Children_Ref is ((E => This.My_Entries'Access)); type Nullable_Since_Attribute (Exists : Boolean := False) is record case Exists is when True => Value : Version_Number; when False => null; end case; end record; type Event_Tag is limited record My_Name : Nullable_String_Ptr; My_Since_Attribute : Nullable_Since_Attribute; My_Children : aliased Event_Child_Vectors.Vector; end record; function Name (This : Event_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Event_Tag) return Boolean is (This.My_Name.Exists); function Since (This : Event_Tag) return Version_Number is (This.My_Since_Attribute.Value); function Since_As_Pos32 (This : Event_Tag) return Positive is (Positive (This.My_Since_Attribute.Value)); function Exists_Since (This : Event_Tag) return Boolean is (This.My_Since_Attribute.Exists); function Children (This : aliased Event_Tag) return Event_Children_Ref is ((E => This.My_Children'Access)); type Nullable_Since_T (Exists : Boolean := False) is record case Exists is when True => Value : Version_Number; when False => null; end case; end record; type Request_Tag is limited record My_Name : Nullable_String_Ptr; My_Children : aliased Request_Child_Vectors.Vector; My_Type_Attribute : Nullable_String_Ptr; My_Since : Nullable_Since_T; end record; function Name (This : Request_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Request_Tag) return Boolean is (This.My_Name.Exists); function Children (This : aliased Request_Tag) return Request_Children_Ref is ((E => This.My_Children'Access)); function Type_Attribute (This : Request_Tag) return String is (This.My_Type_Attribute.Value.all); function Exists_Type_Attribute (This : Request_Tag) return Boolean is (This.My_Type_Attribute.Exists); function Since (This : Request_Tag) return Version_Number is (This.My_Since.Value); function Since_As_Pos32 (This : Request_Tag) return Positive is (Positive (This.My_Since.Value)); function Exists_Since (This : Request_Tag) return Boolean is (This.My_Since.Exists); type Interface_Tag is limited record My_Name : Nullable_String_Ptr; My_Version : Nullable_Version; My_Children : aliased Interface_Child_Vectors.Vector; end record; function Name (This : Interface_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Interface_Tag) return Boolean is (This.My_Name.Exists); function Version (This : Interface_Tag) return Version_Number is (This.My_Version.Value); function Exists_Version (This : Interface_Tag) return Boolean is (This.My_Version.Exists); function Children (This : aliased Interface_Tag) return Interface_Children_Ref is ((E => This.My_Children'Access)); type Protocol_Tag is limited record My_Name : Nullable_String_Ptr; My_Children : aliased Protocol_Child_Vectors.Vector; end record; function Name (This : Protocol_Tag) return String is (This.My_Name.Value.all); function Exists_Name (This : Protocol_Tag) return Boolean is (This.My_Name.Exists); function Children (This : aliased Protocol_Tag) return Protocol_Children_Ref is ((E => This.My_Children'Access)); end Wayland_XML;
with Resources1; with Ada.Command_Line; with Ada.Text_IO; procedure Test2 is use Resources1; C : Content_Access := Get_Content ("main.html"); begin if C = null then Ada.Text_IO.Put_Line ("FAIL: No content 'main.html'"); Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); return; end if; C := Get_Content ("js/main.js"); if C = null then Ada.Text_IO.Put_Line ("FAIL: No content 'js/main.js'"); Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); return; end if; C := Get_Content ("css/main.css"); if C = null then Ada.Text_IO.Put_Line ("FAIL: No content 'css/main.css'"); Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); return; end if; Ada.Text_IO.Put_Line ("PASS"); end Test2;
------------------------------------------------------------------------------- -- LSE -- L-System Editor -- Author: Heziode -- -- License: -- MIT License -- -- Copyright (c) 2018 Quentin Dauprat (Heziode) <Heziode@protonmail.com> -- -- Permission is hereby granted, free of charge, to any person obtaining a -- copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction, including without limitation -- the rights to use, copy, modify, merge, publish, distribute, sublicense, -- and/or sell copies of the Software, and to permit persons to whom the -- Software is furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -- DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- with Ada.Characters.Handling; with Ada.Characters.Latin_1; with Ada.Integer_Text_IO; with Ada.Strings; with Ada.Strings.Fixed; package body LSE.Utils.Colors is package L renames Ada.Characters.Latin_1; function Str_Hex_To_Int (Input : String) return Natural is use Ada.Characters.Handling; Str_Length : Natural := Input'Length; Result : Natural := 0; begin for C of Input loop case To_Upper (C) is when 'F' => Result := Result + 15**Str_Length; when 'E' => Result := Result + 14**Str_Length; when 'D' => Result := Result + 13**Str_Length; when 'C' => Result := Result + 12**Str_Length; when 'B' => Result := Result + 11**Str_Length; when 'A' => Result := Result + 10**Str_Length; when '0' .. '9' => Result := Result + Natural'Value (C & ""); when others => raise UNEXPECTED_CHARACTER; end case; Str_Length := Str_Length - 1; end loop; return Result; end Str_Hex_To_Int; function Str_Hex_To_Float (Input : String) return Float is begin return Float (Str_Hex_To_Int (Input)) / 255.0; end Str_Hex_To_Float; procedure To_RGB (Input : String; R, G, B : out Natural) is use Ada.Text_IO; Index : Positive := Input'First; begin if Input'Length not in 6 .. 7 then raise STRING_LENGTH; end if; if Input (Index) = '#' then Index := Index + 1; end if; R := Str_Hex_To_Int (Input (Index .. Index + 1)); Index := Index + 2; G := Str_Hex_To_Int (Input (Index .. Index + 1)); Index := Index + 2; B := Str_Hex_To_Int (Input (Index .. Index + 1)); exception when STRING_LENGTH => Put_Line ("Error: bad length of string for RGB conversion"); when UNEXPECTED_CHARACTER => Put_Line ("Error: Unexpected character encountered"); when others => Put_Line ("Error: cannot convert string to RGB"); end To_RGB; procedure To_RGB (Input : String; R, G, B : out Float) is use Ada.Text_IO; Index : Positive := Input'First; begin if Input'Length not in 6 .. 7 then raise STRING_LENGTH; end if; if Input (Index) = '#' then Index := Index + 1; end if; R := Str_Hex_To_Float (Input (Index .. Index + 1)); Index := Index + 2; G := Str_Hex_To_Float (Input (Index .. Index + 1)); Index := Index + 2; B := Str_Hex_To_Float (Input (Index .. Index + 1)); exception when STRING_LENGTH => Put_Line ("Error: bad length of string for RGB conversion"); when UNEXPECTED_CHARACTER => Put_Line ("Error: Unexpected character encountered"); when others => Put_Line ("Error: cannot convert string to RGB"); end To_RGB; -- Convert RGB value to string function RGB_To_String (R, G, B : Natural) return String is use Ada.Strings; use Ada.Strings.Fixed; begin return Trim (Natural'Image (R), Left) & L.Space & Natural'Image (G) & L.Space & Natural'Image (B); end RGB_To_String; -- Convert RGB value to string function RGB_To_String (R, G, B : Float) return String is use Ada.Strings; use Ada.Strings.Fixed; begin return Trim (Fixed_Point'Image (Fixed_Point (R)), Left) & L.Space & Fixed_Point'Image (Fixed_Point (G)) & L.Space & Fixed_Point'Image (Fixed_Point (B)); end RGB_To_String; function RGB_To_Hex_String (R, G, B : Natural) return String is Rs : String (1 .. 6); Gs : String (1 .. 6); Bs : String (1 .. 6); begin Ada.Integer_Text_IO.Put (Rs, R, 16); Ada.Integer_Text_IO.Put (Gs, G, 16); Ada.Integer_Text_IO.Put (Bs, B, 16); return "#" & (if Rs (4 .. 4) = "#" then "0" else Rs (4 .. 4)) & (if Rs (4 .. 4) = "#" then Rs (5 .. 5) else Rs (4 .. 4)) & (if Gs (4 .. 4) = "#" then "0" else Gs (4 .. 4)) & (if Gs (4 .. 4) = "#" then Gs (5 .. 5) else Gs (4 .. 4)) & (if Bs (4 .. 4) = "#" then "0" else Bs (4 .. 4)) & (if Bs (4 .. 4) = "#" then Bs (5 .. 5) else Bs (4 .. 4)); end RGB_To_Hex_String; function RGB_To_Hex_String (R, G, B : Float) return String is begin return RGB_To_Hex_String (Natural (R * 255.0), Natural (G * 255.0), Natural (B * 255.0)); end RGB_To_Hex_String; end LSE.Utils.Colors;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Wide_Text_IO; use Ada.Wide_Text_IO; with Interfaces; use Interfaces; with System; with Ada.Unchecked_Conversion; use Ada; -- Play with UTF8 pragma Wide_Character_Encoding (UTF8); procedure represent2 is type Action_Type is (Load, Store, Copy, Add, Clear, Jump, Ret) with Size => 4; for Action_Type use (Load => 2#1000#, Store => 2#1001#, Copy => 2#1010#, Add => 2#1011#, Clear => 2#1100#, Jump => 2#1101#, Ret => 2#1110#); type Register_Type is mod 2**4 with Size => 4; type Ref_Register_Type is mod 2**2 with Size => 2; type Mode_Type is (Direct, Register, Indirect) with Size => 2; for Mode_Type use (Direct => 2#01#, Register => 2#10#, Indirect => 2#11#); type Mult_Factor_Type is mod 2**2 with Size => 2; type Long_Reg (Mode : Mode_Type := Direct) is record Action : Action_Type; -- 4 case Mode is when Direct => Bit_Fill : Mult_Factor_Type; -- 2 Address : Unsigned_8; -- 8 when Register => Mult_Factor : Mult_Factor_Type; -- 2 Reg1 : Register_Type; -- 4 Reg2 : Register_Type; -- 4 when Indirect => Ref_Reg : Ref_Register_Type; -- 2 Offset : Unsigned_8; -- 8 end case; end record with Size => 16, -- Pack, Bit_Order => System.Low_Order_First; -- This works. for Long_Reg use record Action at 0 range 12 .. 15; Mode at 0 range 10 .. 11; Bit_Fill at 0 range 8 .. 9; Address at 0 range 0 .. 7; Mult_Factor at 0 range 8 .. 9; Reg1 at 0 range 4 .. 7; Reg2 at 0 range 0 .. 3; Ref_Reg at 0 range 8 .. 9; Offset at 0 range 0 .. 7; end record; type Word is new Interfaces.Unsigned_16; function To_Word is new Unchecked_Conversion (Long_Reg, Word); procedure Put_Word (S : Long_Reg) is begin Put_Line (Word'Image (To_Word (S))); end; E : Long_Reg; begin Put_Line (Integer'Image (Long_Reg'Size)); Put (Wide_Character'Val (16#03BC#)); Text_IO.New_Line; E := (Action => Load, Mode => Direct, Bit_Fill => 0, Address => 0); Put_Word (E); E := (Action => Load, Mode => Register, Mult_Factor => 3, Reg1 => 15, Reg2 => 0); Put_Word (E); end;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ limited with AMF.OCL.Collection_Literal_Parts.Collections; with AMF.OCL.Literal_Exps; package AMF.OCL.Collection_Literal_Exps is pragma Preelaborate; type OCL_Collection_Literal_Exp is limited interface and AMF.OCL.Literal_Exps.OCL_Literal_Exp; type OCL_Collection_Literal_Exp_Access is access all OCL_Collection_Literal_Exp'Class; for OCL_Collection_Literal_Exp_Access'Storage_Size use 0; not overriding function Get_Kind (Self : not null access constant OCL_Collection_Literal_Exp) return AMF.OCL.OCL_Collection_Kind is abstract; -- Getter of CollectionLiteralExp::kind. -- not overriding procedure Set_Kind (Self : not null access OCL_Collection_Literal_Exp; To : AMF.OCL.OCL_Collection_Kind) is abstract; -- Setter of CollectionLiteralExp::kind. -- not overriding function Get_Part (Self : not null access constant OCL_Collection_Literal_Exp) return AMF.OCL.Collection_Literal_Parts.Collections.Ordered_Set_Of_OCL_Collection_Literal_Part is abstract; -- Getter of CollectionLiteralExp::part. -- end AMF.OCL.Collection_Literal_Exps;
-- Copyright 2015-2017 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 Pack; procedure Foo is begin Pack.Do_Nothing (Pack.AA); -- BREAK end Foo;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.INDEFINITE_MULTIWAY_TREES -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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 System; use type System.Address; package body Ada.Containers.Indefinite_Multiway_Trees is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers -------------------- -- Root_Iterator -- -------------------- type Root_Iterator is abstract new Limited_Controlled and Tree_Iterator_Interfaces.Forward_Iterator with record Container : Tree_Access; Subtree : Tree_Node_Access; end record; overriding procedure Finalize (Object : in out Root_Iterator); ----------------------- -- Subtree_Iterator -- ----------------------- type Subtree_Iterator is new Root_Iterator with null record; overriding function First (Object : Subtree_Iterator) return Cursor; overriding function Next (Object : Subtree_Iterator; Position : Cursor) return Cursor; --------------------- -- Child_Iterator -- --------------------- type Child_Iterator is new Root_Iterator and Tree_Iterator_Interfaces.Reversible_Iterator with null record; overriding function First (Object : Child_Iterator) return Cursor; overriding function Next (Object : Child_Iterator; Position : Cursor) return Cursor; overriding function Last (Object : Child_Iterator) return Cursor; overriding function Previous (Object : Child_Iterator; Position : Cursor) return Cursor; ----------------------- -- Local Subprograms -- ----------------------- function Root_Node (Container : Tree) return Tree_Node_Access; procedure Free_Element is new Ada.Unchecked_Deallocation (Element_Type, Element_Access); procedure Deallocate_Node (X : in out Tree_Node_Access); procedure Deallocate_Children (Subtree : Tree_Node_Access; Count : in out Count_Type); procedure Deallocate_Subtree (Subtree : in out Tree_Node_Access; Count : in out Count_Type); function Equal_Children (Left_Subtree, Right_Subtree : Tree_Node_Access) return Boolean; function Equal_Subtree (Left_Subtree, Right_Subtree : Tree_Node_Access) return Boolean; procedure Iterate_Children (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)); procedure Iterate_Subtree (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)); procedure Copy_Children (Source : Children_Type; Parent : Tree_Node_Access; Count : in out Count_Type); procedure Copy_Subtree (Source : Tree_Node_Access; Parent : Tree_Node_Access; Target : out Tree_Node_Access; Count : in out Count_Type); function Find_In_Children (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access; function Find_In_Subtree (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access; function Child_Count (Children : Children_Type) return Count_Type; function Subtree_Node_Count (Subtree : Tree_Node_Access) return Count_Type; function Is_Reachable (From, To : Tree_Node_Access) return Boolean; procedure Remove_Subtree (Subtree : Tree_Node_Access); procedure Insert_Subtree_Node (Subtree : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access); procedure Insert_Subtree_List (First : Tree_Node_Access; Last : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access); procedure Splice_Children (Target_Parent : Tree_Node_Access; Before : Tree_Node_Access; Source_Parent : Tree_Node_Access); --------- -- "=" -- --------- function "=" (Left, Right : Tree) return Boolean is begin return Equal_Children (Root_Node (Left), Root_Node (Right)); end "="; ------------ -- Adjust -- ------------ procedure Adjust (Container : in out Tree) is Source : constant Children_Type := Container.Root.Children; Source_Count : constant Count_Type := Container.Count; Target_Count : Count_Type; begin -- We first restore the target container to its default-initialized -- state, before we attempt any allocation, to ensure that invariants -- are preserved in the event that the allocation fails. Container.Root.Children := Children_Type'(others => null); Zero_Counts (Container.TC); Container.Count := 0; -- Copy_Children returns a count of the number of nodes that it -- allocates, but it works by incrementing the value that is passed in. -- We must therefore initialize the count value before calling -- Copy_Children. Target_Count := 0; -- Now we attempt the allocation of subtrees. The invariants are -- satisfied even if the allocation fails. Copy_Children (Source, Root_Node (Container), Target_Count); pragma Assert (Target_Count = Source_Count); Container.Count := Source_Count; end Adjust; ------------------- -- Ancestor_Find -- ------------------- function Ancestor_Find (Position : Cursor; Item : Element_Type) return Cursor is R, N : Tree_Node_Access; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Commented-out pending ARG ruling. ??? -- if Checks and then -- Position.Container /= Container'Unrestricted_Access -- then -- raise Program_Error with "Position cursor not in container"; -- end if; -- AI-0136 says to raise PE if Position equals the root node. This does -- not seem correct, as this value is just the limiting condition of the -- search. For now we omit this check pending a ruling from the ARG.??? -- if Checks and then Is_Root (Position) then -- raise Program_Error with "Position cursor designates root"; -- end if; R := Root_Node (Position.Container.all); N := Position.Node; while N /= R loop if N.Element.all = Item then return Cursor'(Position.Container, N); end if; N := N.Parent; end loop; return No_Element; end Ancestor_Find; ------------------ -- Append_Child -- ------------------ procedure Append_Child (Container : in out Tree; Parent : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is First, Last : Tree_Node_Access; Element : Element_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Count = 0 then return; end if; TC_Check (Container.TC); 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). We don't unsuppress the check on the -- allocator in the loop below, because the one in this block would -- have failed already. pragma Unsuppress (Accessibility_Check); begin Element := new Element_Type'(New_Item); end; First := new Tree_Node_Type'(Parent => Parent.Node, Element => Element, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error. ??? Element := new Element_Type'(New_Item); Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => Element, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => null); -- null means "insert at end of list" -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; end Append_Child; ------------ -- Assign -- ------------ procedure Assign (Target : in out Tree; Source : Tree) is Source_Count : constant Count_Type := Source.Count; Target_Count : Count_Type; begin if Target'Address = Source'Address then return; end if; Target.Clear; -- checks busy bit -- Copy_Children returns the number of nodes that it allocates, but it -- does this by incrementing the count value passed in, so we must -- initialize the count before calling Copy_Children. Target_Count := 0; -- Note that Copy_Children inserts the newly-allocated children into -- their parent list only after the allocation of all the children has -- succeeded. This preserves invariants even if the allocation fails. Copy_Children (Source.Root.Children, Root_Node (Target), Target_Count); pragma Assert (Target_Count = Source_Count); Target.Count := Source_Count; end Assign; ----------------- -- Child_Count -- ----------------- function Child_Count (Parent : Cursor) return Count_Type is begin if Parent = No_Element then return 0; else return Child_Count (Parent.Node.Children); end if; end Child_Count; function Child_Count (Children : Children_Type) return Count_Type is Result : Count_Type; Node : Tree_Node_Access; begin Result := 0; Node := Children.First; while Node /= null loop Result := Result + 1; Node := Node.Next; end loop; return Result; end Child_Count; ----------------- -- Child_Depth -- ----------------- function Child_Depth (Parent, Child : Cursor) return Count_Type is Result : Count_Type; N : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Child = No_Element then raise Constraint_Error with "Child cursor has no element"; end if; if Checks and then Parent.Container /= Child.Container then raise Program_Error with "Parent and Child in different containers"; end if; Result := 0; N := Child.Node; while N /= Parent.Node loop Result := Result + 1; N := N.Parent; if Checks and then N = null then raise Program_Error with "Parent is not ancestor of Child"; end if; end loop; return Result; end Child_Depth; ----------- -- Clear -- ----------- procedure Clear (Container : in out Tree) is Container_Count : Count_Type; Children_Count : Count_Type; begin TC_Check (Container.TC); -- We first set the container count to 0, in order to preserve -- invariants in case the deallocation fails. (This works because -- Deallocate_Children immediately removes the children from their -- parent, and then does the actual deallocation.) Container_Count := Container.Count; Container.Count := 0; -- Deallocate_Children returns the number of nodes that it deallocates, -- but it does this by incrementing the count value that is passed in, -- so we must first initialize the count return value before calling it. Children_Count := 0; -- See comment above. Deallocate_Children immediately removes the -- children list from their parent node (here, the root of the tree), -- and only after that does it attempt the actual deallocation. So even -- if the deallocation fails, the representation invariants Deallocate_Children (Root_Node (Container), Children_Count); pragma Assert (Children_Count = Container_Count); end Clear; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Tree; 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 = Root_Node (Container) then raise Program_Error with "Position cursor designates root"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "Node has no element"; end if; -- Implement Vet for multiway tree??? -- pragma Assert (Vet (Position), -- "Position cursor in Constant_Reference is bad"); declare TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Tree; Item : Element_Type) return Boolean is begin return Find (Container, Item) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Tree) return Tree is begin return Target : Tree do Copy_Children (Source => Source.Root.Children, Parent => Root_Node (Target), Count => Target.Count); pragma Assert (Target.Count = Source.Count); end return; end Copy; ------------------- -- Copy_Children -- ------------------- procedure Copy_Children (Source : Children_Type; Parent : Tree_Node_Access; Count : in out Count_Type) is pragma Assert (Parent /= null); pragma Assert (Parent.Children.First = null); pragma Assert (Parent.Children.Last = null); CC : Children_Type; C : Tree_Node_Access; begin -- We special-case the first allocation, in order to establish the -- representation invariants for type Children_Type. C := Source.First; if C = null then return; end if; Copy_Subtree (Source => C, Parent => Parent, Target => CC.First, Count => Count); CC.Last := CC.First; -- The representation invariants for the Children_Type list have been -- established, so we can now copy the remaining children of Source. C := C.Next; while C /= null loop Copy_Subtree (Source => C, Parent => Parent, Target => CC.Last.Next, Count => Count); CC.Last.Next.Prev := CC.Last; CC.Last := CC.Last.Next; C := C.Next; end loop; -- We add the newly-allocated children to their parent list only after -- the allocation has succeeded, in order to preserve invariants of the -- parent. Parent.Children := CC; end Copy_Children; ------------------ -- Copy_Subtree -- ------------------ procedure Copy_Subtree (Target : in out Tree; Parent : Cursor; Before : Cursor; Source : Cursor) is Target_Subtree : Tree_Node_Access; Target_Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Source = No_Element then return; end if; if Checks and then Is_Root (Source) then raise Constraint_Error with "Source cursor designates root"; end if; -- Copy_Subtree returns a count of the number of nodes that it -- allocates, but it works by incrementing the value that is passed in. -- We must therefore initialize the count value before calling -- Copy_Subtree. Target_Count := 0; Copy_Subtree (Source => Source.Node, Parent => Parent.Node, Target => Target_Subtree, Count => Target_Count); pragma Assert (Target_Subtree /= null); pragma Assert (Target_Subtree.Parent = Parent.Node); pragma Assert (Target_Count >= 1); Insert_Subtree_Node (Subtree => Target_Subtree, Parent => Parent.Node, Before => Before.Node); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Target.Count := Target.Count + Target_Count; end Copy_Subtree; procedure Copy_Subtree (Source : Tree_Node_Access; Parent : Tree_Node_Access; Target : out Tree_Node_Access; Count : in out Count_Type) is E : constant Element_Access := new Element_Type'(Source.Element.all); begin Target := new Tree_Node_Type'(Element => E, Parent => Parent, others => <>); Count := Count + 1; Copy_Children (Source => Source.Children, Parent => Target, Count => Count); end Copy_Subtree; ------------------------- -- Deallocate_Children -- ------------------------- procedure Deallocate_Children (Subtree : Tree_Node_Access; Count : in out Count_Type) is pragma Assert (Subtree /= null); CC : Children_Type := Subtree.Children; C : Tree_Node_Access; begin -- We immediately remove the children from their parent, in order to -- preserve invariants in case the deallocation fails. Subtree.Children := Children_Type'(others => null); while CC.First /= null loop C := CC.First; CC.First := C.Next; Deallocate_Subtree (C, Count); end loop; end Deallocate_Children; --------------------- -- Deallocate_Node -- --------------------- procedure Deallocate_Node (X : in out Tree_Node_Access) is procedure Free_Node is new Ada.Unchecked_Deallocation (Tree_Node_Type, Tree_Node_Access); -- Start of processing for Deallocate_Node begin if X /= null then Free_Element (X.Element); Free_Node (X); end if; end Deallocate_Node; ------------------------ -- Deallocate_Subtree -- ------------------------ procedure Deallocate_Subtree (Subtree : in out Tree_Node_Access; Count : in out Count_Type) is begin Deallocate_Children (Subtree, Count); Deallocate_Node (Subtree); Count := Count + 1; end Deallocate_Subtree; --------------------- -- Delete_Children -- --------------------- procedure Delete_Children (Container : in out Tree; Parent : Cursor) is Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; TC_Check (Container.TC); -- Deallocate_Children returns a count of the number of nodes -- that it deallocates, but it works by incrementing the -- value that is passed in. We must therefore initialize -- the count value before calling Deallocate_Children. Count := 0; Deallocate_Children (Parent.Node, Count); pragma Assert (Count <= Container.Count); Container.Count := Container.Count - Count; end Delete_Children; ----------------- -- Delete_Leaf -- ----------------- procedure Delete_Leaf (Container : in out Tree; Position : in out Cursor) is X : Tree_Node_Access; begin if Checks and then Position = No_Element 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 not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; if Checks and then not Is_Leaf (Position) then raise Constraint_Error with "Position cursor does not designate leaf"; end if; TC_Check (Container.TC); X := Position.Node; Position := No_Element; -- Restore represention invariants before attempting the actual -- deallocation. Remove_Subtree (X); Container.Count := Container.Count - 1; -- It is now safe to attempt the deallocation. This leaf node has been -- disassociated from the tree, so even if the deallocation fails, -- representation invariants will remain satisfied. Deallocate_Node (X); end Delete_Leaf; -------------------- -- Delete_Subtree -- -------------------- procedure Delete_Subtree (Container : in out Tree; Position : in out Cursor) is X : Tree_Node_Access; Count : Count_Type; begin if Checks and then Position = No_Element 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 not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; TC_Check (Container.TC); X := Position.Node; Position := No_Element; -- Here is one case where a deallocation failure can result in the -- violation of a representation invariant. We disassociate the subtree -- from the tree now, but we only decrement the total node count after -- we attempt the deallocation. However, if the deallocation fails, the -- total node count will not get decremented. -- One way around this dilemma is to count the nodes in the subtree -- before attempt to delete the subtree, but that is an O(n) operation, -- so it does not seem worth it. -- Perhaps this is much ado about nothing, since the only way -- deallocation can fail is if Controlled Finalization fails: this -- propagates Program_Error so all bets are off anyway. ??? Remove_Subtree (X); -- Deallocate_Subtree returns a count of the number of nodes that it -- deallocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Deallocate_Subtree. Count := 0; Deallocate_Subtree (X, Count); pragma Assert (Count <= Container.Count); -- See comments above. We would prefer to do this sooner, but there's no -- way to satisfy that goal without an potentially severe execution -- penalty. Container.Count := Container.Count - Count; end Delete_Subtree; ----------- -- Depth -- ----------- function Depth (Position : Cursor) return Count_Type is Result : Count_Type; N : Tree_Node_Access; begin Result := 0; N := Position.Node; while N /= null loop N := N.Parent; Result := Result + 1; end loop; return Result; end Depth; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_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.Node = Root_Node (Position.Container.all) then raise Program_Error with "Position cursor designates root"; end if; return Position.Node.Element.all; end Element; -------------------- -- Equal_Children -- -------------------- function Equal_Children (Left_Subtree : Tree_Node_Access; Right_Subtree : Tree_Node_Access) return Boolean is Left_Children : Children_Type renames Left_Subtree.Children; Right_Children : Children_Type renames Right_Subtree.Children; L, R : Tree_Node_Access; begin if Child_Count (Left_Children) /= Child_Count (Right_Children) then return False; end if; L := Left_Children.First; R := Right_Children.First; while L /= null loop if not Equal_Subtree (L, R) then return False; end if; L := L.Next; R := R.Next; end loop; return True; end Equal_Children; ------------------- -- Equal_Subtree -- ------------------- function Equal_Subtree (Left_Position : Cursor; Right_Position : Cursor) return Boolean is begin if Checks and then Left_Position = No_Element then raise Constraint_Error with "Left cursor has no element"; end if; if Checks and then Right_Position = No_Element then raise Constraint_Error with "Right cursor has no element"; end if; if Left_Position = Right_Position then return True; end if; if Is_Root (Left_Position) then if not Is_Root (Right_Position) then return False; end if; return Equal_Children (Left_Position.Node, Right_Position.Node); end if; if Is_Root (Right_Position) then return False; end if; return Equal_Subtree (Left_Position.Node, Right_Position.Node); end Equal_Subtree; function Equal_Subtree (Left_Subtree : Tree_Node_Access; Right_Subtree : Tree_Node_Access) return Boolean is begin if Left_Subtree.Element.all /= Right_Subtree.Element.all then return False; end if; return Equal_Children (Left_Subtree, Right_Subtree); end Equal_Subtree; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Root_Iterator) is begin Unbusy (Object.Container.TC); end Finalize; ---------- -- Find -- ---------- function Find (Container : Tree; Item : Element_Type) return Cursor is N : constant Tree_Node_Access := Find_In_Children (Root_Node (Container), Item); begin if N = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, N); end Find; ----------- -- First -- ----------- overriding function First (Object : Subtree_Iterator) return Cursor is begin if Object.Subtree = Root_Node (Object.Container.all) then return First_Child (Root (Object.Container.all)); else return Cursor'(Object.Container, Object.Subtree); end if; end First; overriding function First (Object : Child_Iterator) return Cursor is begin return First_Child (Cursor'(Object.Container, Object.Subtree)); end First; ----------------- -- First_Child -- ----------------- function First_Child (Parent : Cursor) return Cursor is Node : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; Node := Parent.Node.Children.First; if Node = null then return No_Element; end if; return Cursor'(Parent.Container, Node); end First_Child; ------------------------- -- First_Child_Element -- ------------------------- function First_Child_Element (Parent : Cursor) return Element_Type is begin return Element (First_Child (Parent)); end First_Child_Element; ---------------------- -- Find_In_Children -- ---------------------- function Find_In_Children (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access is N, Result : Tree_Node_Access; begin N := Subtree.Children.First; while N /= null loop Result := Find_In_Subtree (N, Item); if Result /= null then return Result; end if; N := N.Next; end loop; return null; end Find_In_Children; --------------------- -- Find_In_Subtree -- --------------------- function Find_In_Subtree (Position : Cursor; Item : Element_Type) return Cursor is Result : Tree_Node_Access; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Commented-out pending ruling from ARG. ??? -- if Checks and then -- Position.Container /= Container'Unrestricted_Access -- then -- raise Program_Error with "Position cursor not in container"; -- end if; if Is_Root (Position) then Result := Find_In_Children (Position.Node, Item); else Result := Find_In_Subtree (Position.Node, Item); end if; if Result = null then return No_Element; end if; return Cursor'(Position.Container, Result); end Find_In_Subtree; function Find_In_Subtree (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access is begin if Subtree.Element.all = Item then return Subtree; end if; return Find_In_Children (Subtree, Item); end Find_In_Subtree; ------------------------ -- 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 if Position = No_Element then return False; end if; return Position.Node.Parent /= null; end Has_Element; ------------------ -- Insert_Child -- ------------------ procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is Position : Cursor; pragma Unreferenced (Position); begin Insert_Child (Container, Parent, Before, New_Item, Position, Count); end Insert_Child; procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; New_Item : Element_Type; Position : out Cursor; Count : Count_Type := 1) is First : Tree_Node_Access; Last : Tree_Node_Access; Element : Element_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Parent cursor not parent of Before"; end if; end if; if Count = 0 then Position := No_Element; -- Need ruling from ARG ??? return; end if; TC_Check (Container.TC); 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). We don't unsuppress the check on the -- allocator in the loop below, because the one in this block would -- have failed already. pragma Unsuppress (Accessibility_Check); begin Element := new Element_Type'(New_Item); end; First := new Tree_Node_Type'(Parent => Parent.Node, Element => Element, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error. ??? Element := new Element_Type'(New_Item); Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => Element, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => Before.Node); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; Position := Cursor'(Parent.Container, First); end Insert_Child; ------------------------- -- Insert_Subtree_List -- ------------------------- procedure Insert_Subtree_List (First : Tree_Node_Access; Last : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access) is pragma Assert (Parent /= null); C : Children_Type renames Parent.Children; begin -- This is a simple utility operation to insert a list of nodes (from -- First..Last) as children of Parent. The Before node specifies where -- the new children should be inserted relative to the existing -- children. if First = null then pragma Assert (Last = null); return; end if; pragma Assert (Last /= null); pragma Assert (Before = null or else Before.Parent = Parent); if C.First = null then C.First := First; C.First.Prev := null; C.Last := Last; C.Last.Next := null; elsif Before = null then -- means "insert after existing nodes" C.Last.Next := First; First.Prev := C.Last; C.Last := Last; C.Last.Next := null; elsif Before = C.First then Last.Next := C.First; C.First.Prev := Last; C.First := First; C.First.Prev := null; else Before.Prev.Next := First; First.Prev := Before.Prev; Last.Next := Before; Before.Prev := Last; end if; end Insert_Subtree_List; ------------------------- -- Insert_Subtree_Node -- ------------------------- procedure Insert_Subtree_Node (Subtree : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access) is begin -- This is a simple wrapper operation to insert a single child into the -- Parent's children list. Insert_Subtree_List (First => Subtree, Last => Subtree, Parent => Parent, Before => Before); end Insert_Subtree_Node; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Tree) return Boolean is begin return Container.Root.Children.First = null; end Is_Empty; ------------- -- Is_Leaf -- ------------- function Is_Leaf (Position : Cursor) return Boolean is begin if Position = No_Element then return False; end if; return Position.Node.Children.First = null; end Is_Leaf; ------------------ -- Is_Reachable -- ------------------ function Is_Reachable (From, To : Tree_Node_Access) return Boolean is pragma Assert (From /= null); pragma Assert (To /= null); N : Tree_Node_Access; begin N := From; while N /= null loop if N = To then return True; end if; N := N.Parent; end loop; return False; end Is_Reachable; ------------- -- Is_Root -- ------------- function Is_Root (Position : Cursor) return Boolean is begin if Position.Container = null then return False; end if; return Position = Root (Position.Container.all); end Is_Root; ------------- -- Iterate -- ------------- procedure Iterate (Container : Tree; Process : not null access procedure (Position : Cursor)) is Busy : With_Busy (Container.TC'Unrestricted_Access); begin Iterate_Children (Container => Container'Unrestricted_Access, Subtree => Root_Node (Container), Process => Process); end Iterate; function Iterate (Container : Tree) return Tree_Iterator_Interfaces.Forward_Iterator'Class is begin return Iterate_Subtree (Root (Container)); end Iterate; ---------------------- -- Iterate_Children -- ---------------------- procedure Iterate_Children (Parent : Cursor; Process : not null access procedure (Position : Cursor)) is C : Tree_Node_Access; Busy : With_Busy (Parent.Container.TC'Unrestricted_Access); begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; C := Parent.Node.Children.First; while C /= null loop Process (Position => Cursor'(Parent.Container, Node => C)); C := C.Next; end loop; end Iterate_Children; procedure Iterate_Children (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)) is Node : Tree_Node_Access; begin -- This is a helper function to recursively iterate over all the nodes -- in a subtree, in depth-first fashion. This particular helper just -- visits the children of this subtree, not the root of the subtree node -- itself. This is useful when starting from the ultimate root of the -- entire tree (see Iterate), as that root does not have an element. Node := Subtree.Children.First; while Node /= null loop Iterate_Subtree (Container, Node, Process); Node := Node.Next; end loop; end Iterate_Children; function Iterate_Children (Container : Tree; Parent : Cursor) return Tree_Iterator_Interfaces.Reversible_Iterator'Class is C : constant Tree_Access := Container'Unrestricted_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= C then raise Program_Error with "Parent cursor not in container"; end if; return It : constant Child_Iterator := Child_Iterator'(Limited_Controlled with Container => C, Subtree => Parent.Node) do Busy (C.TC); end return; end Iterate_Children; --------------------- -- Iterate_Subtree -- --------------------- function Iterate_Subtree (Position : Cursor) return Tree_Iterator_Interfaces.Forward_Iterator'Class is C : constant Tree_Access := Position.Container; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Implement Vet for multiway trees??? -- pragma Assert (Vet (Position), "bad subtree cursor"); return It : constant Subtree_Iterator := (Limited_Controlled with Container => Position.Container, Subtree => Position.Node) do Busy (C.TC); end return; end Iterate_Subtree; procedure Iterate_Subtree (Position : Cursor; Process : not null access procedure (Position : Cursor)) is Busy : With_Busy (Position.Container.TC'Unrestricted_Access); begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Is_Root (Position) then Iterate_Children (Position.Container, Position.Node, Process); else Iterate_Subtree (Position.Container, Position.Node, Process); end if; end Iterate_Subtree; procedure Iterate_Subtree (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)) is begin -- This is a helper function to recursively iterate over all the nodes -- in a subtree, in depth-first fashion. It first visits the root of the -- subtree, then visits its children. Process (Cursor'(Container, Subtree)); Iterate_Children (Container, Subtree, Process); end Iterate_Subtree; ---------- -- Last -- ---------- overriding function Last (Object : Child_Iterator) return Cursor is begin return Last_Child (Cursor'(Object.Container, Object.Subtree)); end Last; ---------------- -- Last_Child -- ---------------- function Last_Child (Parent : Cursor) return Cursor is Node : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; Node := Parent.Node.Children.Last; if Node = null then return No_Element; end if; return (Parent.Container, Node); end Last_Child; ------------------------ -- Last_Child_Element -- ------------------------ function Last_Child_Element (Parent : Cursor) return Element_Type is begin return Element (Last_Child (Parent)); end Last_Child_Element; ---------- -- Move -- ---------- procedure Move (Target : in out Tree; Source : in out Tree) is Node : Tree_Node_Access; begin if Target'Address = Source'Address then return; end if; TC_Check (Source.TC); Target.Clear; -- checks busy bit Target.Root.Children := Source.Root.Children; Source.Root.Children := Children_Type'(others => null); Node := Target.Root.Children.First; while Node /= null loop Node.Parent := Root_Node (Target); Node := Node.Next; end loop; Target.Count := Source.Count; Source.Count := 0; end Move; ---------- -- Next -- ---------- function Next (Object : Subtree_Iterator; Position : Cursor) return Cursor is Node : Tree_Node_Access; 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 tree"; end if; Node := Position.Node; if Node.Children.First /= null then return Cursor'(Object.Container, Node.Children.First); end if; while Node /= Object.Subtree loop if Node.Next /= null then return Cursor'(Object.Container, Node.Next); end if; Node := Node.Parent; end loop; return No_Element; end Next; function Next (Object : Child_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 tree"; end if; return Next_Sibling (Position); end Next; ------------------ -- Next_Sibling -- ------------------ function Next_Sibling (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Next = null then return No_Element; end if; return Cursor'(Position.Container, Position.Node.Next); end Next_Sibling; procedure Next_Sibling (Position : in out Cursor) is begin Position := Next_Sibling (Position); end Next_Sibling; ---------------- -- Node_Count -- ---------------- function Node_Count (Container : Tree) return Count_Type is begin -- Container.Count is the number of nodes we have actually allocated. We -- cache the value specifically so this Node_Count operation can execute -- in O(1) time, which makes it behave similarly to how the Length -- selector function behaves for other containers. -- -- The cached node count value only describes the nodes we have -- allocated; the root node itself is not included in that count. The -- Node_Count operation returns a value that includes the root node -- (because the RM says so), so we must add 1 to our cached value. return 1 + Container.Count; end Node_Count; ------------ -- Parent -- ------------ function Parent (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Parent = null then return No_Element; end if; return Cursor'(Position.Container, Position.Node.Parent); end Parent; ------------------- -- Prepent_Child -- ------------------- procedure Prepend_Child (Container : in out Tree; Parent : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is First, Last : Tree_Node_Access; Element : Element_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Count = 0 then return; end if; TC_Check (Container.TC); 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). We don't unsuppress the check on the -- allocator in the loop below, because the one in this block would -- have failed already. pragma Unsuppress (Accessibility_Check); begin Element := new Element_Type'(New_Item); end; First := new Tree_Node_Type'(Parent => Parent.Node, Element => Element, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error. ??? Element := new Element_Type'(New_Item); Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => Element, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => Parent.Node.Children.First); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; end Prepend_Child; -------------- -- Previous -- -------------- overriding function Previous (Object : Child_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 Previous designates wrong tree"; end if; return Previous_Sibling (Position); end Previous; ---------------------- -- Previous_Sibling -- ---------------------- function Previous_Sibling (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Prev = null then return No_Element; end if; return Cursor'(Position.Container, Position.Node.Prev); end Previous_Sibling; procedure Previous_Sibling (Position : in out Cursor) is begin Position := Previous_Sibling (Position); end Previous_Sibling; ---------------------- -- Pseudo_Reference -- ---------------------- function Pseudo_Reference (Container : aliased Tree'Class) return Reference_Control_Type is TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Control_Type := (Controlled with TC) do Lock (TC.all); end return; end Pseudo_Reference; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)) is T : Tree renames Position.Container.all'Unrestricted_Access.all; Lock : With_Lock (T.TC'Unrestricted_Access); begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; Process (Position.Node.Element.all); end Query_Element; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Tree) is procedure Read_Children (Subtree : Tree_Node_Access); function Read_Subtree (Parent : Tree_Node_Access) return Tree_Node_Access; Total_Count : Count_Type'Base; -- Value read from the stream that says how many elements follow Read_Count : Count_Type'Base; -- Actual number of elements read from the stream ------------------- -- Read_Children -- ------------------- procedure Read_Children (Subtree : Tree_Node_Access) is pragma Assert (Subtree /= null); pragma Assert (Subtree.Children.First = null); pragma Assert (Subtree.Children.Last = null); Count : Count_Type'Base; -- Number of child subtrees C : Children_Type; begin Count_Type'Read (Stream, Count); if Checks and then Count < 0 then raise Program_Error with "attempt to read from corrupt stream"; end if; if Count = 0 then return; end if; C.First := Read_Subtree (Parent => Subtree); C.Last := C.First; for J in Count_Type'(2) .. Count loop C.Last.Next := Read_Subtree (Parent => Subtree); C.Last.Next.Prev := C.Last; C.Last := C.Last.Next; end loop; -- Now that the allocation and reads have completed successfully, it -- is safe to link the children to their parent. Subtree.Children := C; end Read_Children; ------------------ -- Read_Subtree -- ------------------ function Read_Subtree (Parent : Tree_Node_Access) return Tree_Node_Access is Element : constant Element_Access := new Element_Type'(Element_Type'Input (Stream)); Subtree : constant Tree_Node_Access := new Tree_Node_Type' (Parent => Parent, Element => Element, others => <>); begin Read_Count := Read_Count + 1; Read_Children (Subtree); return Subtree; end Read_Subtree; -- Start of processing for Read begin Container.Clear; -- checks busy bit Count_Type'Read (Stream, Total_Count); if Checks and then Total_Count < 0 then raise Program_Error with "attempt to read from corrupt stream"; end if; if Total_Count = 0 then return; end if; Read_Count := 0; Read_Children (Root_Node (Container)); if Checks and then Read_Count /= Total_Count then raise Program_Error with "attempt to read from corrupt stream"; end if; Container.Count := Total_Count; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Position : out Cursor) is begin raise Program_Error with "attempt to read tree cursor from stream"; end 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; 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; --------------- -- Reference -- --------------- function Reference (Container : aliased in out Tree; 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 = Root_Node (Container) then raise Program_Error with "Position cursor designates root"; end if; if Checks and then Position.Node.Element = null then raise Program_Error with "Node has no element"; end if; -- Implement Vet for multiway tree??? -- pragma Assert (Vet (Position), -- "Position cursor in Constant_Reference is bad"); declare TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => Position.Node.Element.all'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; -------------------- -- Remove_Subtree -- -------------------- procedure Remove_Subtree (Subtree : Tree_Node_Access) is C : Children_Type renames Subtree.Parent.Children; begin -- This is a utility operation to remove a subtree node from its -- parent's list of children. if C.First = Subtree then pragma Assert (Subtree.Prev = null); if C.Last = Subtree then pragma Assert (Subtree.Next = null); C.First := null; C.Last := null; else C.First := Subtree.Next; C.First.Prev := null; end if; elsif C.Last = Subtree then pragma Assert (Subtree.Next = null); C.Last := Subtree.Prev; C.Last.Next := null; else Subtree.Prev.Next := Subtree.Next; Subtree.Next.Prev := Subtree.Prev; end if; end Remove_Subtree; ---------------------- -- Replace_Element -- ---------------------- procedure Replace_Element (Container : in out Tree; Position : Cursor; New_Item : Element_Type) is E, X : Element_Access; begin if Checks and then Position = No_Element 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 not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; TE_Check (Container.TC); 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 E := new Element_Type'(New_Item); end; X := Position.Node.Element; Position.Node.Element := E; Free_Element (X); end Replace_Element; ------------------------------ -- Reverse_Iterate_Children -- ------------------------------ procedure Reverse_Iterate_Children (Parent : Cursor; Process : not null access procedure (Position : Cursor)) is C : Tree_Node_Access; Busy : With_Busy (Parent.Container.TC'Unrestricted_Access); begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; C := Parent.Node.Children.Last; while C /= null loop Process (Position => Cursor'(Parent.Container, Node => C)); C := C.Prev; end loop; end Reverse_Iterate_Children; ---------- -- Root -- ---------- function Root (Container : Tree) return Cursor is begin return (Container'Unrestricted_Access, Root_Node (Container)); end Root; --------------- -- Root_Node -- --------------- function Root_Node (Container : Tree) return Tree_Node_Access is begin return Container.Root'Unrestricted_Access; end Root_Node; --------------------- -- Splice_Children -- --------------------- procedure Splice_Children (Target : in out Tree; Target_Parent : Cursor; Before : Cursor; Source : in out Tree; Source_Parent : Cursor) is Count : Count_Type; begin if Checks and then Target_Parent = No_Element then raise Constraint_Error with "Target_Parent cursor has no element"; end if; if Checks and then Target_Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Target_Parent cursor not in Target container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in Target container"; end if; if Checks and then Before.Node.Parent /= Target_Parent.Node then raise Constraint_Error with "Before cursor not child of Target_Parent"; end if; end if; if Checks and then Source_Parent = No_Element then raise Constraint_Error with "Source_Parent cursor has no element"; end if; if Checks and then Source_Parent.Container /= Source'Unrestricted_Access then raise Program_Error with "Source_Parent cursor not in Source container"; end if; if Target'Address = Source'Address then if Target_Parent = Source_Parent then return; end if; TC_Check (Target.TC); if Checks and then Is_Reachable (From => Target_Parent.Node, To => Source_Parent.Node) then raise Constraint_Error with "Source_Parent is ancestor of Target_Parent"; end if; Splice_Children (Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); return; end if; TC_Check (Target.TC); TC_Check (Source.TC); -- We cache the count of the nodes we have allocated, so that operation -- Node_Count can execute in O(1) time. But that means we must count the -- nodes in the subtree we remove from Source and insert into Target, in -- order to keep the count accurate. Count := Subtree_Node_Count (Source_Parent.Node); pragma Assert (Count >= 1); Count := Count - 1; -- because Source_Parent node does not move Splice_Children (Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); Source.Count := Source.Count - Count; Target.Count := Target.Count + Count; end Splice_Children; procedure Splice_Children (Container : in out Tree; Target_Parent : Cursor; Before : Cursor; Source_Parent : Cursor) is begin if Checks and then Target_Parent = No_Element then raise Constraint_Error with "Target_Parent cursor has no element"; end if; if Checks and then Target_Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Target_Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Target_Parent.Node then raise Constraint_Error with "Before cursor not child of Target_Parent"; end if; end if; if Checks and then Source_Parent = No_Element then raise Constraint_Error with "Source_Parent cursor has no element"; end if; if Checks and then Source_Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Source_Parent cursor not in container"; end if; if Target_Parent = Source_Parent then return; end if; TC_Check (Container.TC); if Checks and then Is_Reachable (From => Target_Parent.Node, To => Source_Parent.Node) then raise Constraint_Error with "Source_Parent is ancestor of Target_Parent"; end if; Splice_Children (Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); end Splice_Children; procedure Splice_Children (Target_Parent : Tree_Node_Access; Before : Tree_Node_Access; Source_Parent : Tree_Node_Access) is CC : constant Children_Type := Source_Parent.Children; C : Tree_Node_Access; begin -- This is a utility operation to remove the children from Source parent -- and insert them into Target parent. Source_Parent.Children := Children_Type'(others => null); -- Fix up the Parent pointers of each child to designate its new Target -- parent. C := CC.First; while C /= null loop C.Parent := Target_Parent; C := C.Next; end loop; Insert_Subtree_List (First => CC.First, Last => CC.Last, Parent => Target_Parent, Before => Before); end Splice_Children; -------------------- -- Splice_Subtree -- -------------------- procedure Splice_Subtree (Target : in out Tree; Parent : Cursor; Before : Cursor; Source : in out Tree; Position : in out Cursor) is Subtree_Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Parent cursor not in Target container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in Target container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Source'Unrestricted_Access then raise Program_Error with "Position cursor not in Source container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; if Target'Address = Source'Address then if Position.Node.Parent = Parent.Node then if Position.Node = Before.Node then return; end if; if Position.Node.Next = Before.Node then return; end if; end if; TC_Check (Target.TC); if Checks and then Is_Reachable (From => Parent.Node, To => Position.Node) then raise Constraint_Error with "Position is ancestor of Parent"; end if; Remove_Subtree (Position.Node); Position.Node.Parent := Parent.Node; Insert_Subtree_Node (Position.Node, Parent.Node, Before.Node); return; end if; TC_Check (Target.TC); TC_Check (Source.TC); -- This is an unfortunate feature of this API: we must count the nodes -- in the subtree that we remove from the source tree, which is an O(n) -- operation. It would have been better if the Tree container did not -- have a Node_Count selector; a user that wants the number of nodes in -- the tree could simply call Subtree_Node_Count, with the understanding -- that such an operation is O(n). -- -- Of course, we could choose to implement the Node_Count selector as an -- O(n) operation, which would turn this splice operation into an O(1) -- operation. ??? Subtree_Count := Subtree_Node_Count (Position.Node); pragma Assert (Subtree_Count <= Source.Count); Remove_Subtree (Position.Node); Source.Count := Source.Count - Subtree_Count; Position.Node.Parent := Parent.Node; Insert_Subtree_Node (Position.Node, Parent.Node, Before.Node); Target.Count := Target.Count + Subtree_Count; Position.Container := Target'Unrestricted_Access; end Splice_Subtree; procedure Splice_Subtree (Container : in out Tree; Parent : Cursor; Before : Cursor; Position : Cursor) is begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Checks and then Position = No_Element 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 not in container"; end if; if Checks and then Is_Root (Position) then -- Should this be PE instead? Need ARG confirmation. ??? raise Constraint_Error with "Position cursor designates root"; end if; if Position.Node.Parent = Parent.Node then if Position.Node = Before.Node then return; end if; if Position.Node.Next = Before.Node then return; end if; end if; TC_Check (Container.TC); if Checks and then Is_Reachable (From => Parent.Node, To => Position.Node) then raise Constraint_Error with "Position is ancestor of Parent"; end if; Remove_Subtree (Position.Node); Position.Node.Parent := Parent.Node; Insert_Subtree_Node (Position.Node, Parent.Node, Before.Node); end Splice_Subtree; ------------------------ -- Subtree_Node_Count -- ------------------------ function Subtree_Node_Count (Position : Cursor) return Count_Type is begin if Position = No_Element then return 0; end if; return Subtree_Node_Count (Position.Node); end Subtree_Node_Count; function Subtree_Node_Count (Subtree : Tree_Node_Access) return Count_Type is Result : Count_Type; Node : Tree_Node_Access; begin Result := 1; Node := Subtree.Children.First; while Node /= null loop Result := Result + Subtree_Node_Count (Node); Node := Node.Next; end loop; return Result; end Subtree_Node_Count; ---------- -- Swap -- ---------- procedure Swap (Container : in out Tree; I, J : Cursor) is begin if Checks and then I = No_Element then raise Constraint_Error with "I cursor has no element"; end if; if Checks and then I.Container /= Container'Unrestricted_Access then raise Program_Error with "I cursor not in container"; end if; if Checks and then Is_Root (I) then raise Program_Error with "I cursor designates root"; end if; if I = J then -- make this test sooner??? return; end if; if Checks and then J = No_Element then raise Constraint_Error with "J cursor has no element"; end if; if Checks and then J.Container /= Container'Unrestricted_Access then raise Program_Error with "J cursor not in container"; end if; if Checks and then Is_Root (J) then raise Program_Error with "J cursor designates root"; end if; TE_Check (Container.TC); declare EI : constant Element_Access := I.Node.Element; begin I.Node.Element := J.Node.Element; J.Node.Element := EI; end; end Swap; -------------------- -- Update_Element -- -------------------- procedure Update_Element (Container : in out Tree; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)) is T : Tree renames Position.Container.all'Unrestricted_Access.all; Lock : With_Lock (T.TC'Unrestricted_Access); begin if Checks and then Position = No_Element 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 not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; Process (Position.Node.Element.all); end Update_Element; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Tree) is procedure Write_Children (Subtree : Tree_Node_Access); procedure Write_Subtree (Subtree : Tree_Node_Access); -------------------- -- Write_Children -- -------------------- procedure Write_Children (Subtree : Tree_Node_Access) is CC : Children_Type renames Subtree.Children; C : Tree_Node_Access; begin Count_Type'Write (Stream, Child_Count (CC)); C := CC.First; while C /= null loop Write_Subtree (C); C := C.Next; end loop; end Write_Children; ------------------- -- Write_Subtree -- ------------------- procedure Write_Subtree (Subtree : Tree_Node_Access) is begin Element_Type'Output (Stream, Subtree.Element.all); Write_Children (Subtree); end Write_Subtree; -- Start of processing for Write begin Count_Type'Write (Stream, Container.Count); if Container.Count = 0 then return; end if; Write_Children (Root_Node (Container)); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Position : Cursor) is begin raise Program_Error with "attempt to write tree cursor to stream"; end 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; 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; end Ada.Containers.Indefinite_Multiway_Trees;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . D I R E C T _ I O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the declaration of the control block used for -- Direct_IO. This must be declared at the outer library level. It also -- contains code that is shared between instances of Direct_IO. with Interfaces.C_Streams; with Ada.Streams; with System.File_Control_Block; with System.Storage_Elements; package System.Direct_IO is package FCB renames System.File_Control_Block; type Operation is (Op_Read, Op_Write, Op_Other); -- Type used to record last operation (to optimize sequential operations) subtype Count is Interfaces.C_Streams.long; -- The Count type in each instantiation is derived from this type subtype Positive_Count is Count range 1 .. Count'Last; type Direct_AFCB is new FCB.AFCB with record Index : Count := 1; -- Current Index value Bytes : Interfaces.C_Streams.size_t; -- Length of item in bytes (set from inside generic template) Last_Op : Operation := Op_Other; -- Last operation performed on file, used to avoid unnecessary -- repositioning between successive read or write operations. end record; function AFCB_Allocate (Control_Block : Direct_AFCB) return FCB.AFCB_Ptr; procedure AFCB_Close (File : access Direct_AFCB); procedure AFCB_Free (File : access Direct_AFCB); procedure Read (File : in out Direct_AFCB; Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); -- Required overriding of Read, not actually used for Direct_IO procedure Write (File : in out Direct_AFCB; Item : Ada.Streams.Stream_Element_Array); -- Required overriding of Write, not actually used for Direct_IO type File_Type is access all Direct_AFCB; -- File_Type in individual instantiations is derived from this type procedure Create (File : in out File_Type; Mode : FCB.File_Mode := FCB.Inout_File; Name : String := ""; Form : String := ""); function End_Of_File (File : File_Type) return Boolean; function Index (File : File_Type) return Positive_Count; procedure Open (File : in out File_Type; Mode : FCB.File_Mode; Name : String; Form : String := ""); procedure Read (File : File_Type; Item : System.Address; Size : Interfaces.C_Streams.size_t; From : Positive_Count); procedure Read (File : File_Type; Item : System.Address; Size : Interfaces.C_Streams.size_t); procedure Reset (File : in out File_Type; Mode : FCB.File_Mode); procedure Reset (File : in out File_Type); procedure Set_Index (File : File_Type; To : Positive_Count); function Size (File : File_Type) return Count; procedure Write (File : File_Type; Item : System.Address; Size : Interfaces.C_Streams.size_t; Zeroes : System.Storage_Elements.Storage_Array); -- Note: Zeroes is the buffer of zeroes used to fill out partial records end System.Direct_IO;
with Ada.Text_IO, Miller_Rabin; procedure Prime_Gen is type Num is range 0 .. 2**63-1; -- maximum for the gnat Ada compiler MR_Iterations: constant Positive := 25; -- the probability Pr[Is_Prime(N, MR_Iterations) = Probably_Prime] -- is 1 for prime N and < 4**(-MR_Iterations) for composed N function Next(P: Num) return Num is N: Num := P+1; package MR is new Miller_Rabin(Num); use MR; begin while not (Is_Prime(N, MR_Iterations) = Probably_Prime) loop N := N + 1; end loop; return N; end Next; Current: Num; Count: Num := 0; begin -- show the first twenty primes Ada.Text_IO.Put("First 20 primes:"); Current := 1; for I in 1 .. 20 loop Current := Next(Current); Ada.Text_IO.Put(Num'Image(Current)); end loop; Ada.Text_IO.New_Line; -- show the primes between 100 and 150 Ada.Text_IO.Put("Primes between 100 and 150:"); Current := 99; loop Current := Next(Current); exit when Current > 150; Ada.Text_IO.Put(Num'Image(Current)); end loop; Ada.Text_IO.New_Line; -- count primes between 7700 and 8000 Ada.Text_IO.Put("Number of primes between 7700 and 8000:"); Current := 7699; loop Current := Next(Current); exit when Current > 8000; Count := Count + 1; end loop; Ada.Text_IO.Put_Line(Num'Image(Count)); Count := 10; Ada.Text_IO.Put_Line("Print the K_i'th prime, for $K=10**i:"); begin loop Current := 1; for I in 1 .. Count loop Current := Next(Current); end loop; Ada.Text_IO.Put(Num'Image(Count) & "th prime:" & Num'Image(Current)); Count := Count * 10; end loop; exception when Constraint_Error => Ada.Text_IO.Put_Line(" can't compute the" & Num'Image(Count) & "th prime:"); end; end;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2012 Felix Krause <contact@flyx.org> -- -- 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 GL.API; with GL.Low_Level; package body GL.Objects.Vertex_Arrays is procedure Create (Object : in out Vertex_Array_Object) is New_Id : UInt := 0; begin API.Create_Vertex_Arrays.Ref (1, New_Id); Object.Reference.GL_Id := New_Id; API.Bind_Vertex_Array.Ref (Object.Reference.GL_Id); end Create; procedure Delete (Object : in out Vertex_Array_Object) is Arr : constant Low_Level.UInt_Array := (1 => Object.Reference.GL_Id); begin API.Delete_Vertex_Arrays.Ref (1, Arr); Object.Reference.GL_Id := 0; end Delete; end GL.Objects.Vertex_Arrays;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 0 6 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_06 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_06; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; -- The following declarations are for the case where the address -- passed to GetU_06 or SetU_06 is not guaranteed to be aligned. -- These routines are used when the packed array is itself a -- component of a packed record, and therefore may not be aligned. type ClusterU is new Cluster; for ClusterU'Alignment use 1; type ClusterU_Ref is access ClusterU; type Rev_ClusterU is new ClusterU with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_ClusterU_Ref is access Rev_ClusterU; ------------ -- Get_06 -- ------------ function Get_06 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_06 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end Get_06; ------------- -- GetU_06 -- ------------- function GetU_06 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_06 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : ClusterU_Ref with Address => A'Address, Import; RC : Rev_ClusterU_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end GetU_06; ------------ -- Set_06 -- ------------ procedure Set_06 (Arr : System.Address; N : Natural; E : Bits_06; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end Set_06; ------------- -- SetU_06 -- ------------- procedure SetU_06 (Arr : System.Address; N : Natural; E : Bits_06; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : ClusterU_Ref with Address => A'Address, Import; RC : Rev_ClusterU_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end SetU_06; end System.Pack_06;
----------------------------------------------------------------------- -- druss-gateways -- Gateway management -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Containers.Vectors; with Ada.Strings.Hash; with Ada.Containers.Indefinite_Hashed_Maps; with Util.Properties; with Util.Refs; with Bbox.API; package Druss.Gateways is Not_Found : exception; type State_Type is (IDLE, READY, BUSY); protected type Gateway_State is function Get_State return State_Type; private State : State_Type := IDLE; end Gateway_State; type Gateway_Type is limited new Util.Refs.Ref_Entity with record -- Gateway IP address. Ip : Ada.Strings.Unbounded.Unbounded_String; -- API password. Passwd : Ada.Strings.Unbounded.Unbounded_String; -- The Bbox serial number. Serial : Ada.Strings.Unbounded.Unbounded_String; -- Directory that contains the images. Images : Ada.Strings.Unbounded.Unbounded_String; -- Whether the gateway entry is enabled or not. Enable : Boolean := True; -- The gateway state. State : Gateway_State; -- Current WAN information (from api/v1/wan). Wan : Util.Properties.Manager; -- Current LAN information (from api/v1/lan). Lan : Util.Properties.Manager; -- Wireless information (From api/v1/wireless). Wifi : Util.Properties.Manager; -- Voip information (From api/v1/voip). Voip : Util.Properties.Manager; -- IPtv information (From api/v1/iptv). IPtv : Util.Properties.Manager; -- Hosts information (From api/v1/hosts). Hosts : Util.Properties.Manager; -- Current Device information (from api/v1/device). Device : Util.Properties.Manager; -- The Bbox API client. Client : Bbox.API.Client_Type; end record; type Gateway_Type_Access is access all Gateway_Type; -- Refresh the information by using the Bbox API. procedure Refresh (Gateway : in out Gateway_Type); package Gateway_Refs is new Util.Refs.References (Element_Type => Gateway_Type, Element_Access => Gateway_Type_Access); subtype Gateway_Ref is Gateway_Refs.Ref; function "=" (Left, Right : in Gateway_Ref) return Boolean; package Gateway_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Gateway_Ref, "=" => "="); subtype Gateway_Vector is Gateway_Vectors.Vector; subtype Gateway_Cursor is Gateway_Vectors.Cursor; package Gateway_Maps is new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => String, Element_Type => Gateway_Ref, Hash => Ada.Strings.Hash, Equivalent_Keys => "=", "=" => "="); -- Initalize the list of gateways from the property list. procedure Initialize (Config : in Util.Properties.Manager; List : in out Gateway_Vector); -- Save the list of gateways. procedure Save_Gateways (Config : in out Util.Properties.Manager; List : in Druss.Gateways.Gateway_Vector); -- Refresh the information by using the Bbox API. procedure Refresh (Gateway : in Gateway_Ref) with pre => not Gateway.Is_Null; type Iterate_Type is (ITER_ALL, ITER_ENABLE, ITER_DISABLE); -- Iterate over the list of gateways and execute the <tt>Process</tt> procedure. procedure Iterate (List : in Gateway_Vector; Mode : in Iterate_Type := ITER_ALL; Process : not null access procedure (G : in out Gateway_Type)); -- Find the gateway with the given IP address. function Find_IP (List : in Gateway_Vector; IP : in String) return Gateway_Ref; end Druss.Gateways;
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32H743x.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.DAC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR_TSEL1_Field is HAL.UInt3; subtype CR_WAVE1_Field is HAL.UInt2; subtype CR_MAMP1_Field is HAL.UInt4; subtype CR_TSEL2_Field is HAL.UInt3; subtype CR_WAVE2_Field is HAL.UInt2; subtype CR_MAMP2_Field is HAL.UInt4; -- DAC control register type CR_Register is record -- DAC channel1 enable This bit is set and cleared by software to -- enable/disable DAC channel1. EN1 : Boolean := False; -- DAC channel1 trigger enable TEN1 : Boolean := False; -- DAC channel1 trigger selection These bits select the external event -- used to trigger DAC channel1. Note: Only used if bit TEN1 = 1 (DAC -- channel1 trigger enabled). TSEL1 : CR_TSEL1_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- DAC channel1 noise/triangle wave generation enable These bits are set -- and cleared by software. Note: Only used if bit TEN1 = 1 (DAC -- channel1 trigger enabled). WAVE1 : CR_WAVE1_Field := 16#0#; -- DAC channel1 mask/amplitude selector These bits are written by -- software to select mask in wave generation mode or amplitude in -- triangle generation mode. = 1011: Unmask bits[11:0] of LFSR/ triangle -- amplitude equal to 4095 MAMP1 : CR_MAMP1_Field := 16#0#; -- DAC channel1 DMA enable This bit is set and cleared by software. DMAEN1 : Boolean := False; -- DAC channel1 DMA Underrun Interrupt enable This bit is set and -- cleared by software. DMAUDRIE1 : Boolean := False; -- DAC Channel 1 calibration enable This bit is set and cleared by -- software to enable/disable DAC channel 1 calibration, it can be -- written only if bit EN1=0 into DAC_CR (the calibration mode can be -- entered/exit only when the DAC channel is disabled) Otherwise, the -- write operation is ignored. CEN1 : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- DAC channel2 enable This bit is set and cleared by software to -- enable/disable DAC channel2. EN2 : Boolean := False; -- DAC channel2 trigger enable TEN2 : Boolean := False; -- DAC channel2 trigger selection These bits select the external event -- used to trigger DAC channel2 Note: Only used if bit TEN2 = 1 (DAC -- channel2 trigger enabled). TSEL2 : CR_TSEL2_Field := 16#0#; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- DAC channel2 noise/triangle wave generation enable These bits are -- set/reset by software. 1x: Triangle wave generation enabled Note: -- Only used if bit TEN2 = 1 (DAC channel2 trigger enabled) WAVE2 : CR_WAVE2_Field := 16#0#; -- DAC channel2 mask/amplitude selector These bits are written by -- software to select mask in wave generation mode or amplitude in -- triangle generation mode. = 1011: Unmask bits[11:0] of LFSR/ triangle -- amplitude equal to 4095 MAMP2 : CR_MAMP2_Field := 16#0#; -- DAC channel2 DMA enable This bit is set and cleared by software. DMAEN2 : Boolean := False; -- DAC channel2 DMA underrun interrupt enable This bit is set and -- cleared by software. DMAUDRIE2 : Boolean := False; -- DAC Channel 2 calibration enable This bit is set and cleared by -- software to enable/disable DAC channel 2 calibration, it can be -- written only if bit EN2=0 into DAC_CR (the calibration mode can be -- entered/exit only when the DAC channel is disabled) Otherwise, the -- write operation is ignored. CEN2 : Boolean := False; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record EN1 at 0 range 0 .. 0; TEN1 at 0 range 1 .. 1; TSEL1 at 0 range 2 .. 4; Reserved_5_5 at 0 range 5 .. 5; WAVE1 at 0 range 6 .. 7; MAMP1 at 0 range 8 .. 11; DMAEN1 at 0 range 12 .. 12; DMAUDRIE1 at 0 range 13 .. 13; CEN1 at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; EN2 at 0 range 16 .. 16; TEN2 at 0 range 17 .. 17; TSEL2 at 0 range 18 .. 20; Reserved_21_21 at 0 range 21 .. 21; WAVE2 at 0 range 22 .. 23; MAMP2 at 0 range 24 .. 27; DMAEN2 at 0 range 28 .. 28; DMAUDRIE2 at 0 range 29 .. 29; CEN2 at 0 range 30 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; -- SWTRGR_SWTRIG array type SWTRGR_SWTRIG_Field_Array is array (1 .. 2) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SWTRGR_SWTRIG type SWTRGR_SWTRIG_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SWTRIG as a value Val : HAL.UInt2; when True => -- SWTRIG as an array Arr : SWTRGR_SWTRIG_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SWTRGR_SWTRIG_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- DAC software trigger register type SWTRGR_Register is record -- Write-only. DAC channel1 software trigger This bit is set by software -- to trigger the DAC in software trigger mode. Note: This bit is -- cleared by hardware (one APB1 clock cycle later) once the DAC_DHR1 -- register value has been loaded into the DAC_DOR1 register. SWTRIG : SWTRGR_SWTRIG_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_31 : HAL.UInt30 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SWTRGR_Register use record SWTRIG at 0 range 0 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; subtype DHR12R1_DACC1DHR_Field is HAL.UInt12; -- DAC channel1 12-bit right-aligned data holding register type DHR12R1_Register is record -- DAC channel1 12-bit right-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel1. DACC1DHR : DHR12R1_DACC1DHR_Field := 16#0#; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR12R1_Register use record DACC1DHR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype DHR12L1_DACC1DHR_Field is HAL.UInt12; -- DAC channel1 12-bit left aligned data holding register type DHR12L1_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- DAC channel1 12-bit left-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel1. DACC1DHR : DHR12L1_DACC1DHR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR12L1_Register use record Reserved_0_3 at 0 range 0 .. 3; DACC1DHR at 0 range 4 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DHR8R1_DACC1DHR_Field is HAL.UInt8; -- DAC channel1 8-bit right aligned data holding register type DHR8R1_Register is record -- DAC channel1 8-bit right-aligned data These bits are written by -- software which specifies 8-bit data for DAC channel1. DACC1DHR : DHR8R1_DACC1DHR_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR8R1_Register use record DACC1DHR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype DHR12R2_DACC2DHR_Field is HAL.UInt12; -- DAC channel2 12-bit right aligned data holding register type DHR12R2_Register is record -- DAC channel2 12-bit right-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel2. DACC2DHR : DHR12R2_DACC2DHR_Field := 16#0#; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR12R2_Register use record DACC2DHR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype DHR12L2_DACC2DHR_Field is HAL.UInt12; -- DAC channel2 12-bit left aligned data holding register type DHR12L2_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- DAC channel2 12-bit left-aligned data These bits are written by -- software which specify 12-bit data for DAC channel2. DACC2DHR : DHR12L2_DACC2DHR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR12L2_Register use record Reserved_0_3 at 0 range 0 .. 3; DACC2DHR at 0 range 4 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DHR8R2_DACC2DHR_Field is HAL.UInt8; -- DAC channel2 8-bit right-aligned data holding register type DHR8R2_Register is record -- DAC channel2 8-bit right-aligned data These bits are written by -- software which specifies 8-bit data for DAC channel2. DACC2DHR : DHR8R2_DACC2DHR_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR8R2_Register use record DACC2DHR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype DHR12RD_DACC1DHR_Field is HAL.UInt12; subtype DHR12RD_DACC2DHR_Field is HAL.UInt12; -- Dual DAC 12-bit right-aligned data holding register type DHR12RD_Register is record -- DAC channel1 12-bit right-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel1. DACC1DHR : DHR12RD_DACC1DHR_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- DAC channel2 12-bit right-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel2. DACC2DHR : DHR12RD_DACC2DHR_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR12RD_Register use record DACC1DHR at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; DACC2DHR at 0 range 16 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype DHR12LD_DACC1DHR_Field is HAL.UInt12; subtype DHR12LD_DACC2DHR_Field is HAL.UInt12; -- DUAL DAC 12-bit left aligned data holding register type DHR12LD_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- DAC channel1 12-bit left-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel1. DACC1DHR : DHR12LD_DACC1DHR_Field := 16#0#; -- unspecified Reserved_16_19 : HAL.UInt4 := 16#0#; -- DAC channel2 12-bit left-aligned data These bits are written by -- software which specifies 12-bit data for DAC channel2. DACC2DHR : DHR12LD_DACC2DHR_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR12LD_Register use record Reserved_0_3 at 0 range 0 .. 3; DACC1DHR at 0 range 4 .. 15; Reserved_16_19 at 0 range 16 .. 19; DACC2DHR at 0 range 20 .. 31; end record; subtype DHR8RD_DACC1DHR_Field is HAL.UInt8; subtype DHR8RD_DACC2DHR_Field is HAL.UInt8; -- DUAL DAC 8-bit right aligned data holding register type DHR8RD_Register is record -- DAC channel1 8-bit right-aligned data These bits are written by -- software which specifies 8-bit data for DAC channel1. DACC1DHR : DHR8RD_DACC1DHR_Field := 16#0#; -- DAC channel2 8-bit right-aligned data These bits are written by -- software which specifies 8-bit data for DAC channel2. DACC2DHR : DHR8RD_DACC2DHR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DHR8RD_Register use record DACC1DHR at 0 range 0 .. 7; DACC2DHR at 0 range 8 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DOR1_DACC1DOR_Field is HAL.UInt12; -- DAC channel1 data output register type DOR1_Register is record -- Read-only. DAC channel1 data output These bits are read-only, they -- contain data output for DAC channel1. DACC1DOR : DOR1_DACC1DOR_Field; -- unspecified Reserved_12_31 : HAL.UInt20; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DOR1_Register use record DACC1DOR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype DOR2_DACC2DOR_Field is HAL.UInt12; -- DAC channel2 data output register type DOR2_Register is record -- Read-only. DAC channel2 data output These bits are read-only, they -- contain data output for DAC channel2. DACC2DOR : DOR2_DACC2DOR_Field; -- unspecified Reserved_12_31 : HAL.UInt20; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DOR2_Register use record DACC2DOR at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- DAC status register type SR_Register is record -- unspecified Reserved_0_12 : HAL.UInt13 := 16#0#; -- DAC channel1 DMA underrun flag This bit is set by hardware and -- cleared by software (by writing it to 1). DMAUDR1 : Boolean := False; -- Read-only. DAC Channel 1 calibration offset status This bit is set -- and cleared by hardware CAL_FLAG1 : Boolean := False; -- Read-only. DAC Channel 1 busy writing sample time flag This bit is -- systematically set just after Sample & Hold mode enable and is set -- each time the software writes the register DAC_SHSR1, It is cleared -- by hardware when the write operation of DAC_SHSR1 is complete. (It -- takes about 3LSI periods of synchronization). BWST1 : Boolean := False; -- unspecified Reserved_16_28 : HAL.UInt13 := 16#0#; -- DAC channel2 DMA underrun flag This bit is set by hardware and -- cleared by software (by writing it to 1). DMAUDR2 : Boolean := False; -- Read-only. DAC Channel 2 calibration offset status This bit is set -- and cleared by hardware CAL_FLAG2 : Boolean := False; -- Read-only. DAC Channel 2 busy writing sample time flag This bit is -- systematically set just after Sample & Hold mode enable and is set -- each time the software writes the register DAC_SHSR2, It is cleared -- by hardware when the write operation of DAC_SHSR2 is complete. (It -- takes about 3 LSI periods of synchronization). BWST2 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record Reserved_0_12 at 0 range 0 .. 12; DMAUDR1 at 0 range 13 .. 13; CAL_FLAG1 at 0 range 14 .. 14; BWST1 at 0 range 15 .. 15; Reserved_16_28 at 0 range 16 .. 28; DMAUDR2 at 0 range 29 .. 29; CAL_FLAG2 at 0 range 30 .. 30; BWST2 at 0 range 31 .. 31; end record; subtype CCR_OTRIM1_Field is HAL.UInt5; subtype CCR_OTRIM2_Field is HAL.UInt5; -- DAC calibration control register type CCR_Register is record -- DAC Channel 1 offset trimming value OTRIM1 : CCR_OTRIM1_Field := 16#0#; -- unspecified Reserved_5_15 : HAL.UInt11 := 16#0#; -- DAC Channel 2 offset trimming value OTRIM2 : CCR_OTRIM2_Field := 16#0#; -- unspecified Reserved_21_31 : HAL.UInt11 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record OTRIM1 at 0 range 0 .. 4; Reserved_5_15 at 0 range 5 .. 15; OTRIM2 at 0 range 16 .. 20; Reserved_21_31 at 0 range 21 .. 31; end record; subtype MCR_MODE1_Field is HAL.UInt3; subtype MCR_MODE2_Field is HAL.UInt3; -- DAC mode control register type MCR_Register is record -- DAC Channel 1 mode These bits can be written only when the DAC is -- disabled and not in the calibration mode (when bit EN1=0 and bit CEN1 -- =0 in the DAC_CR register). If EN1=1 or CEN1 =1 the write operation -- is ignored. They can be set and cleared by software to select the DAC -- Channel 1 mode: DAC Channel 1 in normal Mode DAC Channel 1 in sample -- &amp; hold mode MODE1 : MCR_MODE1_Field := 16#0#; -- unspecified Reserved_3_15 : HAL.UInt13 := 16#0#; -- DAC Channel 2 mode These bits can be written only when the DAC is -- disabled and not in the calibration mode (when bit EN2=0 and bit CEN2 -- =0 in the DAC_CR register). If EN2=1 or CEN2 =1 the write operation -- is ignored. They can be set and cleared by software to select the DAC -- Channel 2 mode: DAC Channel 2 in normal Mode DAC Channel 2 in sample -- &amp; hold mode MODE2 : MCR_MODE2_Field := 16#0#; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for MCR_Register use record MODE1 at 0 range 0 .. 2; Reserved_3_15 at 0 range 3 .. 15; MODE2 at 0 range 16 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; subtype SHSR1_TSAMPLE1_Field is HAL.UInt10; -- DAC Sample and Hold sample time register 1 type SHSR1_Register is record -- DAC Channel 1 sample Time (only valid in sample &amp; hold mode) -- These bits can be written when the DAC channel1 is disabled or also -- during normal operation. in the latter case, the write can be done -- only when BWSTx of DAC_SR register is low, If BWSTx=1, the write -- operation is ignored. TSAMPLE1 : SHSR1_TSAMPLE1_Field := 16#0#; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SHSR1_Register use record TSAMPLE1 at 0 range 0 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; subtype SHSR2_TSAMPLE2_Field is HAL.UInt10; -- DAC Sample and Hold sample time register 2 type SHSR2_Register is record -- DAC Channel 2 sample Time (only valid in sample &amp; hold mode) -- These bits can be written when the DAC channel2 is disabled or also -- during normal operation. in the latter case, the write can be done -- only when BWSTx of DAC_SR register is low, if BWSTx=1, the write -- operation is ignored. TSAMPLE2 : SHSR2_TSAMPLE2_Field := 16#0#; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SHSR2_Register use record TSAMPLE2 at 0 range 0 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; subtype SHHR_THOLD1_Field is HAL.UInt10; subtype SHHR_THOLD2_Field is HAL.UInt10; -- DAC Sample and Hold hold time register type SHHR_Register is record -- DAC Channel 1 hold Time (only valid in sample &amp; hold mode) Hold -- time= (THOLD[9:0]) x T LSI THOLD1 : SHHR_THOLD1_Field := 16#1#; -- unspecified Reserved_10_15 : HAL.UInt6 := 16#0#; -- DAC Channel 2 hold time (only valid in sample &amp; hold mode). Hold -- time= (THOLD[9:0]) x T LSI THOLD2 : SHHR_THOLD2_Field := 16#1#; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SHHR_Register use record THOLD1 at 0 range 0 .. 9; Reserved_10_15 at 0 range 10 .. 15; THOLD2 at 0 range 16 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; subtype SHRR_TREFRESH1_Field is HAL.UInt8; subtype SHRR_TREFRESH2_Field is HAL.UInt8; -- DAC Sample and Hold refresh time register type SHRR_Register is record -- DAC Channel 1 refresh Time (only valid in sample &amp; hold mode) -- Refresh time= (TREFRESH[7:0]) x T LSI TREFRESH1 : SHRR_TREFRESH1_Field := 16#1#; -- unspecified Reserved_8_15 : HAL.UInt8 := 16#0#; -- DAC Channel 2 refresh Time (only valid in sample &amp; hold mode) -- Refresh time= (TREFRESH[7:0]) x T LSI TREFRESH2 : SHRR_TREFRESH2_Field := 16#1#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SHRR_Register use record TREFRESH1 at 0 range 0 .. 7; Reserved_8_15 at 0 range 8 .. 15; TREFRESH2 at 0 range 16 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- DAC type DAC_Peripheral is record -- DAC control register CR : aliased CR_Register; -- DAC software trigger register SWTRGR : aliased SWTRGR_Register; -- DAC channel1 12-bit right-aligned data holding register DHR12R1 : aliased DHR12R1_Register; -- DAC channel1 12-bit left aligned data holding register DHR12L1 : aliased DHR12L1_Register; -- DAC channel1 8-bit right aligned data holding register DHR8R1 : aliased DHR8R1_Register; -- DAC channel2 12-bit right aligned data holding register DHR12R2 : aliased DHR12R2_Register; -- DAC channel2 12-bit left aligned data holding register DHR12L2 : aliased DHR12L2_Register; -- DAC channel2 8-bit right-aligned data holding register DHR8R2 : aliased DHR8R2_Register; -- Dual DAC 12-bit right-aligned data holding register DHR12RD : aliased DHR12RD_Register; -- DUAL DAC 12-bit left aligned data holding register DHR12LD : aliased DHR12LD_Register; -- DUAL DAC 8-bit right aligned data holding register DHR8RD : aliased DHR8RD_Register; -- DAC channel1 data output register DOR1 : aliased DOR1_Register; -- DAC channel2 data output register DOR2 : aliased DOR2_Register; -- DAC status register SR : aliased SR_Register; -- DAC calibration control register CCR : aliased CCR_Register; -- DAC mode control register MCR : aliased MCR_Register; -- DAC Sample and Hold sample time register 1 SHSR1 : aliased SHSR1_Register; -- DAC Sample and Hold sample time register 2 SHSR2 : aliased SHSR2_Register; -- DAC Sample and Hold hold time register SHHR : aliased SHHR_Register; -- DAC Sample and Hold refresh time register SHRR : aliased SHRR_Register; end record with Volatile; for DAC_Peripheral use record CR at 16#0# range 0 .. 31; SWTRGR at 16#4# range 0 .. 31; DHR12R1 at 16#8# range 0 .. 31; DHR12L1 at 16#C# range 0 .. 31; DHR8R1 at 16#10# range 0 .. 31; DHR12R2 at 16#14# range 0 .. 31; DHR12L2 at 16#18# range 0 .. 31; DHR8R2 at 16#1C# range 0 .. 31; DHR12RD at 16#20# range 0 .. 31; DHR12LD at 16#24# range 0 .. 31; DHR8RD at 16#28# range 0 .. 31; DOR1 at 16#2C# range 0 .. 31; DOR2 at 16#30# range 0 .. 31; SR at 16#34# range 0 .. 31; CCR at 16#38# range 0 .. 31; MCR at 16#3C# range 0 .. 31; SHSR1 at 16#40# range 0 .. 31; SHSR2 at 16#44# range 0 .. 31; SHHR at 16#48# range 0 .. 31; SHRR at 16#4C# range 0 .. 31; end record; -- DAC DAC_Periph : aliased DAC_Peripheral with Import, Address => DAC_Base; end STM32_SVD.DAC;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.CMOF.Namespaces.Collections is pragma Preelaborate; package CMOF_Namespace_Collections is new AMF.Generic_Collections (CMOF_Namespace, CMOF_Namespace_Access); type Set_Of_CMOF_Namespace is new CMOF_Namespace_Collections.Set with null record; Empty_Set_Of_CMOF_Namespace : constant Set_Of_CMOF_Namespace; type Ordered_Set_Of_CMOF_Namespace is new CMOF_Namespace_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_CMOF_Namespace : constant Ordered_Set_Of_CMOF_Namespace; type Bag_Of_CMOF_Namespace is new CMOF_Namespace_Collections.Bag with null record; Empty_Bag_Of_CMOF_Namespace : constant Bag_Of_CMOF_Namespace; type Sequence_Of_CMOF_Namespace is new CMOF_Namespace_Collections.Sequence with null record; Empty_Sequence_Of_CMOF_Namespace : constant Sequence_Of_CMOF_Namespace; private Empty_Set_Of_CMOF_Namespace : constant Set_Of_CMOF_Namespace := (CMOF_Namespace_Collections.Set with null record); Empty_Ordered_Set_Of_CMOF_Namespace : constant Ordered_Set_Of_CMOF_Namespace := (CMOF_Namespace_Collections.Ordered_Set with null record); Empty_Bag_Of_CMOF_Namespace : constant Bag_Of_CMOF_Namespace := (CMOF_Namespace_Collections.Bag with null record); Empty_Sequence_Of_CMOF_Namespace : constant Sequence_Of_CMOF_Namespace := (CMOF_Namespace_Collections.Sequence with null record); end AMF.CMOF.Namespaces.Collections;
-- Auto_Counters_Suite.Unique_Ptrs_Tests -- Unit tests for Auto_Counters Unique_Ptrs package -- Copyright (c) 2016, James Humphry - see LICENSE file for details with AUnit; use AUnit; with AUnit.Test_Cases; use AUnit.Test_Cases; package Auto_Counters_Suite.Unique_Ptrs_Tests is type Unique_Ptrs_Test is new Test_Cases.Test_Case with null record; procedure Register_Tests (T: in out Unique_Ptrs_Test); function Name (T : Unique_Ptrs_Test) return Test_String; procedure Set_Up (T : in out Unique_Ptrs_Test); procedure Check_Unique_Ptrs (T : in out Test_Cases.Test_Case'Class); procedure Check_Unique_Const_Ptrs (T : in out Test_Cases.Test_Case'Class); end Auto_Counters_Suite.Unique_Ptrs_Tests;
-- C74401Q.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT OUT PARAMETERS HAVING A LIMITED PRIVATE TYPE CAN BE -- DECLARED FOR A GENERIC SUBPROGRAM IN A PACKAGE SPECIFICATION, -- INCLUDING WITHIN PACKAGES NESTED IN A VISIBLE PART. -- JBG 5/1/85 WITH REPORT; USE REPORT; PROCEDURE C74401Q IS PACKAGE PKG IS TYPE LP IS LIMITED PRIVATE; GENERIC PROCEDURE P20 (X : OUT LP); -- OK. PROCEDURE RESET (X : OUT LP); FUNCTION EQ (L, R : LP) RETURN BOOLEAN; VAL1 : CONSTANT LP; PACKAGE NESTED IS GENERIC PROCEDURE NEST1 (X : OUT LP); PRIVATE GENERIC PROCEDURE NEST2 (X : OUT LP); END NESTED; PRIVATE TYPE LP IS NEW INTEGER; VAL1 : CONSTANT LP := LP(IDENT_INT(3)); END PKG; VAR : PKG.LP; PACKAGE BODY PKG IS PROCEDURE P20 (X : OUT LP) IS BEGIN X := 3; END P20; PROCEDURE RESET (X : OUT LP) IS BEGIN X := 0; END RESET; FUNCTION EQ (L, R : LP) RETURN BOOLEAN IS BEGIN RETURN L = R; END EQ; PACKAGE BODY NESTED IS PROCEDURE NEST1 (X : OUT LP) IS BEGIN X := 3; END NEST1; PROCEDURE NEST2 (X : OUT LP) IS BEGIN X := LP(IDENT_INT(3)); END NEST2; END NESTED; BEGIN VAR := LP(IDENT_INT(0)); END PKG; PACKAGE INSTANCES IS PROCEDURE NP20 IS NEW PKG.P20; PROCEDURE NNEST1 IS NEW PKG.NESTED.NEST1; END INSTANCES; USE INSTANCES; PACKAGE PKG1 IS PROCEDURE P21 (X : OUT PKG.LP) RENAMES INSTANCES.NP20; END PKG1; BEGIN TEST ("C74401Q", "CHECK THAT A PROCEDURE CAN HAVE AN OUT " & "PARAMETER WITH A LIMITED PRIVATE TYPE"); PKG.RESET (VAR); NP20 (VAR); IF NOT PKG.EQ (VAR, PKG.VAL1) THEN FAILED ("DIRECT CALL NOT CORRECT"); END IF; PKG.RESET (VAR); PKG1.P21 (VAR); IF NOT PKG.EQ (VAR, PKG.VAL1) THEN FAILED ("RENAMED CALL NOT CORRECT"); END IF; RESULT; END C74401Q;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.STRINGS.UNBOUNDED.EQUAL_CASE_INSENSITIVE -- -- -- -- S p e c -- -- -- -- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ function Ada.Strings.Unbounded.Equal_Case_Insensitive (Left, Right : Unbounded.Unbounded_String) return Boolean; pragma Preelaborate (Ada.Strings.Unbounded.Equal_Case_Insensitive);
-- This file is generated by SWIG. Do *not* modify by hand. -- package LLVM_bit_Reader is end LLVM_bit_Reader;
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a GNU/Linux (GNU/LinuxThreads) version of this package -- This package contains all the GNULL primitives that interface directly with -- the underlying OS. with Interfaces.C; use Interfaces; use type Interfaces.C.int; with System.Task_Info; with System.Tasking.Debug; with System.Interrupt_Management; with System.OS_Constants; with System.OS_Primitives; with System.Multiprocessors; with System.Soft_Links; -- We use System.Soft_Links instead of System.Tasking.Initialization -- because the later is a higher level package that we shouldn't depend on. -- For example when using the restricted run time, it is replaced by -- System.Tasking.Restricted.Stages. package body System.Task_Primitives.Operations is package OSC renames System.OS_Constants; package SSL renames System.Soft_Links; use System.Tasking.Debug; use System.Tasking; use System.OS_Interface; use System.Parameters; use System.OS_Primitives; use System.Task_Info; ---------------- -- Local Data -- ---------------- -- The followings are logically constants, but need to be initialized -- at run time. Single_RTS_Lock : aliased RTS_Lock; -- This is a lock to allow only one thread of control in the RTS at -- a time; it is used to execute in mutual exclusion from all other tasks. -- Used to protect All_Tasks_List Environment_Task_Id : Task_Id; -- A variable to hold Task_Id for the environment task Unblocked_Signal_Mask : aliased sigset_t; -- The set of signals that should be unblocked in all tasks -- The followings are internal configuration constants needed Next_Serial_Number : Task_Serial_Number := 100; -- We start at 100 (reserve some special values for using in error checks) Time_Slice_Val : Integer; pragma Import (C, Time_Slice_Val, "__gl_time_slice_val"); Dispatching_Policy : Character; pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy"); Locking_Policy : Character; pragma Import (C, Locking_Policy, "__gl_locking_policy"); Foreign_Task_Elaborated : aliased Boolean := True; -- Used to identified fake tasks (i.e., non-Ada Threads) Use_Alternate_Stack : constant Boolean := Alternate_Stack_Size /= 0; -- Whether to use an alternate signal stack for stack overflows Abort_Handler_Installed : Boolean := False; -- True if a handler for the abort signal is installed Null_Thread_Id : constant pthread_t := pthread_t'Last; -- Constant to indicate that the thread identifier has not yet been -- initialized. -------------------- -- Local Packages -- -------------------- package Specific is procedure Initialize (Environment_Task : Task_Id); pragma Inline (Initialize); -- Initialize various data needed by this package function Is_Valid_Task return Boolean; pragma Inline (Is_Valid_Task); -- Does executing thread have a TCB? procedure Set (Self_Id : Task_Id); pragma Inline (Set); -- Set the self id for the current task function Self return Task_Id; pragma Inline (Self); -- Return a pointer to the Ada Task Control Block of the calling task end Specific; package body Specific is separate; -- The body of this package is target specific package Monotonic is function Monotonic_Clock return Duration; pragma Inline (Monotonic_Clock); -- Returns an absolute time, represented as an offset relative to some -- unspecified starting point, typically system boot time. This clock is -- not affected by discontinuous jumps in the system time. function RT_Resolution return Duration; pragma Inline (RT_Resolution); -- Returns resolution of the underlying clock used to implement RT_Clock procedure Timed_Sleep (Self_ID : ST.Task_Id; Time : Duration; Mode : ST.Delay_Modes; Reason : System.Tasking.Task_States; Timedout : out Boolean; Yielded : out Boolean); -- Combination of Sleep (above) and Timed_Delay procedure Timed_Delay (Self_ID : ST.Task_Id; Time : Duration; Mode : ST.Delay_Modes); -- Implement the semantics of the delay statement. -- The caller should be abort-deferred and should not hold any locks. end Monotonic; package body Monotonic is separate; ---------------------------------- -- ATCB allocation/deallocation -- ---------------------------------- package body ATCB_Allocation is separate; -- The body of this package is shared across several targets --------------------------------- -- Support for foreign threads -- --------------------------------- function Register_Foreign_Thread (Thread : Thread_Id; Sec_Stack_Size : Size_Type := Unspecified_Size) return Task_Id; -- Allocate and initialize a new ATCB for the current Thread. The size of -- the secondary stack can be optionally specified. function Register_Foreign_Thread (Thread : Thread_Id; Sec_Stack_Size : Size_Type := Unspecified_Size) return Task_Id is separate; ----------------------- -- Local Subprograms -- ----------------------- procedure Abort_Handler (signo : Signal); function GNAT_pthread_condattr_setup (attr : access pthread_condattr_t) return C.int; pragma Import (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup"); function GNAT_has_cap_sys_nice return C.int; pragma Import (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice"); -- We do not have pragma Linker_Options ("-lcap"); here, because this -- library is not present on many Linux systems. 'libcap' is the Linux -- "capabilities" library, called by __gnat_has_cap_sys_nice. function Prio_To_Linux_Prio (Prio : Any_Priority) return C.int is (C.int (Prio) + 1); -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on -- GNU/Linux, so we map 0 .. 98 to 1 .. 99. function Get_Ceiling_Support return Boolean; -- Get the value of the Ceiling_Support constant (see below). -- Note well: If this function or related code is modified, it should be -- tested by hand, because automated testing doesn't exercise it. ------------------------- -- Get_Ceiling_Support -- ------------------------- function Get_Ceiling_Support return Boolean is Ceiling_Support : Boolean := False; begin if Locking_Policy /= 'C' then return False; end if; declare function geteuid return Integer; pragma Import (C, geteuid, "geteuid"); Superuser : constant Boolean := geteuid = 0; Has_Cap : constant C.int := GNAT_has_cap_sys_nice; pragma Assert (Has_Cap in 0 | 1); begin Ceiling_Support := Superuser or else Has_Cap = 1; end; return Ceiling_Support; end Get_Ceiling_Support; pragma Warnings (Off, "non-preelaborable call not allowed*"); Ceiling_Support : constant Boolean := Get_Ceiling_Support; pragma Warnings (On, "non-preelaborable call not allowed*"); -- True if the locking policy is Ceiling_Locking, and the current process -- has permission to use this policy. The process has permission if it is -- running as 'root', or if the capability was set by the setcap command, -- as in "sudo /sbin/setcap cap_sys_nice=ep exe_file". If it doesn't have -- permission, then a request for Ceiling_Locking is ignored. type RTS_Lock_Ptr is not null access all RTS_Lock; function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int; -- Initialize the mutex L. If Ceiling_Support is True, then set the ceiling -- to Prio. Returns 0 for success, or ENOMEM for out-of-memory. ------------------- -- Abort_Handler -- ------------------- procedure Abort_Handler (signo : Signal) is pragma Unreferenced (signo); Self_Id : constant Task_Id := Self; Result : C.int; Old_Set : aliased sigset_t; begin -- It's not safe to raise an exception when using GCC ZCX mechanism. -- Note that we still need to install a signal handler, since in some -- cases (e.g. shutdown of the Server_Task in System.Interrupts) we -- need to send the Abort signal to a task. if ZCX_By_Default then return; end if; if Self_Id.Deferral_Level = 0 and then Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level and then not Self_Id.Aborting then Self_Id.Aborting := True; -- Make sure signals used for RTS internal purpose are unmasked Result := pthread_sigmask (SIG_UNBLOCK, Unblocked_Signal_Mask'Access, Old_Set'Access); pragma Assert (Result = 0); raise Standard'Abort_Signal; end if; end Abort_Handler; -------------- -- Lock_RTS -- -------------- procedure Lock_RTS is begin Write_Lock (Single_RTS_Lock'Access); end Lock_RTS; ---------------- -- Unlock_RTS -- ---------------- procedure Unlock_RTS is begin Unlock (Single_RTS_Lock'Access); end Unlock_RTS; ----------------- -- Stack_Guard -- ----------------- -- The underlying thread system extends the memory (up to 2MB) when needed procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is pragma Unreferenced (T); pragma Unreferenced (On); begin null; end Stack_Guard; -------------------- -- Get_Thread_Id -- -------------------- function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is begin return T.Common.LL.Thread; end Get_Thread_Id; ---------- -- Self -- ---------- function Self return Task_Id renames Specific.Self; ---------------- -- Init_Mutex -- ---------------- function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is Mutex_Attr : aliased pthread_mutexattr_t; Result, Result_2 : C.int; begin Result := pthread_mutexattr_init (Mutex_Attr'Access); pragma Assert (Result in 0 | ENOMEM); if Result = ENOMEM then return Result; end if; if Ceiling_Support then Result := pthread_mutexattr_setprotocol (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT); pragma Assert (Result = 0); Result := pthread_mutexattr_setprioceiling (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio)); pragma Assert (Result = 0); elsif Locking_Policy = 'I' then Result := pthread_mutexattr_setprotocol (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT); pragma Assert (Result = 0); end if; Result := pthread_mutex_init (L, Mutex_Attr'Access); pragma Assert (Result in 0 | ENOMEM); Result_2 := pthread_mutexattr_destroy (Mutex_Attr'Access); pragma Assert (Result_2 = 0); return Result; -- of pthread_mutex_init, not pthread_mutexattr_destroy end Init_Mutex; --------------------- -- Initialize_Lock -- --------------------- -- Note: mutexes and cond_variables needed per-task basis are initialized -- in Initialize_TCB and the Storage_Error is handled. Other mutexes (such -- as RTS_Lock, Memory_Lock...) used in RTS is initialized before any -- status change of RTS. Therefore raising Storage_Error in the following -- routines should be able to be handled safely. procedure Initialize_Lock (Prio : Any_Priority; L : not null access Lock) is begin if Locking_Policy = 'R' then declare RWlock_Attr : aliased pthread_rwlockattr_t; Result : C.int; begin -- Set the rwlock to prefer writer to avoid writers starvation Result := pthread_rwlockattr_init (RWlock_Attr'Access); pragma Assert (Result = 0); Result := pthread_rwlockattr_setkind_np (RWlock_Attr'Access, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); pragma Assert (Result = 0); Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access); pragma Assert (Result in 0 | ENOMEM); if Result = ENOMEM then raise Storage_Error with "Failed to allocate a lock"; end if; end; else if Init_Mutex (L.WO'Access, Prio) = ENOMEM then raise Storage_Error with "Failed to allocate a lock"; end if; end if; end Initialize_Lock; procedure Initialize_Lock (L : not null access RTS_Lock; Level : Lock_Level) is pragma Unreferenced (Level); begin if Init_Mutex (L.all'Access, Any_Priority'Last) = ENOMEM then raise Storage_Error with "Failed to allocate a lock"; end if; end Initialize_Lock; ------------------- -- Finalize_Lock -- ------------------- procedure Finalize_Lock (L : not null access Lock) is Result : C.int; begin if Locking_Policy = 'R' then Result := pthread_rwlock_destroy (L.RW'Access); else Result := pthread_mutex_destroy (L.WO'Access); end if; pragma Assert (Result = 0); end Finalize_Lock; procedure Finalize_Lock (L : not null access RTS_Lock) is Result : C.int; begin Result := pthread_mutex_destroy (L); pragma Assert (Result = 0); end Finalize_Lock; ---------------- -- Write_Lock -- ---------------- procedure Write_Lock (L : not null access Lock; Ceiling_Violation : out Boolean) is Result : C.int; begin if Locking_Policy = 'R' then Result := pthread_rwlock_wrlock (L.RW'Access); else Result := pthread_mutex_lock (L.WO'Access); end if; -- The cause of EINVAL is a priority ceiling violation pragma Assert (Result in 0 | EINVAL); Ceiling_Violation := Result = EINVAL; end Write_Lock; procedure Write_Lock (L : not null access RTS_Lock) is Result : C.int; begin Result := pthread_mutex_lock (L); pragma Assert (Result = 0); end Write_Lock; procedure Write_Lock (T : Task_Id) is Result : C.int; begin Result := pthread_mutex_lock (T.Common.LL.L'Access); pragma Assert (Result = 0); end Write_Lock; --------------- -- Read_Lock -- --------------- procedure Read_Lock (L : not null access Lock; Ceiling_Violation : out Boolean) is Result : C.int; begin if Locking_Policy = 'R' then Result := pthread_rwlock_rdlock (L.RW'Access); else Result := pthread_mutex_lock (L.WO'Access); end if; -- The cause of EINVAL is a priority ceiling violation pragma Assert (Result in 0 | EINVAL); Ceiling_Violation := Result = EINVAL; end Read_Lock; ------------ -- Unlock -- ------------ procedure Unlock (L : not null access Lock) is Result : C.int; begin if Locking_Policy = 'R' then Result := pthread_rwlock_unlock (L.RW'Access); else Result := pthread_mutex_unlock (L.WO'Access); end if; pragma Assert (Result = 0); end Unlock; procedure Unlock (L : not null access RTS_Lock) is Result : C.int; begin Result := pthread_mutex_unlock (L); pragma Assert (Result = 0); end Unlock; procedure Unlock (T : Task_Id) is Result : C.int; begin Result := pthread_mutex_unlock (T.Common.LL.L'Access); pragma Assert (Result = 0); end Unlock; ----------------- -- Set_Ceiling -- ----------------- -- Dynamic priority ceilings are not supported by the underlying system procedure Set_Ceiling (L : not null access Lock; Prio : Any_Priority) is pragma Unreferenced (L, Prio); begin null; end Set_Ceiling; ----------- -- Sleep -- ----------- procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); Result : C.int; begin pragma Assert (Self_ID = Self); Result := pthread_cond_wait (cond => Self_ID.Common.LL.CV'Access, mutex => Self_ID.Common.LL.L'Access); -- EINTR is not considered a failure pragma Assert (Result in 0 | EINTR); end Sleep; ----------------- -- Timed_Sleep -- ----------------- -- This is for use within the run-time system, so abort is -- assumed to be already deferred, and the caller should be -- holding its own ATCB lock. procedure Timed_Sleep (Self_ID : Task_Id; Time : Duration; Mode : ST.Delay_Modes; Reason : System.Tasking.Task_States; Timedout : out Boolean; Yielded : out Boolean) renames Monotonic.Timed_Sleep; ----------------- -- Timed_Delay -- ----------------- -- This is for use in implementing delay statements, so we assume the -- caller is abort-deferred but is holding no locks. procedure Timed_Delay (Self_ID : Task_Id; Time : Duration; Mode : ST.Delay_Modes) renames Monotonic.Timed_Delay; --------------------- -- Monotonic_Clock -- --------------------- function Monotonic_Clock return Duration renames Monotonic.Monotonic_Clock; ------------------- -- RT_Resolution -- ------------------- function RT_Resolution return Duration renames Monotonic.RT_Resolution; ------------ -- Wakeup -- ------------ procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); Result : C.int; begin Result := pthread_cond_signal (T.Common.LL.CV'Access); pragma Assert (Result = 0); end Wakeup; ----------- -- Yield -- ----------- procedure Yield (Do_Yield : Boolean := True) is Result : C.int; pragma Unreferenced (Result); begin if Do_Yield then Result := sched_yield; end if; end Yield; ------------------ -- Set_Priority -- ------------------ procedure Set_Priority (T : Task_Id; Prio : Any_Priority; Loss_Of_Inheritance : Boolean := False) is pragma Unreferenced (Loss_Of_Inheritance); Result : C.int; Param : aliased struct_sched_param; function Get_Policy (Prio : Any_Priority) return Character; pragma Import (C, Get_Policy, "__gnat_get_specific_dispatching"); -- Get priority specific dispatching policy Priority_Specific_Policy : constant Character := Get_Policy (Prio); -- Upper case first character of the policy name corresponding to the -- task as set by a Priority_Specific_Dispatching pragma. begin T.Common.Current_Priority := Prio; Param.sched_priority := Prio_To_Linux_Prio (Prio); if Dispatching_Policy = 'R' or else Priority_Specific_Policy = 'R' or else Time_Slice_Val > 0 then Result := pthread_setschedparam (T.Common.LL.Thread, SCHED_RR, Param'Access); elsif Dispatching_Policy = 'F' or else Priority_Specific_Policy = 'F' or else Time_Slice_Val = 0 then Result := pthread_setschedparam (T.Common.LL.Thread, SCHED_FIFO, Param'Access); else Param.sched_priority := 0; Result := pthread_setschedparam (T.Common.LL.Thread, SCHED_OTHER, Param'Access); end if; pragma Assert (Result in 0 | EPERM | EINVAL); end Set_Priority; ------------------ -- Get_Priority -- ------------------ function Get_Priority (T : Task_Id) return Any_Priority is begin return T.Common.Current_Priority; end Get_Priority; ---------------- -- Enter_Task -- ---------------- procedure Enter_Task (Self_ID : Task_Id) is begin if Self_ID.Common.Task_Info /= null and then Self_ID.Common.Task_Info.CPU_Affinity = No_CPU then raise Invalid_CPU_Number; end if; Self_ID.Common.LL.Thread := pthread_self; Self_ID.Common.LL.LWP := lwp_self; -- Set thread name to ease debugging. If the name of the task is -- "foreign thread" (as set by Register_Foreign_Thread) retrieve -- the name of the thread and update the name of the task instead. if Self_ID.Common.Task_Image_Len = 14 and then Self_ID.Common.Task_Image (1 .. 14) = "foreign thread" then declare Thread_Name : String (1 .. 16); -- PR_GET_NAME returns a string of up to 16 bytes Len : Natural := 0; -- Length of the task name contained in Task_Name Result : C.int; -- Result from the prctl call begin Result := prctl (PR_GET_NAME, unsigned_long (Thread_Name'Address)); pragma Assert (Result = 0); -- Find the length of the given name for J in Thread_Name'Range loop if Thread_Name (J) /= ASCII.NUL then Len := Len + 1; else exit; end if; end loop; -- Cover the odd situation where someone decides to change -- Parameters.Max_Task_Image_Length to less than 16 characters. if Len > Parameters.Max_Task_Image_Length then Len := Parameters.Max_Task_Image_Length; end if; -- Copy the name of the thread to the task's ATCB Self_ID.Common.Task_Image (1 .. Len) := Thread_Name (1 .. Len); Self_ID.Common.Task_Image_Len := Len; end; elsif Self_ID.Common.Task_Image_Len > 0 then declare Task_Name : String (1 .. Parameters.Max_Task_Image_Length + 1); Result : C.int; begin Task_Name (1 .. Self_ID.Common.Task_Image_Len) := Self_ID.Common.Task_Image (1 .. Self_ID.Common.Task_Image_Len); Task_Name (Self_ID.Common.Task_Image_Len + 1) := ASCII.NUL; Result := prctl (PR_SET_NAME, unsigned_long (Task_Name'Address)); pragma Assert (Result = 0); end; end if; Specific.Set (Self_ID); if Use_Alternate_Stack and then Self_ID.Common.Task_Alternate_Stack /= Null_Address then declare Stack : aliased stack_t; Result : C.int; begin Stack.ss_sp := Self_ID.Common.Task_Alternate_Stack; Stack.ss_size := Alternate_Stack_Size; Stack.ss_flags := 0; Result := sigaltstack (Stack'Access, null); pragma Assert (Result = 0); end; end if; end Enter_Task; ------------------- -- Is_Valid_Task -- ------------------- function Is_Valid_Task return Boolean renames Specific.Is_Valid_Task; ----------------------------- -- Register_Foreign_Thread -- ----------------------------- function Register_Foreign_Thread return Task_Id is begin if Is_Valid_Task then return Self; else return Register_Foreign_Thread (pthread_self); end if; end Register_Foreign_Thread; -------------------- -- Initialize_TCB -- -------------------- procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is Result : C.int; Cond_Attr : aliased pthread_condattr_t; begin -- Give the task a unique serial number Self_ID.Serial_Number := Next_Serial_Number; Next_Serial_Number := Next_Serial_Number + 1; pragma Assert (Next_Serial_Number /= 0); Self_ID.Common.LL.Thread := Null_Thread_Id; if Init_Mutex (Self_ID.Common.LL.L'Access, Any_Priority'Last) /= 0 then Succeeded := False; return; end if; Result := pthread_condattr_init (Cond_Attr'Access); pragma Assert (Result in 0 | ENOMEM); if Result = 0 then Result := GNAT_pthread_condattr_setup (Cond_Attr'Access); pragma Assert (Result = 0); Result := pthread_cond_init (Self_ID.Common.LL.CV'Access, Cond_Attr'Access); pragma Assert (Result in 0 | ENOMEM); end if; if Result = 0 then Succeeded := True; else Result := pthread_mutex_destroy (Self_ID.Common.LL.L'Access); pragma Assert (Result = 0); Succeeded := False; end if; Result := pthread_condattr_destroy (Cond_Attr'Access); pragma Assert (Result = 0); end Initialize_TCB; ----------------- -- Create_Task -- ----------------- procedure Create_Task (T : Task_Id; Wrapper : System.Address; Stack_Size : System.Parameters.Size_Type; Priority : Any_Priority; Succeeded : out Boolean) is Thread_Attr : aliased pthread_attr_t; Adjusted_Stack_Size : C.size_t; Result : C.int; use type Multiprocessors.CPU_Range, Interfaces.C.size_t; begin -- Check whether both Dispatching_Domain and CPU are specified for -- the task, and the CPU value is not contained within the range of -- processors for the domain. if T.Common.Domain /= null and then T.Common.Base_CPU /= Multiprocessors.Not_A_Specific_CPU and then (T.Common.Base_CPU not in T.Common.Domain'Range or else not T.Common.Domain (T.Common.Base_CPU)) then Succeeded := False; return; end if; Adjusted_Stack_Size := C.size_t (Stack_Size + Alternate_Stack_Size); Result := pthread_attr_init (Thread_Attr'Access); pragma Assert (Result in 0 | ENOMEM); if Result /= 0 then Succeeded := False; return; end if; Result := pthread_attr_setstacksize (Thread_Attr'Access, Adjusted_Stack_Size); pragma Assert (Result = 0); Result := pthread_attr_setdetachstate (Thread_Attr'Access, PTHREAD_CREATE_DETACHED); pragma Assert (Result = 0); -- Set the required attributes for the creation of the thread -- Note: Previously, we called pthread_setaffinity_np (after thread -- creation but before thread activation) to set the affinity but it was -- not behaving as expected. Setting the required attributes for the -- creation of the thread works correctly and it is more appropriate. -- Do nothing if required support not provided by the operating system if pthread_attr_setaffinity_np'Address = Null_Address then null; -- Support is available elsif T.Common.Base_CPU /= Multiprocessors.Not_A_Specific_CPU then declare CPUs : constant size_t := C.size_t (Multiprocessors.Number_Of_CPUs); CPU_Set : constant cpu_set_t_ptr := CPU_ALLOC (CPUs); Size : constant size_t := CPU_ALLOC_SIZE (CPUs); begin CPU_ZERO (Size, CPU_Set); System.OS_Interface.CPU_SET (int (T.Common.Base_CPU), Size, CPU_Set); Result := pthread_attr_setaffinity_np (Thread_Attr'Access, Size, CPU_Set); pragma Assert (Result = 0); CPU_FREE (CPU_Set); end; -- Handle Task_Info elsif T.Common.Task_Info /= null then Result := pthread_attr_setaffinity_np (Thread_Attr'Access, CPU_SETSIZE / 8, T.Common.Task_Info.CPU_Affinity'Access); pragma Assert (Result = 0); -- Handle dispatching domains -- To avoid changing CPU affinities when not needed, we set the -- affinity only when assigning to a domain other than the default -- one, or when the default one has been modified. elsif T.Common.Domain /= null and then (T.Common.Domain /= ST.System_Domain or else T.Common.Domain.all /= (Multiprocessors.CPU'First .. Multiprocessors.Number_Of_CPUs => True)) then declare CPUs : constant size_t := C.size_t (Multiprocessors.Number_Of_CPUs); CPU_Set : constant cpu_set_t_ptr := CPU_ALLOC (CPUs); Size : constant size_t := CPU_ALLOC_SIZE (CPUs); begin CPU_ZERO (Size, CPU_Set); -- Set the affinity to all the processors belonging to the -- dispatching domain. for Proc in T.Common.Domain'Range loop if T.Common.Domain (Proc) then System.OS_Interface.CPU_SET (int (Proc), Size, CPU_Set); end if; end loop; Result := pthread_attr_setaffinity_np (Thread_Attr'Access, Size, CPU_Set); pragma Assert (Result = 0); CPU_FREE (CPU_Set); end; end if; -- Since the initial signal mask of a thread is inherited from the -- creator, and the Environment task has all its signals masked, we -- do not need to manipulate caller's signal mask at this point. -- All tasks in RTS will have All_Tasks_Mask initially. -- Note: the use of Unrestricted_Access in the following call is needed -- because otherwise we have an error of getting a access-to-volatile -- value which points to a non-volatile object. But in this case it is -- safe to do this, since we know we have no problems with aliasing and -- Unrestricted_Access bypasses this check. Result := pthread_create (T.Common.LL.Thread'Unrestricted_Access, Thread_Attr'Access, Thread_Body_Access (Wrapper), To_Address (T)); pragma Assert (Result in 0 | EAGAIN | ENOMEM); if Result /= 0 then Succeeded := False; Result := pthread_attr_destroy (Thread_Attr'Access); pragma Assert (Result = 0); return; end if; Succeeded := True; Result := pthread_attr_destroy (Thread_Attr'Access); pragma Assert (Result = 0); Set_Priority (T, Priority); end Create_Task; ------------------ -- Finalize_TCB -- ------------------ procedure Finalize_TCB (T : Task_Id) is Result : C.int; begin Result := pthread_mutex_destroy (T.Common.LL.L'Access); pragma Assert (Result = 0); Result := pthread_cond_destroy (T.Common.LL.CV'Access); pragma Assert (Result = 0); if T.Known_Tasks_Index /= -1 then Known_Tasks (T.Known_Tasks_Index) := null; end if; ATCB_Allocation.Free_ATCB (T); end Finalize_TCB; --------------- -- Exit_Task -- --------------- procedure Exit_Task is begin Specific.Set (null); end Exit_Task; ---------------- -- Abort_Task -- ---------------- procedure Abort_Task (T : Task_Id) is Result : C.int; ESRCH : constant := 3; -- No such process -- It can happen that T has already vanished, in which case pthread_kill -- returns ESRCH, so we don't consider that to be an error. begin if Abort_Handler_Installed then Result := pthread_kill (T.Common.LL.Thread, Signal (System.Interrupt_Management.Abort_Task_Interrupt)); pragma Assert (Result in 0 | ESRCH); end if; end Abort_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (S : in out Suspension_Object) is Result : C.int; begin -- Initialize internal state (always to False (RM D.10(6))) S.State := False; S.Waiting := False; -- Initialize internal mutex Result := pthread_mutex_init (S.L'Access, null); pragma Assert (Result in 0 | ENOMEM); if Result = ENOMEM then raise Storage_Error; end if; -- Initialize internal condition variable Result := pthread_cond_init (S.CV'Access, null); pragma Assert (Result in 0 | ENOMEM); if Result /= 0 then Result := pthread_mutex_destroy (S.L'Access); pragma Assert (Result = 0); if Result = ENOMEM then raise Storage_Error; end if; end if; end Initialize; -------------- -- Finalize -- -------------- procedure Finalize (S : in out Suspension_Object) is Result : C.int; begin -- Destroy internal mutex Result := pthread_mutex_destroy (S.L'Access); pragma Assert (Result = 0); -- Destroy internal condition variable Result := pthread_cond_destroy (S.CV'Access); pragma Assert (Result = 0); end Finalize; ------------------- -- Current_State -- ------------------- function Current_State (S : Suspension_Object) return Boolean is begin -- We do not want to use lock on this read operation. State is marked -- as Atomic so that we ensure that the value retrieved is correct. return S.State; end Current_State; --------------- -- Set_False -- --------------- procedure Set_False (S : in out Suspension_Object) is Result : C.int; begin SSL.Abort_Defer.all; Result := pthread_mutex_lock (S.L'Access); pragma Assert (Result = 0); S.State := False; Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; end Set_False; -------------- -- Set_True -- -------------- procedure Set_True (S : in out Suspension_Object) is Result : C.int; begin SSL.Abort_Defer.all; Result := pthread_mutex_lock (S.L'Access); pragma Assert (Result = 0); -- If there is already a task waiting on this suspension object then -- we resume it, leaving the state of the suspension object to False, -- as it is specified in ARM D.10 par. 9. Otherwise, it just leaves -- the state to True. if S.Waiting then S.Waiting := False; S.State := False; Result := pthread_cond_signal (S.CV'Access); pragma Assert (Result = 0); else S.State := True; end if; Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; end Set_True; ------------------------ -- Suspend_Until_True -- ------------------------ procedure Suspend_Until_True (S : in out Suspension_Object) is Result : C.int; begin SSL.Abort_Defer.all; Result := pthread_mutex_lock (S.L'Access); pragma Assert (Result = 0); if S.Waiting then -- Program_Error must be raised upon calling Suspend_Until_True -- if another task is already waiting on that suspension object -- (RM D.10(10)). Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; raise Program_Error; else -- Suspend the task if the state is False. Otherwise, the task -- continues its execution, and the state of the suspension object -- is set to False (ARM D.10 par. 9). if S.State then S.State := False; else S.Waiting := True; loop -- Loop in case pthread_cond_wait returns earlier than expected -- (e.g. in case of EINTR caused by a signal). This should not -- happen with the current Linux implementation of pthread, but -- POSIX does not guarantee it so this may change in future. Result := pthread_cond_wait (S.CV'Access, S.L'Access); pragma Assert (Result in 0 | EINTR); exit when not S.Waiting; end loop; end if; Result := pthread_mutex_unlock (S.L'Access); pragma Assert (Result = 0); SSL.Abort_Undefer.all; end if; end Suspend_Until_True; ---------------- -- Check_Exit -- ---------------- -- Dummy version function Check_Exit (Self_ID : ST.Task_Id) return Boolean is pragma Unreferenced (Self_ID); begin return True; end Check_Exit; -------------------- -- Check_No_Locks -- -------------------- function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is pragma Unreferenced (Self_ID); begin return True; end Check_No_Locks; ---------------------- -- Environment_Task -- ---------------------- function Environment_Task return Task_Id is begin return Environment_Task_Id; end Environment_Task; ------------------ -- Suspend_Task -- ------------------ function Suspend_Task (T : ST.Task_Id; Thread_Self : Thread_Id) return Boolean is begin if T.Common.LL.Thread /= Thread_Self then return pthread_kill (T.Common.LL.Thread, SIGSTOP) = 0; else return True; end if; end Suspend_Task; ----------------- -- Resume_Task -- ----------------- function Resume_Task (T : ST.Task_Id; Thread_Self : Thread_Id) return Boolean is begin if T.Common.LL.Thread /= Thread_Self then return pthread_kill (T.Common.LL.Thread, SIGCONT) = 0; else return True; end if; end Resume_Task; -------------------- -- Stop_All_Tasks -- -------------------- procedure Stop_All_Tasks is begin null; end Stop_All_Tasks; --------------- -- Stop_Task -- --------------- function Stop_Task (T : ST.Task_Id) return Boolean is pragma Unreferenced (T); begin return False; end Stop_Task; ------------------- -- Continue_Task -- ------------------- function Continue_Task (T : ST.Task_Id) return Boolean is pragma Unreferenced (T); begin return False; end Continue_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (Environment_Task : Task_Id) is act : aliased struct_sigaction; old_act : aliased struct_sigaction; Tmp_Set : aliased sigset_t; Result : C.int; -- Whether to use an alternate signal stack for stack overflows function State (Int : System.Interrupt_Management.Interrupt_ID) return Character; pragma Import (C, State, "__gnat_get_interrupt_state"); -- Get interrupt state. Defined in a-init.c -- The input argument is the interrupt number, -- and the result is one of the following: Default : constant Character := 's'; -- 'n' this interrupt not set by any Interrupt_State pragma -- 'u' Interrupt_State pragma set state to User -- 'r' Interrupt_State pragma set state to Runtime -- 's' Interrupt_State pragma set state to System (use "default" -- system handler) begin Environment_Task_Id := Environment_Task; Interrupt_Management.Initialize; -- Prepare the set of signals that should be unblocked in all tasks Result := sigemptyset (Unblocked_Signal_Mask'Access); pragma Assert (Result = 0); for J in Interrupt_Management.Interrupt_ID loop if System.Interrupt_Management.Keep_Unmasked (J) then Result := sigaddset (Unblocked_Signal_Mask'Access, Signal (J)); pragma Assert (Result = 0); end if; end loop; Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level); -- Initialize the global RTS lock Specific.Initialize (Environment_Task); if Use_Alternate_Stack then Environment_Task.Common.Task_Alternate_Stack := Alternate_Stack'Address; end if; -- Make environment task known here because it doesn't go through -- Activate_Tasks, which does it for all other tasks. Known_Tasks (Known_Tasks'First) := Environment_Task; Environment_Task.Known_Tasks_Index := Known_Tasks'First; Enter_Task (Environment_Task); if State (System.Interrupt_Management.Abort_Task_Interrupt) /= Default then act.sa_flags := 0; act.sa_handler := Abort_Handler'Address; Result := sigemptyset (Tmp_Set'Access); pragma Assert (Result = 0); act.sa_mask := Tmp_Set; Result := sigaction (Signal (Interrupt_Management.Abort_Task_Interrupt), act'Unchecked_Access, old_act'Unchecked_Access); pragma Assert (Result = 0); Abort_Handler_Installed := True; end if; -- pragma CPU and dispatching domains for the environment task Set_Task_Affinity (Environment_Task); end Initialize; ----------------------- -- Set_Task_Affinity -- ----------------------- procedure Set_Task_Affinity (T : ST.Task_Id) is use type Multiprocessors.CPU_Range; begin -- Do nothing if there is no support for setting affinities or the -- underlying thread has not yet been created. If the thread has not -- yet been created then the proper affinity will be set during its -- creation. if pthread_setaffinity_np'Address /= Null_Address and then T.Common.LL.Thread /= Null_Thread_Id then declare CPUs : constant size_t := C.size_t (Multiprocessors.Number_Of_CPUs); CPU_Set : cpu_set_t_ptr := null; Size : constant size_t := CPU_ALLOC_SIZE (CPUs); Result : C.int; begin -- We look at the specific CPU (Base_CPU) first, then at the -- Task_Info field, and finally at the assigned dispatching -- domain, if any. if T.Common.Base_CPU /= Multiprocessors.Not_A_Specific_CPU then -- Set the affinity to an unique CPU CPU_Set := CPU_ALLOC (CPUs); System.OS_Interface.CPU_ZERO (Size, CPU_Set); System.OS_Interface.CPU_SET (int (T.Common.Base_CPU), Size, CPU_Set); -- Handle Task_Info elsif T.Common.Task_Info /= null then CPU_Set := T.Common.Task_Info.CPU_Affinity'Access; -- Handle dispatching domains elsif T.Common.Domain /= null and then (T.Common.Domain /= ST.System_Domain or else T.Common.Domain.all /= (Multiprocessors.CPU'First .. Multiprocessors.Number_Of_CPUs => True)) then -- Set the affinity to all the processors belonging to the -- dispatching domain. To avoid changing CPU affinities when -- not needed, we set the affinity only when assigning to a -- domain other than the default one, or when the default one -- has been modified. CPU_Set := CPU_ALLOC (CPUs); System.OS_Interface.CPU_ZERO (Size, CPU_Set); for Proc in T.Common.Domain'Range loop if T.Common.Domain (Proc) then System.OS_Interface.CPU_SET (int (Proc), Size, CPU_Set); end if; end loop; end if; -- We set the new affinity if needed. Otherwise, the new task -- will inherit its creator's CPU affinity mask (according to -- the documentation of pthread_setaffinity_np), which is -- consistent with Ada's required semantics. if CPU_Set /= null then Result := pthread_setaffinity_np (T.Common.LL.Thread, Size, CPU_Set); pragma Assert (Result = 0); CPU_FREE (CPU_Set); end if; end; end if; end Set_Task_Affinity; end System.Task_Primitives.Operations;
-- -- Copyright 2022 (C) Nicolas Pinault (aka DrPi) -- -- SPDX-License-Identifier: BSD-3-Clause -- with Ada.Command_Line; use Ada.Command_Line; package Errors is NO_ERROR : constant Exit_Status := Success; ARGS : constant Exit_Status := -1; FORMAT : constant Exit_Status := -2; INCOMPATIBLE : constant Exit_Status := -3; READ_FAILED : constant Exit_Status := -4; WRITE_FAILED : constant Exit_Status := -5; function Fail (Code : Exit_Status; Msg : String) return Exit_Status; function Fail_Read_Error return Exit_Status; function Fail_Write_Error return Exit_Status; end Errors;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . T A S K _ L O C K -- -- -- -- S p e c -- -- -- -- Copyright (C) 1998-2005, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Simple task lock and unlock routines -- A small package containing a task lock and unlock routines for creating -- a critical region. The lock involved is a global lock, shared by all -- tasks, and by all calls to these routines, so these routines should be -- used with care to avoid unnecessary reduction of concurrency. -- These routines may be used in a non-tasking program, and in that case -- they have no effect (they do NOT cause the tasking runtime to be loaded). package GNAT.Task_Lock is pragma Elaborate_Body; procedure Lock; pragma Inline (Lock); -- Acquires the global lock, starts the execution of a critical region -- which no other task can enter until the locking task calls Unlock procedure Unlock; pragma Inline (Unlock); -- Releases the global lock, allowing another task to successfully -- complete a Lock operation. Terminates the critical region. -- -- The recommended protocol for using these two procedures is as -- follows: -- -- Locked_Processing : begin -- Lock; -- ... -- TSL.Unlock; -- -- exception -- when others => -- Unlock; -- raise; -- end Locked_Processing; -- -- This ensures that the lock is not left set if an exception is raised -- explicitly or implicitly during the critical locked region. -- -- Note on multiple calls to Lock: It is permissible to call Lock -- more than once with no intervening Unlock from a single task, -- and the lock will not be released until the corresponding number -- of Unlock operations has been performed. For example: -- -- GNAT.Task_Lock.Lock; -- acquires lock -- GNAT.Task_Lock.Lock; -- no effect -- GNAT.Task_Lock.Lock; -- no effect -- GNAT.Task_Lock.Unlock; -- no effect -- GNAT.Task_Lock.Unlock; -- no effect -- GNAT.Task_Lock.Unlock; -- releases lock -- -- However, as previously noted, the Task_Lock facility should only -- be used for very local locks where the probability of conflict is -- low, so usually this kind of nesting is not a good idea in any case. -- In more complex locking situations, it is more appropriate to define -- an appropriate protected type to provide the required locking. -- -- It is an error to call Unlock when there has been no prior call to -- Lock. The effect of such an erroneous call is undefined, and may -- result in deadlock, or other malfunction of the run-time system. end GNAT.Task_Lock;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Units.Bodies; package body Program.Units.Subunits is -------------------- -- Append_Subunit -- -------------------- procedure Append_Subunit (Self : in out Subunit; Value : Program.Compilation_Units.Compilation_Unit_Access) is begin Self.Subunits.Append (Value); end Append_Subunit; ---------------- -- Initialize -- ---------------- procedure Initialize (Self : in out Subunit; Compilation : Program.Compilations.Compilation_Access; Full_Name : Text; Context_Clause : Program.Element_Vectors.Element_Vector_Access; Unit_Declaration : not null Program.Elements.Element_Access; Parent_Body : not null Program.Compilation_Units .Compilation_Unit_Access) is begin Self.Initialize (Compilation => Compilation, Full_Name => Full_Name, Context_Clause => Context_Clause, Unit_Declaration => Unit_Declaration); Self.Parent_Body := Parent_Body; if Parent_Body.all in Program.Units.Bodies.Unit_Body then Program.Units.Bodies.Unit_Body (Parent_Body.all).Append_Subunit (Self'Unchecked_Access); else Subunit (Parent_Body.all).Append_Subunit (Self'Unchecked_Access); end if; Self.Subunits.Clear; end Initialize; -------------- -- Subunits -- -------------- overriding function Subunits (Self : access Subunit) return Program.Compilation_Unit_Vectors.Compilation_Unit_Vector_Access is begin if Self.Subunits.Is_Empty then return null; else return Self.Subunits'Access; end if; end Subunits; ----------------- -- Parent_Body -- ----------------- overriding function Parent_Body (Self : access Subunit) return not null Program.Compilation_Units.Compilation_Unit_Access is begin return Self.Parent_Body; end Parent_Body; end Program.Units.Subunits;
with openGL.Camera, openGL.Texture, ada.unchecked_Deallocation; package body openGL.Impostor.simple is procedure free (Self : in out View) is procedure deallocate is new ada.unchecked_Deallocation (Item'Class, View); begin if Self /= null then destroy (Self.all); deallocate (Self); end if; end free; overriding function current_Camera_look_at_Rotation (Self : in Item) return Matrix_3x3 is begin return Self.current_Camera_look_at_Rotation; end current_Camera_look_at_Rotation; overriding function update_Required (Self : access Item; the_Camera : access Camera.item'Class) return Boolean is use linear_Algebra_3d; begin -- Look directly at target so it will be rendered in the centre of the viewport. -- Self.current_Camera_look_at_Rotation := get_Rotation (look_at (the_Camera.Site, get_Translation (Self.Target.Transform), (0.0, 1.0, 0.0))); Self.current_pixel_Region := Self.get_pixel_Region (camera_Spin => Self.current_Camera_look_at_Rotation, camera_Site => the_Camera.Site, camera_projection_Transform => the_Camera.projection_Transform, camera_Viewport => the_Camera.Viewport); declare update_Required : Boolean := Self.general_Update_required (the_Camera.Site, Self.current_pixel_Region); begin if not update_Required and then Self.size_Update_required (Self.current_pixel_Region) then update_Required := True; end if; if Update_required then Self.current_Width_pixels := Self.current_pixel_Region.Width; -- Cache current state. Self.current_Height_pixels := Self.current_pixel_Region.Height; Self.current_copy_X := Self.current_pixel_Region.X; Self.current_copy_Y := Self.current_pixel_Region.Y; Self.current_copy_Width := Self.current_pixel_Region.Width; Self.current_copy_Height := Self.current_pixel_Region.Height; end if; return update_Required; end; end update_Required; overriding procedure pre_update (Self : in out Item; the_Camera : access Camera.item'Class) is begin Self.camera_world_Rotation_original := the_Camera.Spin; the_Camera.Spin_is (Self.current_Camera_look_at_Rotation); end pre_update; overriding procedure update (Self : in out Item; the_Camera : access Camera.item'Class; texture_Pool : in Texture.Pool_view) is world_Rotation_original : constant Matrix_3x3 := the_Camera.Spin; begin the_Camera.Spin_is (Self.current_Camera_look_at_Rotation); Impostor.item (Self).update (the_Camera, texture_Pool); -- Base class 'update'. the_Camera.Spin_is (world_Rotation_original); end update; overriding procedure post_update (Self : in out Item; the_Camera : access Camera.item'Class) is begin the_Camera.Spin_is (Self.camera_world_Rotation_original); end post_update; end openGL.Impostor.simple;