CombinedText
stringlengths
4
3.42M
with GID.Buffering; use GID.Buffering; package body GID.Decoding_BMP is procedure Load (image: in out Image_descriptor) is b01, b, br, bg, bb: U8:= 0; x, x_max, y: Natural; -- function Times_257(x: Primary_color_range) return Primary_color_range is pragma Inline(Times_257); begin return 16 * (16 * x) + x; -- this is 257 * x, = 16#0101# * x -- Numbers 8-bit -> no OA warning at instanciation. Returns x if type Primary_color_range is mod 2**8. end Times_257; full_opaque: constant Primary_color_range:= Primary_color_range'Last; -- procedure Pixel_with_palette is pragma Inline(Pixel_with_palette); begin case Primary_color_range'Modulus is when 256 => Put_Pixel( Primary_color_range(image.palette(Integer(b)).red), Primary_color_range(image.palette(Integer(b)).green), Primary_color_range(image.palette(Integer(b)).blue), full_opaque ); when 65_536 => Put_Pixel( Times_257(Primary_color_range(image.palette(Integer(b)).red)), Times_257(Primary_color_range(image.palette(Integer(b)).green)), Times_257(Primary_color_range(image.palette(Integer(b)).blue)), -- Times_257 makes max intensity FF go to FFFF full_opaque ); when others => raise invalid_primary_color_range with "BMP: color range not supported"; end case; end Pixel_with_palette; -- pair: Boolean; bit: Natural range 0..7; -- line_bits: constant Float:= Float(image.width * Positive_32 (image.bits_per_pixel)); padded_line_size: constant Positive:= 4 * Integer(Float'Ceiling(line_bits / 32.0)); unpadded_line_size: constant Positive:= Integer(Float'Ceiling(line_bits / 8.0)); -- (in bytes) begin Attach_Stream(image.buffer, image.stream); y:= 0; while y <= Integer (image.height) - 1 loop x:= 0; x_max:= Integer (image.width) - 1; case image.bits_per_pixel is when 1 => -- B/W bit:= 0; Set_X_Y(x,y); while x <= x_max loop if bit=0 then Get_Byte(image.buffer, b01); end if; b:= (b01 and 16#80#) / 16#80#; Pixel_with_palette; b01:= b01 * 2; -- cannot overflow. if bit=7 then bit:= 0; else bit:= bit + 1; end if; x:= x + 1; end loop; when 4 => -- 16 colour image pair:= True; Set_X_Y(x,y); while x <= x_max loop if pair then Get_Byte(image.buffer, b01); b:= (b01 and 16#F0#) / 16#10#; else b:= (b01 and 16#0F#); end if; pair:= not pair; Pixel_with_palette; x:= x + 1; end loop; when 8 => -- 256 colour image Set_X_Y(x,y); while x <= x_max loop Get_Byte(image.buffer, b); Pixel_with_palette; x:= x + 1; end loop; when 24 => -- RGB, 256 colour per primary colour Set_X_Y(x,y); while x <= x_max loop Get_Byte(image.buffer, bb); Get_Byte(image.buffer, bg); Get_Byte(image.buffer, br); case Primary_color_range'Modulus is when 256 => Put_Pixel( Primary_color_range(br), Primary_color_range(bg), Primary_color_range(bb), full_opaque ); when 65_536 => Put_Pixel( Times_257(Primary_color_range(br)), Times_257(Primary_color_range(bg)), Times_257(Primary_color_range(bb)), -- Times_257 makes max intensity FF go to FFFF full_opaque ); when others => raise invalid_primary_color_range with "BMP: color range not supported"; end case; x:= x + 1; end loop; when others => null; end case; for i in unpadded_line_size + 1 .. padded_line_size loop Get_Byte(image.buffer, b); end loop; y:= y + 1; Feedback((y*100) / Integer (image.height)); end loop; end Load; end GID.Decoding_BMP;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <denkpadje@gmail.com> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Orka.Transforms.SIMD_Quaternions; with Orka.Transforms.Singles.Vectors; package Orka.Transforms.Singles.Quaternions is new Orka.Transforms.SIMD_Quaternions (Orka.Transforms.Singles.Vectors); pragma Preelaborate (Orka.Transforms.Singles.Quaternions);
-- 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.Assertions; with Unique_Ptrs; package body Auto_Counters_Suite.Unique_Ptrs_Tests is use AUnit.Assertions; Resources_Released : Natural := 0; procedure Deletion_Recorder (X : in out String) is pragma Unreferenced (X); begin Resources_Released := Resources_Released + 1; end Deletion_Recorder; package String_Unique_Ptrs is new Unique_Ptrs(T => String, Delete => Deletion_Recorder); use String_Unique_Ptrs; -------------------- -- Register_Tests -- -------------------- procedure Register_Tests (T: in out Unique_Ptrs_Test) is use AUnit.Test_Cases.Registration; begin Register_Routine (T, Check_Unique_Ptrs'Access, "Check Unique_Ptr"); Register_Routine (T, Check_Unique_Const_Ptrs'Access, "Check Unique_Const_Ptr"); end Register_Tests; ---------- -- Name -- ---------- function Name (T : Unique_Ptrs_Test) return Test_String is pragma Unreferenced (T); begin return Format ("Tests of Unique_Ptrs"); end Name; ------------ -- Set_Up -- ------------ procedure Set_Up (T : in out Unique_Ptrs_Test) is begin null; end Set_Up; ----------------------- -- Check_Unique_Ptrs -- ----------------------- procedure Check_Unique_Ptrs (T : in out Test_Cases.Test_Case'Class) is pragma Unreferenced(T); UP1 : Unique_Ptr := Make_Unique_Ptr(new String'("Hello, World!")); procedure Make_UP_from_Local is S : aliased String := "Test"; UP2 : Unique_Ptr(Element => S'Access); pragma Unreferenced (UP2); begin null; end Make_UP_from_Local; Caught_Make_UP_from_Local : Boolean := False; begin Assert (UP1 = "Hello, World!", "Initialized Unique_Ptr not working"); UP1(6):= ':'; Assert (UP1 = "Hello: World!", "Writing via a Unique_Ptr is not working"); UP1.Get(6):= ','; Assert (UP1 = "Hello, World!", "Writing via Unique_Ptr.Get is not working"); Resources_Released := 0; declare UP3 : Unique_Ptr := Make_Unique_Ptr(new String'("Goodbye, World!")); pragma Unreferenced (UP3); begin null; end; Assert (Resources_Released = 1, "Unique_Ptr did not delete contents when destroyed"); begin Make_UP_from_Local; exception when Unique_Ptr_Error => Caught_Make_UP_from_Local := True; end; Assert(Caught_Make_UP_from_Local, "Failed to identify Unique_Ptr being set to a local"); end Check_Unique_Ptrs; ----------------------------- -- Check_Unique_Const_Ptrs -- ----------------------------- procedure Check_Unique_Const_Ptrs (T : in out Test_Cases.Test_Case'Class) is pragma Unreferenced(T); UCP1 : Unique_Const_Ptr := Make_Unique_Const_Ptr(new String'("Hello, World!")); procedure Make_UCP_from_Local is S : aliased String := "Test"; UP2 : Unique_Const_Ptr(Element => S'Access); pragma Unreferenced (UP2); begin null; end Make_UCP_from_Local; Caught_Make_UCP_from_Local : Boolean := False; begin Assert (UCP1 = "Hello, World!", "Initialized Unique_Const_Ptr not working"); Assert (UCP1.Get.all = "Hello, World!", "Access via Unique_Const_Ptr.Get not working"); Resources_Released := 0; declare UCP3 : Unique_Const_Ptr := Make_Unique_Const_Ptr(new String'("Goodbye, World!")); pragma Unreferenced (UCP3); begin null; end; Assert (Resources_Released = 1, "Unique_Const_Ptr did not delete contents when destroyed"); begin Make_UCP_from_Local; exception when Unique_Ptr_Error => Caught_Make_UCP_from_Local := True; end; Assert(Caught_Make_UCP_from_Local, "Failed to identify Unique_Const_Ptr being set to a local"); end Check_Unique_Const_Ptrs; end Auto_Counters_Suite.Unique_Ptrs_Tests;
----------------------------------------------------------------------- -- babel-Streams -- Stream management -- Copyright (C) 2014, 2015 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. ----------------------------------------------------------------------- package body Babel.Streams.Refs is procedure Copy (From : in Stream_Ref; Into : in Stream_Ref) is use type Babel.Files.Buffers.Buffer_Access; From_Stream : constant Stream_Access := From.Value; Into_Stream : constant Stream_Access := Into.Value; Buffer : Babel.Files.Buffers.Buffer_Access; begin From_Stream.Rewind; loop From_Stream.Read (Buffer); exit when Buffer = null; Into_Stream.Write (Buffer); end loop; end Copy; end Babel.Streams.Refs;
with Control; with Ada.Real_Time;use Ada.Real_Time; package body Blinker is protected body Cmd_Type_Access is procedure Send( Cmd : Command_To_Type ) is --binary semaphore begin Command_Is_New := False; if Command_To.Cmd /= Cmd.Cmd then Command_To := Cmd; Command_Is_New := True; end if; end Send; entry Receive( Cmd : out Command_To_Type) when Command_Is_New is begin Cmd := Command_To; end Receive; end Cmd_Type_Access; task body Blinker_Type is Next_Time : Time := Clock + Milliseconds(250); Blinker_Stopped: Boolean := False; On : Boolean := False; Command : Command_To_Type; begin loop Protected_Command.Receive(Command); --if Command.Receiver = Id then case Command.Cmd is --when QUIT => -- Control.Put_Line("Quit"); -- exit; when START => Blinker_Stopped := False; On := not On; if On then Control.Put_Line("B"& Id_Type'Image(Command.Receiver) & "S"); else Control.Put_Line("B" & Id_Type'Image(Command.Receiver) & "E"); end if; case Id is when R => Control.Toggle_LedR; when L => Control.Toggle_LedL; when E => Control.Toggle_LedL; Control.Toggle_LedR; when others => null; end case; when STOP => if not Blinker_Stopped then Control.Put_Line("ABS"); Blinker_Stopped := True; Control.Off_LedL; Control.Off_LedR; end if; end case; --end if; Next_Time := Next_Time + Milliseconds(250); delay until Next_Time; end loop; end Blinker_Type; end Blinker;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C H A R A C T E R S . W I D E _ L A T I N _ 1 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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 definitions analogous to those in the RM defined -- package Ada.Characters.Latin_1 except that the type of the constants -- is Wide_Character instead of Character. The provision of this package -- is in accordance with the implementation permission in RM (A.3.3(27)). package Ada.Characters.Wide_Latin_1 is pragma Pure; ------------------------ -- Control Characters -- ------------------------ NUL : constant Wide_Character := Wide_Character'Val (0); SOH : constant Wide_Character := Wide_Character'Val (1); STX : constant Wide_Character := Wide_Character'Val (2); ETX : constant Wide_Character := Wide_Character'Val (3); EOT : constant Wide_Character := Wide_Character'Val (4); ENQ : constant Wide_Character := Wide_Character'Val (5); ACK : constant Wide_Character := Wide_Character'Val (6); BEL : constant Wide_Character := Wide_Character'Val (7); BS : constant Wide_Character := Wide_Character'Val (8); HT : constant Wide_Character := Wide_Character'Val (9); LF : constant Wide_Character := Wide_Character'Val (10); VT : constant Wide_Character := Wide_Character'Val (11); FF : constant Wide_Character := Wide_Character'Val (12); CR : constant Wide_Character := Wide_Character'Val (13); SO : constant Wide_Character := Wide_Character'Val (14); SI : constant Wide_Character := Wide_Character'Val (15); DLE : constant Wide_Character := Wide_Character'Val (16); DC1 : constant Wide_Character := Wide_Character'Val (17); DC2 : constant Wide_Character := Wide_Character'Val (18); DC3 : constant Wide_Character := Wide_Character'Val (19); DC4 : constant Wide_Character := Wide_Character'Val (20); NAK : constant Wide_Character := Wide_Character'Val (21); SYN : constant Wide_Character := Wide_Character'Val (22); ETB : constant Wide_Character := Wide_Character'Val (23); CAN : constant Wide_Character := Wide_Character'Val (24); EM : constant Wide_Character := Wide_Character'Val (25); SUB : constant Wide_Character := Wide_Character'Val (26); ESC : constant Wide_Character := Wide_Character'Val (27); FS : constant Wide_Character := Wide_Character'Val (28); GS : constant Wide_Character := Wide_Character'Val (29); RS : constant Wide_Character := Wide_Character'Val (30); US : constant Wide_Character := Wide_Character'Val (31); ------------------------------------- -- ISO 646 Graphic Wide_Characters -- ------------------------------------- Space : constant Wide_Character := ' '; -- WC'Val(32) Exclamation : constant Wide_Character := '!'; -- WC'Val(33) Quotation : constant Wide_Character := '"'; -- WC'Val(34) Number_Sign : constant Wide_Character := '#'; -- WC'Val(35) Dollar_Sign : constant Wide_Character := '$'; -- WC'Val(36) Percent_Sign : constant Wide_Character := '%'; -- WC'Val(37) Ampersand : constant Wide_Character := '&'; -- WC'Val(38) Apostrophe : constant Wide_Character := '''; -- WC'Val(39) Left_Parenthesis : constant Wide_Character := '('; -- WC'Val(40) Right_Parenthesis : constant Wide_Character := ')'; -- WC'Val(41) Asterisk : constant Wide_Character := '*'; -- WC'Val(42) Plus_Sign : constant Wide_Character := '+'; -- WC'Val(43) Comma : constant Wide_Character := ','; -- WC'Val(44) Hyphen : constant Wide_Character := '-'; -- WC'Val(45) Minus_Sign : Wide_Character renames Hyphen; Full_Stop : constant Wide_Character := '.'; -- WC'Val(46) Solidus : constant Wide_Character := '/'; -- WC'Val(47) -- Decimal digits '0' though '9' are at positions 48 through 57 Colon : constant Wide_Character := ':'; -- WC'Val(58) Semicolon : constant Wide_Character := ';'; -- WC'Val(59) Less_Than_Sign : constant Wide_Character := '<'; -- WC'Val(60) Equals_Sign : constant Wide_Character := '='; -- WC'Val(61) Greater_Than_Sign : constant Wide_Character := '>'; -- WC'Val(62) Question : constant Wide_Character := '?'; -- WC'Val(63) Commercial_At : constant Wide_Character := '@'; -- WC'Val(64) -- Letters 'A' through 'Z' are at positions 65 through 90 Left_Square_Bracket : constant Wide_Character := '['; -- WC'Val (91) Reverse_Solidus : constant Wide_Character := '\'; -- WC'Val (92) Right_Square_Bracket : constant Wide_Character := ']'; -- WC'Val (93) Circumflex : constant Wide_Character := '^'; -- WC'Val (94) Low_Line : constant Wide_Character := '_'; -- WC'Val (95) Grave : constant Wide_Character := '`'; -- WC'Val (96) LC_A : constant Wide_Character := 'a'; -- WC'Val (97) LC_B : constant Wide_Character := 'b'; -- WC'Val (98) LC_C : constant Wide_Character := 'c'; -- WC'Val (99) LC_D : constant Wide_Character := 'd'; -- WC'Val (100) LC_E : constant Wide_Character := 'e'; -- WC'Val (101) LC_F : constant Wide_Character := 'f'; -- WC'Val (102) LC_G : constant Wide_Character := 'g'; -- WC'Val (103) LC_H : constant Wide_Character := 'h'; -- WC'Val (104) LC_I : constant Wide_Character := 'i'; -- WC'Val (105) LC_J : constant Wide_Character := 'j'; -- WC'Val (106) LC_K : constant Wide_Character := 'k'; -- WC'Val (107) LC_L : constant Wide_Character := 'l'; -- WC'Val (108) LC_M : constant Wide_Character := 'm'; -- WC'Val (109) LC_N : constant Wide_Character := 'n'; -- WC'Val (110) LC_O : constant Wide_Character := 'o'; -- WC'Val (111) LC_P : constant Wide_Character := 'p'; -- WC'Val (112) LC_Q : constant Wide_Character := 'q'; -- WC'Val (113) LC_R : constant Wide_Character := 'r'; -- WC'Val (114) LC_S : constant Wide_Character := 's'; -- WC'Val (115) LC_T : constant Wide_Character := 't'; -- WC'Val (116) LC_U : constant Wide_Character := 'u'; -- WC'Val (117) LC_V : constant Wide_Character := 'v'; -- WC'Val (118) LC_W : constant Wide_Character := 'w'; -- WC'Val (119) LC_X : constant Wide_Character := 'x'; -- WC'Val (120) LC_Y : constant Wide_Character := 'y'; -- WC'Val (121) LC_Z : constant Wide_Character := 'z'; -- WC'Val (122) Left_Curly_Bracket : constant Wide_Character := '{'; -- WC'Val (123) Vertical_Line : constant Wide_Character := '|'; -- WC'Val (124) Right_Curly_Bracket : constant Wide_Character := '}'; -- WC'Val (125) Tilde : constant Wide_Character := '~'; -- WC'Val (126) DEL : constant Wide_Character := Wide_Character'Val (127); -------------------------------------- -- ISO 6429 Control Wide_Characters -- -------------------------------------- IS4 : Wide_Character renames FS; IS3 : Wide_Character renames GS; IS2 : Wide_Character renames RS; IS1 : Wide_Character renames US; Reserved_128 : constant Wide_Character := Wide_Character'Val (128); Reserved_129 : constant Wide_Character := Wide_Character'Val (129); BPH : constant Wide_Character := Wide_Character'Val (130); NBH : constant Wide_Character := Wide_Character'Val (131); Reserved_132 : constant Wide_Character := Wide_Character'Val (132); NEL : constant Wide_Character := Wide_Character'Val (133); SSA : constant Wide_Character := Wide_Character'Val (134); ESA : constant Wide_Character := Wide_Character'Val (135); HTS : constant Wide_Character := Wide_Character'Val (136); HTJ : constant Wide_Character := Wide_Character'Val (137); VTS : constant Wide_Character := Wide_Character'Val (138); PLD : constant Wide_Character := Wide_Character'Val (139); PLU : constant Wide_Character := Wide_Character'Val (140); RI : constant Wide_Character := Wide_Character'Val (141); SS2 : constant Wide_Character := Wide_Character'Val (142); SS3 : constant Wide_Character := Wide_Character'Val (143); DCS : constant Wide_Character := Wide_Character'Val (144); PU1 : constant Wide_Character := Wide_Character'Val (145); PU2 : constant Wide_Character := Wide_Character'Val (146); STS : constant Wide_Character := Wide_Character'Val (147); CCH : constant Wide_Character := Wide_Character'Val (148); MW : constant Wide_Character := Wide_Character'Val (149); SPA : constant Wide_Character := Wide_Character'Val (150); EPA : constant Wide_Character := Wide_Character'Val (151); SOS : constant Wide_Character := Wide_Character'Val (152); Reserved_153 : constant Wide_Character := Wide_Character'Val (153); SCI : constant Wide_Character := Wide_Character'Val (154); CSI : constant Wide_Character := Wide_Character'Val (155); ST : constant Wide_Character := Wide_Character'Val (156); OSC : constant Wide_Character := Wide_Character'Val (157); PM : constant Wide_Character := Wide_Character'Val (158); APC : constant Wide_Character := Wide_Character'Val (159); ----------------------------------- -- Other Graphic Wide_Characters -- ----------------------------------- -- Wide_Character positions 160 (16#A0#) .. 175 (16#AF#) No_Break_Space : constant Wide_Character := Wide_Character'Val (160); NBSP : Wide_Character renames No_Break_Space; Inverted_Exclamation : constant Wide_Character := Wide_Character'Val (161); Cent_Sign : constant Wide_Character := Wide_Character'Val (162); Pound_Sign : constant Wide_Character := Wide_Character'Val (163); Currency_Sign : constant Wide_Character := Wide_Character'Val (164); Yen_Sign : constant Wide_Character := Wide_Character'Val (165); Broken_Bar : constant Wide_Character := Wide_Character'Val (166); Section_Sign : constant Wide_Character := Wide_Character'Val (167); Diaeresis : constant Wide_Character := Wide_Character'Val (168); Copyright_Sign : constant Wide_Character := Wide_Character'Val (169); Feminine_Ordinal_Indicator : constant Wide_Character := Wide_Character'Val (170); Left_Angle_Quotation : constant Wide_Character := Wide_Character'Val (171); Not_Sign : constant Wide_Character := Wide_Character'Val (172); Soft_Hyphen : constant Wide_Character := Wide_Character'Val (173); Registered_Trade_Mark_Sign : constant Wide_Character := Wide_Character'Val (174); Macron : constant Wide_Character := Wide_Character'Val (175); -- Wide_Character positions 176 (16#B0#) .. 191 (16#BF#) Degree_Sign : constant Wide_Character := Wide_Character'Val (176); Ring_Above : Wide_Character renames Degree_Sign; Plus_Minus_Sign : constant Wide_Character := Wide_Character'Val (177); Superscript_Two : constant Wide_Character := Wide_Character'Val (178); Superscript_Three : constant Wide_Character := Wide_Character'Val (179); Acute : constant Wide_Character := Wide_Character'Val (180); Micro_Sign : constant Wide_Character := Wide_Character'Val (181); Pilcrow_Sign : constant Wide_Character := Wide_Character'Val (182); Paragraph_Sign : Wide_Character renames Pilcrow_Sign; Middle_Dot : constant Wide_Character := Wide_Character'Val (183); Cedilla : constant Wide_Character := Wide_Character'Val (184); Superscript_One : constant Wide_Character := Wide_Character'Val (185); Masculine_Ordinal_Indicator : constant Wide_Character := Wide_Character'Val (186); Right_Angle_Quotation : constant Wide_Character := Wide_Character'Val (187); Fraction_One_Quarter : constant Wide_Character := Wide_Character'Val (188); Fraction_One_Half : constant Wide_Character := Wide_Character'Val (189); Fraction_Three_Quarters : constant Wide_Character := Wide_Character'Val (190); Inverted_Question : constant Wide_Character := Wide_Character'Val (191); -- Wide_Character positions 192 (16#C0#) .. 207 (16#CF#) UC_A_Grave : constant Wide_Character := Wide_Character'Val (192); UC_A_Acute : constant Wide_Character := Wide_Character'Val (193); UC_A_Circumflex : constant Wide_Character := Wide_Character'Val (194); UC_A_Tilde : constant Wide_Character := Wide_Character'Val (195); UC_A_Diaeresis : constant Wide_Character := Wide_Character'Val (196); UC_A_Ring : constant Wide_Character := Wide_Character'Val (197); UC_AE_Diphthong : constant Wide_Character := Wide_Character'Val (198); UC_C_Cedilla : constant Wide_Character := Wide_Character'Val (199); UC_E_Grave : constant Wide_Character := Wide_Character'Val (200); UC_E_Acute : constant Wide_Character := Wide_Character'Val (201); UC_E_Circumflex : constant Wide_Character := Wide_Character'Val (202); UC_E_Diaeresis : constant Wide_Character := Wide_Character'Val (203); UC_I_Grave : constant Wide_Character := Wide_Character'Val (204); UC_I_Acute : constant Wide_Character := Wide_Character'Val (205); UC_I_Circumflex : constant Wide_Character := Wide_Character'Val (206); UC_I_Diaeresis : constant Wide_Character := Wide_Character'Val (207); -- Wide_Character positions 208 (16#D0#) .. 223 (16#DF#) UC_Icelandic_Eth : constant Wide_Character := Wide_Character'Val (208); UC_N_Tilde : constant Wide_Character := Wide_Character'Val (209); UC_O_Grave : constant Wide_Character := Wide_Character'Val (210); UC_O_Acute : constant Wide_Character := Wide_Character'Val (211); UC_O_Circumflex : constant Wide_Character := Wide_Character'Val (212); UC_O_Tilde : constant Wide_Character := Wide_Character'Val (213); UC_O_Diaeresis : constant Wide_Character := Wide_Character'Val (214); Multiplication_Sign : constant Wide_Character := Wide_Character'Val (215); UC_O_Oblique_Stroke : constant Wide_Character := Wide_Character'Val (216); UC_U_Grave : constant Wide_Character := Wide_Character'Val (217); UC_U_Acute : constant Wide_Character := Wide_Character'Val (218); UC_U_Circumflex : constant Wide_Character := Wide_Character'Val (219); UC_U_Diaeresis : constant Wide_Character := Wide_Character'Val (220); UC_Y_Acute : constant Wide_Character := Wide_Character'Val (221); UC_Icelandic_Thorn : constant Wide_Character := Wide_Character'Val (222); LC_German_Sharp_S : constant Wide_Character := Wide_Character'Val (223); -- Wide_Character positions 224 (16#E0#) .. 239 (16#EF#) LC_A_Grave : constant Wide_Character := Wide_Character'Val (224); LC_A_Acute : constant Wide_Character := Wide_Character'Val (225); LC_A_Circumflex : constant Wide_Character := Wide_Character'Val (226); LC_A_Tilde : constant Wide_Character := Wide_Character'Val (227); LC_A_Diaeresis : constant Wide_Character := Wide_Character'Val (228); LC_A_Ring : constant Wide_Character := Wide_Character'Val (229); LC_AE_Diphthong : constant Wide_Character := Wide_Character'Val (230); LC_C_Cedilla : constant Wide_Character := Wide_Character'Val (231); LC_E_Grave : constant Wide_Character := Wide_Character'Val (232); LC_E_Acute : constant Wide_Character := Wide_Character'Val (233); LC_E_Circumflex : constant Wide_Character := Wide_Character'Val (234); LC_E_Diaeresis : constant Wide_Character := Wide_Character'Val (235); LC_I_Grave : constant Wide_Character := Wide_Character'Val (236); LC_I_Acute : constant Wide_Character := Wide_Character'Val (237); LC_I_Circumflex : constant Wide_Character := Wide_Character'Val (238); LC_I_Diaeresis : constant Wide_Character := Wide_Character'Val (239); -- Wide_Character positions 240 (16#F0#) .. 255 (16#FF) LC_Icelandic_Eth : constant Wide_Character := Wide_Character'Val (240); LC_N_Tilde : constant Wide_Character := Wide_Character'Val (241); LC_O_Grave : constant Wide_Character := Wide_Character'Val (242); LC_O_Acute : constant Wide_Character := Wide_Character'Val (243); LC_O_Circumflex : constant Wide_Character := Wide_Character'Val (244); LC_O_Tilde : constant Wide_Character := Wide_Character'Val (245); LC_O_Diaeresis : constant Wide_Character := Wide_Character'Val (246); Division_Sign : constant Wide_Character := Wide_Character'Val (247); LC_O_Oblique_Stroke : constant Wide_Character := Wide_Character'Val (248); LC_U_Grave : constant Wide_Character := Wide_Character'Val (249); LC_U_Acute : constant Wide_Character := Wide_Character'Val (250); LC_U_Circumflex : constant Wide_Character := Wide_Character'Val (251); LC_U_Diaeresis : constant Wide_Character := Wide_Character'Val (252); LC_Y_Acute : constant Wide_Character := Wide_Character'Val (253); LC_Icelandic_Thorn : constant Wide_Character := Wide_Character'Val (254); LC_Y_Diaeresis : constant Wide_Character := Wide_Character'Val (255); end Ada.Characters.Wide_Latin_1;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- S Y S T E M . G E N E R I C _ C _ M A T H _ I N T E R F A C E -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the Ada Cert Math specific version of s-gcmain.adb. -- The separate version is necessary, because this system does not provide -- an implementation of tanh, among other hyperbolic functions. The run time -- currently has no code to implement this function, so the only short term -- option was to remove the hyperbolic functions. with Ada.Numerics; use Ada.Numerics; package body System.Generic_C_Math_Interface is subtype T is Float_Type'Base; -- The implementations of these functions start with a summary -- of the Ada requirements for the following: -- * Principal branch of multivalued functions -- * Conditions for raising exceptions -- * Prescribed function results -- * Tightly approximated function results (strict mode only) -- Implementation choices are explained after the summary for each -- elementary function. Exceptions are raised either by checking the -- arguments or the C function result. Prescribed results are satisfied by -- referring to corresponding requirements in C, standard implementation -- practice or by explicit special-casing in the code below. -- If one of the arguments of a function is a NaN, the function will return -- a NaN value or raise Argument_Error. Generally, for functions that -- require Argument_Error to be raised for some arguments will also -- raise Argument_Error for NaN arguments. -- Many comparisons for special cases are inverted using "not" in order -- to make sure the condition is false for NaN values, using the principle -- that any comparison involving a NaN argument evaluates to false. -- Principal branch: -- Describes function result for cases where the mathematical -- function is multivalued. -- Exceptions: -- Describes in what situations exceptions such as -- Argument_Error and Constraint_Error must be raised. -- In addition to these required exceptions, Constraint_Error -- may also be raised instead of yielding an infinity value -- for types T where T'Machine_Overflows is True. -- Prescribed results: -- Describes identities that must be satisfied. -- Tightly approximated results: -- Describes arguments for which the function result must -- be in the model interval of the mathematical result. -- This is required for strict mode. -- Special values: -- These are implementation-defined results arguments with -- special values such as infinities (represented by +Inf and -Inf) -- not-a-number values (written as NaN). Where consistent with the -- Ada standard, the implementation satisfies the identities given -- in Chapter F.9 of the C standard. ---------- -- "**" -- ---------- -- Principle branch: -- The result is nonnegative. -- Required exceptions: -- Argument_Error is raised when Left < 0.0, Left is a NaN -- or when Left = 0.0 and Right = 0.0. -- Constraint_Error is raised when Left = 0.0, and Right < 0.0 or is a -- NaN. -- Prescribed results: -- (1) Left ** 0.0 = 1.0 -- (2) Left ** 1.0 = Left -- (3) 0.0 ** Right = 0.0 -- (4) 1.0 ** Right = 1.0 -- The prescribed result (1) is satisfied by C_Pow. -- Result (2) is not, and therefore is special-cased. -- For case (3) this implementation always returns +0.0, -- while C_Pow would return -0.0 when Left = -0.0 and Right a positive -- odd integer. This would seem inconsistent with the required principle -- branch, although it is debatable whether -0.0 is negative. -- For case (4), C_Pow would return NaN, so a special case is required. function "**" (Left, Right : Float_Type'Base) return Float_Type'Base is begin -- The if statements are structured to ensure NaN parameters cause the -- correct exception to be raised (since a NaN will always fail a -- non-equal comparison test). if not (Left > 0.0) then if not (Left = 0.0) or else not (Right /= 0.0) then raise Argument_Error; elsif not (Right >= 0.0) then raise Constraint_Error; else -- Left = 0.0 and Right > 0.0 return 0.0; end if; elsif Right = 1.0 then return Left; elsif Left = 1.0 then return 1.0; end if; return C_Pow (Left, Right); end "**"; ------------ -- Arccos -- ------------ -- (Natural cycle) -- Principal branch: -- The result is in the quadrant containing the point (X, 1.0). -- This quadrant is I or II; thus, the Arccos function ranges -- from 0.0 to approximately Pi. -- Exceptions: -- Argument_Error is raised when abs (X) > 1.0 -- Tightly approximated results: -- Arccos (0.0) = Pi / 2.0; -- Arccos (1.0) = 0.0; -- Since C mandates a NaN result for abs (X) > 1.0 and testing -- for a NaN only requires a single test without calling the "abs" -- function, the result is checked rather than the argument. function Arccos (X : Float_Type'Base) return Float_Type'Base is R : T; begin R := C_Acos (X); if R /= R then raise Argument_Error; else return R; end if; end Arccos; -- (Arbitrary cycle) -- Principal branch: -- The result is in the quadrant containing the point (X, 1.0). -- This quadrant is I or II; thus, the Arccos function ranges -- from 0.0 to approximately Cycle / 2.0. -- Exceptions: -- Argument_Error is raised when abs (X) > 1.0 or when Cycle <= 0.0 -- or when either parameter is a NaN -- Prescribed results: -- Arccos (1.0) = 0.0 -- Tightly approximated results: -- Arccos (0.0) = Cycle / 4.0 -- Since C mandates a NaN result for abs (X) > 1.0 and testing for a NaN -- only requires a single test without calling the "abs" function, the -- result is checked rather than the argument. The tightly approximated -- result may not be obtained by dividing the C_Acos result by Pi, since -- these are transcedental numbers. function Arccos (X, Cycle : Float_Type'Base) return Float_Type'Base is begin if not (Cycle > 0.0) then raise Argument_Error; elsif not (abs X < 1.0) then if X = 1.0 then return 0.0; elsif X = -1.0 then return Cycle / 2.0; end if; raise Argument_Error; end if; if X = 0.0 then return Cycle / 4.0; end if; return C_Acos (X) / (Pi / 2.0) * (Cycle / 4.0); end Arccos; ------------- -- Arccosh -- ------------- -- Principal branch: -- The result is positive -- Exceptions: -- Argument_Error is raised when X < 1.0 -- Prescribed results: -- Arccosh (1.0) = 0.0; -- General description -- TODO function Arccosh (X : Float_Type'Base) return Float_Type'Base is begin if X < 1.0 then raise Argument_Error; else return C_Acosh (X); end if; end Arccosh; ------------ -- Arccot -- ------------ -- Natural cycle -- Principal branch: -- The results are in the quadrant containing the point (X, Y). -- This may be any quadrant (I through IV) when the parameter Y is -- specified, but it is restricted to quadrants I and II when that -- parameter is omitted. Thus the range when that parameter is -- specified is approximately -Pi to Pi; when omitted the range is -- 0.0 to Pi. -- Exceptions: -- Argument_Error is raised when parameters X and Y both have the -- value zero -- Prescribed results: -- Arccot (X, 0.0) = 0.0 when X > 0.0 function Arccot (X : Float_Type'Base; Y : Float_Type'Base := 1.0) return Float_Type'Base is begin if X = 0.0 and then Y = 0.0 then raise Argument_Error; else -- Just reverse arguments return Arctan (Y, X); end if; end Arccot; -- Arbitrary cycle function Arccot (X : Float_Type'Base; Y : Float_Type'Base := 1.0; Cycle : Float_Type'Base) return Float_Type'Base is begin if X = 0.0 and then Y = 0.0 then raise Argument_Error; else -- Just reverse arguments return Arctan (Y, X, Cycle); end if; end Arccot; ------------- -- Arccoth -- ------------- -- Exceptions: -- Argument_Error is raised if abs (X) < 1.0 -- Constraint_Error is raised if X = +-1.0 function Arccoth (X : Float_Type'Base) return Float_Type'Base is begin if abs X <= 1.0 then if abs X = 1.0 then raise Constraint_Error; else raise Argument_Error; end if; elsif abs X > 2.0 then return C_Atanh (1.0 / X); else -- 1.0 < abs X <= 2.0. One of X + 1.0 and X - 1.0 is exact, the -- other has error 0 or Epsilon. return 0.5 * (C_Log (abs (X + 1.0)) - C_Log (abs (X - 1.0))); end if; end Arccoth; ------------ -- Arcsin -- ------------ -- (Natural cycle) -- Principal branch: -- The result of the Arcsin function is in the quadrant containing the -- the point (1.0, X). This quadrant is I or IV; thus, the range of the -- function is approximately -Pi/2.0 to Pi/2.0. -- Exceptions: -- Argument_Error is raised when abs X > 1.0 or X is a NaN -- Prescribed results: -- Arcsin (0.0) = 0.0 -- Tightly approximated results: -- Arcsin (1.0) = Pi / 2.0 -- Arcsin (-1.0) = -Pi / 2.0 -- The prescribed result is guaranteed by C, but the tightly approximated -- results are not. function Arcsin (X : Float_Type'Base) return Float_Type'Base is Y : constant T := abs X; begin if not (Y < 1.0) then if X = 1.0 then return Pi / 2.0; elsif X = -1.0 then return -Pi / 2.0; else raise Argument_Error; end if; end if; return C_Asin (X); end Arcsin; -- (Arbitrary cycle) -- Principal branch: -- The result of the Arcsin function is in the quadrant containing the -- the point (1.0, X). This quadrant is I or IV; thus, the range of the -- function is approximately -Cycle/4.0 to Cycle/4.0. -- Exceptions: -- Argument_Error is raised when abs X > 1.0 or X is a NaN -- or when Cycle <= 0.0 or Cycle is a NaN -- Prescribed results: -- Arcsin (0.0) = 0.0 -- Tightly approximated results: -- Arcsin (1.0) = Cycle / 4.0 -- Arcsin (-1.0) = -Cycle / 4.0 -- The prescribed result is guaranteed by C, but the tightly approximated -- results are not. function Arcsin (X, Cycle : Float_Type'Base) return Float_Type'Base is Y : constant T := abs X; begin if not (Cycle > 0.0) then raise Argument_Error; elsif not (Y < 1.0) then if X = 1.0 then return Cycle / 4.0; elsif X = -1.0 then return -Cycle / 4.0; else raise Argument_Error; end if; end if; return C_Asin (X) / (Pi / 2.0) * (Cycle / 4.0); end Arcsin; ------------- -- Arcsinh -- ------------- -- Prescribed results: -- Arcsinh (0.0) = 0.0 -- TODO - general description function Arcsinh (X : Float_Type'Base) return Float_Type'Base is (C_Asinh (X)); ------------ -- Arctan -- ------------ -- (Natural cycle) -- Principal branch: -- The results are in the quadrant containing the point (X, Y). -- This may be any quadrant (I through IV) when the parameter X is -- specified, but it is restricted to quadrants I and IV when that -- parameter is omitted. Thus the range when that parameter is -- specified is approximately -Pi to Pi; when omitted the range is -- -Pi/2.0 to Pi/2.0. -- Exceptions: -- Argument_Error is raised when both X and Y have the value zero. -- Prescribed results: -- Arctan ( X, 0.0) = 0.0, when X > 0.0 -- Tightly approximated results: -- Arctan (0.0, Y) = Pi/2.0, when Y > 0.0 -- Arctan (0.0, Y) = -Pi/2.0, when Y < 0.0 -- Arctan ( X, +0.0) = +Pi, when X < 0.0 -- Arctan ( X, -0.0) = -Pi, when X < 0.0 -- The prescribed result and tightly approximated results are all -- guaranteed by C. function Arctan (Y : Float_Type'Base; X : Float_Type'Base := 1.0) return Float_Type'Base is begin if not (X /= 0.0) and then not (Y /= 0.0) then raise Argument_Error; end if; return C_Atan2 (Y, X); end Arctan; -- (Arbitrary cycle) -- Principal branch: -- The results are in the quadrant containing the point (X, Y). -- This may be any quadrant (I through IV) when the parameter X is -- specified, but it is restricted to quadrants I and IV when that -- parameter is omitted. Thus the range when that parameter is -- specified is approximately -Cycle/2.0 to Cycle/2.0; when omitted -- the range is -Cycle/4.0 to Cycle/4.0. -- Exceptions: -- Argument_Error is raised when both X and Y have the value zero, -- or when Cycle <= 0.0 or Cycle is a NaN. -- Prescribed results: -- Arctan ( X, 0.0, Cycle) = 0.0, when X > 0.0 -- Tightly approximated results: -- Arctan (0.0, Y, Cycle) = Cycle/4.0, when Y > 0.0 -- Arctan (0.0, Y, Cycle) = -Cycle/4.0, when Y < 0.0 -- Arctan ( X, +0.0, Cycle) = Cycle/2.0, when X < 0.0 -- Arctan ( X, -0.0, Cycle) = -Cycle/2.0, when X < 0.0 -- The prescribed result and tightly approximated results are all -- guaranteed by C. function Arctan (Y : Float_Type'Base; X : Float_Type'Base := 1.0; Cycle : Float_Type'Base) return Float_Type'Base is begin if not (Cycle > 0.0) then raise Argument_Error; end if; if X = 0.0 then if Y = 0.0 then raise Argument_Error; elsif Y > 0.0 then return Cycle / 4.0; elsif Y < 0.0 then return -Cycle / 4.0; end if; -- Y is a NaN elsif Y = 0.0 then -- X /= 0 if X > 0.0 then return 0.0; elsif X < 0.0 then return T'Copy_Sign (Cycle / 2.0, Y); end if; -- X is a NaN end if; return C_Atan2 (Y, X) * Cycle / (2.0 * Pi); end Arctan; ------------- -- Arctanh -- ------------- -- Exceptions: -- Argument_Error is raised when abs (X) > 1.0 -- Constraint_Error is raised when X = +-1.0 -- Prescribed results: -- Arctanh (0.0) = 0.0 -- TODO - general description function Arctanh (X : Float_Type'Base) return Float_Type'Base is begin if not (abs (X) < 1.0) then if abs (X) = 1.0 then raise Constraint_Error; else raise Argument_Error; end if; else return C_Atanh (X); end if; end Arctanh; --------- -- Cos -- --------- -- (Natural cycle) -- Prescribed results: -- Cos (0.0) = 1.0 -- Special values: -- Cos (X), where X is positive or negative infinity returns NaN value -- The C_Cos function satisfies all requirements function Cos (X : Float_Type'Base) return Float_Type'Base is begin return C_Cos (X); end Cos; -- (Arbitrary cycle) -- Exceptions: -- Argument_Error is raised when Cycle <= 0 -- Prescribed results: -- Cos (X) = 0.0, when X is K * Cycle / 4.0 with odd integer K -- Cos (X) = 1.0, when X is K * Cycle, with integer K -- Cos (X) = -1.0, with X is K * Cycle / 2.0, with odd integer K -- Special values: -- Cos (X), where X is positive or negative infinity returns a -- NaN value. function Cos (X, Cycle : Float_Type'Base) return Float_Type'Base is begin -- Just reuse the code for Sin. The potential small -- loss of speed is negligible with proper (front-end) inlining. return -Sin (abs X - Cycle * 0.25, Cycle); end Cos; ---------- -- Cosh -- ---------- -- Prescribed results: -- Cosh (0.0) = 1.0 -- Tightly approximated results: -- TODO -- TODO - general description function Cosh (X : Float_Type'Base) return Float_Type'Base is (C_Cosh (X)); --------- -- Cot -- --------- -- (natural cycle) -- Exceptions: -- Constraint_Error is raised when X = 0.0 -- As there is no cotangent function defined for C99, it is implemented -- here in terms of the regular tangent function. function Cot (X : Float_Type'Base) return Float_Type'Base is begin if not (X /= 0.0) then raise Constraint_Error; else return 1.0 / C_Tan (X); end if; end Cot; -- (arbitrary cycle) -- Exceptions: -- Argument_Error is raised when Cycle <= 0 -- Constraint_Error is raised when X = K * Cycle / 2.0, with integer K -- Prescribed results: -- Cot (X) = 0.0, when X is K * Cycle / 4.0 with odd integer K -- Special values: -- Cot (X), where X is positive or negative infinity returns NaN value function Cot (X, Cycle : Float_Type'Base) return Float_Type'Base is T, TA : Float_Type'Base; begin if not (Cycle > 0.0) then raise Argument_Error; end if; T := Float_Type'Base'Remainder (X, Cycle) / Cycle; TA := abs T; if not (T /= 0.0 and then TA /= 0.5) then raise Constraint_Error; end if; if TA = 0.25 then return 0.0; end if; return 1.0 / C_Tan (T * 2.0 * Pi); end Cot; ---------- -- Coth -- ---------- -- Exceptions: -- Argument_Error is raised when X = 0. -- Tightly approximated results: -- TODO -- TODO - general description function Coth (X : Float_Type'Base) return Float_Type'Base is begin if not (X /= 0.0) then raise Argument_Error; else return 1.0 / C_Tanh (X); end if; end Coth; --------- -- Exp -- --------- -- Prescribed results: -- Exp (0.0) = 1.0 -- Special values: -- Exp (X) = +0.0, for X is negative infinity -- Exp (X) = X, for X is positive infinity -- and Float_Type'Machine_Overflows = False -- The C_Exp function satisfies all Ada requirements function Exp (X : Float_Type'Base) return Float_Type'Base is begin return C_Exp (X); end Exp; --------- -- Log -- --------- -- (natural base) -- Exceptions: -- Argument is raised when X < 0.0 -- Constraint_Error is raised when X = 0.0 -- Prescribed results: -- Log (1.0) = 0.0; -- Special values: -- Log (X) = X, for X is positive infinity -- Apart from exceptions, the C_Log function satisfies all constraints function Log (X : Float_Type'Base) return Float_Type'Base is begin -- The if statements are structured to ensure NaN parameters cause the -- correct exception to be raised (since a NaN will always fail a -- non-equal comparison test). if not (X > 0.0) then if X = 0.0 then raise Constraint_Error; end if; raise Argument_Error; end if; return C_Log (X); end Log; -- (arbitrary base) -- Exceptions: -- Argument is raised when X < 0.0, Base <= 0.0 or Base = 1.0 -- Constraint_Error is raised when X = 0.0 -- Prescribed results: -- Log (1.0, Base) = 0.0 -- Special values: -- Log (X, Base) = X, for X is positive infinity -- Apart from exceptions, the C_Log function satisfies all constraints function Log (X, Base : Float_Type'Base) return Float_Type'Base is begin -- Try to execute the common case of X > 0.0 and Base > 1.0 with -- minimal checks. -- Note, the if statements are structured to ensure NaN parameters cause -- the correct exception to be raised (since a NaN will always fail a -- non-equal comparison test). if not (X > 0.0) or else not (Base > 1.0) then if not (X >= 0.0) or else not (Base > 0.0) or else Base = 1.0 then raise Argument_Error; end if; if X = 0.0 then raise Constraint_Error; end if; end if; return C_Log (X) / C_Log (Base); end Log; --------- -- Sin -- --------- -- (Natural cycle) -- Prescribed results: -- Sin (+0.0) = +0.0 -- Sin (-0.0) = -0.0 -- Special values: -- Sin (X), where X is positive or negative infinity returns a -- NaN value. -- The C_Sin function satisfies all requirements function Sin (X : Float_Type'Base) return Float_Type'Base is begin return C_Sin (X); end Sin; -- (Arbitrary cycle) -- Exceptions: -- Argument_Error is raised when Cycle <= 0 -- Prescribed results: -- Sin (-0.0) = -0.0 -- Sin (+0.0) = +0.0 -- Sin (X) = 1.0, when X is K * Cycle + Cycle / 4.0, with integer K -- Sin (X) = -1.0, with X is K * Cycle - Cycle / 4.0, with integer K -- Special values: -- Sin (X), where X is positive or negative infinity returns NaN value function Sin (X, Cycle : Float_Type'Base) return Float_Type'Base is T : Float_Type'Base; begin if not (Cycle > 0.0) then raise Argument_Error; end if; T := Float_Type'Base'Remainder (X, Cycle); -- The following reduction reduces the argument to the interval -- [-0.5 Cycle, 0.5 * Cycle]. The entire reduction is exact. if T > 0.25 * Cycle then T := 0.5 * Cycle - T; elsif T < -0.25 * Cycle then T := -T - 0.5 * Cycle; end if; return C_Sin (T / Cycle * 2.0 * Pi); end Sin; ---------- -- Sinh -- ---------- -- Prescribed results: -- Sinh (0.0) = 0.0 -- TODO - general description function Sinh (X : Float_Type'Base) return Float_Type'Base is (C_Sinh (X)); ---------- -- Sqrt -- ---------- -- Principle branch: -- The result is nonnegative. -- Exceptions: -- Argument_Error is raised when X < 0.0 -- Prescribed results: -- Sqrt (-0.0) = -0.0 -- Sqrt (+0.0) = +0.0 -- Sqrt (1.0) = 1.0 -- Special values: -- Sqrt (X) = X, for X is positive infinity -- C_Sqrt satisfies all requirements function Sqrt (X : Float_Type'Base) return Float_Type'Base is begin if not (X >= 0.0) then raise Argument_Error; end if; return C_Sqrt (X); end Sqrt; --------- -- Tan -- --------- -- (natural cycle) -- Prescribed results: -- Tan (-0.0) = -0.0 -- Tan (+0.0) = +0.0 -- Special values: -- Tan (X) returns a NaN value, when X is positive or negative infinity -- The C_Tan function satisfies all requirements function Tan (X : Float_Type'Base) return Float_Type'Base is begin return C_Tan (X); end Tan; -- (arbitrary cycle) -- Exceptions: -- Argument_Error is raised for Cycle <= 0.0 -- Prescribed results: -- Tan (-0.0, Cycle) = -0.0 -- Tan (+0.0, Cycle) = +0.0 -- Tan (X, Cycle) = 0, for X a multiple of Cycle / 2.0 -- Special values: -- Tan (X, Cycle) returns a NaN value, when X is positive or -- negative infinity function Tan (X, Cycle : Float_Type'Base) return Float_Type'Base is T : Float_Type'Base; TA : Float_Type'Base; begin if not (Cycle > 0.0) then raise Argument_Error; end if; T := Float_Type'Base'Remainder (X, Cycle) / Cycle; TA := abs T; -- The TA = 0.75 case is not needed because the remainder function -- is defined so that it never returns a value greater than Cycle/2, -- the value of TA will always be less than or equal to 0.5. Therefore, -- the condition TA = 0.75 can never be true. if TA = 0.25 then raise Constraint_Error; end if; if TA = 0.5 then return 0.0; end if; return C_Tan (T * 2.0 * Pi); end Tan; ---------- -- Tanh -- ---------- -- Principal branch: -- The absolute value of the result is smaller than 1.0 -- Prescribed results: -- Tanh (0.0) = 0.0 -- TODO - general description function Tanh (X : Float_Type'Base) return Float_Type'Base is (C_Tanh (X)); end System.Generic_C_Math_Interface;
with Ada.Text_IO; with Ada.Command_Line; procedure Symbolica is NumColors : constant := 4; NumSymbols : constant := 3; Length : constant := 5; Width : constant := 5; package IO renames Ada.Text_IO; type Color_T is new Natural range 0 .. NumColors - 1; type Symbol_T is new Natural range 0 .. NumSymbols - 1; type Column_T is new Natural range 1 .. Length; type Row_T is new Natural range 1 .. Width; type Tile_T is record Color : Color_T; Symbol : Symbol_T; end record; type Board_T is Array(Row_T, Column_T) of Tile_T; type Count_T is Array(Color_T, Symbol_T) of Natural; colors : constant Array(Color_T) of Character := ('R', 'B', 'G', 'Y'); symbols : constant Array(Symbol_T) of Character := ('a', 'b', 'c'); original_board, best_board, board : Board_T; best_distance : Natural := Length * Width; total_solutions : Natural := 0; iterations : Natural := 0; tile_count : Count_T := (others => (others => 0)); function TileImage(tile : Tile_T) return String is begin return (colors(tile.Color), symbols(tile.Symbol)); end TileImage; procedure PrintBoard(b : Board_T) is begin for r in Row_T loop for c in Column_T loop IO.Put(TileImage(b(r,c)) & " "); end loop; IO.New_Line; end loop; end PrintBoard; procedure ReadBoard(filename: in String; b : out Board_T) is Not_In : exception; function GetColor(c: Character) return Color_T is begin for color in Color_T'Range loop if colors(color) = c then return color; end if; end loop; raise Not_In; end GetColor; function GetSymbol(s: Character) return Symbol_T is begin for symbol in Symbol_T'Range loop if symbols(symbol) = s then return symbol; end if; end loop; raise Not_In; end GetSymbol; f : IO.File_Type; c,s : Character; eol : Boolean; begin IO.Open(f, IO.In_File, filename); for row in Row_T'Range loop for col in Column_T'Range loop IO.Get(f, c); IO.Get(f, s); b(row, col) := (GetColor(c), GetSymbol(s)); loop IO.Look_Ahead(f,c,eol); exit when eol or else c /= ' '; IO.Get(f, c); end loop; end loop; end loop; IO.Put_Line("Read in original Board"); PrintBoard(b); end ReadBoard; procedure Validate_Counts is counts : Array(Color_T, Symbol_T) of Integer := (others => (others => 0)); count_incorrect : exception; begin for row in Row_T'range loop for col in Column_T'range loop declare o : Tile_T renames original_board(row, col); b : Tile_T renames board(row, col); begin counts(o.Color, o.Symbol) := counts(o.Color, o.Symbol) + 1; counts(b.Color, b.Symbol) := counts(b.Color, b.Symbol) - 1; end; end loop; end loop; for c in Color_T'range loop for s in Symbol_T'range loop if counts(c, s) /= 0 then IO.Put_Line("New Board has incorrect count of " & (colors(c), symbols(s)) & ": " & Integer'Image(counts(c, s))); PrintBoard(board); raise count_incorrect; end if; end loop; end loop; end Validate_Counts; procedure Validate_Integrity is board_integrity : exception; function Pair_Is_Valid(a, b : Tile_T) return Boolean is begin return (a.Color = b.Color and then a.Symbol /= b.Symbol) or else (a.Color /= b.Color and then a.Symbol = b.Symbol); end Pair_Is_Valid; begin for row in Row_T'range loop for col in Column_T'range loop declare b : Tile_T renames board(row, col); begin if (row > Row_T'First and then not Pair_Is_Valid(b, board(row-1, col))) or else (row < Row_T'Last and then not Pair_Is_Valid(b, board(row+1, col))) or else (col > Column_T'First and then not Pair_Is_Valid(b, board(row, col-1))) or else (col < Column_T'Last and then not Pair_Is_Valid(b, board(row, col+1))) then IO.Put_Line("New Board has incorrect incorrectly placed " & TileImage(b) & " at " & Row_T'Image(row) & "," & Column_T'Image(col)); PrintBoard(board); raise board_integrity; end if; end; end loop; end loop; end Validate_Integrity; Perform_Additional_Validation : constant Boolean := False; procedure CompareBoards is distance : Natural := 0; chain : Natural := 0; waiting : Array(Color_T, Symbol_T, Color_T, Symbol_T) of Natural := (others => (others => (others => (others => 0)))); begin if Perform_Additional_Validation then Validate_Counts; Validate_Integrity; end if; total_solutions := total_solutions + 1; for row in Row_T'Range loop for col in Column_T'Range loop declare o : Tile_T renames original_board(row, col); b : Tile_T renames board(row, col); w : natural renames waiting(o.Color, o.Symbol, b.Color, b.Symbol); ow : natural renames waiting(b.Color, b.Symbol, o.Color, o.Symbol); begin if o.Color /= b.Color or else o.Symbol /= b.Symbol then if ow > 0 then ow := ow - 1; chain := chain - 1; distance := distance + 1; else chain := chain + 1; w := w + 1; end if; end if; end; end loop; end loop; if chain > 0 then distance := distance + chain - 1; end if; if distance < best_distance then best_board := board; best_distance := distance; end if; end CompareBoards; procedure Solve(row : Row_T; col : Column_T); procedure Pick(row : Row_T; col : Column_T; c : Color_T; s : Symbol_T) is tc : Natural renames tile_count(c, s); begin if tc = 0 then return; end if; board(row, col) := (c, s); if col = Column_T'Last then if row = Row_T'Last then CompareBoards; else tc := tc - 1; Solve(row + 1, 1); tc := tc + 1; end if; else tc := tc - 1; Solve(row, col + 1); tc := tc + 1; end if; end Pick; pragma inline(Pick); procedure Solve(row : Row_T; col : Column_T) is begin iterations := iterations + 1; if row = 1 then declare left : Tile_T renames board(row, col - 1); begin for color in Color_T'Range loop if color /= left.Color then Pick(row, col, color, left.Symbol); end if; end loop; for symbol in Symbol_T'Range loop if symbol /= left.Symbol then Pick(row, col, left.Color, symbol); end if; end loop; end; elsif col = 1 then declare above : Tile_T renames board(row - 1, col); begin for color in Color_T'Range loop if color /= above.Color then Pick(row, col, color, above.Symbol); end if; end loop; for symbol in Symbol_T'Range loop if symbol /= above.Symbol then Pick(row, col, above.Color, symbol); end if; end loop; end; else declare left : Tile_T renames board(row, col -1); above : Tile_T renames board(row - 1, col); begin if left.Color = above.Color then for symbol in Symbol_T'Range loop if symbol /= left.Symbol and then symbol /= above.Symbol then Pick(row, col, left.Color, symbol); end if; end loop; elsif left.Symbol = above.Symbol then for color in Color_T'Range loop if color /= left.Color and then color /= above.Color then Pick(row, col, color, left.Symbol); end if; end loop; else Pick(row, col, left.Color, above.Symbol); Pick(row, col, above.Color, left.Symbol); end if; end; end if; end Solve; begin ReadBoard(Ada.Command_Line.Argument(1), original_board); for row in Row_T'Range loop for col in Column_T'Range loop declare tile : constant Tile_T := original_board(row, col); begin tile_count(tile.Color, tile.Symbol) := tile_count(tile.Color, tile.Symbol) + 1; end; end loop; end loop; for color in Color_T'Range loop for symbol in Symbol_T'Range loop Pick(1, 1, color, symbol); end loop; end loop; IO.Put_Line("Total Iterations" & Natural'Image(iterations)); IO.Put_Line("Total Solutions found:" & Natural'Image(total_solutions)); IO.Put_Line("Total Swaps: " & Natural'Image(best_distance)); PrintBoard(best_board); end Symbolica;
-- ----------------------------------------------------------------- -- -- AdaSDL -- -- Binding to Simple Direct Media Layer -- -- Copyright (C) 2001 A.M.F.Vargas -- -- Antonio M. F. Vargas -- -- Ponta Delgada - Azores - Portugal -- -- http://www.adapower.net/~avargas -- -- E-mail: avargas@adapower.net -- -- ----------------------------------------------------------------- -- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public -- -- License as published by the Free Software Foundation; either -- -- version 2 of the License, or (at your option) any later version. -- -- -- -- This library is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. -- -- -- -- You should have received a copy of the GNU General Public -- -- License along with this library; if not, write to the -- -- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- -- Boston, MA 02111-1307, USA. -- -- -- -- 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. -- -- ----------------------------------------------------------------- -- -- **************************************************************** -- -- This is an Ada binding to SDL ( Simple DirectMedia Layer from -- -- Sam Lantinga - www.libsld.org ) -- -- **************************************************************** -- -- In order to help the Ada programmer, the comments in this file -- -- are, in great extent, a direct copy of the original text in the -- -- SDL header files. -- -- **************************************************************** -- with Interfaces.C.Strings; with SDL.Types; use SDL.Types; with SDL.RWops; package SDL.Audio is pragma Elaborate_Body; package C renames Interfaces.C; type Callback_ptr_Type is access procedure ( userdata : void_ptr; stream : Uint8_ptr; len : C.int); pragma Convention (C, Callback_ptr_Type); -- The calculated values in this structure are calculated by OpenAudio type AudioSpec is record freq : C.int; -- DSP frequency -- samples per second format : Uint16; -- Audio data format channels : Uint8; -- Number of channels: 1 mono, 2 stereo silence : Uint8; -- Audio buffer silence value (calculated) samples : Uint16; -- Audio buffer size in samples padding : Uint16; -- Necessary for some compile environments size : Uint32; -- Audio buffer size in bytes (calculated) -- This function is called when the audio device needs more data. -- 'stream' is a pointer to the audio data buffer -- 'len' is the length of that buffer in bytes. -- Once the callback returns, the buffer will no longer be valid. -- Stereo samples are stored in a LRLRLR ordering. callback : Callback_ptr_Type; userdata : void_ptr; end record; pragma Convention (C, AudioSpec); type AudioSpec_ptr is access all AudioSpec; pragma Convention (C, AudioSpec_ptr); type Format_Flag is mod 2**16; pragma Convention (C, Format_Flag); type Format_Flag_ptr is access Format_Flag; pragma Convention (C, Format_Flag_ptr); -- Audio format flags (defaults to LSB byte order) -- Unsigned 8-bit samples AUDIO_U8 : constant Format_Flag := 16#0008#; -- Signed 8-bit samples AUDIO_S8 : constant Format_Flag := 16#8008#; -- Unsigned 16-bit samples AUDIO_U16LSB : constant Format_Flag := 16#0010#; -- Signed 16-bit samples AUDIO_S16LSB : constant Format_Flag := 16#8010#; -- As above, but big-endian byte order AUDIO_U16MSB : constant Format_Flag := 16#1010#; -- As above, but big-endian byte order AUDIO_S16MSB : constant Format_Flag := 16#9010#; AUDIO_U16 : constant Format_Flag := AUDIO_U16LSB; AUDIO_S16 : constant Format_Flag := AUDIO_S16LSB; function Get_Audio_U16_Sys return Format_Flag; function Get_Audio_S16_Sys return Format_Flag; -- A structure to hold a set of audio conversion filters and buffers type AudioCVT; type AudioCVT_ptr is access all AudioCVT; pragma Convention (C, AudioCVT_ptr); type filter_ptr is access procedure ( cvt : AudioCVT_ptr; format : Uint16); pragma Convention (C, filter_ptr); type filters_array is array (0 .. 9) of filter_ptr; pragma Convention (C, filters_array); type AudioCVT is record need : C.int; -- Set to 1 if conversion possible src_format : Uint16; -- Source audio format dst_format : Uint16; -- Target audio format rate_incr : C.double; -- Rate conversion increment buf : Uint8_ptr; -- Buffer to hold entire audio data len : C.int; -- Length of original audio buffer len_cvt : C.int; -- Length of converted audio buffer len_mult : C.int; -- buffer must be len*len_mult big len_ratio : C.double; -- Given len, final size is len*len_ratio filters : filters_array; filter_index : filters_array; -- Current audio conversion function end record; pragma Convention (C, AudioCVT); -- ------------------- -- Function prototypes -- ------------------- -- These function and procedure are used internally, and should not -- be used unless you have a specific need to specify the audio driver -- you want to use.You should normally use Init or InitSubSystem. function AudioInit (driver_name : C.Strings.chars_ptr) return C.int; pragma Import (C, AudioInit, "SDL_AudioInit"); procedure AudioQuit; pragma Import (C, AudioQuit, "SDL_AudioQuit"); -- This function fills the given character buffer with the name of the -- current audio driver, and returns a pointer to it if the audio driver -- has been initialized. It returns NULL if no driver has been initialized. function AudioDriverName ( namebuf : C.Strings.chars_ptr; maslen : C.int) return C.Strings.chars_ptr; pragma Import (C, AudioDriverName, "SDL_AudioDriverName"); -- This function opens the audio device with the desired parameters, and -- returns 0 if successful, placing the actual hardware parameters in the -- structure pointed to by 'obtained'. If 'obtained' is NULL, the audio -- data passed to the callback function will be guaranteed to be in the -- requested format, and will be automatically converted to the hardware -- audio format if necessary. This function returns -1 if it failed -- to open the audio device, or couldn't set up the audio thread. -- When filling in the desired audio spec structure, -- 'desired.freq' should be the desired audio frequency in samples-per-sec. -- 'desired.format' should be the desired audio format. -- 'desired.samples' is the desired size of the audio buffer, in samples. -- This number should be a power of two, and may be adjusted by the audio -- driver to a value more suitable for the hardware. Good values seem to -- range between 512 and 8096 inclusive, depending on the application and -- CPU speed. Smaller values yield faster response time, but can lead -- to underflow if the application is doing heavy processing and cannot -- fill the audio buffer in time. A stereo sample consists of both right -- and left channels in LR ordering. -- Note that the number of samples is directly related to time by the -- following formula: ms := (samples*1000)/freq -- 'desired->size' is the size in bytes of the audio buffer, and is -- calculated by OpenAudio. -- 'desired->silence' is the value used to set the buffer to silence, -- and is calculated by OpenAudio. -- 'desired->callback' should be set to a function that will be called -- when the audio device is ready for more data. It is passed a pointer -- to the audio buffer, and the length in bytes of the audio buffer. -- This function usually runs in a separate thread, and so you should -- protect data structures that it accesses by calling LockAudio -- and UnlockAudio in your code. -- 'desired.userdata' is passed as the first parameter to your callback -- function. -- The audio device starts out playing silence when it's opened, and should -- be enabled for playing by calling PauseAudio(0) when you are ready -- for your audio callback function to be called. Since the audio driver -- may modify the requested size of the audio buffer, you should allocate -- any local mixing buffers after you open the audio device. function OpenAudio ( desired : AudioSpec_ptr; obtained : AudioSpec_ptr) return C.int; pragma Import (C, OpenAudio, "SDL_OpenAudio"); -- Get the current audio state: type audiostatus is new C.int; AUDIO_STOPED : constant := 0; AUDIO_PLAYING : constant := 1; AUDIO_PAUSED : constant := 2; function GetAudioStatus return audiostatus; pragma Import (C, GetAudioStatus, "SDL_GetAudioStatus"); -- This function pauses and unpauses the audio callback processing. -- It should be called with a parameter of 0 after opening the audio -- device to start playing sound. This is so you can safely initialize -- data for your callback function after opening the audio device. -- Silence will be written to the audio device during the pause. procedure PauseAudio (pause_on : C.int); pragma Import (C, PauseAudio, "SDL_PauseAudio"); -- This function loads a WAVE from the data source, automatically freeing -- that source if 'freesrc' is non-zero. For example, to load a WAVE file, -- you could do: -- LoadWAV_RW(RWFromFile("sample.wav", "rb"), 1, ...); -- If this function succeeds, it returns the given AudioSpec, -- filled with the audio data format of the wave data, and sets -- 'audio_buf' to a malloc()'d buffer containing the audio data, -- and sets 'audio_len' to the length of that audio buffer, in bytes. -- You need to free the audio buffer with FreeWAV when you are -- done with it. -- This function returns NULL and sets the SDL error message if the -- wave file cannot be opened, uses an unknown data format, or is -- corrupt. Currently raw and MS-ADPCM WAVE files are supported. function LoadWAV_RW ( src : SDL.RWops.RWops_ptr; freesrc : C.int; spec : AudioSpec_ptr; audio_buf : Uint8_ptr_ptr; audio_len : Uint32_ptr) return AudioSpec_ptr; pragma Import (C, LoadWAV_RW, "SDL_LoadWAV_RW"); function LoadWAV ( file : C.Strings.chars_ptr; spec : AudioSpec_ptr; audio_buf : Uint8_ptr_ptr; audio_len : Uint32_ptr) return AudioSpec_ptr; pragma Inline (LoadWAV); -- LoadWAV_RW_VP not working properly -- for some strange reason. Result is Always null. procedure LoadWAV_RW_VP ( Result : out AudioSpec_ptr; src : SDL.RWops.RWops_ptr; freesrc : C.int; spec : out AudioSpec_ptr; audio_buf : out Uint8_ptr; audio_len : out Uint32); pragma Import (C, LoadWAV_RW_VP, "SDL_LoadWAV_RW"); pragma Import_Valued_Procedure (LoadWAV_RW_VP); procedure Load_WAV ( file : C.Strings.chars_ptr; spec : AudioSpec_ptr; -- out AudioSpec audio_buf : Uint8_ptr_ptr; -- out Uint8_ptr audio_len : Uint32_ptr; -- out Uint32 Valid_WAV : out Boolean); pragma Inline (Load_WAV); -- This function frees data previously allocated with SDL_LoadWAV_RW() procedure FreeWAV (audio_buf : Uint8_ptr); pragma Import (C, FreeWAV, "SDL_FreeWAV"); -- This function takes a source format and rate and a destination format -- and rate, and initializes the 'cvt' structure with information needed -- by ConvertAudio to convert a buffer of audio data from one format -- to the other. -- This function returns 0, or -1 if there was an error. function BuildAudioCVT ( cvt : AudioCVT_ptr; src_format : Uint16; src_channels : Uint8; src_rate : C.int; dst_format : Uint16; dst_channels : Uint8; dst_rate : C.int) return C.int; pragma Import (C, BuildAudioCVT, "SDL_BuildAudioCVT"); -- Once you have initialized the 'cvt' structure using BuildAudioCVT, -- created an audio buffer cvt.buf, and filled it with cvt.len bytes of -- audio data in the source format, this function will convert it in-place -- to the desired format. -- The data conversion may expand the size of the audio data, so the buffer -- cvt.buf should be allocated after the cvt structure is initialized by -- BuildAudioCVT, and should be cvt.len * cvt.len_mult bytes long. function ConvertAudio (cvt : AudioCVT_ptr) return C.int; pragma Import (C, ConvertAudio, "SDL_ConvertAudio"); -- This takes two audio buffers of the playing audio format and mixes -- them, performing addition, volume adjustment, and overflow clipping. -- The volume ranges from 0 - 128, and should be set to _MIX_MAXVOLUME -- for full audio volume. Note this does not change hardware volume. -- This is provided for convenience -- you can mix your own audio data. MIX_MAXVOLUME : constant := 128; procedure MixAudio ( dst : Uint8_ptr; src : Uint8_ptr; len : Uint32; volume : C.int); pragma Import (c, MixAudio, "SDL_MixAudio"); -- The lock manipulated by these functions protects the callback function. -- During a LockAudio/UnlockAudio pair, you can be guaranteed that the -- callback function is not running. Do not call these from the callback -- function or you will cause deadlock. procedure LockAudio; pragma Import (C, LockAudio, "SDL_LockAudio"); procedure UnlockAudio; pragma Import (C, UnlockAudio, "SDL_UnlockAudio"); -- This procedure shuts down audio processing and closes the audio device. procedure CloseAudio; pragma Import (C, CloseAudio, "SDL_CloseAudio"); end SDL.Audio;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2015, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Command_Line; with Ada.Wide_Wide_Text_IO; with League.Application; with League.Strings; with UAFLEX.Run; procedure UAFLEX.Driver is procedure Read_Arguments; procedure Print_Usage; function "+" (Item : Wide_Wide_String) return League.Strings.Universal_String renames League.Strings.To_Universal_String; Handler : League.Strings.Universal_String; Input : League.Strings.Universal_String; Tokens : League.Strings.Universal_String; Types : League.Strings.Universal_String; Scanner : League.Strings.Universal_String; ----------------- -- Print_Usage -- ----------------- procedure Print_Usage is use Ada.Wide_Wide_Text_IO; begin Put_Line (Standard_Error, "Usage: uaflex <unit-options> input_file"); Put_Line (Standard_Error, " where <unit-options> contains:"); Put_Line (Standard_Error, " --types Types_Unit - unit for type and condition declarations"); Put_Line (Standard_Error, " --handler Handler_Unit - unit for abstract handler declaration"); Put_Line (Standard_Error, " --scanner Scanner_Unit - unit where scanner is located"); Put_Line (Standard_Error, " --tokens Tokens_Unit - unit where Token type is declared"); end Print_Usage; -------------------- -- Read_Arguments -- -------------------- procedure Read_Arguments is use League.Strings; Is_Types : constant Universal_String := +"--types"; Is_Scanner : constant Universal_String := +"--scanner"; Is_Tokens : constant Universal_String := +"--tokens"; Is_Handler : constant Universal_String := +"--handler"; Last : constant Natural := League.Application.Arguments.Length; Index : Positive := 1; begin while Index <= Last loop declare Next : constant League.Strings.Universal_String := League.Application.Arguments.Element (Index); begin if Index = Last then Input := Next; elsif Next = Is_Types then Index := Index + 1; Types := League.Application.Arguments.Element (Index); elsif Next = Is_Scanner then Index := Index + 1; Scanner := League.Application.Arguments.Element (Index); elsif Next = Is_Tokens then Index := Index + 1; Tokens := League.Application.Arguments.Element (Index); elsif Next = Is_Handler then Index := Index + 1; Handler := League.Application.Arguments.Element (Index); end if; Index := Index + 1; end; end loop; end Read_Arguments; Success : Boolean; begin Read_Arguments; if Handler.Is_Empty or Input.Is_Empty or Tokens.Is_Empty or Types.Is_Empty or Scanner.Is_Empty then Print_Usage; return; end if; UAFLEX.Run (Handler, Input, Tokens, Types, Scanner, Success); if not Success then Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); end if; end UAFLEX.Driver;
with gel.World; package gel_demo_Server -- -- Provides the server. -- is the_server_World : gel.World.view; task Item is entry start; end Item; end gel_demo_Server;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- F N A M E -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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 Alloc; with Hostparm; use Hostparm; with Table; with Types; use Types; package body Fname is ----------------------------- -- Dummy Table Definitions -- ----------------------------- -- The following table was used in old versions of the compiler. We retain -- the declarations here for compatibility with old tree files. The new -- version of the compiler does not use this table, and will write out a -- dummy empty table for Tree_Write. type SFN_Entry is record U : Unit_Name_Type; F : File_Name_Type; end record; package SFN_Table is new Table.Table ( Table_Component_Type => SFN_Entry, Table_Index_Type => Int, Table_Low_Bound => 0, Table_Initial => Alloc.SFN_Table_Initial, Table_Increment => Alloc.SFN_Table_Increment, Table_Name => "Fname_Dummy_Table"); --------------------------- -- Is_Internal_File_Name -- --------------------------- function Is_Internal_File_Name (Fname : File_Name_Type; Renamings_Included : Boolean := True) return Boolean is begin if Is_Predefined_File_Name (Fname, Renamings_Included) then return True; -- Once Is_Predefined_File_Name has been called and returns False, -- Name_Buffer contains Fname and Name_Len is set to 8. elsif Name_Buffer (1 .. 2) = "g-" or else Name_Buffer (1 .. 8) = "gnat " then return True; elsif OpenVMS and then (Name_Buffer (1 .. 4) = "dec-" or else Name_Buffer (1 .. 8) = "dec ") then return True; else return False; end if; end Is_Internal_File_Name; ----------------------------- -- Is_Predefined_File_Name -- ----------------------------- -- This should really be a test of unit name, given the possibility of -- pragma Source_File_Name setting arbitrary file names for any files??? -- Once Is_Predefined_File_Name has been called and returns False, -- Name_Buffer contains Fname and Name_Len is set to 8. This is used -- only by Is_Internal_File_Name, and is not part of the official -- external interface of this function. function Is_Predefined_File_Name (Fname : File_Name_Type; Renamings_Included : Boolean := True) return Boolean is begin Get_Name_String (Fname); return Is_Predefined_File_Name (Renamings_Included); end Is_Predefined_File_Name; function Is_Predefined_File_Name (Renamings_Included : Boolean := True) return Boolean is subtype Str8 is String (1 .. 8); Predef_Names : constant array (1 .. 11) of Str8 := ("ada ", -- Ada "interfac", -- Interfaces "system ", -- System -- Remaining entries are only considered if Renamings_Included true "calendar", -- Calendar "machcode", -- Machine_Code "unchconv", -- Unchecked_Conversion "unchdeal", -- Unchecked_Deallocation "directio", -- Direct_IO "ioexcept", -- IO_Exceptions "sequenio", -- Sequential_IO "text_io "); -- Text_IO Num_Entries : constant Natural := 3 + 8 * Boolean'Pos (Renamings_Included); begin -- Remove extension (if present) if Name_Len > 4 and then Name_Buffer (Name_Len - 3) = '.' then Name_Len := Name_Len - 4; end if; -- Definitely false if longer than 12 characters (8.3) if Name_Len > 8 then return False; -- Definitely predefined if prefix is a- i- or s- followed by letter elsif Name_Len >= 3 and then Name_Buffer (2) = '-' and then (Name_Buffer (1) = 'a' or else Name_Buffer (1) = 'i' or else Name_Buffer (1) = 's') and then (Name_Buffer (3) in 'a' .. 'z' or else Name_Buffer (3) in 'A' .. 'Z') then return True; end if; -- Otherwise check against special list, first padding to 8 characters while Name_Len < 8 loop Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := ' '; end loop; for J in 1 .. Num_Entries loop if Name_Buffer (1 .. 8) = Predef_Names (J) then return True; end if; end loop; -- Note: when we return False here, the Name_Buffer contains the -- padded file name. This is not defined for clients of the package, -- but is used by Is_Internal_File_Name. return False; end Is_Predefined_File_Name; --------------- -- Tree_Read -- --------------- procedure Tree_Read is begin SFN_Table.Tree_Read; end Tree_Read; ---------------- -- Tree_Write -- ---------------- procedure Tree_Write is begin SFN_Table.Tree_Write; end Tree_Write; end Fname;
-- -- 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. -- -- package ewok.syscalls.handler with spark_mode => off is function svc_handler (frame_a : t_stack_frame_access) return t_stack_frame_access; end ewok.syscalls.handler;
with Kernel.Serial_Output; use Kernel.Serial_Output; with Ada.Real_Time; use Ada.Real_Time; --use type Ada.Real_Time.Time_Span; --with System; use System; with Workload; --with Kernel.Peripherals; use Kernel.Peripherals; --use type Kernel.Peripherals.UART_Channel; package body tools is --------------------------------------------------------------------- -- PROCEDIMIENTO QUE IMPRIME LA HORA -- --------------------------------------------------------------------- procedure Current_Time (Origen : Ada.Real_Time.Time)is begin Put_Line (""); Put ("["); --Print_RTClok; --Kernel.Serial_Output.Put (" / "); Kernel.Serial_Output.Put(Duration'Image(To_Duration(Clock - Origen))); Put ("] "); -- Put_Line (""); end Current_Time; --------------------------------------------------------------------- -- PROCEDIMIENTO QUE SACA EL VALOR DE UN ENTERO POR LA UART -- --------------------------------------------------------------------- procedure Print_an_Integer (x : in integer) is begin --Put ("("); Kernel.Serial_Output.Put (Integer'Image(x)); --Put (")"); end Print_an_Integer; --------------------------------------------------------------------- -- PROCEDIMIENTO QUE SACA EL VALOR DE UN FLOAT POR LA UART -- --------------------------------------------------------------------- procedure Print_a_Float (x : in float) is type Float_Printable is digits 2; nx: Float_Printable; begin --Put ("("); nx := Float_Printable (x); Kernel.Serial_Output.Put (Float_Printable'Image(nx)); --Put (")"); end Print_a_Float; --------------------------------------------------------------------- -- PROCEDIMIENTO PARA AVISAR DEL ARRANQUE DE UNA TAREA -- --------------------------------------------------------------------- procedure Starting_Notice (T: in String) is begin Current_Time (Big_Bang); Put (">>> "); Put (T); end Starting_Notice; procedure Finishing_Notice (T: in String) is begin Current_Time (Big_Bang); Put ("--- "); Put (T); end Finishing_Notice; --------------------------------------------------------------------- -- PROCEDIMIENTO QUE HACE CALCULOS -- --------------------------------------------------------------------- Time_per_Kwhetstones : constant Ada.Real_Time.Time_Span := Ada.Real_Time.Nanoseconds (664445); -- anterior (479936); procedure Execution_Time (Time : Ada.Real_Time.Time_Span) is begin Workload.Small_Whetstone (Time / Time_per_Kwhetstones); end Execution_Time; --------------------------------------------------------------------- begin null; end tools;
----------------------------------------------------------------------- -- keystore-gpg_tests -- Test AKT with GPG2 -- Copyright (C) 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Text_IO; with Util.Test_Caller; with Util.Log.Loggers; with Util.Processes; with Util.Streams.Buffered; with Util.Streams.Pipes; package body Keystore.Fuse_Tests is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Keystore.Fuse_Tests"); CHECK_MOUNT_PATH : constant String := "regtests/files/check-mount.sh"; package Caller is new Util.Test_Caller (Test, "AKT.Fuse"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test AKT.Commands.Mount", Test_Mount'Access); Caller.Add_Test (Suite, "Test AKT.Commands.Mount (Fill)", Test_Mount_Fill'Access); Caller.Add_Test (Suite, "Test AKT.Commands.Mount (Clean)", Test_Mount_Clean'Access); Caller.Add_Test (Suite, "Test AKT.Commands.Mount (Check)", Test_Mount_Check'Access); Caller.Add_Test (Suite, "Test AKT.Commands.Mount (Stress)", Test_Mount_Stress'Access); end Add_Tests; -- ------------------------------ -- Execute the command and get the output in a string. -- ------------------------------ procedure Execute (T : in out Test; Command : in String; Input : in String; Output : in String; Result : out Ada.Strings.Unbounded.Unbounded_String; Status : in Natural := 0) is P : aliased Util.Streams.Pipes.Pipe_Stream; Buffer : Util.Streams.Buffered.Input_Buffer_Stream; begin if Input'Length > 0 then Log.Info ("Execute: {0} < {1}", Command, Input); elsif Output'Length > 0 then Log.Info ("Execute: {0} > {1}", Command, Output); else Log.Info ("Execute: {0}", Command); end if; P.Set_Input_Stream (Input); P.Set_Output_Stream (Output); P.Open (Command, Util.Processes.READ_ALL); -- Write on the process input stream. Result := Ada.Strings.Unbounded.Null_Unbounded_String; Buffer.Initialize (P'Unchecked_Access, 8192); Buffer.Read (Result); P.Close; Ada.Text_IO.Put_Line (Ada.Strings.Unbounded.To_String (Result)); Log.Info ("Command result: {0}", Result); Util.Tests.Assert_Equals (T, Status, P.Get_Exit_Status, "Command '" & Command & "' failed"); end Execute; procedure Execute (T : in out Test; Command : in String; Result : out Ada.Strings.Unbounded.Unbounded_String; Status : in Natural := 0) is begin T.Execute (Command, "", "", Result, Status); end Execute; procedure Execute (T : in out Test; Command : in String; Expect : in String; Status : in Natural := 0) is Path : constant String := Util.Tests.Get_Path ("regtests/expect/" & Expect); Output : constant String := Util.Tests.Get_Test_Path (Expect); Result : Ada.Strings.Unbounded.Unbounded_String; begin T.Execute (Command, "", Output, Result, Status); Util.Tests.Assert_Equal_Files (T, Path, Output, "Command '" & Command & "' invalid output"); end Execute; -- ------------------------------ -- Test the akt keystore creation. -- ------------------------------ procedure Test_Mount (T : in out Test) is Tool : constant String := Util.Tests.Get_Path (CHECK_MOUNT_PATH); Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Create keystore T.Execute (Tool & " START", Result); Util.Tests.Assert_Matches (T, "PASS", Result, "akt keystore creation failed"); end Test_Mount; -- ------------------------------ -- Test the akt mount and filling the keystore. -- ------------------------------ procedure Test_Mount_Fill (T : in out Test) is Tool : constant String := Util.Tests.Get_Path (CHECK_MOUNT_PATH); Result : Ada.Strings.Unbounded.Unbounded_String; begin T.Execute (Tool & " FILL", Result); Util.Tests.Assert_Matches (T, "PASS", Result, "akt keystore mount+fill failed"); end Test_Mount_Fill; -- ------------------------------ -- Test the akt mount and cleaning the keystore. -- ------------------------------ procedure Test_Mount_Clean (T : in out Test) is Tool : constant String := Util.Tests.Get_Path (CHECK_MOUNT_PATH); Result : Ada.Strings.Unbounded.Unbounded_String; begin T.Execute (Tool & " CLEAN", Result); Util.Tests.Assert_Matches (T, "PASS", Result, "akt keystore mount+clean failed"); end Test_Mount_Clean; -- ------------------------------ -- Test the akt mount and checking its content. -- ------------------------------ procedure Test_Mount_Check (T : in out Test) is Tool : constant String := Util.Tests.Get_Path (CHECK_MOUNT_PATH); Result : Ada.Strings.Unbounded.Unbounded_String; begin T.Execute (Tool & " CHECK", Result); Util.Tests.Assert_Matches (T, "PASS", Result, "akt keystore mount+check after stress failed"); end Test_Mount_Check; -- ------------------------------ -- Test the akt mount and stressing the filesystem. -- ------------------------------ procedure Test_Mount_Stress (T : in out Test) is Tool : constant String := Util.Tests.Get_Path (CHECK_MOUNT_PATH); Result : Ada.Strings.Unbounded.Unbounded_String; begin T.Execute (Tool & " BIG", Result); Util.Tests.Assert_Matches (T, "PASS", Result, "akt keystore mount+check after stress failed"); end Test_Mount_Stress; end Keystore.Fuse_Tests;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName/> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>pixel_unpack</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>in_stream_data_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_stream.data.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>in_stream_user_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_stream.user.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>in_stream_last_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_stream.last.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>out_stream_data_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out_stream.data.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>out_stream_user_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out_stream.user.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>out_stream_last_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out_stream.last.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_7"> <Value> <Obj> <type>1</type> <id>7</id> <name>mode</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>mode</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>80</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_8"> <Value> <Obj> <type>0</type> <id>8</id> <name>mode_read</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>mode</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>124</item> <item>125</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>22</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>35</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second class_id="12" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="13" tracking_level="0" version="0"> <first class_id="14" tracking_level="0" version="0"> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>35</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>12</count> <item_version>0</item_version> <item>126</item> <item>127</item> <item>129</item> <item>130</item> <item>132</item> <item>133</item> <item>135</item> <item>136</item> <item>138</item> <item>139</item> <item>141</item> <item>142</item> </oprand_edges> <opcode>switch</opcode> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>26</id> <name>empty_13</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>342</item> <item>343</item> <item>344</item> <item>345</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>27</id> <name>data_V_2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>data.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>346</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>28</id> <name>user_V_2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>user.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>347</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>29</id> <name>last_2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>last</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>348</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>30</id> <name>p_Result_s</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_181</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>349</item> <item>350</item> <item>351</item> <item>352</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>31</id> <name>p_Result_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>114</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>114</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_185</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>353</item> <item>354</item> <item>355</item> <item>356</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>32</id> <name>tmp_12</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>114</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>114</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_12_fu_197_p1</rtlName> <coreName/> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>357</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>33</id> <name>p_Result_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>114</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>114</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_2_fu_201_p3</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>358</item> <item>359</item> <item>360</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>34</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>114</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>114</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>361</item> <item>362</item> <item>363</item> <item>364</item> <item>365</item> <item>366</item> <item>367</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>35</id> <name>p_Result_9_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>112</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>112</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_189</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>368</item> <item>369</item> <item>370</item> <item>371</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>36</id> <name>p_Result_14_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>114</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>114</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_14_1_fu_210_p4</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>373</item> <item>374</item> <item>375</item> <item>376</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>37</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>114</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>114</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>377</item> <item>378</item> <item>379</item> <item>380</item> <item>381</item> <item>382</item> <item>383</item> <item>561</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>39</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>104</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>104</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>384</item> <item>385</item> <item>386</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>43</id> <name>empty_11</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>311</item> <item>312</item> <item>313</item> <item>314</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>44</id> <name>data_V_1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>data.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>315</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>45</id> <name>user_V_1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>user.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>316</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>46</id> <name>last_1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>last</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>317</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>47</id> <name>tmp_11</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_11_fu_221_p1</rtlName> <coreName/> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>318</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>48</id> <name>p_Result_8</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_8_fu_225_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>319</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>49</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>320</item> <item>321</item> <item>322</item> <item>323</item> <item>324</item> <item>325</item> <item>326</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>50</id> <name>p_Result_7_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_193</rtlName> <coreName/> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>327</item> <item>328</item> <item>329</item> <item>330</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>51</id> <name>p_Result_8_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_8_1_fu_230_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>331</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>52</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>332</item> <item>333</item> <item>334</item> <item>335</item> <item>336</item> <item>337</item> <item>338</item> <item>562</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>54</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>87</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>339</item> <item>340</item> <item>341</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>58</id> <name>empty_9</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>254</item> <item>255</item> <item>256</item> <item>257</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>59</id> <name>data_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>data.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>258</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>60</id> <name>user_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>user.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>259</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>61</id> <name>last</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>last</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>260</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>62</id> <name>tmp_10</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_10_fu_235_p1</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>261</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>63</id> <name>p_Result_6</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_6_fu_239_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>262</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>64</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>263</item> <item>264</item> <item>265</item> <item>266</item> <item>267</item> <item>268</item> <item>269</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>65</id> <name>p_Result_5_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_181</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>270</item> <item>271</item> <item>272</item> <item>274</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>66</id> <name>p_Result_6_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_6_1_fu_244_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>275</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>67</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>276</item> <item>277</item> <item>278</item> <item>279</item> <item>280</item> <item>281</item> <item>282</item> <item>565</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>68</id> <name>p_Result_5_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_189</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>283</item> <item>284</item> <item>285</item> <item>287</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>69</id> <name>p_Result_6_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_6_2_fu_249_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>288</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>70</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>289</item> <item>290</item> <item>291</item> <item>292</item> <item>293</item> <item>294</item> <item>295</item> <item>564</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>71</id> <name>p_Result_5_3</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>reg_185</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>296</item> <item>297</item> <item>298</item> <item>299</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>72</id> <name>p_Result_6_3</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_6_3_fu_254_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>300</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>73</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>78</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>78</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>301</item> <item>302</item> <item>303</item> <item>304</item> <item>305</item> <item>306</item> <item>307</item> <item>563</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>75</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>70</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>70</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>308</item> <item>309</item> <item>310</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>79</id> <name>empty_7</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>236</item> <item>237</item> <item>238</item> <item>239</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>80</id> <name>p_Val2_s</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>__Val2__</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>240</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>81</id> <name>in_stream_user_V_val3</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>241</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>82</id> <name>in_stream_last_V_val3</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>242</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>83</id> <name>tmp_9</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_9_fu_259_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>243</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>84</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>61</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>61</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>244</item> <item>245</item> <item>246</item> <item>247</item> <item>248</item> <item>249</item> <item>250</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>86</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>58</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>58</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>251</item> <item>252</item> <item>253</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>90</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>144</item> <item>145</item> <item>146</item> <item>147</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>91</id> <name>in_stream_data_V_val</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>148</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>92</id> <name>in_stream_user_V_val</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>149</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>93</id> <name>in_stream_last_V_val</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>150</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_62"> <Value> <Obj> <type>0</type> <id>94</id> <name>empty_4</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>151</item> <item>152</item> <item>153</item> <item>154</item> <item>570</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_63"> <Value> <Obj> <type>0</type> <id>95</id> <name>in_stream_data_V_val1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>155</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_64"> <Value> <Obj> <type>0</type> <id>96</id> <name>in_stream_user_V_val1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>156</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_65"> <Value> <Obj> <type>0</type> <id>97</id> <name>in_stream_last_V_val1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>157</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_66"> <Value> <Obj> <type>0</type> <id>98</id> <name>empty_5</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>158</item> <item>159</item> <item>160</item> <item>161</item> <item>569</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_67"> <Value> <Obj> <type>0</type> <id>99</id> <name>in_stream_data_V_val2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>162</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_68"> <Value> <Obj> <type>0</type> <id>100</id> <name>in_stream_user_V_val2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>163</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_69"> <Value> <Obj> <type>0</type> <id>101</id> <name>in_stream_last_V_val2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>164</item> </oprand_edges> <opcode>extractvalue</opcode> </item> <item class_id_reference="9" object_id="_70"> <Value> <Obj> <type>0</type> <id>102</id> <name>tmp4</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>44</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp4_fu_284_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>165</item> <item>166</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_71"> <Value> <Obj> <type>0</type> <id>103</id> <name>has_user_V_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>44</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>has_user_V_2_fu_290_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>167</item> <item>168</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_72"> <Value> <Obj> <type>0</type> <id>104</id> <name>tmp5</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>45</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>45</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp5_fu_297_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>169</item> <item>170</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_73"> <Value> <Obj> <type>0</type> <id>105</id> <name>last_9_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>45</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>45</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>last_9_2_fu_303_p2</rtlName> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>171</item> <item>172</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_74"> <Value> <Obj> <type>0</type> <id>106</id> <name>tmp_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>tmp_2_fu_264_p1</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>173</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_75"> <Value> <Obj> <type>0</type> <id>107</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>175</item> <item>176</item> <item>177</item> <item>178</item> <item>179</item> <item>180</item> <item>182</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_76"> <Value> <Obj> <type>0</type> <id>108</id> <name>tmp_3</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>reg_185</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>184</item> <item>185</item> <item>187</item> <item>189</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_77"> <Value> <Obj> <type>0</type> <id>109</id> <name>tmp_4</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>tmp_4_fu_268_p1</rtlName> <coreName/> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>190</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_78"> <Value> <Obj> <type>0</type> <id>110</id> <name>p_Result_3_1</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_3_1_fu_323_p3</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>192</item> <item>193</item> <item>194</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_79"> <Value> <Obj> <type>0</type> <id>111</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>195</item> <item>196</item> <item>197</item> <item>198</item> <item>199</item> <item>200</item> <item>201</item> <item>568</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_80"> <Value> <Obj> <type>0</type> <id>112</id> <name>tmp_5</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>reg_193</rtlName> <coreName/> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>203</item> <item>204</item> <item>206</item> <item>207</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_81"> <Value> <Obj> <type>0</type> <id>113</id> <name>tmp_6</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>tmp_6_fu_309_p1</rtlName> <coreName/> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>208</item> </oprand_edges> <opcode>trunc</opcode> </item> <item class_id_reference="9" object_id="_82"> <Value> <Obj> <type>0</type> <id>114</id> <name>p_Result_3_2</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_3_2_fu_331_p3</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>210</item> <item>211</item> <item>212</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_83"> <Value> <Obj> <type>0</type> <id>115</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>213</item> <item>214</item> <item>215</item> <item>216</item> <item>217</item> <item>218</item> <item>219</item> <item>567</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_84"> <Value> <Obj> <type>0</type> <id>116</id> <name>p_Result_3_3</name> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>p_Result_3_3_reg_392</rtlName> <coreName/> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>221</item> <item>222</item> <item>224</item> <item>225</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_85"> <Value> <Obj> <type>0</type> <id>117</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>49</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>49</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>8</count> <item_version>0</item_version> <item>226</item> <item>227</item> <item>228</item> <item>229</item> <item>230</item> <item>231</item> <item>232</item> <item>566</item> </oprand_edges> <opcode>write</opcode> </item> <item class_id_reference="9" object_id="_86"> <Value> <Obj> <type>0</type> <id>119</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>37</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>37</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>233</item> <item>234</item> <item>235</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_87"> <Value> <Obj> <type>0</type> <id>121</id> <name/> <fileName>pixel_unpack/pixel_unpack.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>123</lineNumber> <contextFuncName>pixel_unpack</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/matti/TD/VHDL/PYNQ/boards/ip/hls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>pixel_unpack/pixel_unpack.cpp</first> <second>pixel_unpack</second> </first> <second>123</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_88"> <Value> <Obj> <type>2</type> <id>128</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_89"> <Value> <Obj> <type>2</type> <id>131</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_90"> <Value> <Obj> <type>2</type> <id>134</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>2</content> </item> <item class_id_reference="16" object_id="_91"> <Value> <Obj> <type>2</type> <id>137</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>3</content> </item> <item class_id_reference="16" object_id="_92"> <Value> <Obj> <type>2</type> <id>140</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>4</content> </item> <item class_id_reference="16" object_id="_93"> <Value> <Obj> <type>2</type> <id>181</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_94"> <Value> <Obj> <type>2</type> <id>186</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>24</content> </item> <item class_id_reference="16" object_id="_95"> <Value> <Obj> <type>2</type> <id>188</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>31</content> </item> <item class_id_reference="16" object_id="_96"> <Value> <Obj> <type>2</type> <id>205</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>16</content> </item> <item class_id_reference="16" object_id="_97"> <Value> <Obj> <type>2</type> <id>223</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_98"> <Value> <Obj> <type>2</type> <id>273</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>15</content> </item> <item class_id_reference="16" object_id="_99"> <Value> <Obj> <type>2</type> <id>286</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>23</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_100"> <Obj> <type>3</type> <id>23</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>8</item> <item>22</item> </node_objs> </item> <item class_id_reference="18" object_id="_101"> <Obj> <type>3</type> <id>40</id> <name>.preheader</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>13</count> <item_version>0</item_version> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>39</item> </node_objs> </item> <item class_id_reference="18" object_id="_102"> <Obj> <type>3</type> <id>55</id> <name>.preheader504</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>11</count> <item_version>0</item_version> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> <item>49</item> <item>50</item> <item>51</item> <item>52</item> <item>54</item> </node_objs> </item> <item class_id_reference="18" object_id="_103"> <Obj> <type>3</type> <id>76</id> <name>.preheader508</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>17</count> <item_version>0</item_version> <item>58</item> <item>59</item> <item>60</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> <item>65</item> <item>66</item> <item>67</item> <item>68</item> <item>69</item> <item>70</item> <item>71</item> <item>72</item> <item>73</item> <item>75</item> </node_objs> </item> <item class_id_reference="18" object_id="_104"> <Obj> <type>3</type> <id>87</id> <name>.preheader510</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>7</count> <item_version>0</item_version> <item>79</item> <item>80</item> <item>81</item> <item>82</item> <item>83</item> <item>84</item> <item>86</item> </node_objs> </item> <item class_id_reference="18" object_id="_105"> <Obj> <type>3</type> <id>120</id> <name>.preheader512.preheader</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>29</count> <item_version>0</item_version> <item>90</item> <item>91</item> <item>92</item> <item>93</item> <item>94</item> <item>95</item> <item>96</item> <item>97</item> <item>98</item> <item>99</item> <item>100</item> <item>101</item> <item>102</item> <item>103</item> <item>104</item> <item>105</item> <item>106</item> <item>107</item> <item>108</item> <item>109</item> <item>110</item> <item>111</item> <item>112</item> <item>113</item> <item>114</item> <item>115</item> <item>116</item> <item>117</item> <item>119</item> </node_objs> </item> <item class_id_reference="18" object_id="_106"> <Obj> <type>3</type> <id>122</id> <name>.loopexit</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>121</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>234</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_107"> <id>125</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>126</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>127</id> <edge_type>2</edge_type> <source_obj>122</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>129</id> <edge_type>1</edge_type> <source_obj>128</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>130</id> <edge_type>2</edge_type> <source_obj>120</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>132</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>133</id> <edge_type>2</edge_type> <source_obj>87</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>135</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>136</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>138</id> <edge_type>1</edge_type> <source_obj>137</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>139</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>141</id> <edge_type>1</edge_type> <source_obj>140</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>142</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>145</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>146</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>147</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>90</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>148</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>91</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>149</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>92</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>150</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>93</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>152</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>94</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>153</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>94</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>154</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>94</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>155</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>95</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>156</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>96</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>157</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>97</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>159</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>160</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>161</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>162</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>99</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>163</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>100</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>164</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>101</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>165</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>166</id> <edge_type>1</edge_type> <source_obj>100</source_obj> <sink_obj>102</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>167</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>103</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>168</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>103</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>169</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>104</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>170</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>104</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>171</id> <edge_type>1</edge_type> <source_obj>104</source_obj> <sink_obj>105</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>172</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>105</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>173</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>106</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>176</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>177</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>178</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>179</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>180</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>182</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>107</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>185</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>108</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>187</id> <edge_type>1</edge_type> <source_obj>186</source_obj> <sink_obj>108</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>189</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>108</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>190</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>109</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>193</id> <edge_type>1</edge_type> <source_obj>109</source_obj> <sink_obj>110</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>194</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>110</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>196</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>197</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>198</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>199</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>200</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>201</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>204</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>112</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>206</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>112</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>207</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>112</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>208</id> <edge_type>1</edge_type> <source_obj>99</source_obj> <sink_obj>113</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>211</id> <edge_type>1</edge_type> <source_obj>113</source_obj> <sink_obj>114</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>212</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>114</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>214</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>215</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>216</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>217</id> <edge_type>1</edge_type> <source_obj>114</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>218</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>219</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>222</id> <edge_type>1</edge_type> <source_obj>99</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>224</id> <edge_type>1</edge_type> <source_obj>223</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>225</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>116</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>227</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>228</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>229</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>230</id> <edge_type>1</edge_type> <source_obj>116</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>231</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>232</id> <edge_type>1</edge_type> <source_obj>105</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>233</id> <edge_type>1</edge_type> <source_obj>105</source_obj> <sink_obj>119</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>234</id> <edge_type>2</edge_type> <source_obj>120</source_obj> <sink_obj>119</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>235</id> <edge_type>2</edge_type> <source_obj>122</source_obj> <sink_obj>119</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>237</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>238</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>239</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>240</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>80</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>241</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>242</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>82</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>243</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>83</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>245</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>246</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>247</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_199"> <id>248</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_200"> <id>249</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_201"> <id>250</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>84</sink_obj> </item> <item class_id_reference="20" object_id="_202"> <id>251</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>86</sink_obj> </item> <item class_id_reference="20" object_id="_203"> <id>252</id> <edge_type>2</edge_type> <source_obj>87</source_obj> <sink_obj>86</sink_obj> </item> <item class_id_reference="20" object_id="_204"> <id>253</id> <edge_type>2</edge_type> <source_obj>122</source_obj> <sink_obj>86</sink_obj> </item> <item class_id_reference="20" object_id="_205"> <id>255</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_206"> <id>256</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_207"> <id>257</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_208"> <id>258</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_209"> <id>259</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_210"> <id>260</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_211"> <id>261</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_212"> <id>262</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_213"> <id>264</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_214"> <id>265</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_215"> <id>266</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_216"> <id>267</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_217"> <id>268</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_218"> <id>269</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_219"> <id>271</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_220"> <id>272</id> <edge_type>1</edge_type> <source_obj>223</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_221"> <id>274</id> <edge_type>1</edge_type> <source_obj>273</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_222"> <id>275</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_223"> <id>277</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_224"> <id>278</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_225"> <id>279</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_226"> <id>280</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_227"> <id>281</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_228"> <id>282</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_229"> <id>284</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_230"> <id>285</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_231"> <id>287</id> <edge_type>1</edge_type> <source_obj>286</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_232"> <id>288</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_233"> <id>290</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_234"> <id>291</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_235"> <id>292</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_236"> <id>293</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_237"> <id>294</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_238"> <id>295</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_239"> <id>297</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_240"> <id>298</id> <edge_type>1</edge_type> <source_obj>186</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_241"> <id>299</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_242"> <id>300</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_243"> <id>302</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_244"> <id>303</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_245"> <id>304</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_246"> <id>305</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_247"> <id>306</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_248"> <id>307</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_249"> <id>308</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_250"> <id>309</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_251"> <id>310</id> <edge_type>2</edge_type> <source_obj>122</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_252"> <id>312</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_253"> <id>313</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_254"> <id>314</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_255"> <id>315</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_256"> <id>316</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_257"> <id>317</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_258"> <id>318</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_259"> <id>319</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_260"> <id>321</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_261"> <id>322</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_262"> <id>323</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_263"> <id>324</id> <edge_type>1</edge_type> <source_obj>48</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_264"> <id>325</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_265"> <id>326</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_266"> <id>328</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_267"> <id>329</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_268"> <id>330</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_269"> <id>331</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_270"> <id>333</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_271"> <id>334</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_272"> <id>335</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_273"> <id>336</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_274"> <id>337</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_275"> <id>338</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_276"> <id>339</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_277"> <id>340</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_278"> <id>341</id> <edge_type>2</edge_type> <source_obj>122</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_279"> <id>343</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_280"> <id>344</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_281"> <id>345</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_282"> <id>346</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_283"> <id>347</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_284"> <id>348</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_285"> <id>350</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_286"> <id>351</id> <edge_type>1</edge_type> <source_obj>223</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_287"> <id>352</id> <edge_type>1</edge_type> <source_obj>273</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_288"> <id>354</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_289"> <id>355</id> <edge_type>1</edge_type> <source_obj>186</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_290"> <id>356</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_291"> <id>357</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_292"> <id>359</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_293"> <id>360</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_294"> <id>362</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_295"> <id>363</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_296"> <id>364</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_297"> <id>365</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_298"> <id>366</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_299"> <id>367</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_300"> <id>369</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_301"> <id>370</id> <edge_type>1</edge_type> <source_obj>205</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_302"> <id>371</id> <edge_type>1</edge_type> <source_obj>286</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_303"> <id>374</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_304"> <id>375</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_305"> <id>376</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_306"> <id>378</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_307"> <id>379</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_308"> <id>380</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_309"> <id>381</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_310"> <id>382</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_311"> <id>383</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_312"> <id>384</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_313"> <id>385</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_314"> <id>386</id> <edge_type>2</edge_type> <source_obj>122</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_315"> <id>545</id> <edge_type>2</edge_type> <source_obj>23</source_obj> <sink_obj>122</sink_obj> </item> <item class_id_reference="20" object_id="_316"> <id>546</id> <edge_type>2</edge_type> <source_obj>23</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_317"> <id>547</id> <edge_type>2</edge_type> <source_obj>23</source_obj> <sink_obj>87</sink_obj> </item> <item class_id_reference="20" object_id="_318"> <id>548</id> <edge_type>2</edge_type> <source_obj>23</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_319"> <id>549</id> <edge_type>2</edge_type> <source_obj>23</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_320"> <id>550</id> <edge_type>2</edge_type> <source_obj>23</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_321"> <id>551</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>122</sink_obj> </item> <item class_id_reference="20" object_id="_322"> <id>552</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_323"> <id>553</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>122</sink_obj> </item> <item class_id_reference="20" object_id="_324"> <id>554</id> <edge_type>2</edge_type> <source_obj>55</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_325"> <id>555</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>122</sink_obj> </item> <item class_id_reference="20" object_id="_326"> <id>556</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_327"> <id>557</id> <edge_type>2</edge_type> <source_obj>87</source_obj> <sink_obj>122</sink_obj> </item> <item class_id_reference="20" object_id="_328"> <id>558</id> <edge_type>2</edge_type> <source_obj>87</source_obj> <sink_obj>87</sink_obj> </item> <item class_id_reference="20" object_id="_329"> <id>559</id> <edge_type>2</edge_type> <source_obj>120</source_obj> <sink_obj>122</sink_obj> </item> <item class_id_reference="20" object_id="_330"> <id>560</id> <edge_type>2</edge_type> <source_obj>120</source_obj> <sink_obj>120</sink_obj> </item> <item class_id_reference="20" object_id="_331"> <id>561</id> <edge_type>4</edge_type> <source_obj>34</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_332"> <id>562</id> <edge_type>4</edge_type> <source_obj>49</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_333"> <id>563</id> <edge_type>4</edge_type> <source_obj>70</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_334"> <id>564</id> <edge_type>4</edge_type> <source_obj>67</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_335"> <id>565</id> <edge_type>4</edge_type> <source_obj>64</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_336"> <id>566</id> <edge_type>4</edge_type> <source_obj>115</source_obj> <sink_obj>117</sink_obj> </item> <item class_id_reference="20" object_id="_337"> <id>567</id> <edge_type>4</edge_type> <source_obj>111</source_obj> <sink_obj>115</sink_obj> </item> <item class_id_reference="20" object_id="_338"> <id>568</id> <edge_type>4</edge_type> <source_obj>107</source_obj> <sink_obj>111</sink_obj> </item> <item class_id_reference="20" object_id="_339"> <id>569</id> <edge_type>4</edge_type> <source_obj>94</source_obj> <sink_obj>98</sink_obj> </item> <item class_id_reference="20" object_id="_340"> <id>570</id> <edge_type>4</edge_type> <source_obj>90</source_obj> <sink_obj>94</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_341"> <mId>1</mId> <mTag>pixel_unpack</mTag> <mType>0</mType> <sub_regions> <count>7</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> <item>5</item> <item>6</item> <item>7</item> <item>8</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_342"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>23</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_343"> <mId>3</mId> <mTag>Loop 5</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>40</item> </basic_blocks> <mII>2</mII> <mDepth>2</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_344"> <mId>4</mId> <mTag>Loop 4</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>55</item> </basic_blocks> <mII>2</mII> <mDepth>2</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_345"> <mId>5</mId> <mTag>Loop 3</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>76</item> </basic_blocks> <mII>4</mII> <mDepth>4</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_346"> <mId>6</mId> <mTag>Loop 2</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>87</item> </basic_blocks> <mII>1</mII> <mDepth>1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_347"> <mId>7</mId> <mTag>Loop 1</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>120</item> </basic_blocks> <mII>4</mII> <mDepth>6</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> <item class_id_reference="22" object_id="_348"> <mId>8</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>122</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_349"> <states class_id="25" tracking_level="0" version="0"> <count>18</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_350"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_351"> <id>8</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_352"> <id>2</id> <operations> <count>15</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_353"> <id>8</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_354"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_355"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_356"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_357"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_358"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_359"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_360"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_361"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_362"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_363"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_364"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_365"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_366"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_367"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_368"> <id>3</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_369"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_370"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_371"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_372"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_373"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_374"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_375"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_376"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_377"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_378"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_379"> <id>4</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_380"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_381"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_382"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_383"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_384"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_385"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_386"> <id>5</id> <operations> <count>8</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_387"> <id>43</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_388"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_389"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_390"> <id>46</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_391"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_392"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_393"> <id>49</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_394"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_395"> <id>6</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_396"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_397"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_398"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_399"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_400"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_401"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_402"> <id>7</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_403"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_404"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_405"> <id>60</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_406"> <id>61</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_407"> <id>62</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_408"> <id>63</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_409"> <id>64</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_410"> <id>65</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_411"> <id>68</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_412"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_413"> <id>8</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_414"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_415"> <id>67</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_416"> <id>9</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_417"> <id>69</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_418"> <id>70</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_419"> <id>10</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_420"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_421"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_422"> <id>72</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_423"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_424"> <id>74</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_425"> <id>75</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_426"> <id>11</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_427"> <id>77</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_428"> <id>78</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_429"> <id>79</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_430"> <id>80</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_431"> <id>81</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_432"> <id>82</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_433"> <id>83</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_434"> <id>84</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_435"> <id>85</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_436"> <id>86</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_437"> <id>12</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_438"> <id>90</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_439"> <id>91</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_440"> <id>106</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_441"> <id>108</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_442"> <id>13</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_443"> <id>94</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_444"> <id>95</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_445"> <id>109</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_446"> <id>112</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_447"> <id>14</id> <operations> <count>15</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_448"> <id>92</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_449"> <id>93</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_450"> <id>96</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_451"> <id>97</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_452"> <id>98</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_453"> <id>99</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_454"> <id>100</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_455"> <id>101</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_456"> <id>102</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_457"> <id>103</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_458"> <id>104</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_459"> <id>105</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_460"> <id>107</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_461"> <id>113</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_462"> <id>116</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_463"> <id>15</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_464"> <id>110</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_465"> <id>111</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_466"> <id>16</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_467"> <id>114</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_468"> <id>115</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_469"> <id>17</id> <operations> <count>5</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_470"> <id>88</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_471"> <id>89</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_472"> <id>117</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_473"> <id>118</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_474"> <id>119</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_475"> <id>18</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_476"> <id>121</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>27</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_477"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>27</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_478"> <inState>2</inState> <outState>3</outState> <condition> <id>34</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>8</first> <second>4</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_479"> <inState>2</inState> <outState>5</outState> <condition> <id>33</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>3</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_480"> <inState>2</inState> <outState>7</outState> <condition> <id>32</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>2</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_481"> <inState>2</inState> <outState>11</outState> <condition> <id>31</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>1</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_482"> <inState>2</inState> <outState>12</outState> <condition> <id>30</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_483"> <inState>2</inState> <outState>18</outState> <condition> <id>29</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>5</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>0</second> </first> <second>0</second> </item> <item> <first> <first>8</first> <second>1</second> </first> <second>0</second> </item> <item> <first> <first>8</first> <second>2</second> </first> <second>0</second> </item> <item> <first> <first>8</first> <second>3</second> </first> <second>0</second> </item> <item> <first> <first>8</first> <second>4</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_484"> <inState>3</inState> <outState>4</outState> <condition> <id>65</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_485"> <inState>4</inState> <outState>18</outState> <condition> <id>66</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>29</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_486"> <inState>4</inState> <outState>3</outState> <condition> <id>67</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>29</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_487"> <inState>5</inState> <outState>6</outState> <condition> <id>68</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_488"> <inState>6</inState> <outState>18</outState> <condition> <id>69</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>46</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_489"> <inState>6</inState> <outState>5</outState> <condition> <id>70</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>46</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_490"> <inState>7</inState> <outState>8</outState> <condition> <id>71</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_491"> <inState>8</inState> <outState>9</outState> <condition> <id>72</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_492"> <inState>9</inState> <outState>10</outState> <condition> <id>73</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_493"> <inState>10</inState> <outState>18</outState> <condition> <id>74</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>61</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_494"> <inState>10</inState> <outState>7</outState> <condition> <id>75</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>61</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_495"> <inState>11</inState> <outState>18</outState> <condition> <id>76</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>82</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_496"> <inState>11</inState> <outState>11</outState> <condition> <id>77</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>82</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_497"> <inState>12</inState> <outState>13</outState> <condition> <id>78</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_498"> <inState>13</inState> <outState>14</outState> <condition> <id>79</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_499"> <inState>14</inState> <outState>15</outState> <condition> <id>80</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_500"> <inState>15</inState> <outState>16</outState> <condition> <id>81</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_501"> <inState>16</inState> <outState>17</outState> <condition> <id>82</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_502"> <inState>17</inState> <outState>18</outState> <condition> <id>83</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>105</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_503"> <inState>17</inState> <outState>12</outState> <condition> <id>84</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>105</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="36" tracking_level="1" version="0" object_id="_504"> <dp_component_resource class_id="37" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>pixel_unpack_AXILiteS_s_axi_U (pixel_unpack_AXILiteS_s_axi)</first> <second class_id="39" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="40" tracking_level="0" version="0"> <first>BRAM</first> <second>0</second> </item> <item> <first>FF</first> <second>68</second> </item> <item> <first>LUT</first> <second>104</second> </item> </second> </item> </dp_component_resource> <dp_expression_resource> <count>4</count> <item_version>0</item_version> <item> <first>has_user_V_2_fu_290_p2 ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>last_9_2_fu_303_p2 ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>tmp4_fu_284_p2 ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>tmp5_fu_297_p2 ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> </dp_expression_resource> <dp_fifo_resource> <count>0</count> <item_version>0</item_version> </dp_fifo_resource> <dp_memory_resource> <count>0</count> <item_version>0</item_version> </dp_memory_resource> <dp_multiplexer_resource> <count>8</count> <item_version>0</item_version> <item> <first>ap_NS_fsm</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>17</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>17</second> </item> <item> <first>LUT</first> <second>15</second> </item> </second> </item> <item> <first>ap_reg_ppiten_pp4_it1</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>ap_sig_ioackin_out_stream_TREADY</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>in_stream_TDATA_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>out_stream_TDATA</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>14</second> </item> <item> <first>(1Bits)</first> <second>24</second> </item> <item> <first>(2Count)</first> <second>336</second> </item> <item> <first>LUT</first> <second>72</second> </item> </second> </item> <item> <first>out_stream_TDATA_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>out_stream_TLAST</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>7</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>7</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>out_stream_TUSER</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>4</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>4</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> </dp_multiplexer_resource> <dp_register_resource> <count>22</count> <item_version>0</item_version> <item> <first>ap_CS_fsm</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> <item> <first>ap_reg_ioackin_out_stream_TREADY</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_reg_ppiten_pp4_it0</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_reg_ppiten_pp4_it1</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>empty_4_reg_371_1</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>empty_4_reg_371_2</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>empty_reg_360_1</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>empty_reg_360_2</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>last_1_reg_347</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>last_2_reg_342</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>last_9_2_reg_382</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>last_reg_352</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>mode_0_data_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>32</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>32</second> </item> </second> </item> <item> <first>mode_0_vld_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> </second> </item> <item> <first>p_Result_3_3_reg_392</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>24</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>24</second> </item> </second> </item> <item> <first>reg_181</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>8</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>8</second> </item> </second> </item> <item> <first>reg_185</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>8</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>8</second> </item> </second> </item> <item> <first>reg_189</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>8</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>8</second> </item> </second> </item> <item> <first>reg_193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> <item> <first>tmp_2_reg_366</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>24</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>24</second> </item> </second> </item> <item> <first>tmp_4_reg_377</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> <item> <first>tmp_6_reg_387</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>8</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>8</second> </item> </second> </item> </dp_register_resource> <dp_component_map class_id="41" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_map> <dp_expression_map> <count>4</count> <item_version>0</item_version> <item class_id="42" tracking_level="0" version="0"> <first>has_user_V_2_fu_290_p2 ( or ) </first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>last_9_2_fu_303_p2 ( or ) </first> <second> <count>1</count> <item_version>0</item_version> <item>105</item> </second> </item> <item> <first>tmp4_fu_284_p2 ( or ) </first> <second> <count>1</count> <item_version>0</item_version> <item>102</item> </second> </item> <item> <first>tmp5_fu_297_p2 ( or ) </first> <second> <count>1</count> <item_version>0</item_version> <item>104</item> </second> </item> </dp_expression_map> <dp_fifo_map> <count>0</count> <item_version>0</item_version> </dp_fifo_map> <dp_memory_map> <count>0</count> <item_version>0</item_version> </dp_memory_map> </res> <node_label_latency class_id="43" tracking_level="0" version="0"> <count>80</count> <item_version>0</item_version> <item class_id="44" tracking_level="0" version="0"> <first>8</first> <second class_id="45" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>67</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>70</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>80</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>81</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>82</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>83</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>84</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>86</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>90</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>91</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>92</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>93</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>94</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>95</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>96</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>97</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>98</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>99</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>100</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>101</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>102</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>103</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>104</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>105</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>106</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>107</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>108</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>109</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>110</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>111</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>112</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>113</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>114</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>115</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>116</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>117</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>119</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>121</first> <second> <first>8</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="46" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="47" tracking_level="0" version="0"> <first>23</first> <second class_id="48" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> <item> <first>40</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>55</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>76</first> <second> <first>2</first> <second>5</second> </second> </item> <item> <first>87</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>120</first> <second> <first>2</first> <second>7</second> </second> </item> <item> <first>122</first> <second> <first>8</first> <second>8</second> </second> </item> </bblk_ent_exit> <regions class_id="49" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="50" tracking_level="1" version="0" object_id="_505"> <region_name>Loop 4</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>55</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>2</interval> <pipe_depth>2</pipe_depth> </item> <item class_id_reference="50" object_id="_506"> <region_name>Loop 2</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>87</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>1</interval> <pipe_depth>1</pipe_depth> </item> <item class_id_reference="50" object_id="_507"> <region_name>Loop 3</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>76</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>4</interval> <pipe_depth>4</pipe_depth> </item> <item class_id_reference="50" object_id="_508"> <region_name>Loop 5</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>40</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>2</interval> <pipe_depth>2</pipe_depth> </item> <item class_id_reference="50" object_id="_509"> <region_name>Loop 1</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>120</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>4</interval> <pipe_depth>6</pipe_depth> </item> </regions> <dp_fu_nodes class_id="51" tracking_level="0" version="0"> <count>36</count> <item_version>0</item_version> <item class_id="52" tracking_level="0" version="0"> <first>96</first> <second> <count>2</count> <item_version>0</item_version> <item>8</item> <item>8</item> </second> </item> <item> <first>102</first> <second> <count>7</count> <item_version>0</item_version> <item>26</item> <item>43</item> <item>58</item> <item>79</item> <item>90</item> <item>94</item> <item>98</item> </second> </item> <item> <first>112</first> <second> <count>13</count> <item_version>0</item_version> <item>34</item> <item>37</item> <item>49</item> <item>52</item> <item>64</item> <item>67</item> <item>70</item> <item>73</item> <item>84</item> <item>107</item> <item>111</item> <item>115</item> <item>117</item> </second> </item> <item> <first>127</first> <second> <count>7</count> <item_version>0</item_version> <item>27</item> <item>44</item> <item>59</item> <item>80</item> <item>91</item> <item>95</item> <item>99</item> </second> </item> <item> <first>131</first> <second> <count>5</count> <item_version>0</item_version> <item>28</item> <item>45</item> <item>60</item> <item>81</item> <item>100</item> </second> </item> <item> <first>136</first> <second> <count>5</count> <item_version>0</item_version> <item>29</item> <item>46</item> <item>61</item> <item>82</item> <item>101</item> </second> </item> <item> <first>141</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>65</item> </second> </item> <item> <first>151</first> <second> <count>3</count> <item_version>0</item_version> <item>31</item> <item>71</item> <item>108</item> </second> </item> <item> <first>161</first> <second> <count>2</count> <item_version>0</item_version> <item>35</item> <item>68</item> </second> </item> <item> <first>171</first> <second> <count>2</count> <item_version>0</item_version> <item>50</item> <item>112</item> </second> </item> <item> <first>197</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>201</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>210</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>221</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>225</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>230</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>235</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>239</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>244</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>249</first> <second> <count>1</count> <item_version>0</item_version> <item>69</item> </second> </item> <item> <first>254</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>259</first> <second> <count>1</count> <item_version>0</item_version> <item>83</item> </second> </item> <item> <first>264</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>268</first> <second> <count>1</count> <item_version>0</item_version> <item>109</item> </second> </item> <item> <first>272</first> <second> <count>1</count> <item_version>0</item_version> <item>92</item> </second> </item> <item> <first>275</first> <second> <count>1</count> <item_version>0</item_version> <item>93</item> </second> </item> <item> <first>278</first> <second> <count>1</count> <item_version>0</item_version> <item>96</item> </second> </item> <item> <first>281</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>284</first> <second> <count>1</count> <item_version>0</item_version> <item>102</item> </second> </item> <item> <first>290</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>297</first> <second> <count>1</count> <item_version>0</item_version> <item>104</item> </second> </item> <item> <first>303</first> <second> <count>1</count> <item_version>0</item_version> <item>105</item> </second> </item> <item> <first>309</first> <second> <count>1</count> <item_version>0</item_version> <item>113</item> </second> </item> <item> <first>313</first> <second> <count>1</count> <item_version>0</item_version> <item>116</item> </second> </item> <item> <first>323</first> <second> <count>1</count> <item_version>0</item_version> <item>110</item> </second> </item> <item> <first>331</first> <second> <count>1</count> <item_version>0</item_version> <item>114</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="54" tracking_level="0" version="0"> <count>33</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>grp_fu_127</first> <second> <count>7</count> <item_version>0</item_version> <item>27</item> <item>44</item> <item>59</item> <item>80</item> <item>91</item> <item>95</item> <item>99</item> </second> </item> <item> <first>grp_fu_131</first> <second> <count>5</count> <item_version>0</item_version> <item>28</item> <item>45</item> <item>60</item> <item>81</item> <item>100</item> </second> </item> <item> <first>grp_fu_136</first> <second> <count>5</count> <item_version>0</item_version> <item>29</item> <item>46</item> <item>61</item> <item>82</item> <item>101</item> </second> </item> <item> <first>grp_fu_141</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>65</item> </second> </item> <item> <first>grp_fu_151</first> <second> <count>3</count> <item_version>0</item_version> <item>31</item> <item>71</item> <item>108</item> </second> </item> <item> <first>grp_fu_161</first> <second> <count>2</count> <item_version>0</item_version> <item>35</item> <item>68</item> </second> </item> <item> <first>grp_fu_171</first> <second> <count>2</count> <item_version>0</item_version> <item>50</item> <item>112</item> </second> </item> <item> <first>has_user_V_2_fu_290</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>in_stream_last_V_val1_fu_281</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>in_stream_last_V_val_fu_275</first> <second> <count>1</count> <item_version>0</item_version> <item>93</item> </second> </item> <item> <first>in_stream_user_V_val1_fu_278</first> <second> <count>1</count> <item_version>0</item_version> <item>96</item> </second> </item> <item> <first>in_stream_user_V_val_fu_272</first> <second> <count>1</count> <item_version>0</item_version> <item>92</item> </second> </item> <item> <first>last_9_2_fu_303</first> <second> <count>1</count> <item_version>0</item_version> <item>105</item> </second> </item> <item> <first>p_Result_14_1_fu_210</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>p_Result_2_fu_201</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>p_Result_3_1_fu_323</first> <second> <count>1</count> <item_version>0</item_version> <item>110</item> </second> </item> <item> <first>p_Result_3_2_fu_331</first> <second> <count>1</count> <item_version>0</item_version> <item>114</item> </second> </item> <item> <first>p_Result_3_3_fu_313</first> <second> <count>1</count> <item_version>0</item_version> <item>116</item> </second> </item> <item> <first>p_Result_6_1_fu_244</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>p_Result_6_2_fu_249</first> <second> <count>1</count> <item_version>0</item_version> <item>69</item> </second> </item> <item> <first>p_Result_6_3_fu_254</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>p_Result_6_fu_239</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>p_Result_8_1_fu_230</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>p_Result_8_fu_225</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>tmp4_fu_284</first> <second> <count>1</count> <item_version>0</item_version> <item>102</item> </second> </item> <item> <first>tmp5_fu_297</first> <second> <count>1</count> <item_version>0</item_version> <item>104</item> </second> </item> <item> <first>tmp_10_fu_235</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>tmp_11_fu_221</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>tmp_12_fu_197</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>tmp_2_fu_264</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>tmp_4_fu_268</first> <second> <count>1</count> <item_version>0</item_version> <item>109</item> </second> </item> <item> <first>tmp_6_fu_309</first> <second> <count>1</count> <item_version>0</item_version> <item>113</item> </second> </item> <item> <first>tmp_9_fu_259</first> <second> <count>1</count> <item_version>0</item_version> <item>83</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>3</count> <item_version>0</item_version> <item> <first>grp_read_fu_102</first> <second> <count>7</count> <item_version>0</item_version> <item>26</item> <item>43</item> <item>58</item> <item>79</item> <item>90</item> <item>94</item> <item>98</item> </second> </item> <item> <first>grp_read_fu_96</first> <second> <count>2</count> <item_version>0</item_version> <item>8</item> <item>8</item> </second> </item> <item> <first>grp_write_fu_112</first> <second> <count>13</count> <item_version>0</item_version> <item>34</item> <item>37</item> <item>49</item> <item>52</item> <item>64</item> <item>67</item> <item>70</item> <item>73</item> <item>84</item> <item>107</item> <item>111</item> <item>115</item> <item>117</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="56" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>14</count> <item_version>0</item_version> <item> <first>181</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>65</item> </second> </item> <item> <first>185</first> <second> <count>3</count> <item_version>0</item_version> <item>31</item> <item>71</item> <item>108</item> </second> </item> <item> <first>189</first> <second> <count>2</count> <item_version>0</item_version> <item>35</item> <item>68</item> </second> </item> <item> <first>193</first> <second> <count>2</count> <item_version>0</item_version> <item>50</item> <item>112</item> </second> </item> <item> <first>342</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>347</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>352</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>360</first> <second> <count>1</count> <item_version>0</item_version> <item>90</item> </second> </item> <item> <first>366</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>371</first> <second> <count>1</count> <item_version>0</item_version> <item>94</item> </second> </item> <item> <first>377</first> <second> <count>1</count> <item_version>0</item_version> <item>109</item> </second> </item> <item> <first>382</first> <second> <count>1</count> <item_version>0</item_version> <item>105</item> </second> </item> <item> <first>387</first> <second> <count>1</count> <item_version>0</item_version> <item>113</item> </second> </item> <item> <first>392</first> <second> <count>1</count> <item_version>0</item_version> <item>116</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>14</count> <item_version>0</item_version> <item> <first>empty_4_reg_371</first> <second> <count>1</count> <item_version>0</item_version> <item>94</item> </second> </item> <item> <first>empty_reg_360</first> <second> <count>1</count> <item_version>0</item_version> <item>90</item> </second> </item> <item> <first>last_1_reg_347</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>last_2_reg_342</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>last_9_2_reg_382</first> <second> <count>1</count> <item_version>0</item_version> <item>105</item> </second> </item> <item> <first>last_reg_352</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>p_Result_3_3_reg_392</first> <second> <count>1</count> <item_version>0</item_version> <item>116</item> </second> </item> <item> <first>reg_181</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>65</item> </second> </item> <item> <first>reg_185</first> <second> <count>3</count> <item_version>0</item_version> <item>31</item> <item>71</item> <item>108</item> </second> </item> <item> <first>reg_189</first> <second> <count>2</count> <item_version>0</item_version> <item>35</item> <item>68</item> </second> </item> <item> <first>reg_193</first> <second> <count>2</count> <item_version>0</item_version> <item>50</item> <item>112</item> </second> </item> <item> <first>tmp_2_reg_366</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>tmp_4_reg_377</first> <second> <count>1</count> <item_version>0</item_version> <item>109</item> </second> </item> <item> <first>tmp_6_reg_387</first> <second> <count>1</count> <item_version>0</item_version> <item>113</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="57" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="58" tracking_level="0" version="0"> <first>in_stream_data_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>7</count> <item_version>0</item_version> <item>90</item> <item>94</item> <item>98</item> <item>79</item> <item>58</item> <item>43</item> <item>26</item> </second> </item> </second> </item> <item> <first>in_stream_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>7</count> <item_version>0</item_version> <item>90</item> <item>94</item> <item>98</item> <item>79</item> <item>58</item> <item>43</item> <item>26</item> </second> </item> </second> </item> <item> <first>in_stream_user_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>7</count> <item_version>0</item_version> <item>90</item> <item>94</item> <item>98</item> <item>79</item> <item>58</item> <item>43</item> <item>26</item> </second> </item> </second> </item> <item> <first>mode</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> </second> </item> <item> <first>out_stream_data_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>13</count> <item_version>0</item_version> <item>107</item> <item>111</item> <item>115</item> <item>117</item> <item>84</item> <item>64</item> <item>67</item> <item>70</item> <item>73</item> <item>49</item> <item>52</item> <item>34</item> <item>37</item> </second> </item> </second> </item> <item> <first>out_stream_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>13</count> <item_version>0</item_version> <item>107</item> <item>111</item> <item>115</item> <item>117</item> <item>84</item> <item>64</item> <item>67</item> <item>70</item> <item>73</item> <item>49</item> <item>52</item> <item>34</item> <item>37</item> </second> </item> </second> </item> <item> <first>out_stream_user_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>13</count> <item_version>0</item_version> <item>107</item> <item>111</item> <item>115</item> <item>117</item> <item>84</item> <item>64</item> <item>67</item> <item>70</item> <item>73</item> <item>49</item> <item>52</item> <item>34</item> <item>37</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="59" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
with openGL.Font.texture, openGL.Geometry; package openGL.Model.Text.lit_colored_textured -- -- Models lit, colored, textured text. -- is type Item is new Model.text.item with record Text : access String; Font_Id : openGL.Font.font_Id; Font : openGL.Font.texture.view; Color : lucid_Color; Centered : Boolean; end record; type View is access all Item'Class; --------- --- Forge -- function new_Text (Scale : in Vector_3; Text : in String; Font : in openGL.Font.font_Id; Color : in lucid_Color; Centered : in Boolean := True) return View; -------------- --- Attributes -- overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in openGL.Font.font_id_Map_of_font) return Geometry.views; overriding procedure Text_is (Self : in out Item; Now : in String); overriding function Text (Self : in Item) return String; overriding function Font (Self : in Item) return openGL.Font.view; end openGL.Model.Text.lit_colored_textured;
-- Copyright 2011-2015 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 body Pck is procedure Do_Nothing (A : System.Address) is begin null; end Do_Nothing; end Pck;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Asis.Expressions; with League.String_Vectors; package body Properties.Expressions.Extension_Aggregate is ---------- -- Code -- ---------- function Code (Engine : access Engines.Contexts.Context; Element : Asis.Expression; Name : Engines.Text_Property) return League.Strings.Universal_String is Tag : constant Asis.Declaration := Asis.Expressions.Corresponding_Expression_Type (Element); List : constant Asis.Association_List := Asis.Expressions.Record_Component_Associations (Element, True); Result : League.Strings.Universal_String; Names : League.Strings.Universal_String; Text : League.Strings.Universal_String; begin Result.Append ("_ec._extend ("); Text := Engine.Text.Get_Property (Tag, Engines.Initialize); Result.Append (Text); Result.Append (", {"); for J in List'Range loop Names := Engine.Text.Get_Property (List (J), Engines.Associations); Text := Engine.Text.Get_Property (List (J), Name); declare V : constant League.String_Vectors.Universal_String_Vector := Names.Split (','); begin for K in 1 .. V.Length loop if J /= List'First or K /= 1 then Result.Append (","); end if; Result.Append (V.Element (K)); Result.Append (":"); Result.Append (Text); end loop; end; end loop; Result.Append ("})"); return Result; end Code; end Properties.Expressions.Extension_Aggregate;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . S O F T _ L I N K S -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; pragma Warnings (Off); -- Disable warnings as System.Soft_Links.Initialize is not Preelaborate. It is -- safe to with this unit as its elaboration routine will only be initializing -- NT_TSD, which is part of this package spec. with System.Soft_Links.Initialize; pragma Warnings (On); package body System.Soft_Links is Stack_Limit : aliased System.Address := System.Null_Address; pragma Export (C, Stack_Limit, "__gnat_stack_limit"); -- Needed for Vx6Cert (Vx653mc) GOS cert and ravenscar-cert runtimes, -- VxMILS cert, ravenscar-cert and full runtimes, Vx 5 default runtime -------------------- -- Abort_Defer_NT -- -------------------- procedure Abort_Defer_NT is begin null; end Abort_Defer_NT; ---------------------- -- Abort_Handler_NT -- ---------------------- procedure Abort_Handler_NT is begin null; end Abort_Handler_NT; ---------------------- -- Abort_Undefer_NT -- ---------------------- procedure Abort_Undefer_NT is begin null; end Abort_Undefer_NT; ----------------- -- Adafinal_NT -- ----------------- procedure Adafinal_NT is begin -- Handle normal task termination by the environment task, but only -- for the normal task termination. In the case of Abnormal and -- Unhandled_Exception they must have been handled before, and the -- task termination soft link must have been changed so the task -- termination routine is not executed twice. Task_Termination_Handler.all (Ada.Exceptions.Null_Occurrence); -- Finalize all library-level controlled objects if needed if Finalize_Library_Objects /= null then Finalize_Library_Objects.all; end if; end Adafinal_NT; --------------------------- -- Check_Abort_Status_NT -- --------------------------- function Check_Abort_Status_NT return Integer is begin return Boolean'Pos (False); end Check_Abort_Status_NT; ------------------------ -- Complete_Master_NT -- ------------------------ procedure Complete_Master_NT is begin null; end Complete_Master_NT; ---------------- -- Create_TSD -- ---------------- procedure Create_TSD (New_TSD : in out TSD; Sec_Stack : SST.SS_Stack_Ptr; Sec_Stack_Size : System.Parameters.Size_Type) is begin New_TSD.Jmpbuf_Address := Null_Address; New_TSD.Sec_Stack_Ptr := Sec_Stack; SST.SS_Init (New_TSD.Sec_Stack_Ptr, Sec_Stack_Size); end Create_TSD; ----------------------- -- Current_Master_NT -- ----------------------- function Current_Master_NT return Integer is begin return 0; end Current_Master_NT; ----------------- -- Destroy_TSD -- ----------------- procedure Destroy_TSD (Old_TSD : in out TSD) is begin SST.SS_Free (Old_TSD.Sec_Stack_Ptr); end Destroy_TSD; --------------------- -- Enter_Master_NT -- --------------------- procedure Enter_Master_NT is begin null; end Enter_Master_NT; -------------------------- -- Get_Current_Excep_NT -- -------------------------- function Get_Current_Excep_NT return EOA is begin return NT_TSD.Current_Excep'Access; end Get_Current_Excep_NT; ------------------------ -- Get_GNAT_Exception -- ------------------------ function Get_GNAT_Exception return Ada.Exceptions.Exception_Id is begin return Ada.Exceptions.Exception_Identity (Get_Current_Excep.all.all); end Get_GNAT_Exception; --------------------------- -- Get_Jmpbuf_Address_NT -- --------------------------- function Get_Jmpbuf_Address_NT return Address is begin return NT_TSD.Jmpbuf_Address; end Get_Jmpbuf_Address_NT; ----------------------------- -- Get_Jmpbuf_Address_Soft -- ----------------------------- function Get_Jmpbuf_Address_Soft return Address is begin return Get_Jmpbuf_Address.all; end Get_Jmpbuf_Address_Soft; ---------------------- -- Get_Sec_Stack_NT -- ---------------------- function Get_Sec_Stack_NT return SST.SS_Stack_Ptr is begin return NT_TSD.Sec_Stack_Ptr; end Get_Sec_Stack_NT; ----------------------------- -- Get_Sec_Stack_Soft -- ----------------------------- function Get_Sec_Stack_Soft return SST.SS_Stack_Ptr is begin return Get_Sec_Stack.all; end Get_Sec_Stack_Soft; ----------------------- -- Get_Stack_Info_NT -- ----------------------- function Get_Stack_Info_NT return Stack_Checking.Stack_Access is begin return NT_TSD.Pri_Stack_Info'Access; end Get_Stack_Info_NT; ----------------------------- -- Save_Library_Occurrence -- ----------------------------- procedure Save_Library_Occurrence (E : EOA) is use Ada.Exceptions; begin if not Library_Exception_Set then Library_Exception_Set := True; if E /= null then Ada.Exceptions.Save_Occurrence (Library_Exception, E.all); end if; end if; end Save_Library_Occurrence; --------------------------- -- Set_Jmpbuf_Address_NT -- --------------------------- procedure Set_Jmpbuf_Address_NT (Addr : Address) is begin NT_TSD.Jmpbuf_Address := Addr; end Set_Jmpbuf_Address_NT; procedure Set_Jmpbuf_Address_Soft (Addr : Address) is begin Set_Jmpbuf_Address (Addr); end Set_Jmpbuf_Address_Soft; ---------------------- -- Set_Sec_Stack_NT -- ---------------------- procedure Set_Sec_Stack_NT (Stack : SST.SS_Stack_Ptr) is begin NT_TSD.Sec_Stack_Ptr := Stack; end Set_Sec_Stack_NT; ------------------------ -- Set_Sec_Stack_Soft -- ------------------------ procedure Set_Sec_Stack_Soft (Stack : SST.SS_Stack_Ptr) is begin Set_Sec_Stack (Stack); end Set_Sec_Stack_Soft; ------------------ -- Task_Lock_NT -- ------------------ procedure Task_Lock_NT is begin null; end Task_Lock_NT; ------------------ -- Task_Name_NT -- ------------------- function Task_Name_NT return String is begin return "main_task"; end Task_Name_NT; ------------------------- -- Task_Termination_NT -- ------------------------- procedure Task_Termination_NT (Excep : EO) is pragma Unreferenced (Excep); begin null; end Task_Termination_NT; -------------------- -- Task_Unlock_NT -- -------------------- procedure Task_Unlock_NT is begin null; end Task_Unlock_NT; end System.Soft_Links;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ P R A G -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. 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. -- -- -- ------------------------------------------------------------------------------ -- Expand routines for pragmas with Types; use Types; package Exp_Prag is procedure Expand_N_Pragma (N : Node_Id); procedure Expand_Pragma_Contract_Cases (CCs : Node_Id; Subp_Id : Entity_Id; Decls : List_Id; Stmts : in out List_Id); -- Given pragma Contract_Cases CCs, create the circuitry needed to evaluate -- case guards and trigger consequence expressions. Subp_Id is the related -- subprogram for which the pragma applies. Decls are the declarations of -- Subp_Id's body. All generated code is added to list Stmts. If Stmts is -- No_List on entry, a new list is created. procedure Expand_Pragma_Initial_Condition (Spec_Or_Body : Node_Id); -- Generate a runtime check needed to verify the assumption of introduced -- by pragma Initial_Condition. Spec_Or_Body denotes the spec or body of -- the package where the pragma appears. The check is inserted according -- to the following precedence rules: -- 1) If the package has a body with a statement sequence, the check is -- inserted at the end of the statments. -- 2) If the package has a body, the check is inserted at the end of the -- body declarations. -- 3) The check is inserted at the end of the visible declarations. end Exp_Prag;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . A R I T H _ 6 4 -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with GNAT.Exceptions; use GNAT.Exceptions; with Interfaces; use Interfaces; with Unchecked_Conversion; package body System.Arith_64 is pragma Suppress (Overflow_Check); pragma Suppress (Range_Check); subtype Uns64 is Unsigned_64; function To_Uns is new Unchecked_Conversion (Int64, Uns64); function To_Int is new Unchecked_Conversion (Uns64, Int64); subtype Uns32 is Unsigned_32; ----------------------- -- Local Subprograms -- ----------------------- function "+" (A, B : Uns32) return Uns64; function "+" (A : Uns64; B : Uns32) return Uns64; pragma Inline ("+"); -- Length doubling additions function "-" (A : Uns64; B : Uns32) return Uns64; pragma Inline ("-"); -- Length doubling subtraction function "*" (A, B : Uns32) return Uns64; function "*" (A : Uns64; B : Uns32) return Uns64; pragma Inline ("*"); -- Length doubling multiplications function "/" (A : Uns64; B : Uns32) return Uns64; pragma Inline ("/"); -- Length doubling division function "rem" (A : Uns64; B : Uns32) return Uns64; pragma Inline ("rem"); -- Length doubling remainder function "&" (Hi, Lo : Uns32) return Uns64; pragma Inline ("&"); -- Concatenate hi, lo values to form 64-bit result function Lo (A : Uns64) return Uns32; pragma Inline (Lo); -- Low order half of 64-bit value function Hi (A : Uns64) return Uns32; pragma Inline (Hi); -- High order half of 64-bit value function To_Neg_Int (A : Uns64) return Int64; -- Convert to negative integer equivalent. If the input is in the range -- 0 .. 2 ** 63, then the corresponding negative signed integer (obtained -- by negating the given value) is returned, otherwise constraint error -- is raised. function To_Pos_Int (A : Uns64) return Int64; -- Convert to positive integer equivalent. If the input is in the range -- 0 .. 2 ** 63-1, then the corresponding non-negative signed integer is -- returned, otherwise constraint error is raised. procedure Raise_Error; pragma No_Return (Raise_Error); -- Raise constraint error with appropriate message --------- -- "&" -- --------- function "&" (Hi, Lo : Uns32) return Uns64 is begin return Shift_Left (Uns64 (Hi), 32) or Uns64 (Lo); end "&"; --------- -- "*" -- --------- function "*" (A, B : Uns32) return Uns64 is begin return Uns64 (A) * Uns64 (B); end "*"; function "*" (A : Uns64; B : Uns32) return Uns64 is begin return A * Uns64 (B); end "*"; --------- -- "+" -- --------- function "+" (A, B : Uns32) return Uns64 is begin return Uns64 (A) + Uns64 (B); end "+"; function "+" (A : Uns64; B : Uns32) return Uns64 is begin return A + Uns64 (B); end "+"; --------- -- "-" -- --------- function "-" (A : Uns64; B : Uns32) return Uns64 is begin return A - Uns64 (B); end "-"; --------- -- "/" -- --------- function "/" (A : Uns64; B : Uns32) return Uns64 is begin return A / Uns64 (B); end "/"; ----------- -- "rem" -- ----------- function "rem" (A : Uns64; B : Uns32) return Uns64 is begin return A rem Uns64 (B); end "rem"; -------------------------- -- Add_With_Ovflo_Check -- -------------------------- function Add_With_Ovflo_Check (X, Y : Int64) return Int64 is R : constant Int64 := To_Int (To_Uns (X) + To_Uns (Y)); begin if X >= 0 then if Y < 0 or else R >= 0 then return R; end if; else -- X < 0 if Y > 0 or else R < 0 then return R; end if; end if; Raise_Error; end Add_With_Ovflo_Check; ------------------- -- Double_Divide -- ------------------- procedure Double_Divide (X, Y, Z : Int64; Q, R : out Int64; Round : Boolean) is Xu : constant Uns64 := To_Uns (abs X); Yu : constant Uns64 := To_Uns (abs Y); Yhi : constant Uns32 := Hi (Yu); Ylo : constant Uns32 := Lo (Yu); Zu : constant Uns64 := To_Uns (abs Z); Zhi : constant Uns32 := Hi (Zu); Zlo : constant Uns32 := Lo (Zu); T1, T2 : Uns64; Du, Qu, Ru : Uns64; Den_Pos : Boolean; begin if Yu = 0 or else Zu = 0 then Raise_Error; end if; -- Compute Y * Z. Note that if the result overflows 64 bits unsigned, -- then the rounded result is clearly zero (since the dividend is at -- most 2**63 - 1, the extra bit of precision is nice here!) if Yhi /= 0 then if Zhi /= 0 then Q := 0; R := X; return; else T2 := Yhi * Zlo; end if; else if Zhi /= 0 then T2 := Ylo * Zhi; else T2 := 0; end if; end if; T1 := Ylo * Zlo; T2 := T2 + Hi (T1); if Hi (T2) /= 0 then Q := 0; R := X; return; end if; Du := Lo (T2) & Lo (T1); Qu := Xu / Du; Ru := Xu rem Du; -- Deal with rounding case if Round and then Ru > (Du - Uns64'(1)) / Uns64'(2) then Qu := Qu + Uns64'(1); end if; -- Set final signs (RM 4.5.5(27-30)) Den_Pos := (Y < 0) = (Z < 0); -- Case of dividend (X) sign positive if X >= 0 then R := To_Int (Ru); if Den_Pos then Q := To_Int (Qu); else Q := -To_Int (Qu); end if; -- Case of dividend (X) sign negative else R := -To_Int (Ru); if Den_Pos then Q := -To_Int (Qu); else Q := To_Int (Qu); end if; end if; end Double_Divide; -------- -- Hi -- -------- function Hi (A : Uns64) return Uns32 is begin return Uns32 (Shift_Right (A, 32)); end Hi; -------- -- Lo -- -------- function Lo (A : Uns64) return Uns32 is begin return Uns32 (A and 16#FFFF_FFFF#); end Lo; ------------------------------- -- Multiply_With_Ovflo_Check -- ------------------------------- function Multiply_With_Ovflo_Check (X, Y : Int64) return Int64 is Xu : constant Uns64 := To_Uns (abs X); Xhi : constant Uns32 := Hi (Xu); Xlo : constant Uns32 := Lo (Xu); Yu : constant Uns64 := To_Uns (abs Y); Yhi : constant Uns32 := Hi (Yu); Ylo : constant Uns32 := Lo (Yu); T1, T2 : Uns64; begin if Xhi /= 0 then if Yhi /= 0 then Raise_Error; else T2 := Xhi * Ylo; end if; elsif Yhi /= 0 then T2 := Xlo * Yhi; else -- Yhi = Xhi = 0 T2 := 0; end if; -- Here we have T2 set to the contribution to the upper half -- of the result from the upper halves of the input values. T1 := Xlo * Ylo; T2 := T2 + Hi (T1); if Hi (T2) /= 0 then Raise_Error; end if; T2 := Lo (T2) & Lo (T1); if X >= 0 then if Y >= 0 then return To_Pos_Int (T2); else return To_Neg_Int (T2); end if; else -- X < 0 if Y < 0 then return To_Pos_Int (T2); else return To_Neg_Int (T2); end if; end if; end Multiply_With_Ovflo_Check; ----------------- -- Raise_Error -- ----------------- procedure Raise_Error is begin Raise_Exception (CE, "64-bit arithmetic overflow"); end Raise_Error; ------------------- -- Scaled_Divide -- ------------------- procedure Scaled_Divide (X, Y, Z : Int64; Q, R : out Int64; Round : Boolean) is Xu : constant Uns64 := To_Uns (abs X); Xhi : constant Uns32 := Hi (Xu); Xlo : constant Uns32 := Lo (Xu); Yu : constant Uns64 := To_Uns (abs Y); Yhi : constant Uns32 := Hi (Yu); Ylo : constant Uns32 := Lo (Yu); Zu : Uns64 := To_Uns (abs Z); Zhi : Uns32 := Hi (Zu); Zlo : Uns32 := Lo (Zu); D1, D2, D3, D4 : Uns32; -- The dividend, four digits (D1 is high order) Q1, Q2 : Uns32; -- The quotient, two digits (Q1 is high order) S1, S2, S3 : Uns32; -- Value to subtract, three digits (S1 is high order) Qu : Uns64; Ru : Uns64; -- Unsigned quotient and remainder Scale : Natural; -- Scaling factor used for multiple-precision divide. Dividend and -- Divisor are multiplied by 2 ** Scale, and the final remainder -- is divided by the scaling factor. The reason for this scaling -- is to allow more accurate estimation of quotient digits. T1, T2, T3 : Uns64; -- Temporary values begin -- First do the multiplication, giving the four digit dividend T1 := Xlo * Ylo; D4 := Lo (T1); D3 := Hi (T1); if Yhi /= 0 then T1 := Xlo * Yhi; T2 := D3 + Lo (T1); D3 := Lo (T2); D2 := Hi (T1) + Hi (T2); if Xhi /= 0 then T1 := Xhi * Ylo; T2 := D3 + Lo (T1); D3 := Lo (T2); T3 := D2 + Hi (T1); T3 := T3 + Hi (T2); D2 := Lo (T3); D1 := Hi (T3); T1 := (D1 & D2) + Uns64'(Xhi * Yhi); D1 := Hi (T1); D2 := Lo (T1); else D1 := 0; end if; else if Xhi /= 0 then T1 := Xhi * Ylo; T2 := D3 + Lo (T1); D3 := Lo (T2); D2 := Hi (T1) + Hi (T2); else D2 := 0; end if; D1 := 0; end if; -- Now it is time for the dreaded multiple precision division. First -- an easy case, check for the simple case of a one digit divisor. if Zhi = 0 then if D1 /= 0 or else D2 >= Zlo then Raise_Error; -- Here we are dividing at most three digits by one digit else T1 := D2 & D3; T2 := Lo (T1 rem Zlo) & D4; Qu := Lo (T1 / Zlo) & Lo (T2 / Zlo); Ru := T2 rem Zlo; end if; -- If divisor is double digit and too large, raise error elsif (D1 & D2) >= Zu then Raise_Error; -- This is the complex case where we definitely have a double digit -- divisor and a dividend of at least three digits. We use the classical -- multiple division algorithm (see section (4.3.1) of Knuth's "The Art -- of Computer Programming", Vol. 2 for a description (algorithm D). else -- First normalize the divisor so that it has the leading bit on. -- We do this by finding the appropriate left shift amount. Scale := 0; if (Zhi and 16#FFFF0000#) = 0 then Scale := 16; Zu := Shift_Left (Zu, 16); end if; if (Hi (Zu) and 16#FF00_0000#) = 0 then Scale := Scale + 8; Zu := Shift_Left (Zu, 8); end if; if (Hi (Zu) and 16#F000_0000#) = 0 then Scale := Scale + 4; Zu := Shift_Left (Zu, 4); end if; if (Hi (Zu) and 16#C000_0000#) = 0 then Scale := Scale + 2; Zu := Shift_Left (Zu, 2); end if; if (Hi (Zu) and 16#8000_0000#) = 0 then Scale := Scale + 1; Zu := Shift_Left (Zu, 1); end if; Zhi := Hi (Zu); Zlo := Lo (Zu); -- Note that when we scale up the dividend, it still fits in four -- digits, since we already tested for overflow, and scaling does -- not change the invariant that (D1 & D2) >= Zu. T1 := Shift_Left (D1 & D2, Scale); D1 := Hi (T1); T2 := Shift_Left (0 & D3, Scale); D2 := Lo (T1) or Hi (T2); T3 := Shift_Left (0 & D4, Scale); D3 := Lo (T2) or Hi (T3); D4 := Lo (T3); -- Compute first quotient digit. We have to divide three digits by -- two digits, and we estimate the quotient by dividing the leading -- two digits by the leading digit. Given the scaling we did above -- which ensured the first bit of the divisor is set, this gives an -- estimate of the quotient that is at most two too high. if D1 = Zhi then Q1 := 2 ** 32 - 1; else Q1 := Lo ((D1 & D2) / Zhi); end if; -- Compute amount to subtract T1 := Q1 * Zlo; T2 := Q1 * Zhi; S3 := Lo (T1); T1 := Hi (T1) + Lo (T2); S2 := Lo (T1); S1 := Hi (T1) + Hi (T2); -- Adjust quotient digit if it was too high loop exit when S1 < D1; if S1 = D1 then exit when S2 < D2; if S2 = D2 then exit when S3 <= D3; end if; end if; Q1 := Q1 - 1; T1 := (S2 & S3) - Zlo; S3 := Lo (T1); T1 := (S1 & S2) - Zhi; S2 := Lo (T1); S1 := Hi (T1); end loop; -- Subtract from dividend (note: do not bother to set D1 to -- zero, since it is no longer needed in the calculation). T1 := (D2 & D3) - S3; D3 := Lo (T1); T1 := (D1 & Hi (T1)) - S2; D2 := Lo (T1); -- Compute second quotient digit in same manner if D2 = Zhi then Q2 := 2 ** 32 - 1; else Q2 := Lo ((D2 & D3) / Zhi); end if; T1 := Q2 * Zlo; T2 := Q2 * Zhi; S3 := Lo (T1); T1 := Hi (T1) + Lo (T2); S2 := Lo (T1); S1 := Hi (T1) + Hi (T2); loop exit when S1 < D2; if S1 = D2 then exit when S2 < D3; if S2 = D3 then exit when S3 <= D4; end if; end if; Q2 := Q2 - 1; T1 := (S2 & S3) - Zlo; S3 := Lo (T1); T1 := (S1 & S2) - Zhi; S2 := Lo (T1); S1 := Hi (T1); end loop; T1 := (D3 & D4) - S3; D4 := Lo (T1); T1 := (D2 & Hi (T1)) - S2; D3 := Lo (T1); -- The two quotient digits are now set, and the remainder of the -- scaled division is in (D3 & D4). To get the remainder for the -- original unscaled division, we rescale this dividend. -- We rescale the divisor as well, to make the proper comparison -- for rounding below. Qu := Q1 & Q2; Ru := Shift_Right (D3 & D4, Scale); Zu := Shift_Right (Zu, Scale); end if; -- Deal with rounding case if Round and then Ru > (Zu - Uns64'(1)) / Uns64'(2) then Qu := Qu + Uns64 (1); end if; -- Set final signs (RM 4.5.5(27-30)) -- Case of dividend (X * Y) sign positive if (X >= 0 and then Y >= 0) or else (X < 0 and then Y < 0) then R := To_Pos_Int (Ru); if Z > 0 then Q := To_Pos_Int (Qu); else Q := To_Neg_Int (Qu); end if; -- Case of dividend (X * Y) sign negative else R := To_Neg_Int (Ru); if Z > 0 then Q := To_Neg_Int (Qu); else Q := To_Pos_Int (Qu); end if; end if; end Scaled_Divide; ------------------------------- -- Subtract_With_Ovflo_Check -- ------------------------------- function Subtract_With_Ovflo_Check (X, Y : Int64) return Int64 is R : constant Int64 := To_Int (To_Uns (X) - To_Uns (Y)); begin if X >= 0 then if Y > 0 or else R >= 0 then return R; end if; else -- X < 0 if Y <= 0 or else R < 0 then return R; end if; end if; Raise_Error; end Subtract_With_Ovflo_Check; ---------------- -- To_Neg_Int -- ---------------- function To_Neg_Int (A : Uns64) return Int64 is R : constant Int64 := -To_Int (A); begin if R <= 0 then return R; else Raise_Error; end if; end To_Neg_Int; ---------------- -- To_Pos_Int -- ---------------- function To_Pos_Int (A : Uns64) return Int64 is R : constant Int64 := To_Int (A); begin if R >= 0 then return R; else Raise_Error; end if; end To_Pos_Int; end System.Arith_64;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S E M A P H O R E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2003-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. -- -- -- -- -- -- -- -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- This package provides classic counting semaphores and binary semaphores. -- Both types are visibly defined as protected types so that users can make -- conditional and timed calls when appropriate. with System; package GNAT.Semaphores is Default_Ceiling : constant System.Priority := System.Default_Priority; -- A convenient value for the priority discriminants that follow ------------------------ -- Counting_Semaphore -- ------------------------ protected type Counting_Semaphore (Initial_Value : Natural; -- A counting semaphore contains an internal counter. The initial -- value of this counter is set by clients via the discriminant. Ceiling : System.Priority) -- Users must specify the ceiling priority for the object. If the -- Real-Time Systems Annex is not in use this value is not important. is pragma Priority (Ceiling); entry Seize; -- Blocks caller until/unless the semaphore's internal counter is -- greater than zero. Decrements the semaphore's internal counter when -- executed. procedure Release; -- Increments the semaphore's internal counter private Count : Natural := Initial_Value; end Counting_Semaphore; ---------------------- -- Binary_Semaphore -- ---------------------- protected type Binary_Semaphore (Initially_Available : Boolean; -- Binary semaphores are either available or not; there is no internal -- count involved. The discriminant value determines whether the -- individual object is initially available. Ceiling : System.Priority) -- Users must specify the ceiling priority for the object. If the -- Real-Time Systems Annex is not in use this value is not important. is pragma Priority (Ceiling); entry Seize; -- Blocks the caller unless/until semaphore is available. After -- execution the semaphore is no longer available. procedure Release; -- Makes the semaphore available private Available : Boolean := Initially_Available; end Binary_Semaphore; end GNAT.Semaphores;
pragma Priority_Specific_Dispatching(FIFO_Within_Priorities, 2, 30); --high priority tasks pragma Priority_Specific_Dispatching(Round_Robin_Within_Priorities, 1, 1); --low priority tasks with Ada.Text_IO; use Ada.Text_IO; with Ada.Real_Time; use Ada.Real_Time; procedure mixedscheduling is package Duration_IO is new Ada.Text_IO.Fixed_IO(Duration); package Int_IO is new Ada.Text_IO.Integer_IO(Integer); -------- function F(N : Integer) return Integer; function F(N : Integer) return Integer is X : Integer := 0; begin for Index in 1..N loop for I in 1..5000000 loop X := I; end loop; end loop; return X; end F; -------- Start : Time; Dummy : Integer; task type T(Period : Integer; ExecutionTime : Integer) is --high priority tasks pragma Priority(20 - Period); -- priority corresponds to period length end; task body T is Next : Time; begin Next := Start; loop Next := Next + Milliseconds(22*Period); --loop takes about 23ms to finish --- Some dummy function Dummy := F(ExecutionTime); --- Duration_IO.Put(To_Duration(Clock - Start), 3, 3); -- print task execution duration Put(" : "); Int_IO.Put(Period, 2); -- print the priority Put_Line(""); delay until Next; end loop; end T; task type T_low(ID: Integer; ExecutionTime : Integer) is --low priority tasks pragma Priority(1); end; task body T_low is Next : Time; begin Next := Start; loop Next := Next + Milliseconds(22); --loop takes about 23ms to finish --- Some dummy function Dummy := F(ExecutionTime); --- Duration_IO.Put(To_Duration(Clock - Start), 3, 3); -- print task execution duration Put(" : "); Int_IO.Put(ID, 2); -- print the priority Put_Line(""); delay until Next; end loop; end T_low; -- High priority tasks Task_1 : T(3, 1); Task_2 : T(4, 1); Task_3 : T(6, 1); -- Low priority tasks Task_4 : T_low(100, 1); Task_5 : T_low(101, 1); Task_6 : T_low(102, 1); begin Start := Clock; null; end mixedscheduling;
-- convert UCD/extracted/DerivedGeneralCategory.txt -- bin/ucd_generalcategory $UCD/extracted/DerivedGeneralCategory.txt > ../source/strings/a-ucgeca.ads with Ada.Command_Line; use Ada.Command_Line; with Ada.Containers.Doubly_Linked_Lists; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Strings; use Ada.Strings; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Strings.Maps; use Ada.Strings.Maps; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; use Ada.Text_IO; procedure ucd_generalcategory is Hexadecimal_Digit_Set : constant Character_Set := To_Set ("0123456789ABCDEF"); Letter_Set : constant Character_Set := To_Set (Character_Ranges'(('A', 'Z'), ('a', 'z'))); function Value (S : String) return Wide_Wide_Character is Img : constant String := "Hex_" & (1 .. 8 - S'Length => '0') & S; begin return Wide_Wide_Character'Value (Img); end Value; procedure Put_16 (Item : Integer) is begin if Item >= 16#10000# then Put (Item, Width => 1, Base => 16); else declare S : String (1 .. 8); -- "16#XXXX#" begin Put (S, Item, Base => 16); S (1) := '1'; S (2) := '6'; S (3) := '#'; for I in reverse 4 .. 6 loop if S (I) = '#' then S (4 .. I) := (others => '0'); exit; end if; end loop; Put (S); end; end if; end Put_16; type Bit is (In_16, In_17, In_32); function Get_Bit (C : Wide_Wide_Character) return Bit is begin if C > Wide_Wide_Character'Val (16#1FFFF#) then return In_32; elsif C > Wide_Wide_Character'Val (16#FFFF#) then return In_17; else return In_16; end if; end Get_Bit; type Range_Item is record First : Wide_Wide_Character; Last : Wide_Wide_Character; end record; package Range_Lists is new Ada.Containers.Doubly_Linked_Lists (Range_Item); use Range_Lists; type Nums_Type is array (Bit, Boolean) of Natural; type Category_Item is record Name : Ada.Strings.Unbounded.Unbounded_String; Code_Points : aliased Range_Lists.List; Total_CP_Num : Natural; Total_Set_Num : Natural; Nums : Nums_Type; end record; package Category_Lists is new Ada.Containers.Doubly_Linked_Lists (Category_Item); use Category_Lists; function Find (Table : Category_Lists.List; Category : String) return Category_Lists.Cursor is I : Category_Lists.Cursor := First (Table); begin while Has_Element (I) loop if Table.Constant_Reference (I).Element.Name = Category then return I; end if; I := Next (I); end loop; return Category_Lists.No_Element; end Find; Table : aliased Category_Lists.List; begin declare File : Ada.Text_IO.File_Type; begin Open (File, In_File, Argument (1)); while not End_Of_File (File) loop declare Line : constant String := Get_Line (File); P : Positive := Line'First; N : Natural; Token_First : Positive; Token_Last : Natural; First, Last : Wide_Wide_Character; Category : Ada.Strings.Unbounded.Unbounded_String; Category_Pos : Category_Lists.Cursor; begin if Line'Length = 0 or else Line (P) = '#' then null; -- comment else Find_Token ( Line (P .. Line'Last), Hexadecimal_Digit_Set, Inside, Token_First, Token_Last); if Token_First /= P then raise Data_Error with Line & " -- A"; end if; First := Value (Line (Token_First .. Token_Last)); P := Token_Last + 1; if Line (P) = '.' and then Line (P + 1) = '.' then P := P + 2; Find_Token ( Line (P .. Line'Last), Hexadecimal_Digit_Set, Inside, Token_First, Token_Last); if Token_First /= P then raise Data_Error with Line & " -- B"; end if; Last := Value (Line (Token_First .. Token_Last)); P := Token_Last + 1; else Last := First; end if; N := Index_Non_Blank (Line (P .. Line'Last)); if N = 0 or else Line (N) /= ';' then raise Data_Error with Line & " -- C"; end if; P := N + 1; -- skip ';' N := Index_Non_Blank (Line (P .. Line'Last)); if N = 0 then raise Data_Error with Line & " -- D"; end if; P := N; Find_Token ( Line (P .. Line'Last), Letter_Set, Inside, Token_First, Token_Last); if Token_First /= P then raise Data_Error with Line & " -- E"; end if; Category := To_Unbounded_String (Line (Token_First .. Token_Last)); Category_Pos := Find (Table, To_String (Category)); if not Has_Element (Category_Pos) then Insert ( Table, Before => Category_Lists.No_Element, Position => Category_Pos); Table.Reference (Category_Pos).Element.Name := Category; end if; Append ( Table.Reference (Category_Pos).Element.Code_Points, (First => First, Last => Last)); end if; end; end loop; Close (File); end; declare I : Category_Lists.Cursor := First (Table); begin while Has_Element (I) loop declare Cat : Category_Item renames Table.Reference (I).Element.all; begin Cat.Total_CP_Num := 0; Cat.Total_Set_Num := 0; for J in Bit loop for K in Boolean loop Cat.Nums (J, K) := 0; end loop; end loop; declare J : Range_Lists.Cursor := First (Cat.Code_Points); begin while Has_Element (J) loop declare R : Range_Item renames Cat.Code_Points.Constant_Reference (J).Element.all; B : Bit := Get_Bit (R.Last); S : Boolean := R.First /= R.Last; begin Cat.Nums (B, S) := Cat.Nums (B, S) + 1; Cat.Total_CP_Num := Cat.Total_CP_Num + ( Wide_Wide_Character'Pos (R.Last) - Wide_Wide_Character'Pos (R.First) + 1); Cat.Total_Set_Num := Cat.Total_Set_Num + 1; end; J := Next (J); end loop; end; end; I := Next (I); end loop; end; Put_Line ("pragma License (Unrestricted);"); Put_Line ("-- implementation unit, translated from DerivedGeneralCategory.txt"); Put_Line ("package Ada.UCD.General_Category is"); Put_Line (" pragma Pure;"); New_Line; declare I : Category_Lists.Cursor := First (Table); begin while Has_Element (I) loop declare Cat : Category_Item renames Table.Reference (I).Element.all; begin Put (" "); Put (To_String (Cat.Name)); Put ("_Total : constant := "); Put (Cat.Total_CP_Num, Width => 1); Put (";"); New_Line; Put (" "); Put (To_String (Cat.Name)); Put ("_Range_Length : constant := "); Put (Cat.Total_Set_Num, Width => 1); Put (";"); New_Line; end; I := Next (I); end loop; end; New_Line; Put_Line (" Empty_XXXXx1 : constant UCS_2_Array (1 .. 0) := (others => 0);"); Put_Line (" Empty_XXXXx2 : constant Set_16_Type (1 .. 0) := (others => (0, 0));"); Put_Line (" Empty_1XXXXx1 : UCS_2_Array renames Empty_XXXXx1;"); Put_Line (" Empty_1XXXXx2 : Set_16_Type renames Empty_XXXXx2;"); Put_Line (" Empty_XXXXXXXXx1 : constant UCS_4_Array (1 .. 0) := (others => 0);"); Put_Line (" Empty_XXXXXXXXx2 : constant Set_32_Type (1 .. 0) := (others => (0, 0));"); New_Line; declare I : Category_Lists.Cursor := First (Table); begin while Has_Element (I) loop declare Cat : Category_Item renames Table.Reference (I).Element.all; begin for B in Bit loop for S in Boolean loop Put (" "); Put (To_String (Cat.Name)); Put ("_Table_"); case B is when In_32 => Put ("XXXXXXXX"); when In_17 => Put ("1XXXX"); when In_16 => Put ("XXXX"); end case; if S then Put ("x2"); else Put ("x1"); end if; Put (" : "); if Cat.Nums (B, S) > 0 then Put ("constant "); end if; if S then case B is when In_32 => Put ("Set_32_Type"); when In_16 | In_17 => Put ("Set_16_Type"); end case; else case B is when In_32 => Put ("UCS_4_Array"); when In_16 | In_17 => Put ("UCS_2_Array"); end case; end if; if Cat.Nums (B, S) = 0 then Put (" renames Empty_"); case B is when In_32 => Put ("XXXXXXXX"); when In_17 => Put ("1XXXX"); when In_16 => Put ("XXXX"); end case; if S then Put ("x2"); else Put ("x1"); end if; Put (";"); New_Line; else Put (" (1 .. "); Put (Cat.Nums (B, S), Width => 1); Put (") := ("); New_Line; declare J : Range_Lists.Cursor := First (Cat.Code_Points); Second : Boolean := False; begin while Has_Element (J) loop declare R : Range_Item renames Cat.Code_Points.Constant_Reference (J).Element.all; Item_B : Bit := Get_Bit (R.Last); Item_S : Boolean := R.First /= R.Last; Offset : Integer := 0; begin if Item_B = B and then Item_S = S then if B = In_17 then Offset := 16#10000#; end if; if Second then Put (","); New_Line; end if; Put (" "); if Cat.Nums (B, S) = 1 then Put ("1 => "); end if; if S then Put ("("); Put_16 ( Wide_Wide_Character'Pos (R.First) - Offset); Put (", "); Put_16 ( Wide_Wide_Character'Pos (R.Last) - Offset); Put (")"); else Put_16 ( Wide_Wide_Character'Pos (R.First) - Offset); end if; Second := True; end if; end; J := Next (J); end loop; end; Put (");"); New_Line; end if; New_Line; end loop; end loop; end; I := Next (I); end loop; end; Put_Line ("end Ada.UCD.General_Category;"); end ucd_generalcategory;
pragma License (Unrestricted); -- implementation unit with Ada.Interrupts; package System.Interrupt_Handlers is -- pragma Interrupt_Handler is required to Attach_Handler, CXC3001. procedure Register_Interrupt_Handler ( Code_Address : Address); procedure Register_Interrupt_Handler ( Handler : Ada.Interrupts.Parameterless_Handler); procedure Set_Static_Handler ( Code_Address : Address); procedure Set_Static_Handler ( Handler : Ada.Interrupts.Parameterless_Handler); function Is_Static_Handler ( Code_Address : Address) return Boolean; function Is_Static_Handler ( Handler : Ada.Interrupts.Parameterless_Handler) return Boolean; end System.Interrupt_Handlers;
with physics.Object, physics.Model, physics.Shape, bullet_C; private with lace.Any; package bullet_Physics.Object -- -- Provides glue between a physics object and a Bullet3D object. -- is type Item is limited new physics.Object.item with private; type View is access all Item'Class; use Math; --------- --- Forge -- function new_Object (Shape : in physics.Shape.view; Mass : in Real; Friction : in Real; Restitution : in Real; at_Site : in Vector_3) return View; -- is_Kinematic : in Boolean) return View; overriding procedure define (Self : access Item; Shape : in physics.Shape.view; Mass : in Real; Friction : in Real; Restitution : in Real; at_Site : in Vector_3); procedure free (the_Object : in out physics.Object.view); -------------- --- Attributes -- function C (Self : in Item) return access bullet_C.Object; overriding function Model (Self : in Item) return physics.Model.view; overriding procedure Model_is (Self : in out Item; Now : in physics.Model.view); overriding procedure update_Dynamics (Self : in out Item); overriding function get_Dynamics (Self : in Item) return Matrix_4x4; private type Item is limited new physics.Object.item with record C : access bullet_C.Object; Shape : physics.Shape.view; Model : physics.Model.view; Dynamics : physics.Object.safe_Dynamics; user_Data : access lace.Any.limited_item'Class; end record; overriding procedure destruct (Self : in out Item); overriding function Shape (Self : in Item) return physics.Shape.view; overriding function Scale (Self : in Item) return Vector_3; overriding procedure Scale_is (Self : in out Item; Now : in Vector_3); overriding procedure activate (Self : in out Item; forceActivation : in Boolean := False); overriding function is_Active (Self : in Item) return Boolean; overriding function Mass (Self : in Item) return Real; overriding function Site (Self : in Item) return Vector_3; overriding procedure Site_is (Self : in out Item; Now : in Vector_3); overriding function Spin (Self : in Item) return Matrix_3x3; overriding procedure Spin_is (Self : in out Item; Now : in Matrix_3x3); overriding function xy_Spin (Self : in Item) return Radians; overriding procedure xy_Spin_is (Self : in out Item; Now : in Radians); overriding function Transform (Self : in Item) return Matrix_4x4; overriding procedure Transform_is (Self : in out Item; Now : in Matrix_4x4); overriding function Speed (Self : in Item) return Vector_3; overriding procedure Speed_is (Self : in out Item; Now : in Vector_3); overriding function Gyre (Self : in Item) return Vector_3; overriding procedure Gyre_is (Self : in out Item; Now : in Vector_3); overriding procedure Friction_is (Self : in out Item; Now : in Real); overriding procedure Restitution_is (Self : in out Item; Now : in Real); --- Forces -- overriding procedure apply_Torque (Self : in out Item; Torque : in Vector_3); overriding procedure apply_Torque_impulse (Self : in out Item; Torque : in Vector_3); overriding procedure apply_Force (Self : in out Item; Force : in Vector_3); --- User data -- overriding procedure user_Data_is (Self : in out Item; Now : access lace.Any.limited_item'Class); overriding function user_Data (Self : in Item) return access lace.Any.limited_item'Class; end bullet_Physics.Object;
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired) -- -- Copyright William A. Whitaker (1936–2010) -- -- This is a free program, which means it is proper to copy it and pass -- it on to your friends. Consider it a developmental item for which -- there is no charge. However, just for form, it is Copyrighted -- (c). Permission is hereby freely given for any and all use of program -- and data. You can sell it as your own, but at least tell me. -- -- This version is distributed without obligation, but the developer -- would appreciate comments and suggestions. -- -- All parts of the WORDS system, source code and data files, are made freely -- available to anyone who wishes to use them, for whatever purpose. separate (Latin_Utils.Inflections_Package) package body Vpar_Record_IO is --------------------------------------------------------------------------- procedure Get (File : in File_Type; Item : out Vpar_Record) is Spacer : Character := ' '; pragma Unreferenced (Spacer); begin Decn_Record_IO.Get (File, Item.Con); Get (File, Spacer); Case_Type_IO.Get (File, Item.Of_Case); Get (File, Spacer); Number_Type_IO.Get (File, Item.Number); Get (File, Spacer); Gender_Type_IO.Get (File, Item.Gender); Get (File, Spacer); Tense_Voice_Mood_Record_IO.Get (File, Item.Tense_Voice_Mood); end Get; --------------------------------------------------------------------------- procedure Get (Item : out Vpar_Record) is Spacer : Character := ' '; pragma Unreferenced (Spacer); begin Decn_Record_IO.Get (Item.Con); Get (Spacer); Case_Type_IO.Get (Item.Of_Case); Get (Spacer); Number_Type_IO.Get (Item.Number); Get (Spacer); Gender_Type_IO.Get (Item.Gender); Get (Spacer); Tense_Voice_Mood_Record_IO.Get (Item.Tense_Voice_Mood); end Get; --------------------------------------------------------------------------- procedure Put (File : in File_Type; Item : in Vpar_Record) is begin Decn_Record_IO.Put (File, Item.Con); Put (File, ' '); Case_Type_IO.Put (File, Item.Of_Case); Put (File, ' '); Number_Type_IO.Put (File, Item.Number); Put (File, ' '); Gender_Type_IO.Put (File, Item.Gender); Put (File, ' '); Tense_Voice_Mood_Record_IO.Put (File, Item.Tense_Voice_Mood); end Put; --------------------------------------------------------------------------- procedure Put (Item : in Vpar_Record) is begin Decn_Record_IO.Put (Item.Con); Put (' '); Case_Type_IO.Put (Item.Of_Case); Put (' '); Number_Type_IO.Put (Item.Number); Put (' '); Gender_Type_IO.Put (Item.Gender); Put (' '); Tense_Voice_Mood_Record_IO.Put (Item.Tense_Voice_Mood); end Put; --------------------------------------------------------------------------- procedure Get (Source : in String; Target : out Vpar_Record; Last : out Integer ) is -- Used for computing lower bound of substrings Low : Integer := Source'First - 1; begin Decn_Record_IO.Get (Source (Low + 1 .. Source'Last), Target.Con, Low); Low := Low + 1; Case_Type_IO.Get (Source (Low + 1 .. Source'Last), Target.Of_Case, Low); Low := Low + 1; Number_Type_IO.Get (Source (Low + 1 .. Source'Last), Target.Number, Low); Low := Low + 1; Gender_Type_IO.Get (Source (Low + 1 .. Source'Last), Target.Gender, Low); Low := Low + 1; Tense_Voice_Mood_Record_IO.Get (Source (Low + 1 .. Source'Last), Target.Tense_Voice_Mood, Last); end Get; --------------------------------------------------------------------------- procedure Put (Target : out String; Item : in Vpar_Record) is -- Used for computing bounds of substrings Low : Integer := Target'First - 1; High : Integer := 0; begin -- Put Decn_Record High := Low + Decn_Record_IO.Default_Width; Decn_Record_IO.Put (Target (Low + 1 .. High), Item.Con); -- Put Case_Type Low := High + 1; Target (Low) := ' '; High := Low + Case_Type_IO.Default_Width; Case_Type_IO.Put (Target (Low + 1 .. High), Item.Of_Case); -- Put Number_Type Low := High + 1; Target (Low) := ' '; High := Low + Number_Type_IO.Default_Width; Number_Type_IO.Put (Target (Low + 1 .. High), Item.Number); -- Put Gender_Type Low := High + 1; Target (Low) := ' '; High := Low + Gender_Type_IO.Default_Width; Gender_Type_IO.Put (Target (Low + 1 .. High), Item.Gender); -- Put Tense_Voice_Mood_Record Low := High + 1; Target (Low) := ' '; High := Low + Tense_Voice_Mood_Record_IO.Default_Width; Tense_Voice_Mood_Record_IO.Put (Target (Low + 1 .. High), Item.Tense_Voice_Mood); -- Fill remainder of String Target (High + 1 .. Target'Last) := (others => ' '); end Put; --------------------------------------------------------------------------- end Vpar_Record_IO;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.UML.Information_Items.Hash is new AMF.Elements.Generic_Hash (UML_Information_Item, UML_Information_Item_Access);
package Racionalisok is type Racionalis is private; function Szamlalo ( R: Racionalis ) return Integer; function Nevezo ( R: Racionalis ) return Positive; function "/" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis; function "/" ( X, Y: Racionalis ) return Racionalis; function "/" ( X: Racionalis; Y: Positive ) return Racionalis; function "+" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis; function "+" ( X, Y: Racionalis ) return Racionalis; function "+" ( X: Racionalis; Y: Positive ) return Racionalis; function "*" ( Szamlalo: Integer; Nevezo: Positive ) return Racionalis; function "*" ( X, Y: Racionalis ) return Racionalis; function "*" ( X: Racionalis; Y: Positive ) return Racionalis; -- function "=" ( X, Y: Racionalis ) return Boolean; private type Racionalis is record Szamlalo: Integer := 0; Nevezo: Positive := 1; end record; end Racionalisok;
----------------------------------------------------------------------- -- package body Gauss_Quadrature_61. Gaussian quadrature. -- Copyright (C) 2018 Jonathan S. Parker -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------------------------- with Gauss_Nodes_61, Gauss_Nodes_61_bak; package body Gauss_Quadrature_61 is package Nodes is new Gauss_Nodes_61 (Gauss_Index_61, Real, Gauss_Values); use Nodes; package Test_Nodes is new Gauss_Nodes_61_bak (Gauss_Index_61, Real, Gauss_Values); use Test_Nodes; ------------------------- -- Gauss_61_Coeff_Test -- ------------------------- -- Use redundant gauss coeffs to search for mutated coefficients. procedure Gauss_61_Coeff_Test is Error1, Error2, Err : Real := 0.0; begin for I in Gauss_Index_61 loop Error1 := Abs (Gauss_Weights_61 (I) - Gauss_Weights_61_bak (I)); Error2 := Abs (Gauss_Roots_61 (I) - Gauss_Roots_61_bak (I)); if (abs(Error1) > Err) then Err := Abs (Error1); end if; if (abs(Error2) > Err) then Err := Abs (Error2); end if; end loop; for I in Gauss_Index_30 loop Error1 := Abs (Gauss_Weights_30 (I) - Gauss_Weights_30_bak (I)); if (abs(Error1) > Err) then Err := Abs (Error1); end if; end loop; if (Err > Real'Epsilon * 2.0) then raise Program_Error with "Gaussian coefficients are wrong."; end if; end Gauss_61_Coeff_Test; ----------------------- -- Find_Gauss_Nodes -- ----------------------- Gauss_Roots : Gauss_Values renames Gauss_Roots_61; procedure Find_Gauss_Nodes (X_Starting : in Real; X_Final : in Real; X_gauss : out Gauss_Values) is Abs_Half_Delta_X : constant Real := Abs (X_Final - X_Starting) * 0.5; Central_X : constant Real := (X_Final + X_Starting) * 0.5; begin for I in Gauss_Index_61 loop X_gauss(I) := Central_X + Gauss_Roots(I) * Abs_Half_Delta_X; end loop; end Find_Gauss_Nodes; ------------------ -- Get_Integral -- ------------------ procedure Get_Integral (F_val : in Function_Values; X_Starting : in Real; X_Final : in Real; Area : out Real; Rough_Error : out Real) is Area_30, Area_61, Area_abs : Real; Sum, Error_Est, Area_scaler, Scaled_Error, F_mean: Real; Half_Delta_X : constant Real := (X_Final - X_Starting) * 0.5; Abs_Half_Delta_X : constant Real := Abs (Half_Delta_X); function Min(X,Y : Real) return Real is begin if X < Y then return X; else return Y; end if; end Min; function Max(X,Y : Real) return Real is begin if X > Y then return X; else return Y; end if; end Max; begin -- Get the 30-point Gaussian Quadrature: Sum := 0.0; for I in Gauss_Index_30 loop Sum := Sum + Gauss_Weights_30 (I) * F_val (2*I-1); end loop; Area_30 := Sum * Half_Delta_X; -- Calculate the 61-pt formula Sum := 0.0; for I in Gauss_Index_61 loop Sum := Sum + Gauss_Weights_61 (I) * F_val (I); end loop; F_mean := Sum * 0.5; Area_61 := Sum * Half_Delta_X; -- Calculate Rough_Error: Sum := 0.0; for I in Gauss_Index_61 loop Sum := Sum + Gauss_Weights_61 (I) * Abs (F_val (I) - F_mean); end loop; Area_scaler := Sum * Abs_Half_Delta_X; Sum := 0.0; for I in Gauss_Index_61 loop Sum := Sum + Gauss_Weights_61 (I) * Abs (F_val (I)); end loop; Area_abs := Sum * Abs_Half_Delta_X; Error_Est := Abs (Area_61 - Area_30); if Error_Est > 0.0 and Area_scaler > 0.0 then Scaled_Error := Error_Est / Area_scaler; Error_Est := Scaled_Error * Min (1.0, (Sqrt (200.0 * Scaled_Error))**3); end if; if Area_abs > Real'Small / (Real'Epsilon * 8.0) then Error_Est := Max (Error_Est, Area_abs * Real'Epsilon * 2.0); end if; -- Very rough fit to true error Rough_Error := Error_Est; Area := Area_61; end Get_Integral; begin Gauss_61_Coeff_Test; -- Search for typos in the tables of coefficients. end Gauss_Quadrature_61;
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2013-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/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Warnings (Off); with System.SAM4S; use System.SAM4S; pragma Warnings (On); with Ada.Interrupts.Names; with Ada.Real_Time; package body Oled is -- Pin definition. Spi_DC_Pin_C : constant := 2 ** 21; -- PC21 Spi_Reset_Pin_C : constant := 2 ** 31; -- PC31 Spi_MOSI_Pin_A : constant := 2 ** 13; -- PA13 Spi_SPCK_Pin_A : constant := 2 ** 14; -- PA14 Spi_NPC_Pin_A : constant := 2 ** 10; -- PA10 -- SSD1306 commands. package SSD1306 is pragma Warnings (Off, "*is not referenced"); CMD_SET_LOW_COL : constant := 16#00#; CMD_SET_HIGH_COL : constant := 16#10#; CMD_SET_MEMORY_ADDRESSING_MODE : constant := 16#20#; CMD_SET_COLUMN_ADDRESS : constant := 16#21#; CMD_SET_PAGE_ADDRESS : constant := 16#22#; CMD_SET_START_LINE : constant := 16#40#; CMD_SET_CONTRAST_CONTROL_FOR_BANK0 : constant := 16#81#; CMD_SET_CHARGE_PUMP_SETTING : constant := 16#8D#; CMD_SET_SEGMENT_RE_MAP_COL0_SEG0 : constant := 16#A0#; CMD_SET_SEGMENT_RE_MAP_COL127_SEG0 : constant := 16#A1#; CMD_ENTIRE_DISPLAY_AND_GDDRAM_ON : constant := 16#A4#; CMD_ENTIRE_DISPLAY_ON : constant := 16#A5#; CMD_SET_NORMAL_DISPLAY : constant := 16#A6#; CMD_SET_INVERSE_DISPLAY : constant := 16#A7#; CMD_SET_MULTIPLEX_RATIO : constant := 16#A8#; CMD_SET_DISPLAY_ON : constant := 16#AF#; CMD_SET_DISPLAY_OFF : constant := 16#AE#; CMD_SET_PAGE_START_ADDRESS : constant := 16#B0#; CMD_SET_COM_OUTPUT_SCAN_UP : constant := 16#C0#; CMD_SET_COM_OUTPUT_SCAN_DOWN : constant := 16#C8#; CMD_SET_DISPLAY_OFFSET : constant := 16#D3#; CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO : constant := 16#D5#; CMD_SET_PRE_CHARGE_PERIOD : constant := 16#D9#; CMD_SET_COM_PINS : constant := 16#DA#; CMD_SET_VCOMH_DESELECT_LEVEL : constant := 16#DB#; CMD_NOP : constant := 16#E3#; CMD_SCROLL_H_RIGHT : constant := 16#26#; CMD_SCROLL_H_LEFT : constant := 16#27#; CMD_CONTINUOUS_SCROLL_V_AND_H_RIGHT : constant := 16#29#; CMD_CONTINUOUS_SCROLL_V_AND_H_LEFT : constant := 16#2A#; CMD_DEACTIVATE_SCROLL : constant := 16#2E#; CMD_ACTIVATE_SCROLL : constant := 16#2F#; CMD_SET_VERTICAL_SCROLL_AREA : constant := 16#A3#; pragma Warnings (On, "*is not referenced"); end SSD1306; procedure Oled_Configure is begin -- Enable clock for SPI PMC.PMC_PCER0 := PMC.PMC_PCER0 + 2 ** SPI_ID; -- Configure SPI pins PIOC.PER := Spi_DC_Pin_C + Spi_Reset_Pin_C; PIOC.OER := Spi_DC_Pin_C + Spi_Reset_Pin_C; PIOC.CODR := Spi_DC_Pin_C + Spi_Reset_Pin_C; PIOC.MDDR := Spi_DC_Pin_C + Spi_Reset_Pin_C; PIOC.PUER := Spi_DC_Pin_C + Spi_Reset_Pin_C; PIOA.ODR := Spi_MOSI_Pin_A + Spi_SPCK_Pin_A + Spi_NPC_Pin_A; PIOA.CODR := Spi_MOSI_Pin_A + Spi_SPCK_Pin_A + Spi_NPC_Pin_A; PIOA.MDDR := Spi_MOSI_Pin_A + Spi_SPCK_Pin_A + Spi_NPC_Pin_A; PIOA.PUER := Spi_MOSI_Pin_A + Spi_SPCK_Pin_A + Spi_NPC_Pin_A; PIOA.ABCDSR1 := (PIOA.ABCDSR1 and not (Spi_MOSI_Pin_A + Spi_SPCK_Pin_A)) or Spi_NPC_Pin_A; PIOA.ABCDSR2 := PIOA.ABCDSR2 and not (Spi_MOSI_Pin_A + Spi_SPCK_Pin_A + Spi_NPC_Pin_A); PIOA.PDR := Spi_MOSI_Pin_A + Spi_SPCK_Pin_A + Spi_NPC_Pin_A; end Oled_Configure; procedure Oled_Reset is use Ada.Real_Time; Now : Time := Clock; Period_3us : constant Time_Span := Microseconds (3); begin -- Lower reset PIOC.CODR := Spi_Reset_Pin_C; Now := Now + Period_3us; delay until Now; -- Raise reset PIOC.SODR := Spi_Reset_Pin_C; Now := Now + Period_3us; delay until Now; end Oled_Reset; protected Spi_Prot is pragma Interrupt_Priority (System.Interrupt_Priority'First); procedure Write_Byte (Cmd : Unsigned_8); procedure Interrupt; pragma Attach_Handler (Interrupt, Ada.Interrupts.Names.SPI_Interrupt); entry Wait_Tx; private Tx_Done : Boolean := False; end Spi_Prot; protected body Spi_Prot is procedure Write_Byte (Cmd : Unsigned_8) is begin -- Set PCS #2 SPI.SPI_MR := (SPI.SPI_MR and not SPI_MR.PCS_Mask) or (SPI_MR.PCS_Mask and not ((2 ** 2) * SPI_MR.PCS)); -- Write cmd SPI.SPI_TDR := Word (Cmd) * SPI_TDR.TD; -- Enable TXEMPTY interrupt. SPI.SPI_IER := SPI_SR.TXEMPTY; end Write_Byte; procedure Interrupt is begin if (SPI.SPI_SR and SPI_SR.TXEMPTY) /= 0 then -- Disable TXEMPTY interrupt. SPI.SPI_IDR := SPI_SR.TXEMPTY; Tx_Done := True; end if; end Interrupt; entry Wait_Tx when Tx_Done is begin Tx_Done := False; -- Deselect device SPI.SPI_MR := SPI.SPI_MR or SPI_MR.PCS_Mask; -- Last transfer SPI.SPI_CR := SPI_CR.LASTXFER; end Wait_Tx; end Spi_Prot; procedure Spi_Init is Baudrate : constant := 200; -- 120_000_000 / 5_000_000; begin -- Reset SPI SPI.SPI_CR := SPI_CR.SWRST; -- Set mode register. -- Set master mode, disable mode fault, disable loopback, set chip -- select value, set fixed peripheral select, disable select decode. SPI.SPI_MR := (SPI.SPI_MR and not (SPI_MR.LLB or SPI_MR.PCS_Mask or SPI_MR.PS or SPI_MR.PCSDEC or SPI_MR.DLYBCS_Mask)) or SPI_MR.MODFDIS or SPI_MR.MSTR or 0 * SPI_MR.DLYBCS; -- Set chip select register. SPI.SPI_CSR2 := 0 * SPI_CSR.DLYBCT or 0 * SPI_CSR.DLYBS or Baudrate * SPI_CSR.SCBR or (8 - 8) * SPI_CSR.BITS or SPI_CSR.CSAAT or 0 * SPI_CSR.CPOL or SPI_CSR.NCPHA; -- enable SPI.SPI_CR := SPI_CR.SPIEN; end Spi_Init; procedure Ssd1306_Write (Cmd : Unsigned_8) is begin Spi_Prot.Write_Byte (Cmd); Spi_Prot.Wait_Tx; end Ssd1306_Write; procedure Ssd1306_Cmd (Cmd : Unsigned_8) is begin -- Select cmd PIOC.CODR := Spi_DC_Pin_C; Ssd1306_Write (Cmd); end Ssd1306_Cmd; procedure Ssd1306_Data (Cmd : Unsigned_8) is begin -- Select data PIOC.SODR := Spi_DC_Pin_C; Ssd1306_Write (Cmd); end Ssd1306_Data; procedure Ssd1306_Init is begin -- 1/32 duty Ssd1306_Cmd (SSD1306.CMD_SET_MULTIPLEX_RATIO); Ssd1306_Cmd (31); -- Set ram counter. Ssd1306_Cmd (SSD1306.CMD_SET_DISPLAY_OFFSET); Ssd1306_Cmd (0); -- Set start line. Ssd1306_Cmd (SSD1306.CMD_SET_START_LINE + 0); Ssd1306_Cmd (SSD1306.CMD_SET_SEGMENT_RE_MAP_COL127_SEG0); Ssd1306_Cmd (SSD1306.CMD_SET_COM_OUTPUT_SCAN_DOWN); Ssd1306_Cmd (SSD1306.CMD_SET_COM_PINS); Ssd1306_Cmd (2); -- Set contrast Ssd1306_Cmd (SSD1306.CMD_SET_CONTRAST_CONTROL_FOR_BANK0); Ssd1306_Cmd (16#8f#); Ssd1306_Cmd (SSD1306.CMD_ENTIRE_DISPLAY_AND_GDDRAM_ON); Ssd1306_Cmd (SSD1306.CMD_SET_NORMAL_DISPLAY); -- Display clock divide ratio Ssd1306_Cmd (SSD1306.CMD_SET_DISPLAY_CLOCK_DIVIDE_RATIO); Ssd1306_Cmd (16#80#); -- Enable charge pump regulator Ssd1306_Cmd (SSD1306.CMD_SET_CHARGE_PUMP_SETTING); Ssd1306_Cmd (16#14#); -- VCOMH deselect level Ssd1306_Cmd (SSD1306.CMD_SET_VCOMH_DESELECT_LEVEL); Ssd1306_Cmd (16#40#); -- Pre-charge: 15 clocks, discharge: 1 clock. Ssd1306_Cmd (SSD1306.CMD_SET_PRE_CHARGE_PERIOD); Ssd1306_Cmd (16#f1#); Ssd1306_Cmd (SSD1306.CMD_SET_DISPLAY_ON); end Ssd1306_Init; procedure Oled_Set_Page (Page : Unsigned_8) is begin Ssd1306_Cmd (SSD1306.CMD_SET_PAGE_START_ADDRESS + (Page and 16#f#)); Ssd1306_Cmd (SSD1306.CMD_SET_HIGH_COL + 0); Ssd1306_Cmd (SSD1306.CMD_SET_LOW_COL + 0); end Oled_Set_Page; procedure Ssd1306_Clear is begin for Page in Unsigned_8 range 0 .. 3 loop Oled_Set_Page (Page); for B in Unsigned_8 range 0 .. 127 loop Ssd1306_Data (0); end loop; end loop; end Ssd1306_Clear; procedure Oled_Clear renames Ssd1306_Clear; procedure Oled_Draw (B : Unsigned_8) renames Ssd1306_Data; procedure Oled_Init is begin Oled_Configure; Oled_Reset; -- Init spi master Spi_Init; Ssd1306_Init; Ssd1306_Clear; end Oled_Init; end Oled;
with Ada.Long_Integer_Text_IO; -- Copyright 2021 Melwyn Francis Carlo procedure A043 is use Ada.Long_Integer_Text_IO; Main_Num : String (1 .. 10) := "0123456789"; Temp_Char : String (1 .. 1); Pandigital_Num_List : array (Integer range 1 .. 100) of Long_Integer := (others => 0); Sum : Long_Integer := 0; Count_Val : Integer := 1; Duplicate_Found : Boolean; begin for I in 1 .. 10 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Main_Num (6 .. 6); Main_Num (6 .. 6) := Main_Num (5 .. 5); Main_Num (5 .. 5) := Main_Num (4 .. 4); Main_Num (4 .. 4) := Main_Num (3 .. 3); Main_Num (3 .. 3) := Main_Num (2 .. 2); Main_Num (2 .. 2) := Main_Num (1 .. 1); Main_Num (1 .. 1) := Temp_Char; for J in 1 .. 9 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Main_Num (6 .. 6); Main_Num (6 .. 6) := Main_Num (5 .. 5); Main_Num (5 .. 5) := Main_Num (4 .. 4); Main_Num (4 .. 4) := Main_Num (3 .. 3); Main_Num (3 .. 3) := Main_Num (2 .. 2); Main_Num (2 .. 2) := Temp_Char; for K in 1 .. 8 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Main_Num (6 .. 6); Main_Num (6 .. 6) := Main_Num (5 .. 5); Main_Num (5 .. 5) := Main_Num (4 .. 4); Main_Num (4 .. 4) := Main_Num (3 .. 3); Main_Num (3 .. 3) := Temp_Char; for L in 1 .. 7 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Main_Num (6 .. 6); Main_Num (6 .. 6) := Main_Num (5 .. 5); Main_Num (5 .. 5) := Main_Num (4 .. 4); Main_Num (4 .. 4) := Temp_Char; for M in 1 .. 6 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Main_Num (6 .. 6); Main_Num (6 .. 6) := Main_Num (5 .. 5); Main_Num (5 .. 5) := Temp_Char; for N in 1 .. 5 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Main_Num (6 .. 6); Main_Num (6 .. 6) := Temp_Char; for O in 1 .. 4 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Main_Num (7 .. 7); Main_Num (7 .. 7) := Temp_Char; for P in 1 .. 3 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Main_Num (8 .. 8); Main_Num (8 .. 8) := Temp_Char; for Q in 1 .. 2 loop Temp_Char := Main_Num (10 .. 10); Main_Num (10 .. 10) := Main_Num (9 .. 9); Main_Num (9 .. 9) := Temp_Char; if Main_Num (6 .. 6) /= "5" and Main_Num (6 .. 6) /= "0" then goto Continue; end if; if Integer'Value (Main_Num (4 .. 4)) mod 2 /= 0 then goto Continue; end if; if (Integer'Value (Main_Num (3 .. 3)) + Integer'Value (Main_Num (4 .. 4)) + Integer'Value (Main_Num (5 .. 5))) mod 3 /= 0 then goto Continue; end if; if Integer'Value (Main_Num (5 .. 7)) mod 7 /= 0 then goto Continue; end if; if Integer'Value (Main_Num (6 .. 8)) mod 11 /= 0 then goto Continue; end if; if Integer'Value (Main_Num (7 .. 9)) mod 13 /= 0 then goto Continue; end if; if Integer'Value (Main_Num (8 .. 10)) mod 17 /= 0 then goto Continue; end if; Duplicate_Found := False; for R in 1 .. Count_Val loop if Pandigital_Num_List (R) = Long_Integer'Value (Main_Num) then Duplicate_Found := True; exit; end if; end loop; if not Duplicate_Found then Pandigital_Num_List (Count_Val) := Long_Integer'Value (Main_Num); Sum := Sum + Long_Integer'Value (Main_Num); Count_Val := Count_Val + 1; end if; <<Continue>> end loop; end loop; end loop; end loop; end loop; end loop; end loop; end loop; end loop; Put (Sum, Width => 0); end A043;
with Ada.Unchecked_Conversion; package Tkmrpc.Request.Cfg.Tkm_Reset.Convert is function To_Request is new Ada.Unchecked_Conversion ( Source => Tkm_Reset.Request_Type, Target => Request.Data_Type); function From_Request is new Ada.Unchecked_Conversion ( Source => Request.Data_Type, Target => Tkm_Reset.Request_Type); end Tkmrpc.Request.Cfg.Tkm_Reset.Convert;
-- C93003A.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 ACTIVATION OF TASKS CREATED BY ALLOCATORS PRESENT IN A -- DECLARATIVE PART TAKES PLACE DURING ELABORATION OF THE -- CORRESPONDING DECLARATION. -- SUBTESTS ARE: -- (A) A SIMPLE TASK ALLOCATOR, IN A BLOCK. -- (B) AN ARRAY OF TASK ALLOCATOR, IN A FUNCTION. -- (C) A RECORD OF TASK ALLOCATOR, IN A PACKAGE SPECIFICATION. -- (D) A RECORD OF ARRAY OF TASK ALLOCATOR, IN A PACKAGE BODY. -- (E) AN ARRAY OF RECORD OF TASK ALLOCATOR, IN A TASK BODY. -- JRK 9/28/81 -- SPS 11/11/82 -- SPS 11/21/82 -- RJW 8/4/86 ADDED CHECKS ON INITIALIZATIONS OF NON-TASK COMPONENTS -- OF RECORD TYPES. -- PWN 11/30/94 REMOVED PRAGMA PRIORITY INSTANCES FOR ADA 9X. WITH REPORT; USE REPORT; WITH SYSTEM; USE SYSTEM; PROCEDURE C93003A IS GLOBAL : INTEGER; FUNCTION SIDE_EFFECT (I : INTEGER) RETURN INTEGER IS BEGIN GLOBAL := IDENT_INT (I); RETURN 0; END SIDE_EFFECT; TASK TYPE TT IS ENTRY E; END TT; TASK BODY TT IS I : INTEGER := SIDE_EFFECT (1); BEGIN NULL; END TT; BEGIN TEST ("C93003A", "CHECK THAT ACTIVATION OF TASKS CREATED BY " & "ALLOCATORS PRESENT IN A DECLARATIVE PART " & "TAKES PLACE DURING ELABORATION OF THE " & "CORRESPONDING DECLARATION"); -------------------------------------------------- GLOBAL := IDENT_INT (0); DECLARE -- (A) TYPE A IS ACCESS TT; T1 : A := NEW TT; I1 : INTEGER := GLOBAL; J : INTEGER := SIDE_EFFECT (0); T2 : A := NEW TT; I2 : INTEGER := GLOBAL; BEGIN -- (A) IF I1 /= 1 OR I2 /= 1 THEN FAILED ("A SIMPLE TASK ALLOCATOR IN A BLOCK WAS " & "ACTIVATED TOO LATE - (A)"); END IF; END; -- (A) -------------------------------------------------- GLOBAL := IDENT_INT (0); DECLARE -- (B) J : INTEGER; FUNCTION F RETURN INTEGER IS TYPE A_T IS ARRAY (1 .. 1) OF TT; TYPE A IS ACCESS A_T; A1 : A := NEW A_T; I1 : INTEGER := GLOBAL; J : INTEGER := SIDE_EFFECT (0); A2 : A := NEW A_T; I2 : INTEGER := GLOBAL; BEGIN IF I1 /= 1 OR I2 /= 1 THEN FAILED ("AN ARRAY OF TASK ALLOCATOR IN A " & "FUNCTION WAS ACTIVATED TOO LATE - (B)"); END IF; RETURN 0; END F; BEGIN -- (B) J := F ; END; -- (B) -------------------------------------------------- GLOBAL := IDENT_INT (0); DECLARE -- (C1) PACKAGE P IS TYPE INTREC IS RECORD N1 : INTEGER := GLOBAL; END RECORD; TYPE RT IS RECORD M : INTEGER := GLOBAL; T : TT; N : INTREC; END RECORD; TYPE A IS ACCESS RT; R1 : A := NEW RT; I1 : INTEGER := GLOBAL; J : INTEGER := SIDE_EFFECT (0); R2 : A := NEW RT; I2 : INTEGER := GLOBAL; END P; BEGIN -- (C1) IF P.R1.M /= 0 OR P.R1.N.N1 /= 0 THEN FAILED ("NON-TASK COMPONENTS OF RECORD R1 NOT " & "INITIALIZED BEFORE TASK ACTIVATED - (C1)" ); END IF; IF P.R2.M /= 0 OR P.R2.N.N1 /= 0 THEN FAILED ("NON-TASK COMPONENTS OF RECORD R2 NOT " & "INITIALIZED BEFORE TASK ACTIVATED - (C1)" ); END IF; IF P.I1 /= 1 OR P.I2 /= 1 THEN FAILED ("A RECORD OF TASK ALLOCATOR IN A PACKAGE " & "SPECIFICATION WAS ACTIVATED TOO LATE - (C1)"); END IF; END; -- (C1) -------------------------------------------------- GLOBAL := IDENT_INT (0); DECLARE -- (C2) PACKAGE Q IS J1 : INTEGER; PRIVATE TYPE GRADE IS (GOOD, FAIR, POOR); TYPE REC (G : GRADE) IS RECORD NULL; END RECORD; TYPE ACCR IS ACCESS REC; TYPE ACCI IS ACCESS INTEGER; TYPE RT IS RECORD M : ACCR := NEW REC (GRADE'VAL (GLOBAL)); T : TT; N : ACCI := NEW INTEGER'(GLOBAL); END RECORD; TYPE A IS ACCESS RT; R1 : A := NEW RT; I1 : INTEGER := GLOBAL; J2 : INTEGER := SIDE_EFFECT (0); R2 : A := NEW RT; I2 : INTEGER := GLOBAL; END Q; PACKAGE BODY Q IS BEGIN IF R1.M.G /= GOOD OR R1.N.ALL /= 0 THEN FAILED ("NON-TASK COMPONENTS OF RECORD R1 NOT " & "INITIALIZED BEFORE TASK ACTIVATED " & "- (C2)" ); END IF; IF R2.M.G /= GOOD OR R2.N.ALL /= 0 THEN FAILED ("NON-TASK COMPONENTS OF RECORD R2 NOT " & "INITIALIZED BEFORE TASK ACTIVATED " & "- (C2)" ); END IF; IF I1 /= 1 OR I2 /= 1 THEN FAILED ("A RECORD OF TASK ALLOCATOR IN A PACKAGE " & "SPECIFICATION WAS ACTIVATED TOO LATE " & "- (C2)"); END IF; END Q; BEGIN -- (C2) NULL; END; -- (C2) -------------------------------------------------- GLOBAL := IDENT_INT (0); DECLARE -- (D) PACKAGE P IS TYPE ARR IS ARRAY (1 .. 1) OF TT; TYPE INTARR IS ARRAY (1 .. 1) OF INTEGER; TYPE RAT IS RECORD M : INTARR := (1 => GLOBAL); A : ARR; N : INTARR := (1 => GLOBAL); END RECORD; END P; PACKAGE BODY P IS TYPE A IS ACCESS RAT; RA1 : A := NEW RAT; I1 : INTEGER := GLOBAL; J : INTEGER := SIDE_EFFECT (0); RA2 : A := NEW RAT; I2 : INTEGER := GLOBAL; BEGIN IF RA1.M (1) /= 0 OR RA1.N (1) /= 0 THEN FAILED ("NON-TASK COMPONENTS OF RECORD RA1 NOT " & "INITIALIZED BEFORE TASK ACTIVATED " & "- (D)" ); END IF; IF RA2.M (1) /= 0 OR RA2.N (1) /= 0 THEN FAILED ("NON-TASK COMPONENTS OF RECORD RA2 NOT " & "INITIALIZED BEFORE TASK ACTIVATED " & "- (D)" ); END IF; IF I1 /= 1 OR I2 /= 1 THEN FAILED ("A RECORD OF ARRAY OF TASK ALLOCATOR IN " & "A PACKAGE BODY WAS ACTIVATED " & "TOO LATE - (D)"); END IF; END P; BEGIN -- (D) NULL; END; -- (D) -------------------------------------------------- GLOBAL := IDENT_INT (0); DECLARE -- (E) TASK T IS ENTRY E; END T; TASK BODY T IS TYPE RT IS RECORD M : BOOLEAN := BOOLEAN'VAL (GLOBAL); T : TT; N : CHARACTER := CHARACTER'VAL (GLOBAL); END RECORD; TYPE ART IS ARRAY (1 .. 1) OF RT; TYPE A IS ACCESS ART; AR1 : A := NEW ART; I1 : INTEGER := GLOBAL; J : INTEGER := SIDE_EFFECT (0); AR2 : A := NEW ART; I2 : INTEGER := GLOBAL; BEGIN IF AR1.ALL (1).M /= FALSE OR AR1.ALL (1).N /= ASCII.NUL THEN FAILED ("NON-TASK COMPONENTS OF RECORD AR1 NOT " & "INITIALIZED BEFORE TASK ACTIVATED " & "- (E)" ); END IF; IF AR2.ALL (1).M /= FALSE OR AR2.ALL (1).N /= ASCII.NUL THEN FAILED ("NON-TASK COMPONENTS OF RECORD AR2 NOT " & "INITIALIZED BEFORE TASK ACTIVATED " & "- (E)" ); END IF; IF I1 /= 1 OR I2 /= 1 THEN FAILED ("AN ARRAY OF RECORD OF TASK ALLOCATOR IN " & "A TASK BODY WAS ACTIVATED TOO LATE - (E)"); END IF; END T; BEGIN -- (E) NULL; END; -- (E) -------------------------------------------------- RESULT; END C93003A;
with impact.d2.orbs.Solid, impact.d2.orbs.Contact.circle, impact.d2.orbs.world_Callbacks, ada.unchecked_Deallocation; with impact.d2.orbs.Shape; package body impact.d2.orbs.Contact is use type int32; procedure free (Self : in out View) is procedure deallocate is new ada.unchecked_Deallocation (b2Contact'Class, View); begin deallocate (Self); end free; function GetManifold (Self : access b2Contact) return access collision.b2Manifold is begin return Self.m_manifold'Unchecked_Access; end GetManifold; procedure GetWorldManifold (Self : in b2Contact; worldManifold : access collision.b2WorldManifold) is use impact.d2.orbs; bodyA : constant access constant Solid.item := Self.m_fixtureA.GetBody; bodyB : constant access constant Solid.item := Self.m_fixtureB.GetBody; shapeA : constant access constant Shape.Item := Self.m_fixtureA.GetShape; shapeB : constant access constant Shape.Item := Self.m_fixtureB.GetShape; begin collision.Initialize (worldManifold.all, Self.m_manifold, bodyA.GetTransform, shapeA.m_radius, bodyB.GetTransform, shapeB.m_radius); end GetWorldManifold; function IsTouching (Self : in b2Contact) return Boolean is use type uint32; begin return (Self.m_flags and e_touchingFlag) = e_touchingFlag; end IsTouching; procedure SetEnabled (Self : in out b2Contact; flag : in Boolean) is use type uint32; begin if flag then Self.m_flags := Self.m_flags or e_enabledFlag; else Self.m_flags := Self.m_flags and not e_enabledFlag; end if; end SetEnabled; function IsEnabled (Self : in b2Contact) return Boolean is use type uint32; begin return (Self.m_flags and e_enabledFlag) = e_enabledFlag; end IsEnabled; function GetNext (Self : in b2Contact) return View is begin return Self.m_next; end GetNext; function GetFixtureA (Self : in b2Contact) return access Fixture.item'Class is begin return Self.m_fixtureA; end GetFixtureA; function GetFixtureB (Self : in b2Contact) return access Fixture.item'Class is begin return Self.m_fixtureB; end GetFixtureB; procedure FlagForFiltering (Self : in out b2Contact) is use type uint32; begin Self.m_flags := Self.m_flags or e_filterFlag; end FlagForFiltering; procedure define (Self : in out b2Contact; fixtureA, fixtureB : access Fixture.item'Class) is begin Self.m_flags := e_enabledFlag; Self.m_fixtureA := fixtureA.all'Unchecked_Access; Self.m_fixtureB := fixtureB.all'Unchecked_Access; Self.m_manifold.pointCount := 0; Self.m_prev := null; Self.m_next := null; Self.m_nodeA.contact := null; Self.m_nodeA.prev := null; Self.m_nodeA.next := null; Self.m_nodeA.other := null; Self.m_nodeB.contact := null; Self.m_nodeB.prev := null; Self.m_nodeB.next := null; Self.m_nodeB.other := null; Self.m_toiCount := 0; end define; procedure AddType (createFcn : in b2ContactCreateFcn; destroyFcn : in b2ContactDestroyFcn) is begin s_registers (1, 1).createFcn := createFcn; s_registers (1, 1).destroyFcn := destroyFcn; s_registers (1, 1).primary := True; end AddType; procedure InitializeRegisters is begin AddType (Contact.circle.Create 'Access, Contact.circle.Destroy'Access); end InitializeRegisters; function Create (fixtureA, fixtureB : access Fixture.item) return access b2Contact'Class is createFcn : b2ContactCreateFcn; begin if s_initialized = False then InitializeRegisters; s_initialized := True; end if; createFcn := s_registers (1, 1).createFcn; if createFcn /= null then if s_registers (1, 1).primary then return createFcn (fixtureA, fixtureB); else return createFcn (fixtureB, fixtureA); end if; else return null; end if; end Create; -- procedure Destroy (contact : access b2Contact; -- kindA, kindB : in shape.Kind); procedure Destroy (contact : in out impact.d2.orbs.Contact.view) is destroyFcn : b2ContactDestroyFcn; begin pragma Assert (s_initialized); if contact.m_manifold.pointCount > 0 then contact.GetFixtureA.GetBody.SetAwake (True); contact.GetFixtureB.GetBody.SetAwake (True); end if; destroyFcn := s_registers (1, 1).destroyFcn; destroyFcn (contact); end Destroy; -- Update the contact manifold and touching status. -- Note: do not assume the fixture AABBs are overlapping or are valid. -- procedure Update (Self : in out b2Contact'Class; listener : access world_callbacks.b2ContactListener'Class) is use type uint32; oldManifold : aliased collision.b2Manifold := Self.m_manifold; touching : Boolean := False; wasTouching : constant Boolean := (Self.m_flags and e_touchingFlag) = e_touchingFlag; sensorA : constant Boolean := Self.m_fixtureA.IsSensor; sensorB : constant Boolean := Self.m_fixtureB.IsSensor; sensor : constant Boolean := sensorA or sensorB; bodyA : constant access Solid.item'Class := Self.m_fixtureA.GetBody; bodyB : constant access Solid.item'Class := Self.m_fixtureB.GetBody; xfA : b2Transform renames bodyA.GetTransform; xfB : b2Transform renames bodyB.GetTransform; mp1, mp2 : access collision.b2ManifoldPoint; id2 : collision.b2ContactID; begin -- Re-enable this contact. Self.m_flags := Self.m_flags or e_enabledFlag; -- Is this contact a sensor? if sensor then touching := collision.b2TestOverlap (Self.m_fixtureA.GetShape, Self.m_fixtureB.GetShape, xfA, xfB); -- Sensors don't generate manifolds. Self.m_manifold.pointCount := 0; else Self.Evaluate (Self.m_manifold'Access, xfA, xfB); touching := Self.m_manifold.pointCount > 0; -- Match old contact ids to new contact ids and copy the -- stored impulses to warm start the solver. for i in 1 .. Self.m_manifold.pointCount loop mp2 := Self.m_manifold.points (i)'Access; mp2.normalImpulse := 0.0; mp2.tangentImpulse := 0.0; id2 := mp2.id; for j in 1 .. oldManifold.pointCount loop mp1 := oldManifold.points (j)'Access; if mp1.id.key = id2.key then mp2.normalImpulse := mp1.normalImpulse; mp2.tangentImpulse := mp1.tangentImpulse; exit; end if; end loop; end loop; if touching /= wasTouching then bodyA.SetAwake (True); bodyB.SetAwake (True); end if; end if; if touching then Self.m_flags := Self.m_flags or e_touchingFlag; else Self.m_flags := Self.m_flags and not e_touchingFlag; end if; if not wasTouching and then touching and then listener /= null then listener.BeginContact (Self'Access); end if; if wasTouching and then not touching and then listener /= null then listener.EndContact (Self'Access); end if; if not sensor and then touching and then listener /= null then listener.PreSolve (Self'Access, oldManifold); end if; end Update; --- 'protected' subprograms for use by C 'friend's. -- function m_prev (Self : access b2Contact) return View is begin return Self.m_prev.all'Access; end m_prev; function m_next (Self : access b2Contact) return View is begin return Contact.view (Self.m_next); --.all'unchecked_access; end m_next; procedure m_prev_is (Self : in out b2Contact; Now : in View) is begin Self.m_prev := Now; end m_prev_is; procedure m_next_is (Self : in out b2Contact; Now : in View) is begin Self.m_next := Now; end m_next_is; function m_toiCount (Self : in b2Contact'Class) return int32 is begin return Self.m_toiCount; end m_toiCount; procedure m_toiCount_is (Self : in out b2Contact'Class; Now : in int32) is begin Self.m_toiCount := Now; end m_toiCount_is; procedure m_flags_are (Self : in out b2Contact'Class; Now : in uint32) is begin Self.m_flags := Now; end m_flags_are; function m_flags (Self : in b2Contact'Class) return uint32 is begin return Self.m_flags; end m_flags; -- function m_nodeA (Self : access b2Contact) return access b2ContactEdge -- is -- begin -- return Self.m_nodeA'access; -- end; -- -- -- -- function m_nodeB (Self : access b2Contact) return access b2ContactEdge -- is -- begin -- return Self.m_nodeB'access; -- end; end impact.d2.orbs.Contact;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E R R _ V A R S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2014, 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 contains variables common to error reporting packages -- including Errout and Prj.Err. with Namet; use Namet; with Types; use Types; with Uintp; use Uintp; package Err_Vars is -- All of these variables are set when needed, so they do not need to be -- initialized. However, there is code that saves and restores existing -- values, which may malfunction in -gnatVa mode if the variable has never -- been initialized, so we initialize some variables to avoid exceptions -- from invalid values in such cases. -- Note on error counts (Serious_Errors_Detected, Total_Errors_Detected, -- Warnings_Detected, Info_Messages). These counts might more logically -- appear in this unit, but we place them instead in atree.ads, because of -- licensing issues. We need to be able to access these counts from units -- that have the more general licensing conditions. ---------------------------------- -- Error Message Mode Variables -- ---------------------------------- -- These variables control special error message modes. The initialized -- values below give the normal default behavior, but they can be reset -- by the caller to get different behavior as noted in the comments. These -- variables are not reset by calls to the error message routines, so the -- caller is responsible for resetting the default behavior after use. Error_Msg_Qual_Level : Int := 0; -- Number of levels of qualification required for type name (see the -- description of the } insertion character. Note that this value does -- note get reset by any Error_Msg call, so the caller is responsible -- for resetting it. Warn_On_Instance : Boolean := False; -- Normally if a warning is generated in a generic template from the -- analysis of the template, then the warning really belongs in the -- template, and the default value of False for this Boolean achieves -- that effect. If Warn_On_Instance is set True, then the warnings are -- generated on the instantiation (referring to the template) rather -- than on the template itself. Raise_Exception_On_Error : Nat := 0; -- If this value is non-zero, then any attempt to generate an error -- message raises the exception Error_Msg_Exception, and the error -- message is not output. This is used for defending against junk -- resulting from illegalities, and also for substitution of more -- appropriate error messages from higher semantic levels. It is -- a counter so that the increment/decrement protocol nests neatly. -- Initialized for -gnatVa use, see comment above. Error_Msg_Exception : exception; -- Exception raised if Raise_Exception_On_Error is true Current_Error_Source_File : Source_File_Index := Internal_Source_File; -- Id of current messages. Used to post file name when unit changes. This -- is initialized to Main_Source_File at the start of a compilation, which -- means that no file names will be output unless there are errors in units -- other than the main unit. However, if the main unit has a pragma -- Source_Reference line, then this is initialized to No_Source_File, -- to force an initial reference to the real source file name. Warning_Doc_Switch : Boolean := False; -- If this is set True, then the ??/?x?/?x? sequences in error messages -- are active (see errout.ads for details). If this switch is False, then -- these sequences are ignored (i.e. simply equivalent to a single ?). The -- -gnatw.d switch sets this flag True, -gnatw.D sets this flag False. ---------------------------------------- -- Error Message Insertion Parameters -- ---------------------------------------- -- The error message routines work with strings that contain insertion -- sequences that result in the insertion of variable data. The following -- variables contain the required data. The procedure is to set one or more -- of the following global variables to appropriate values before making a -- call to one of the error message routines with a string containing the -- insertion character to get the value inserted in an appropriate format. Error_Msg_Col : Column_Number; -- Column for @ insertion character in message Error_Msg_Uint_1 : Uint; Error_Msg_Uint_2 : Uint; -- Uint values for ^ insertion characters in message Error_Msg_Sloc : Source_Ptr; -- Source location for # insertion character in message Error_Msg_Name_1 : Name_Id; Error_Msg_Name_2 : Name_Id; Error_Msg_Name_3 : Name_Id; -- Name_Id values for % insertion characters in message Error_Msg_File_1 : File_Name_Type; Error_Msg_File_2 : File_Name_Type; Error_Msg_File_3 : File_Name_Type; -- File_Name_Type values for { insertion characters in message Error_Msg_Unit_1 : Unit_Name_Type; Error_Msg_Unit_2 : Unit_Name_Type; -- Unit_Name_Type values for $ insertion characters in message Error_Msg_Node_1 : Node_Id; Error_Msg_Node_2 : Node_Id; -- Node_Id values for & insertion characters in message Error_Msg_Warn : Boolean; -- Used if current message contains a < insertion character to indicate -- if the current message is a warning message. Must be set appropriately -- before any call to Error_Msg_xxx with a < insertion character present. -- Setting is irrelevant if no < insertion character is present. Note -- that it is not necessary to reset this after using it, since the proper -- procedure is always to set it before issuing such a message. Note that -- the warning documentation tag is always [enabled by default] in the -- case where this flag is True. Error_Msg_String : String (1 .. 4096); Error_Msg_Strlen : Natural; -- Used if current message contains a ~ insertion character to indicate -- insertion of the string Error_Msg_String (1 .. Error_Msg_Strlen). end Err_Vars;
-- Copyright 2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local url = require("url") local json = require("json") name = "Arquivo" type = "archive" function start() set_rate_limit(5) end function vertical(ctx, domain) local resp, err = request(ctx, {['url']=build_url(domain)}) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end local d = json.decode(resp) if (d == nil or #(d.response_items) == 0) then return end for _, r in pairs(d.response_items) do send_names(ctx, r.originalURL) end end function build_url(domain) local params = { ['q']=domain, ['offset']="0", ['maxItems']="500", ['siteSearch']="", ['type']="", ['collection']="", } return "https://arquivo.pt/textsearch?" .. url.build_query_string(params) end
------------------------------------------------------------------------------- -- Copyright (c) 2019, Daniel King -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * The name of the copyright holder may not be used to endorse or promote -- Products derived from this software without specific prior written -- permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY -- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------- with Keccak.Keccak_1600.Rounds_24; with Keccak.Generic_Parallel_Sponge; with Keccak.Padding; pragma Elaborate_All (Keccak.Generic_Parallel_Sponge); package Keccak.Parallel_Keccak_1600.Rounds_24 with SPARK_Mode => On is procedure Permute_All_P2 is new KeccakF_1600_P2.Permute_All (First_Round => 0, Num_Rounds => 24); procedure Permute_All_P4 is new KeccakF_1600_P4.Permute_All (Permute_All_P2); procedure Permute_All_P8 is new KeccakF_1600_P8.Permute_All (Permute_All_P2); package Parallel_Sponge_P2 is new Keccak.Generic_Parallel_Sponge (State_Size => 1600, State_Type => KeccakF_1600_P2.Parallel_State, Parallelism => 2, Init => KeccakF_1600_P2.Init, Permute_All => Permute_All_P2, XOR_Bits_Into_State_Separate => KeccakF_1600_P2.XOR_Bits_Into_State_Separate, XOR_Bits_Into_State_All => KeccakF_1600_P2.XOR_Bits_Into_State_All, Extract_Bytes => KeccakF_1600_P2.Extract_Bytes, Pad => Keccak.Padding.Pad101_Single_Block, Min_Padding_Bits => Keccak.Padding.Pad101_Min_Bits); package Parallel_Sponge_P4 is new Keccak.Generic_Parallel_Sponge (State_Size => 1600, State_Type => KeccakF_1600_P4.Parallel_State, Parallelism => 4, Init => KeccakF_1600_P4.Init, Permute_All => Permute_All_P4, XOR_Bits_Into_State_Separate => KeccakF_1600_P4.XOR_Bits_Into_State_Separate, XOR_Bits_Into_State_All => KeccakF_1600_P4.XOR_Bits_Into_State_All, Extract_Bytes => KeccakF_1600_P4.Extract_Bytes, Pad => Keccak.Padding.Pad101_Single_Block, Min_Padding_Bits => Keccak.Padding.Pad101_Min_Bits); package Parallel_Sponge_P8 is new Keccak.Generic_Parallel_Sponge (State_Size => 1600, State_Type => KeccakF_1600_P8.Parallel_State, Parallelism => 8, Init => KeccakF_1600_P8.Init, Permute_All => Permute_All_P8, XOR_Bits_Into_State_Separate => KeccakF_1600_P8.XOR_Bits_Into_State_Separate, XOR_Bits_Into_State_All => KeccakF_1600_P8.XOR_Bits_Into_State_All, Extract_Bytes => KeccakF_1600_P8.Extract_Bytes, Pad => Keccak.Padding.Pad101_Single_Block, Min_Padding_Bits => Keccak.Padding.Pad101_Min_Bits); end Keccak.Parallel_Keccak_1600.Rounds_24;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.UML.Reply_Actions.Hash is new AMF.Elements.Generic_Hash (UML_Reply_Action, UML_Reply_Action_Access);
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.UML.Input_Pins.Collections is pragma Preelaborate; package UML_Input_Pin_Collections is new AMF.Generic_Collections (UML_Input_Pin, UML_Input_Pin_Access); type Set_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Set with null record; Empty_Set_Of_UML_Input_Pin : constant Set_Of_UML_Input_Pin; type Ordered_Set_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Input_Pin : constant Ordered_Set_Of_UML_Input_Pin; type Bag_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Bag with null record; Empty_Bag_Of_UML_Input_Pin : constant Bag_Of_UML_Input_Pin; type Sequence_Of_UML_Input_Pin is new UML_Input_Pin_Collections.Sequence with null record; Empty_Sequence_Of_UML_Input_Pin : constant Sequence_Of_UML_Input_Pin; private Empty_Set_Of_UML_Input_Pin : constant Set_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Input_Pin : constant Ordered_Set_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Input_Pin : constant Bag_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Bag with null record); Empty_Sequence_Of_UML_Input_Pin : constant Sequence_Of_UML_Input_Pin := (UML_Input_Pin_Collections.Sequence with null record); end AMF.UML.Input_Pins.Collections;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- F N A M E . U F -- -- -- -- 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Alloc; with Debug; use Debug; with Fmap; use Fmap; with Krunch; with Opt; use Opt; with Osint; use Osint; with Table; with Uname; use Uname; with Widechar; use Widechar; with GNAT.HTable; package body Fname.UF is -------------------------------------------------------- -- Declarations for Handling Source_File_Name pragmas -- -------------------------------------------------------- type SFN_Entry is record U : Unit_Name_Type; -- Unit name F : File_Name_Type; -- Spec/Body file name Index : Nat; -- Index from SFN pragma (0 if none) end record; -- Record single Unit_Name type call to Set_File_Name package SFN_Table is new Table.Table ( Table_Component_Type => SFN_Entry, Table_Index_Type => Int, Table_Low_Bound => 0, Table_Initial => Alloc.SFN_Table_Initial, Table_Increment => Alloc.SFN_Table_Increment, Table_Name => "SFN_Table"); -- Table recording all Unit_Name calls to Set_File_Name type SFN_Header_Num is range 0 .. 100; function SFN_Hash (F : Unit_Name_Type) return SFN_Header_Num; -- Compute hash index for use by Simple_HTable No_Entry : constant Int := -1; -- Signals no entry in following table package SFN_HTable is new GNAT.HTable.Simple_HTable ( Header_Num => SFN_Header_Num, Element => Int, No_Element => No_Entry, Key => Unit_Name_Type, Hash => SFN_Hash, Equal => "="); -- Hash table allowing rapid access to SFN_Table, the element value is an -- index into this table. type SFN_Pattern_Entry is record Pat : String_Ptr; -- File name pattern (with asterisk in it) Typ : Character; -- 'S'/'B'/'U' for spec/body/subunit Dot : String_Ptr; -- Dot_Separator string Cas : Casing_Type; -- Upper/Lower/Mixed end record; -- Records single call to Set_File_Name_Patterm package SFN_Patterns is new Table.Table ( Table_Component_Type => SFN_Pattern_Entry, Table_Index_Type => Int, Table_Low_Bound => 1, Table_Initial => 10, Table_Increment => 100, Table_Name => "SFN_Patterns"); -- Table recording calls to Set_File_Name_Pattern. Note that the first two -- entries are set to represent the standard GNAT rules for file naming. ----------------------- -- File_Name_Of_Body -- ----------------------- function File_Name_Of_Body (Name : Name_Id) return File_Name_Type is begin Get_Name_String (Name); Name_Buffer (Name_Len + 1 .. Name_Len + 2) := "%b"; Name_Len := Name_Len + 2; return Get_File_Name (Name_Enter, Subunit => False); end File_Name_Of_Body; ----------------------- -- File_Name_Of_Spec -- ----------------------- function File_Name_Of_Spec (Name : Name_Id) return File_Name_Type is begin Get_Name_String (Name); Name_Buffer (Name_Len + 1 .. Name_Len + 2) := "%s"; Name_Len := Name_Len + 2; return Get_File_Name (Name_Enter, Subunit => False); end File_Name_Of_Spec; ---------------------------- -- Get_Expected_Unit_Type -- ---------------------------- function Get_Expected_Unit_Type (Fname : File_Name_Type) return Expected_Unit_Type is begin -- In syntax checking only mode or in multiple unit per file mode, there -- can be more than one unit in a file, so the file name is not a useful -- guide to the nature of the unit. if Operating_Mode = Check_Syntax or else Multiple_Unit_Index /= 0 then return Unknown; end if; -- Search the file mapping table, if we find an entry for this file we -- know whether it is a spec or a body. for J in SFN_Table.First .. SFN_Table.Last loop if Fname = SFN_Table.Table (J).F then if Is_Body_Name (SFN_Table.Table (J).U) then return Expect_Body; else return Expect_Spec; end if; end if; end loop; -- If no entry in file naming table, assume .ads/.adb for spec/body and -- return unknown if we have neither of these two cases. Get_Name_String (Fname); if Name_Len > 4 then if Name_Buffer (Name_Len - 3 .. Name_Len) = ".ads" then return Expect_Spec; elsif Name_Buffer (Name_Len - 3 .. Name_Len) = ".adb" then return Expect_Body; end if; end if; return Unknown; end Get_Expected_Unit_Type; ------------------- -- Get_File_Name -- ------------------- function Get_File_Name (Uname : Unit_Name_Type; Subunit : Boolean; May_Fail : Boolean := False) return File_Name_Type is Unit_Char : Character; -- Set to 's' or 'b' for spec or body or to 'u' for a subunit Unit_Char_Search : Character; -- Same as Unit_Char, except that in the case of 'u' for a subunit, we -- set Unit_Char_Search to 'b' if we do not find a subunit match. N : Int; Pname : File_Name_Type := No_File; Fname : File_Name_Type := No_File; -- Path name and File name for mapping begin -- Null or error name means that some previous error occurred. This is -- an unrecoverable error, so signal it. if Uname in Error_Unit_Name_Or_No_Unit_Name then raise Unrecoverable_Error; end if; -- Look in the map from unit names to file names Fname := Mapped_File_Name (Uname); -- If the unit name is already mapped, return the corresponding file -- name from the map. if Fname /= No_File then return Fname; end if; -- If there is a specific SFN pragma, return the corresponding file name N := SFN_HTable.Get (Uname); if N /= No_Entry then return SFN_Table.Table (N).F; end if; -- Here for the case where the name was not found in the table Get_Decoded_Name_String (Uname); -- A special fudge, normally we don't have operator symbols present, -- since it is always an error to do so. However, if we do, at this -- stage it has a leading double quote. -- What we do in this case is to go back to the undecoded name, which -- is of the form, for example: -- Oand%s -- and build a file name that looks like: -- _and_.ads -- which is bit peculiar, but we keep it that way. This means that we -- avoid bombs due to writing a bad file name, and we get expected error -- processing downstream, e.g. a compilation following gnatchop. if Name_Buffer (1) = '"' then Get_Name_String (Uname); Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := Name_Buffer (Name_Len - 1); Name_Buffer (Name_Len - 1) := Name_Buffer (Name_Len - 2); Name_Buffer (Name_Len - 2) := '_'; Name_Buffer (1) := '_'; end if; -- Deal with spec or body suffix Unit_Char := Name_Buffer (Name_Len); pragma Assert (Unit_Char = 'b' or else Unit_Char = 's'); pragma Assert (Name_Len >= 3 and then Name_Buffer (Name_Len - 1) = '%'); Name_Len := Name_Len - 2; if Subunit then Unit_Char := 'u'; end if; -- Now we need to find the proper translation of the name declare Uname : constant String (1 .. Name_Len) := Name_Buffer (1 .. Name_Len); Pent : Nat; Plen : Natural; Fnam : File_Name_Type := No_File; J : Natural; Dot : String_Ptr; Dotl : Natural; Is_Predef : Boolean; -- Set True for predefined file function C (N : Natural) return Character; -- Return N'th character of pattern function C (N : Natural) return Character is begin return SFN_Patterns.Table (Pent).Pat (N); end C; -- Start of search through pattern table begin -- Search pattern table to find a matching entry. In the general case -- we do two complete searches. The first time through we stop only -- if a matching file is found, the second time through we accept the -- first match regardless. Note that there will always be a match the -- second time around, because of the default entries at the end of -- the table. for No_File_Check in False .. True loop Unit_Char_Search := Unit_Char; <<Repeat_Search>> -- The search is repeated with Unit_Char_Search set to b, if an -- initial search for the subunit case fails to find any match. Pent := SFN_Patterns.First; while Pent <= SFN_Patterns.Last loop if SFN_Patterns.Table (Pent).Typ = Unit_Char_Search then -- Determine if we have a predefined file name Is_Predef := Is_Predefined_Unit_Name (Uname, Renamings_Included => True); -- Found a match, execute the pattern Name_Len := Uname'Length; Name_Buffer (1 .. Name_Len) := Uname; -- Apply casing, except that we do not do this for the case -- of a predefined library file. For the latter, we always -- use the all lower case name, regardless of the setting. if not Is_Predef then Set_Casing (SFN_Patterns.Table (Pent).Cas); end if; -- If dot translation required do it Dot := SFN_Patterns.Table (Pent).Dot; Dotl := Dot.all'Length; if Dot.all /= "." then J := 1; while J <= Name_Len loop if Name_Buffer (J) = '.' then if Dotl = 1 then Name_Buffer (J) := Dot (Dot'First); else Name_Buffer (J + Dotl .. Name_Len + Dotl - 1) := Name_Buffer (J + 1 .. Name_Len); Name_Buffer (J .. J + Dotl - 1) := Dot.all; Name_Len := Name_Len + Dotl - 1; end if; J := J + Dotl; -- Skip past wide char sequences to avoid messing with -- dot characters that are part of a sequence. elsif Name_Buffer (J) = ASCII.ESC or else (Upper_Half_Encoding and then Name_Buffer (J) in Upper_Half_Character) then Skip_Wide (Name_Buffer, J); else J := J + 1; end if; end loop; end if; -- Here move result to right if preinsertion before * Plen := SFN_Patterns.Table (Pent).Pat'Length; for K in 1 .. Plen loop if C (K) = '*' then if K /= 1 then Name_Buffer (1 + K - 1 .. Name_Len + K - 1) := Name_Buffer (1 .. Name_Len); for L in 1 .. K - 1 loop Name_Buffer (L) := C (L); end loop; Name_Len := Name_Len + K - 1; end if; for L in K + 1 .. Plen loop Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := C (L); end loop; exit; end if; end loop; -- Execute possible crunch on constructed name. The krunch -- operation excludes any extension that may be present. J := Name_Len; while J > 1 loop exit when Name_Buffer (J) = '.'; J := J - 1; end loop; -- Case of extension present if J > 1 then declare Ext : constant String := Name_Buffer (J .. Name_Len); begin -- Remove extension Name_Len := J - 1; -- Krunch what's left Krunch (Name_Buffer, Name_Len, Integer (Maximum_File_Name_Length), Debug_Flag_4); -- Replace extension Name_Buffer (Name_Len + 1 .. Name_Len + Ext'Length) := Ext; Name_Len := Name_Len + Ext'Length; end; -- Case of no extension present, straight krunch on the -- entire file name. else Krunch (Name_Buffer, Name_Len, Integer (Maximum_File_Name_Length), Debug_Flag_4); end if; Fnam := Name_Find; -- If we are in the second search of the table, we accept -- the file name without checking, because we know that the -- file does not exist, except when May_Fail is True, in -- which case we return No_File. if No_File_Check then if May_Fail then return No_File; else return Fnam; end if; -- Otherwise we check if the file exists else Pname := Find_File (Fnam, Source); -- If it does exist, we add it to the mappings and return -- the file name. if Pname /= No_File then -- Add to mapping, so that we don't do another path -- search in Find_File for this file name and, if we -- use a mapping file, we are ready to update it at -- the end of this compilation for the benefit of -- other compilation processes. Add_To_File_Map (Get_File_Name.Uname, Fnam, Pname); return Fnam; -- If there are only two entries, they are those of the -- default GNAT naming scheme. The file does not exist, -- but there is no point doing the second search, because -- we will end up with the same file name. Just return -- the file name, or No_File if May_Fail is True. elsif SFN_Patterns.Last = 2 then if May_Fail then return No_File; else return Fnam; end if; -- The file does not exist, but there may be other naming -- scheme. Keep on searching. else Fnam := No_File; end if; end if; end if; Pent := Pent + 1; end loop; -- If search failed, and was for a subunit, repeat the search with -- Unit_Char_Search reset to 'b', since in the normal case we -- simply treat subunits as bodies. if Fnam = No_File and then Unit_Char_Search = 'u' then Unit_Char_Search := 'b'; goto Repeat_Search; end if; -- Repeat entire search in No_File_Check mode if necessary end loop; -- Something is wrong if search fails completely, since the default -- entries should catch all possibilities at this stage. raise Program_Error; end; end Get_File_Name; -------------------- -- Get_Unit_Index -- -------------------- function Get_Unit_Index (Uname : Unit_Name_Type) return Nat is N : constant Int := SFN_HTable.Get (Uname); begin if N /= No_Entry then return SFN_Table.Table (N).Index; else return 0; end if; end Get_Unit_Index; ---------------- -- Initialize -- ---------------- procedure Initialize is begin SFN_Table.Init; SFN_Patterns.Init; -- Add default entries to SFN_Patterns.Table to represent the standard -- default GNAT rules for file name translation. SFN_Patterns.Append (New_Val => (Pat => new String'("*.ads"), Typ => 's', Dot => new String'("-"), Cas => All_Lower_Case)); SFN_Patterns.Append (New_Val => (Pat => new String'("*.adb"), Typ => 'b', Dot => new String'("-"), Cas => All_Lower_Case)); end Initialize; ---------- -- Lock -- ---------- procedure Lock is begin SFN_Table.Release; SFN_Table.Locked := True; end Lock; ------------------- -- Set_File_Name -- ------------------- procedure Set_File_Name (U : Unit_Name_Type; F : File_Name_Type; Index : Nat) is begin SFN_Table.Increment_Last; SFN_Table.Table (SFN_Table.Last) := (U, F, Index); SFN_HTable.Set (U, SFN_Table.Last); end Set_File_Name; --------------------------- -- Set_File_Name_Pattern -- --------------------------- procedure Set_File_Name_Pattern (Pat : String_Ptr; Typ : Character; Dot : String_Ptr; Cas : Casing_Type) is L : constant Nat := SFN_Patterns.Last; begin SFN_Patterns.Increment_Last; -- Move up the last two entries (the default ones) and then put the new -- entry into the table just before them (we always have the default -- entries be the last ones). SFN_Patterns.Table (L + 1) := SFN_Patterns.Table (L); SFN_Patterns.Table (L) := SFN_Patterns.Table (L - 1); SFN_Patterns.Table (L - 1) := (Pat, Typ, Dot, Cas); end Set_File_Name_Pattern; -------------- -- SFN_Hash -- -------------- function SFN_Hash (F : Unit_Name_Type) return SFN_Header_Num is begin return SFN_Header_Num (Int (F) mod SFN_Header_Num'Range_Length); end SFN_Hash; begin -- We call the initialization routine from the package body, so that -- Fname.Init only needs to be called explicitly to reinitialize. Fname.UF.Initialize; end Fname.UF;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . D I R E C T _ I O -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- This is the generic template for Direct_IO, i.e. the code that gets -- duplicated. We absolutely minimize this code by either calling routines -- in System.File_IO (for common file functions), or in System.Direct_IO -- (for specialized Direct_IO functions) with Interfaces.C_Streams; use Interfaces.C_Streams; with System; use System; with System.CRTL; with System.File_Control_Block; with System.File_IO; with System.Storage_Elements; with Ada.Unchecked_Conversion; package body Ada.Direct_IO is Zeroes : constant System.Storage_Elements.Storage_Array := (1 .. System.Storage_Elements.Storage_Offset (Bytes) => 0); -- Buffer used to fill out partial records package FCB renames System.File_Control_Block; package FIO renames System.File_IO; package DIO renames System.Direct_IO; SU : constant := System.Storage_Unit; subtype AP is FCB.AFCB_Ptr; subtype FP is DIO.File_Type; subtype DPCount is DIO.Positive_Count; function To_FCB is new Ada.Unchecked_Conversion (File_Mode, FCB.File_Mode); function To_DIO is new Ada.Unchecked_Conversion (FCB.File_Mode, File_Mode); use type System.CRTL.size_t; ----------- -- Close -- ----------- procedure Close (File : in out File_Type) is begin FIO.Close (AP (File)'Unrestricted_Access); end Close; ------------ -- Create -- ------------ procedure Create (File : in out File_Type; Mode : File_Mode := Inout_File; Name : String := ""; Form : String := "") is begin DIO.Create (FP (File), To_FCB (Mode), Name, Form); File.Bytes := Bytes; end Create; ------------ -- Delete -- ------------ procedure Delete (File : in out File_Type) is begin FIO.Delete (AP (File)'Unrestricted_Access); end Delete; ----------------- -- End_Of_File -- ----------------- function End_Of_File (File : File_Type) return Boolean is begin return DIO.End_Of_File (FP (File)); end End_Of_File; ----------- -- Flush -- ----------- procedure Flush (File : File_Type) is begin FIO.Flush (AP (File)); end Flush; ---------- -- Form -- ---------- function Form (File : File_Type) return String is begin return FIO.Form (AP (File)); end Form; ----------- -- Index -- ----------- function Index (File : File_Type) return Positive_Count is begin return Positive_Count (DIO.Index (FP (File))); end Index; ------------- -- Is_Open -- ------------- function Is_Open (File : File_Type) return Boolean is begin return FIO.Is_Open (AP (File)); end Is_Open; ---------- -- Mode -- ---------- function Mode (File : File_Type) return File_Mode is begin return To_DIO (FIO.Mode (AP (File))); end Mode; ---------- -- Name -- ---------- function Name (File : File_Type) return String is begin return FIO.Name (AP (File)); end Name; ---------- -- Open -- ---------- procedure Open (File : in out File_Type; Mode : File_Mode; Name : String; Form : String := "") is begin DIO.Open (FP (File), To_FCB (Mode), Name, Form); File.Bytes := Bytes; end Open; ---------- -- Read -- ---------- procedure Read (File : File_Type; Item : out Element_Type; From : Positive_Count) is begin -- For a non-constrained variant record type, we read into an -- intermediate buffer, since we may have the case of discriminated -- records where a discriminant check is required, and we may need -- to assign only part of the record buffer originally written. -- Note: we have to turn warnings on/off because this use of -- the Constrained attribute is an obsolescent feature. pragma Warnings (Off); if not Element_Type'Constrained then pragma Warnings (On); declare Buf : Element_Type; begin DIO.Read (FP (File), Buf'Address, Bytes, DPCount (From)); Item := Buf; end; -- In the normal case, we can read straight into the buffer else DIO.Read (FP (File), Item'Address, Bytes, DPCount (From)); end if; end Read; procedure Read (File : File_Type; Item : out Element_Type) is begin -- Same processing for unconstrained case as above -- Note: we have to turn warnings on/off because this use of -- the Constrained attribute is an obsolescent feature. pragma Warnings (Off); if not Element_Type'Constrained then pragma Warnings (On); declare Buf : Element_Type; begin DIO.Read (FP (File), Buf'Address, Bytes); Item := Buf; end; else DIO.Read (FP (File), Item'Address, Bytes); end if; end Read; ----------- -- Reset -- ----------- procedure Reset (File : in out File_Type; Mode : File_Mode) is begin DIO.Reset (FP (File), To_FCB (Mode)); end Reset; procedure Reset (File : in out File_Type) is begin DIO.Reset (FP (File)); end Reset; --------------- -- Set_Index -- --------------- procedure Set_Index (File : File_Type; To : Positive_Count) is begin DIO.Set_Index (FP (File), DPCount (To)); end Set_Index; ---------- -- Size -- ---------- function Size (File : File_Type) return Count is begin return Count (DIO.Size (FP (File))); end Size; ----------- -- Write -- ----------- procedure Write (File : File_Type; Item : Element_Type; To : Positive_Count) is begin DIO.Set_Index (FP (File), DPCount (To)); DIO.Write (FP (File), Item'Address, Item'Size / SU, Zeroes); end Write; procedure Write (File : File_Type; Item : Element_Type) is begin DIO.Write (FP (File), Item'Address, Item'Size / SU, Zeroes); end Write; end Ada.Direct_IO;
with gel.hinge_Joint, gel. any_Joint, gel.World, ada.Tags, ada.unchecked_Deallocation, ada.unchecked_Conversion; package body gel.Sprite is use ada.Tags, linear_Algebra_3D; procedure log (Message : in String) -- renames ada.text_IO.put_Line; is null; ------------------ --- Initialisation -- procedure rebuild_Shape (Self : in out Item) is use type physics.Model.shape_Kind, physics.Model.View; the_Scale : aliased Vector_3; begin -- Self.Shape := Self.World.Space.new_Shape (Self.physics_Model); -- Old if Self.physics_Model = null then return; end if; the_Scale := Self.physics_Model.Scale; case Self.physics_Model.shape_Info.Kind is when physics.Model.Cube => Self.Shape := physics_Shape_view (Self.World.Space. new_box_Shape (Self.physics_Model.shape_Info.half_Extents)); when physics.Model.a_Sphere => Self.Shape := physics_Shape_view (Self.World.Space. new_sphere_Shape (Self.physics_Model.shape_Info.sphere_Radius)); when physics.Model.multi_Sphere => Self.Shape := physics_Shape_view (Self.World.Space.new_multisphere_Shape (Self.physics_Model.shape_Info.Sites.all, Self.physics_Model.shape_Info.Radii.all)); when physics.Model.Cone => Self.Shape := physics_Shape_view (Self.World.Space. new_cone_Shape (Radius => Real (Self.physics_Model.Scale (1) / 2.0), Height => Real (Self.physics_Model.Scale (2)))); when physics.Model.a_Capsule => Self.Shape := physics_Shape_view (Self.World.Space. new_capsule_Shape (Self.physics_Model.shape_Info.lower_Radius, Self.physics_Model.shape_Info.Height)); when physics.Model.Cylinder => Self.Shape := physics_Shape_view (Self.World.Space. new_cylinder_Shape (Self.physics_Model.shape_Info.half_Extents)); when physics.Model.Hull => Self.Shape := physics_Shape_view (Self.World.Space.new_convex_hull_Shape (Self.physics_Model.shape_Info.Points.all)); when physics.Model.Mesh => Self.Shape := physics_Shape_view (Self.World.Space .new_mesh_Shape (Self.physics_Model.shape_Info.Model)); when physics.Model.Plane => Self.Shape := physics_Shape_view (Self.World.Space. new_plane_Shape (Self.physics_Model.Shape_Info.plane_Normal, Self.physics_Model.Shape_Info.plane_Offset)); when physics.Model.Heightfield => Self.Shape := physics_Shape_view (Self.World.Space.new_heightfield_Shape (Self.physics_Model.shape_Info.Heights.all, Self.physics_Model.Scale)); when physics.Model.Circle => Self.Shape := physics_Shape_view (Self.World.Space. new_circle_Shape (Self.physics_Model.shape_Info.circle_Radius)); when physics.Model.Polygon => Self.Shape := physics_Shape_view (Self.World.Space. new_polygon_Shape (physics.space.polygon_Vertices (Self.physics_Model.shape_Info.Vertices (1 .. Self.physics_Model.shape_Info.vertex_Count)))); end case; end rebuild_Shape; procedure rebuild_Solid (Self : in out Item; at_Site : Vector_3) is use Physics.Object; begin if Self.Solid /= null then raise Program_Error; end if; Self.Solid := physics_Object_view (Self.World.Space.new_Object (physics.Shape.view (Self.Shape), Self.physics_Model.Mass, Self.physics_Model.Friction, Self.physics_Model.Restitution, at_Site, Self.is_Kinematic)); end rebuild_Solid; procedure define (Self : access Item; World : in World_view; at_Site : in Vector_3; graphics_Model : access openGL. Model.item'Class; physics_Model : access physics.Model.item'Class; owns_Graphics : in Boolean; owns_Physics : in Boolean; is_Kinematic : in Boolean := False) is use type physics.Model.view; begin Self.Id := World.new_sprite_Id; Self.World := World; Self.Visual.Model_is (graphics_Model.all'unchecked_Access); Self.physics_Model := physics.Model.view (physics_Model); Self.owns_Graphics := owns_Graphics; Self.owns_Physics := owns_Physics; Self.is_Kinematic := is_Kinematic; -- set_Translation (Self.Transform, To => physics_Model.Site); -- Physics -- if Self.physics_Model /= null then Self.rebuild_Shape; Self.rebuild_Solid (at_Site); null; end if; end define; procedure destroy (Self : access Item; and_Children : in Boolean) is use gel.Joint; begin if Self.is_Destroyed then raise Error with "Sprite is already destroyed."; end if; -- Detach parent, if any. -- if Self.parent_Joint /= null then Self.parent_Joint.Sprite_A.detach (Sprite.view (Self)); end if; -- Detach children, if any. -- while not Self.child_Joints.is_Empty loop declare child_Sprite : constant Sprite.view := Self.child_Joints.Last_Element.Sprite_B.all'Access; begin Self.detach (child_Sprite); if and_Children then destroy (child_Sprite, and_Children); -- Recurse. end if; end; end loop; Self.is_Destroyed := True; Self.World.destroy (Sprite.view (Self)); lace.Subject_and_deferred_Observer.item (Self.all).destroy; -- Destroy base class. end destroy; function is_Destroyed (Self : in Item) return Boolean is begin return Self.is_Destroyed; end is_Destroyed; procedure free (Self : in out View) is pragma assert (Self.is_Destroyed); use gel.Joint, physics.Model, physics.Object, physics.Shape; procedure deallocate is new ada.unchecked_Deallocation (Sprite.item'Class, Sprite.view); procedure deallocate is new ada.unchecked_Deallocation (Joint.views, access_Joint_views); child_Joint : Joint.view; begin for Each in 1 .. Integer (Self.child_Joints.Length) loop child_Joint := Self.child_Joints.Element (Each); free (child_Joint); end loop; if Self.owns_Physics then free (Self.physics_Model); end if; free (Self.Shape); free (Self.Solid); deallocate (Self); end free; ---------- --- Forge -- package body Forge is function to_Sprite (Name : in String; World : in World_view; at_Site : in Vector_3; graphics_Model : access openGL. Model.item'Class; physics_Model : access physics.Model.item'Class; owns_Graphics : in Boolean; owns_Physics : in Boolean; is_Kinematic : in Boolean := False) return Item is begin return Self : Item := (lace.Subject_and_deferred_Observer.forge.to_Subject_and_Observer (Name) with others => <>) do Self.define (World, at_Site, graphics_Model, physics_Model, owns_Graphics, owns_Physics, is_Kinematic); end return; end to_Sprite; function new_Sprite (Name : in String; World : in World_view; at_Site : in Vector_3; graphics_Model : access openGL. Model.item'Class; physics_Model : access physics.Model.item'Class; owns_Graphics : in Boolean := True; owns_Physics : in Boolean := True; is_Kinematic : in Boolean := False) return View is Self : constant View := new Item' (to_Sprite (Name, World, at_Site, graphics_Model, physics_Model, owns_Graphics, owns_Physics, is_Kinematic)); begin return Self; end new_Sprite; end Forge; -------------- --- Attributes -- function World (Self : in Item'Class) return access gel.World.item'Class is begin return Self.World; end World; function Id (Self : in Item'Class) return gel.sprite_Id is begin return Self.Id; end Id; procedure Id_is (Self : in out Item'Class; Now : in gel.sprite_Id) is begin Self.Id := Now; end Id_is; function Depth_in_camera_space (Self : in Item'Class) return Real is begin return Self.Depth_in_camera_space; end Depth_in_camera_space; function Mass (Self : in Item'Class) return Real is begin return Self.physics_Model.Mass; end Mass; function is_Static (Self : in Item'Class) return Boolean is begin return Self.Mass = 0.0; end is_Static; function is_Kinematic (Self : in Item'Class) return Boolean is begin return Self.is_Kinematic; end is_Kinematic; procedure mvp_Matrix_is (Self : in out Item'Class; Now : in Matrix_4x4) is begin Self.Visual.mvp_Transform_is (Now); Self.Depth_in_camera_space := Now (4, 3); end mvp_Matrix_is; function mvp_Matrix (Self : in Item'Class) return Matrix_4x4 is begin return Self.Visual.mvp_Transform; end mvp_Matrix; procedure is_Visible (Self : in out Item'Class; Now : in Boolean) is begin Self.is_Visible := Now; end is_Visible; function is_Visible (Self : in Item'Class) return Boolean is begin return Self.is_Visible; end is_Visible; procedure key_Response_is (Self : in out Item'Class; Now : in lace.Response.view) is begin Self.key_Response := Now; end key_Response_is; function key_Response (Self : in Item'Class) return lace.Response.view is begin return Self.key_Response; end key_Response; function Visual (Self : access Item'Class) return openGL.Visual.view is begin return Self.Visual; end Visual; function graphics_Model (Self : in Item'Class) return openGL.Model.view is begin return Self.visual.Model; end graphics_Model; procedure Model_is (Self : in out Item'Class; Now : in openGL.Model.view) is begin Self.Visual.Model_is (Now); end Model_is; function owns_Graphics (Self : in Item) return Boolean is begin return Self.owns_Graphics; end owns_Graphics; function physics_Model (Self : in Item'Class) return access physics.Model.item'class is begin return Self.physics_Model; end physics_Model; procedure physics_Model_is (Self : in out Item'Class; Now : in physics.Model.view) is begin Self.physics_Model := Now; end physics_Model_is; procedure Scale_is (Self : in out Item'Class; Now : in math.Vector_3) is begin Self.physics_Model.Scale_is (Now); Self.World .update_Scale (Self'unchecked_Access, +Now); end Scale_is; function Scale (Self : in Item'Class) return Vector_3 is begin return Self.physics_Model.Scale; end Scale; function Solid (Self : in Item'Class) return physics_Object_view is begin return Self.Solid; end Solid; procedure Solid_is (Self : out Item'Class; Now : in physics_Object_view) is begin Self.Solid := Now; end Solid_is; function to_GEL (the_Solid : in physics_Object_view) return gel.Sprite.view is begin return gel.Sprite.view (the_Solid.user_Data); end to_GEL; function Shape (Self : in Item'Class) return physics_Shape_view is begin return Self.Shape; end Shape; ------------- --- Dynamics -- --- Bounds -- function Bounds (Self : in Item) return Geometry_3d.bounding_Box is use Geometry_3d; begin return Self.graphics_Model.Bounds.Box + Self.Site; end Bounds; --- Site -- function Site (Self : in Item) return Vector_3 is -- Transform : constant Matrix_4x4 := Self.Transform; begin -- return get_Translation (Self.Transform); return Self.Solid.Site; end Site; procedure Site_is (Self : in out Item; Now : in Vector_3) is use type physics.Model.view; -- Transform : Matrix_4x4 := Self.Transform.Value; begin Self.Solid.Site_is (Now); -- set_Translation (Self.Transform, Now); -- Self.Transform_is (Transform); -- if Self.physics_Model /= null -- then -- Self.World.update_Site (Self'unchecked_Access, Now); -- end if; end Site_is; procedure move (Self : in out Item; to_Site : in Vector_3) is the_Offset : constant Vector_3 := to_Site - Self.Site; child_Sprite : Sprite.view; begin -- Do children. -- for i in 1 .. Integer (Self.child_Joints.Length) loop child_Sprite := Self.child_Joints.Element (i).Sprite_B; child_Sprite.move (to_site => child_Sprite.Site + the_Offset); -- Recurse. end loop; Self.Site_is (to_Site); end move; procedure set_Speed (Self : in out Item; to_Speed : in Vector_3) is child_Sprite : Sprite.view; begin -- Do children. -- for i in 1 .. Integer (Self.child_Joints.Length) loop child_Sprite := Self.child_Joints.Element (i).Sprite_B; child_Sprite.set_Speed (to_Speed); end loop; Self.Speed_is (to_Speed); end set_Speed; function Spin (Self : in Item) return Matrix_3x3 is begin return Self.Solid.Spin; end Spin; procedure Spin_is (Self : in out Item; Now : in Matrix_3x3) is use type Physics.Object.view; -- Transform : Matrix_4x4 := Self.Transform.Value; begin -- set_Rotation (Self.Transform, Now); -- Self.Transform_is (Transform); -- if Self.Solid /= null then Self.Solid.Spin_is (Now); -- end if; end Spin_is; function xy_Spin (Self : in Item) return Radians is begin return Self.Solid.xy_Spin; end xy_Spin; procedure xy_Spin_is (Self : in out Item; Now : in Radians) is begin Self.World.set_xy_Spin (Self'unchecked_Access, Now); end xy_Spin_is; procedure rotate (Self : in out Item; to_Spin : in Matrix_3x3) is the_spin_Delta : constant Matrix_3x3 := to_Spin * Inverse (Self.Spin); -- The rotation matrix describing the amount by which Self has rotated. procedure spin_Children (the_Sprite : in Sprite.item'class) is begin if the_Sprite.child_Joints.Is_Empty then return; end if; declare child_Sprite : Sprite.view; the_site_Offset : Vector_3; begin for i in 1 .. Integer (the_Sprite.child_Joints.Length) loop child_Sprite := the_Sprite.child_Joints.Element (i).Sprite_B; the_site_Offset := the_spin_Delta * (child_Sprite.Site - Self.Site) ; child_Sprite.Site_is (Self.Site + the_site_Offset); child_Sprite.Spin_is (the_spin_Delta * child_Sprite.Spin); spin_Children (child_Sprite.all); -- Recurse. end loop; end; end spin_Children; begin spin_Children (Self); -- Do children. Self.Spin_is (to_Spin); end rotate; function Transform (Self : in Item) return Matrix_4x4 is begin -- return Self.Transform.Value; return Self.Solid.Transform; end Transform; procedure Transform_is (Self : in out Item; Now : in Matrix_4x4) is begin -- Self.Transform.Value_is (Now); Self.Solid.Transform_is (Now); end Transform_is; function Speed (Self : in Item) return Vector_3 is begin return Self.Solid.Speed; end Speed; procedure Speed_is (Self : in out Item; Now : in Vector_3) is begin Self.World.set_Speed (Self'unchecked_Access, Now); end Speed_is; function Gyre (Self : in Item) return Vector_3 is begin return Self.Solid.Gyre; end Gyre; procedure Gyre_is (Self : in out Item; Now : in Vector_3) is begin Self.Solid.Gyre_is (Now); end Gyre_is; procedure set_Gyre (Self : in out Item; to_Gyre : in Vector_3) is child_Sprite : Sprite.view; begin -- Do children. -- for i in 1 .. Integer (Self.child_Joints.Length) loop child_Sprite := Self.child_Joints.Element (i).Sprite_B; child_Sprite.set_Gyre (to_Gyre); end loop; Self.Gyre_is (to_Gyre); end set_Gyre; --- Forces -- procedure apply_Force (Self : in out Item; Force : in Vector_3) is the_Force : aliased constant Vector_3 := Force; begin Self.World.apply_Force (Self'unchecked_Access, the_Force); end apply_Force; procedure apply_Torque (Self : in out Item; Torque : in Vector_3) is the_Torque : constant Vector_3 := Torque; begin Self.Solid.apply_Torque (the_Torque); end apply_Torque; procedure apply_Torque_impulse (Self : in out Item; Torque : in Vector_3) is the_Torque : constant Vector_3 := Torque; begin Self.Solid.apply_Torque_impulse (the_Torque); end apply_Torque_impulse; -- Mirrored Dynamics -- function desired_Site (Self : in Item) return Vector_3 is begin return Self.desired_Site; end desired_Site; procedure desired_Site_is (Self : in out Item; Now : in Vector_3) is begin Self.desired_Site := Now; Self.interpolation_Vector := (Self.desired_Site - Self.Site) / 15.0; end desired_Site_is; procedure desired_Spin_is (Self : in out Item; Now : in Quaternion) is begin Self.initial_Spin := to_Quaternion (Transpose (Self.Spin)); Self.desired_Spin := Now; Self.interpolation_spin_Time := 0.0; end desired_Spin_is; procedure interpolate_Motion (Self : in out Item'Class) is begin if Self.is_Static then return; end if; declare current_Distance : constant Vector_3 := (Self.desired_Site - Self.Site) / 15.0; -- TODO: Where does 15.0 come from ? begin if abs (current_Distance (1)) < 0.005 -- Prevent drift due to very small interpolation vectors. and then abs (current_Distance (2)) < 0.005 and then abs (current_Distance (3)) < 0.005 then Self.interpolation_Vector := (0.0, 0.0, 0.0); end if; end; Self.Site_is (Self.Site + Self.interpolation_Vector); if Self.interpolation_spin_Time < 1.0 then -- Interpolation is not yet complete. Self.interpolation_spin_Time := Self.interpolation_spin_Time + 1.0/15.0; Self.Spin_is (Transpose (to_Matrix (slerp (Self.initial_spin, Self.desired_Spin, Self.interpolation_spin_Time)))); end if; end interpolate_Motion; -------------- --- Operations -- --- Hierachy -- function parent_Joint (Self : in Item'Class) return gel.Joint.view is begin return Self.parent_Joint; end parent_Joint; function child_Joints (Self : in Item'Class) return gel.Joint.views is the_Joints : Joint.views (1 .. Integer (Self.child_Joints.Length)); begin for i in the_Joints'Range loop the_Joints (i) := Self.child_Joints.Element (i); end loop; return the_Joints; end child_Joints; function top_Parent (Self : access Item'Class) return gel.Sprite.view is begin if Self.parent_Joint = null then return gel.Sprite.view (Self); else return Self.parent_Joint.Sprite_A.top_Parent; -- Recurse. end if; end top_Parent; function Parent (Self : in Item) return gel.Sprite.view is begin if Self.parent_Joint = null then return null; else return Self.parent_Joint.Sprite_A; end if; end Parent; function tree_Depth (Self : in Item) return Natural is Parent : Sprite.view := Self.Parent; Depth : Natural := 0; begin while Parent /= null loop Depth := Depth + 1; Parent := Parent.Parent; end loop; return Depth; end tree_Depth; procedure apply (Self : in out Item; do_Action : Action) is begin do_Action (Self); for i in 1 .. Integer (Self.child_Joints.Length) loop Self.child_Joints.Element (i).Sprite_B.apply (do_Action); end loop; end apply; procedure attach (Self : access Item'Class; the_Child : in Sprite.view; the_Joint : in gel.Joint.view) is begin log ("Attaching " & the_Child.Id'Image & " to " & Self.Id'Image); Self.child_Joints.append (the_Joint); the_Child.parent_Joint := the_Joint; the_Child.relay_responseless_Events (To => Self); end attach; procedure detach (Self : in out Item; the_Child : gel.Sprite.view) is childs_Joint : Joint.view; begin log ("Detaching " & the_Child.Id'Image & " from " & Self.Id'Image); for i in 1 .. Integer (Self.child_Joints.Length) loop if Self.child_Joints.Element (i).Sprite_B = the_Child then childs_Joint := Self.child_Joints.Element (i); Self.child_Joints.delete (i); the_Child.parent_Joint := null; Self.World.destroy (childs_Joint); return; end if; end loop; raise no_such_Child; end detach; -- Hinge -- procedure attach_via_Hinge (Self : access Item'Class; the_Child : in Sprite.view; pivot_Axis : in Vector_3; Anchor : in Vector_3; child_Anchor : in Vector_3; low_Limit : in Real; high_Limit : in Real; collide_Connected : in Boolean; new_joint : out gel.Joint.view) is the_Joint : constant gel.hinge_Joint.view := new gel.hinge_Joint.item; begin the_Joint.define (Self.World.Space, Self, the_Child, pivot_Axis, Anchor, child_Anchor, low_Limit, high_Limit, collide_Connected); the_Joint.Limits_are (low_Limit, high_Limit); Self.attach (the_Child, the_Joint.all'Access); new_Joint := the_Joint.all'Access; end attach_via_Hinge; procedure attach_via_Hinge (Self : access Item'Class; the_Child : in Sprite.view; pivot_Axis : in Vector_3; pivot_Anchor : in Vector_3; low_Limit : in Real; high_Limit : in Real; new_joint : out gel.Joint.view) is the_Joint : constant gel.hinge_Joint.view := new gel.hinge_Joint.item; begin the_Joint.define (in_Space => Self.World.Space, Sprite_A => Self, Sprite_B => the_Child, pivot_Axis => pivot_Axis, pivot_Anchor => pivot_Anchor); the_Joint.Limits_are (low_Limit, high_Limit); Self.attach (the_Child, the_Joint.all'Access); new_Joint := the_Joint.all'Access; end attach_via_Hinge; procedure attach_via_Hinge (Self : access Item'Class; the_Child : in Sprite.view; pivot_Axis : in Vector_3; low_Limit : in Real; high_Limit : in Real; new_joint : out gel.Joint.view) is the_Joint : constant gel.hinge_Joint.view := new gel.hinge_Joint.item; begin the_Joint.define (in_Space => Self.World.Space, Sprite_A => Self, Sprite_B => the_Child, pivot_Axis => pivot_Axis); the_Joint.Limits_are (low_Limit, high_Limit); Self.attach (the_Child, the_Joint.all'Access); new_Joint := the_Joint.all'Access; end attach_via_Hinge; procedure attach_via_Hinge (Self : access Item'Class; the_Child : in Sprite.view; Frame_in_parent : in Matrix_4x4; Frame_in_child : in Matrix_4x4; Limits : in DoF_Limits; collide_Connected : in Boolean; new_joint : out gel.Joint.view) is the_Joint : constant gel.hinge_Joint.view := new gel.hinge_Joint.item; begin the_Joint.define (Self.World.Space, Self, the_Child, Frame_in_parent, Frame_in_child, Limits.Low, Limits.High, collide_Connected); the_Joint.Limits_are (limits.Low, limits.High); Self.attach (the_Child, the_Joint.all'Access); new_Joint := the_Joint.all'Access; end attach_via_Hinge; -- Ball/Socket -- procedure internal_attach_via_ball_Socket (Self : access Item'Class; the_Child : in Sprite.view; pitch_Limits : in DoF_Limits; yaw_Limits : in DoF_Limits; roll_Limits : in DoF_Limits; the_Joint : in gel.any_Joint.view) is use gel.any_Joint; begin the_Joint.low_Bound_is (Pitch, pitch_Limits.Low); the_Joint.low_Bound_is (Yaw, yaw_Limits .Low); the_Joint.low_Bound_is (Roll, roll_Limits .Low); the_Joint.high_Bound_is (Pitch, pitch_Limits.High); the_Joint.high_Bound_is (Yaw, yaw_Limits .High); the_Joint.high_Bound_is (Roll, roll_Limits .High); Self.attach (the_Child, the_Joint.all'Access); end internal_attach_via_ball_Socket; procedure attach_via_ball_Socket (Self : access Item'Class; the_Child : in Sprite.view; pivot_Anchor : in Vector_3; pivot_Axis : in Matrix_3x3; pitch_Limits : in DoF_Limits; yaw_Limits : in DoF_Limits; roll_Limits : in DoF_Limits; new_joint : out gel.Joint.view) is the_Joint : constant gel.any_Joint.view := new gel.any_Joint.item; begin the_Joint.define (Self.World.Space, Self, the_Child, pivot_Anchor, pivot_Axis); Self.internal_attach_via_ball_Socket (the_Child, pitch_Limits, yaw_Limits, roll_Limits, the_joint); new_Joint := the_Joint.all'Access; end attach_via_ball_Socket; procedure attach_via_ball_Socket (Self : access Item'Class; the_Child : in Sprite.view; Frame_in_parent : in Matrix_4x4; Frame_in_child : in Matrix_4x4; pitch_Limits : in DoF_Limits; yaw_Limits : in DoF_Limits; roll_Limits : in DoF_Limits; new_joint : out gel.Joint.view) is the_Joint : constant gel.any_Joint.view := new gel.any_Joint.item; begin the_Joint.define (Self.World.Space, Self, the_Child, Frame_in_parent, Frame_in_child); Self.internal_attach_via_ball_Socket (the_Child, pitch_Limits, yaw_Limits, roll_Limits, the_joint); new_Joint := the_Joint.all'Access; end attach_via_ball_Socket; ------------ --- Graphics -- procedure program_Parameters_are (Self : in out Item'Class; Now : in opengl.Program.Parameters_view) is begin Self.program_Parameters := Now; end program_Parameters_are; function program_Parameters (Self : in Item'Class) return opengl.Program.Parameters_view is begin return Self.program_Parameters; end program_Parameters; ----------- --- Utility -- function to_Hash (Self : in ada.Tags.Tag) return ada.Containers.Hash_type is function Converted is new ada.unchecked_Conversion (ada.Tags.Tag, ada.Containers.Hash_type); begin return Converted (Self); end to_Hash; -- protected -- body safe_Matrix_4x4 -- is -- function Value return Matrix_4x4 -- is -- begin -- return the_Value; -- end Value; -- -- procedure Value_is (Now : in Matrix_4x4) -- is -- begin -- the_Value := Now; -- end Value_is; -- -- procedure Site_is (Now : in Vector_3) -- is -- begin -- the_Value (4, 1) := Now (1); -- the_Value (4, 2) := Now (2); -- the_Value (4, 3) := Now (3); -- end Site_is; -- end safe_Matrix_4x4; end gel.Sprite;
with Ada.Command_Line; with Ada.Text_IO; use Ada.Text_IO; with STRINGS_PACKAGE; use STRINGS_PACKAGE; with CONFIG; use CONFIG; with WORD_PARAMETERS; use WORD_PARAMETERS; with DEVELOPER_PARAMETERS; use DEVELOPER_PARAMETERS; with WORD_PACKAGE; use WORD_PACKAGE; with PARSE; procedure MEANINGS is INPUT_LINE : STRING(1..250) := (others => ' '); ARGUMENTS_START : INTEGER := 1; begin -- The language shift in argumants must take place here -- since later parsing of line ignores non-letter characters CONFIGURATION := ONLY_MEANINGS; --The main mode of usage for WORDS is a simple call, followed by screen interaction. if Ada.Command_Line.ARGUMENT_COUNT = 0 then -- Simple WORDS METHOD := INTERACTIVE; -- Interactive SUPPRESS_PREFACE := FALSE; SET_OUTPUT(Ada.TEXT_IO.STANDARD_OUTPUT); INITIALIZE_WORD_PARAMETERS; INITIALIZE_DEVELOPER_PARAMETERS; INITIALIZE_WORD_PACKAGE; PARSE; --But there are other, command line options. --WORDS may be called with arguments on the same line, --in a number of different modes. -- else SUPPRESS_PREFACE := TRUE; INITIALIZE_WORD_PARAMETERS; INITIALIZE_DEVELOPER_PARAMETERS; INITIALIZE_WORD_PACKAGE; --Single parameter, either a simple Latin word or an input file. --WORDS amo --WORDS infile if Ada.Command_Line.ARGUMENT_COUNT = 1 then -- Input 1 word in-line ONE_ARGUMENT: declare INPUT_NAME : constant STRING := TRIM(Ada.Command_Line.Argument(1)); begin OPEN(INPUT, IN_FILE, INPUT_NAME); -- Try file name, not raises NAME_ERROR METHOD := COMMAND_LINE_FILES; SET_INPUT(INPUT); SET_OUTPUT(Ada.TEXT_IO.STANDARD_OUTPUT); PARSE; -- No additional arguments, so just go to PARSE now exception -- Triggers on INPUT when NAME_ERROR => -- Raised NAME_ERROR therefore METHOD := COMMAND_LINE_INPUT; -- Found word in command line end ONE_ARGUMENT; --With two arguments the options are: inputfile and outputfile, --two Latin words, or a language shift to English (Latin being the startup default) --and an English word (with no part of speech). --WORDS infile outfile --WORDS amo amas --WORDS ^e love elsif Ada.Command_Line.ARGUMENT_COUNT = 2 then -- INPUT and OUTPUT files TWO_ARGUMENTS: -- or multiwords in-line declare INPUT_NAME : constant STRING := TRIM(Ada.Command_Line.Argument(1)); OUTPUT_NAME : constant STRING := TRIM(Ada.Command_Line.Argument(2)); begin if INPUT_NAME(1) = CHANGE_LANGUAGE_CHARACTER then if (INPUT_NAME'LENGTH > 1) then CHANGE_LANGUAGE(INPUT_NAME(2)); ARGUMENTS_START := 2; METHOD := COMMAND_LINE_INPUT; -- Parse the one word end if; else OPEN(INPUT, IN_FILE, INPUT_NAME); CREATE(OUTPUT, OUT_FILE, OUTPUT_NAME); METHOD := COMMAND_LINE_FILES; SET_INPUT(INPUT); SET_OUTPUT(OUTPUT); SUPPRESS_PREFACE := TRUE; OUTPUT_SCREEN_SIZE := INTEGER'LAST; PARSE; -- No additional arguments, so just go to PARSE now SET_INPUT(Ada.TEXT_IO.STANDARD_INPUT); -- Clean up SET_OUTPUT(Ada.TEXT_IO.STANDARD_OUTPUT); CLOSE(OUTPUT); end if; exception -- Triggers on either INPUT or OUTPUT !!! when NAME_ERROR => METHOD := COMMAND_LINE_INPUT; -- Found words in command line end TWO_ARGUMENTS; --With three arguments there could be three Latin words or a language shift --and and English word and part of speech. --WORDS amo amas amat --WORDS ^e love v elsif Ada.Command_Line.ARGUMENT_COUNT = 3 then -- INPUT and OUTPUT files THREE_ARGUMENTS: -- or multiwords in-line declare ARG1 : constant STRING := TRIM(Ada.Command_Line.Argument(1)); ARG2 : constant STRING := TRIM(Ada.Command_Line.Argument(2)); ARG3 : constant STRING := TRIM(Ada.Command_Line.Argument(3)); begin if ARG1(1) = CHANGE_LANGUAGE_CHARACTER then if (ARG1'LENGTH > 1) then CHANGE_LANGUAGE(ARG1(2)); ARGUMENTS_START := 2; METHOD := COMMAND_LINE_INPUT; -- Parse the one word end if; else METHOD := COMMAND_LINE_INPUT; end if; end THREE_ARGUMENTS; --More than three arguments must all be Latin words. --WORDS amo amas amat amamus amatis amant else -- More than three arguments METHOD := COMMAND_LINE_INPUT; end if; if METHOD = COMMAND_LINE_INPUT then -- Process words in command line MORE_ARGUMENTS: begin --Ada.TEXT_IO.PUT_LINE("MORE_ARG ARG_START = " & INTEGER'IMAGE(ARGUMENTS_START)); SUPPRESS_PREFACE := TRUE; for I in ARGUMENTS_START..Ada.Command_Line.Argument_Count loop -- Assemble input words INPUT_LINE := HEAD(TRIM(INPUT_LINE) & " " & Ada.Command_Line.Argument(I), 250); end loop; --Ada.TEXT_IO.PUT_LINE("To PARSE >" & TRIM(INPUT_LINE)); PARSE(TRIM(INPUT_LINE)); end MORE_ARGUMENTS; end if; end if; end MEANINGS;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017-2020, Fabien Chouteau -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with System; use System; with AGATE.Traces; with AGATE.Scheduler.Context_Switch; with AGATE.Arch; use AGATE.Arch; with AGATE.Timer; with AGATE.Stack_Canaries_Enable; package body AGATE.Scheduler is Alarm_List : Task_Object_Access := null; Idle_Stack : aliased Task_Stack := (1 .. 512 => 0); Idle_Sec_Stack : aliased Task_Sec_Stack := (1 .. 0 => 0); Idle_Heap : aliased Task_Heap := (1 .. 0 => 0); Idle_Task : aliased Task_Object (Proc => AGATE.Arch.Idle_Procedure'Access, Base_Prio => -1, Stack => Idle_Stack'Access, Sec_Stack => Idle_Sec_Stack'Access, Heap => Idle_Heap'Access); function In_Ready_Tasks (ID : Task_ID) return Boolean; procedure Extract (ID : Task_ID); procedure Insert (ID : Task_ID) with Pre => not In_Ready_Tasks (ID); procedure Insert_Alarm (T : Task_Object_Access); procedure Update_Alarm_Time; -------------- -- Register -- -------------- procedure Register (ID : Task_ID; Name : String) is T : constant Task_Object_Access := Task_Object_Access (ID); begin T.Status := Ready; T.Name (Task_Name'First .. Task_Name'First + Name'Length - 1) := Name; T.Current_Prio := T.Base_Prio; Initialize_Task_Context (ID); if AGATE.Stack_Canaries_Enable.Enabled then Set_Stack_Canary (ID); end if; Insert (Task_ID (T)); ID.All_Task_Next := All_Tasks_List; All_Tasks_List := Task_Object_Access (ID); Traces.Register (Task_ID (T), T.Name); end Register; ----------- -- Start -- ----------- procedure Start is begin if Ready_Tasks = null then raise Program_Error with "No task to run"; end if; Register (Idle_Task'Access, "idle"); Running_Task := Ready_Tasks; Jump_In_Task (Task_ID (Running_Task)); end Start; ------------------ -- Current_Task -- ------------------ function Current_Task return Task_ID is (Task_ID (Running_Task)); -------------------------- -- Current_Task_Context -- -------------------------- function Current_Task_Context return System.Address is begin return Running_Task.Context (Running_Task.Context'First)'Address; end Current_Task_Context; ----------------- -- Task_To_Run -- ----------------- function Task_To_Run return Task_ID is (Task_ID (Ready_Tasks)); -------------------- -- In_Ready_Tasks -- -------------------- function In_Ready_Tasks (ID : Task_ID) return Boolean is T : Task_Object_Access := Ready_Tasks; begin while T /= null and then Task_ID (T) /= ID loop T := T.Next; end loop; return Task_ID (T) = ID; end In_Ready_Tasks; ---------------------- -- Print_Read_Tasks -- ---------------------- procedure Print_Ready_Tasks is T : Task_Object_Access := Ready_Tasks; begin -- Ada.Text_IO.Put_Line ("Ready tasks:"); while T /= null loop -- Ada.Text_IO.Put_Line (" - " & Image (Task_ID (T))); T := T.Next; end loop; end Print_Ready_Tasks; ------------- -- Extract -- ------------- procedure Extract (ID : Task_ID) is Prev, Curr : Task_Object_Access; begin if Task_ID (Ready_Tasks) = ID then -- Extract head Ready_Tasks := Ready_Tasks.Next; ID.Next := null; else -- Extract from inside the list Prev := null; Curr := Ready_Tasks; while Curr /= null and then Task_ID (Curr) /= ID loop Prev := Curr; Curr := Curr.Next; end loop; if Task_ID (Curr) = ID then Prev.Next := Curr.Next; ID.Next := null; end if; end if; end Extract; ------------ -- Insert -- ------------ procedure Insert (ID : Task_ID) is Acc : constant Task_Object_Access := Task_Object_Access (ID); Cur : Task_Object_Access := Ready_Tasks; Prev : Task_Object_Access := null; begin Acc.Next := null; while Cur /= null and then Cur.Current_Prio >= Acc.Current_Prio loop Prev := Cur; Cur := Cur.Next; end loop; Acc.Next := Cur; if Prev = null then -- Head insertion Ready_Tasks := Acc; else Prev.Next := Acc; end if; end Insert; ----------- -- Yield -- ----------- procedure Yield is begin Extract (Current_Task); Insert (Current_Task); Current_Task.Status := Ready; if Context_Switch_Needed then Context_Switch.Switch; end if; end Yield; ------------ -- Resume -- ------------ procedure Resume (ID : Task_ID) is begin Task_Object_Access (ID).Status := Ready; Insert (ID); Traces.Resume (ID); if Context_Switch_Needed then Context_Switch.Switch; end if; end Resume; ------------- -- Suspend -- ------------- procedure Suspend (Reason : Suspend_Reason) is begin Extract (Current_Task); Current_Task.Status := (case Reason is when Alarm => Suspended_Alarm, when Semaphore => Suspended_Semaphore, when Mutex => Suspended_Mutex); Traces.Suspend (Current_Task); end Suspend; ----------- -- Fault -- ----------- procedure Fault (ID : Task_ID) is begin Extract (ID); ID.Status := Fault; Traces.Fault (ID); end Fault; ----------- -- Fault -- ----------- procedure Fault is begin Fault (Current_Task); end Fault; --------------------- -- Change_Priority -- --------------------- procedure Change_Priority (New_Prio : Task_Priority) is T : constant Task_ID := Current_Task; begin if New_Prio < T.Base_Prio then raise Program_Error with "Cannot set priority below the task base priority"; end if; Traces.Change_Priority (T, New_Prio); if New_Prio >= T.Current_Prio then -- The current task already have the highest priority of the ready -- task, by the properties of the FIFO within priorities scheduling. -- So the current task position in the ready tasks list won't change, -- We don't have to re-insert it. T.Current_Prio := New_Prio; else Extract (T); T.Current_Prio := New_Prio; Insert (T); end if; end Change_Priority; ----------------- -- Delay_Until -- ----------------- procedure Delay_Until (Wake_Up_Time : Time) is T : constant Task_Object_Access := Task_Object_Access (Current_Task); Now : constant Time := AGATE.Timer.Clock; begin if Wake_Up_Time <= Now then Scheduler.Yield; else Scheduler.Suspend (Alarm); T.Alarm_Time := Wake_Up_Time; Insert_Alarm (T); if Context_Switch_Needed then Context_Switch.Switch; end if; end if; end Delay_Until; ------------------ -- Insert_Alarm -- ------------------ procedure Insert_Alarm (T : Task_Object_Access) is Cur : Task_Object_Access := Alarm_List; Prev : Task_Object_Access := null; begin while Cur /= null and then Cur.Alarm_Time < T.Alarm_Time loop Prev := Cur; Cur := Cur.Next; end loop; if Prev = null then -- Head insertion T.Next := Alarm_List; Alarm_List := T; else Prev.Next := T; T.Next := Cur; end if; Update_Alarm_Time; end Insert_Alarm; --------------------------- -- Wakeup_Expired_Alarms -- --------------------------- procedure Wakeup_Expired_Alarms is Now : constant Time := AGATE.Timer.Clock; T : Task_Object_Access := Alarm_List; begin while Alarm_List /= null and then Alarm_List.Alarm_Time <= Now loop T := Alarm_List; Alarm_List := T.Next; Scheduler.Resume (Task_ID (T)); end loop; Update_Alarm_Time; end Wakeup_Expired_Alarms; ----------------------- -- Update_Alarm_Time -- ----------------------- procedure Update_Alarm_Time is begin if Alarm_List = null then AGATE.Timer.Set_Alarm (Time'Last); else AGATE.Timer.Set_Alarm (Alarm_List.Alarm_Time); end if; end Update_Alarm_Time; --------------------------- -- Context_Switch_Needed -- --------------------------- function Context_Switch_Needed return Boolean is (Task_To_Run /= Current_Task); ----------------------- -- Do_Context_Switch -- ----------------------- procedure Do_Context_Switch renames AGATE.Scheduler.Context_Switch.Switch; end AGATE.Scheduler;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 2 5 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_25 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_25; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; ------------ -- Get_25 -- ------------ function Get_25 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_25 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_25; ------------ -- Set_25 -- ------------ procedure Set_25 (Arr : System.Address; N : Natural; E : Bits_25; 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_25; end System.Pack_25;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package body Program.Nodes.Constrained_Array_Types is function Create (Array_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Right_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Of_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access) return Constrained_Array_Type is begin return Result : Constrained_Array_Type := (Array_Token => Array_Token, Left_Bracket_Token => Left_Bracket_Token, Index_Subtypes => Index_Subtypes, Right_Bracket_Token => Right_Bracket_Token, Of_Token => Of_Token, Component_Definition => Component_Definition, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Index_Subtypes : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Component_Definition : not null Program.Elements.Component_Definitions .Component_Definition_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Constrained_Array_Type is begin return Result : Implicit_Constrained_Array_Type := (Index_Subtypes => Index_Subtypes, Component_Definition => Component_Definition, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Index_Subtypes (Self : Base_Constrained_Array_Type) return not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access is begin return Self.Index_Subtypes; end Index_Subtypes; overriding function Component_Definition (Self : Base_Constrained_Array_Type) return not null Program.Elements.Component_Definitions .Component_Definition_Access is begin return Self.Component_Definition; end Component_Definition; overriding function Array_Token (Self : Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Array_Token; end Array_Token; overriding function Left_Bracket_Token (Self : Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Left_Bracket_Token; end Left_Bracket_Token; overriding function Right_Bracket_Token (Self : Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Right_Bracket_Token; end Right_Bracket_Token; overriding function Of_Token (Self : Constrained_Array_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Of_Token; end Of_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Constrained_Array_Type) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Constrained_Array_Type) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Constrained_Array_Type) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : in out Base_Constrained_Array_Type'Class) is begin for Item in Self.Index_Subtypes.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; Set_Enclosing_Element (Self.Component_Definition, Self'Unchecked_Access); null; end Initialize; overriding function Is_Constrained_Array_Type (Self : Base_Constrained_Array_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Constrained_Array_Type; overriding function Is_Type_Definition (Self : Base_Constrained_Array_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Type_Definition; overriding function Is_Definition (Self : Base_Constrained_Array_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Definition; overriding procedure Visit (Self : not null access Base_Constrained_Array_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Constrained_Array_Type (Self); end Visit; overriding function To_Constrained_Array_Type_Text (Self : in out Constrained_Array_Type) return Program.Elements.Constrained_Array_Types .Constrained_Array_Type_Text_Access is begin return Self'Unchecked_Access; end To_Constrained_Array_Type_Text; overriding function To_Constrained_Array_Type_Text (Self : in out Implicit_Constrained_Array_Type) return Program.Elements.Constrained_Array_Types .Constrained_Array_Type_Text_Access is pragma Unreferenced (Self); begin return null; end To_Constrained_Array_Type_Text; end Program.Nodes.Constrained_Array_Types;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . M A N T I S S A -- -- -- -- B o d y -- -- -- -- Copyright (C) 1996-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. -- -- -- ------------------------------------------------------------------------------ package body System.Mantissa is -------------------- -- Mantissa_Value -- -------------------- function Mantissa_Value (First, Last : Integer) return Natural is Result : Natural := 0; Val : Integer := Integer'Max (abs First - 1, abs Last); -- Note: First-1 allows for twos complement largest neg number begin while Val /= 0 loop Val := Val / 2; Result := Result + 1; end loop; return Result; end Mantissa_Value; end System.Mantissa;
----------------------------------------------------------------------- -- Babel.Base.Models -- Babel.Base.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off, "unit * is not referenced"); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Basic.Lists; pragma Warnings (On, "unit * is not referenced"); package Babel.Base.Models is type Store_Ref is new ADO.Objects.Object_Ref with null record; type Backup_Ref is new ADO.Objects.Object_Ref with null record; type FileSet_Ref is new ADO.Objects.Object_Ref with null record; type Path_Ref is new ADO.Objects.Object_Ref with null record; type File_Ref is new ADO.Objects.Object_Ref with null record; -- Create an object key for Store. function Store_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Store from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Store_Key (Id : in String) return ADO.Objects.Object_Key; Null_Store : constant Store_Ref; function "=" (Left, Right : Store_Ref'Class) return Boolean; -- procedure Set_Id (Object : in out Store_Ref; Value : in ADO.Identifier); -- function Get_Id (Object : in Store_Ref) return ADO.Identifier; -- procedure Set_Name (Object : in out Store_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Store_Ref; Value : in String); -- function Get_Name (Object : in Store_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Store_Ref) return String; -- procedure Set_Parameter (Object : in out Store_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Parameter (Object : in out Store_Ref; Value : in String); -- function Get_Parameter (Object : in Store_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Parameter (Object : in Store_Ref) return String; -- procedure Set_Server (Object : in out Store_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Server (Object : in out Store_Ref; Value : in String); -- function Get_Server (Object : in Store_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Server (Object : in Store_Ref) return String; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Store_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Store_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Store_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Store_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Store_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Store_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition STORE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Store_Ref); -- Copy of the object. procedure Copy (Object : in Store_Ref; Into : in out Store_Ref); -- Create an object key for Backup. function Backup_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Backup from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Backup_Key (Id : in String) return ADO.Objects.Object_Key; Null_Backup : constant Backup_Ref; function "=" (Left, Right : Backup_Ref'Class) return Boolean; -- procedure Set_Id (Object : in out Backup_Ref; Value : in ADO.Identifier); -- function Get_Id (Object : in Backup_Ref) return ADO.Identifier; -- procedure Set_Create_Date (Object : in out Backup_Ref; Value : in Ada.Calendar.Time); -- function Get_Create_Date (Object : in Backup_Ref) return Ada.Calendar.Time; -- procedure Set_Store (Object : in out Backup_Ref; Value : in Babel.Base.Models.Store_Ref'Class); -- function Get_Store (Object : in Backup_Ref) return Babel.Base.Models.Store_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Backup_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Backup_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Backup_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Backup_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Backup_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Backup_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition BACKUP_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Backup_Ref); -- Copy of the object. procedure Copy (Object : in Backup_Ref; Into : in out Backup_Ref); -- Create an object key for FileSet. function FileSet_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for FileSet from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function FileSet_Key (Id : in String) return ADO.Objects.Object_Key; Null_FileSet : constant FileSet_Ref; function "=" (Left, Right : FileSet_Ref'Class) return Boolean; -- procedure Set_Id (Object : in out Fileset_Ref; Value : in ADO.Identifier); -- function Get_Id (Object : in Fileset_Ref) return ADO.Identifier; -- procedure Set_First_Id (Object : in out Fileset_Ref; Value : in ADO.Identifier); -- function Get_First_Id (Object : in Fileset_Ref) return ADO.Identifier; -- procedure Set_Last_Id (Object : in out Fileset_Ref; Value : in ADO.Identifier); -- function Get_Last_Id (Object : in Fileset_Ref) return ADO.Identifier; -- procedure Set_Backup (Object : in out Fileset_Ref; Value : in Babel.Base.Models.Backup_Ref'Class); -- function Get_Backup (Object : in Fileset_Ref) return Babel.Base.Models.Backup_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Fileset_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition FILESET_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Fileset_Ref); -- Copy of the object. procedure Copy (Object : in Fileset_Ref; Into : in out Fileset_Ref); -- Create an object key for Path. function Path_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Path from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Path_Key (Id : in String) return ADO.Objects.Object_Key; Null_Path : constant Path_Ref; function "=" (Left, Right : Path_Ref'Class) return Boolean; -- Set the path identifier. procedure Set_Id (Object : in out Path_Ref; Value : in ADO.Identifier); -- Get the path identifier. function Get_Id (Object : in Path_Ref) return ADO.Identifier; -- Set the file or path name. procedure Set_Name (Object : in out Path_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Path_Ref; Value : in String); -- Get the file or path name. function Get_Name (Object : in Path_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Path_Ref) return String; -- procedure Set_Store (Object : in out Path_Ref; Value : in Babel.Base.Models.Store_Ref'Class); -- function Get_Store (Object : in Path_Ref) return Babel.Base.Models.Store_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Path_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Path_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Path_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Path_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Path_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Path_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition PATH_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Path_Ref); -- Copy of the object. procedure Copy (Object : in Path_Ref; Into : in out Path_Ref); -- Create an object key for File. function File_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for File from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function File_Key (Id : in String) return ADO.Objects.Object_Key; Null_File : constant File_Ref; function "=" (Left, Right : File_Ref'Class) return Boolean; -- Set the file identifier. procedure Set_Id (Object : in out File_Ref; Value : in ADO.Identifier); -- Get the file identifier. function Get_Id (Object : in File_Ref) return ADO.Identifier; -- Set the file size. procedure Set_Size (Object : in out File_Ref; Value : in Integer); -- Get the file size. function Get_Size (Object : in File_Ref) return Integer; -- Set the file modification date. procedure Set_Date (Object : in out File_Ref; Value : in Ada.Calendar.Time); -- Get the file modification date. function Get_Date (Object : in File_Ref) return Ada.Calendar.Time; -- Set the file SHA1 signature. procedure Set_Sha1 (Object : in out File_Ref; Value : in ADO.Blob_Ref); -- Get the file SHA1 signature. function Get_Sha1 (Object : in File_Ref) return ADO.Blob_Ref; -- procedure Set_Directory (Object : in out File_Ref; Value : in Babel.Base.Models.Path_Ref'Class); -- function Get_Directory (Object : in File_Ref) return Babel.Base.Models.Path_Ref'Class; -- procedure Set_Name (Object : in out File_Ref; Value : in Babel.Base.Models.Path_Ref'Class); -- function Get_Name (Object : in File_Ref) return Babel.Base.Models.Path_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out File_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out File_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out File_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out File_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out File_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in File_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition FILE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out File_Ref); -- Copy of the object. procedure Copy (Object : in File_Ref; Into : in out File_Ref); private STORE_NAME : aliased constant String := "babel_store"; COL_0_1_NAME : aliased constant String := "id"; COL_1_1_NAME : aliased constant String := "name"; COL_2_1_NAME : aliased constant String := "parameter"; COL_3_1_NAME : aliased constant String := "server"; STORE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 4, Table => STORE_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access, 3 => COL_2_1_NAME'Access, 4 => COL_3_1_NAME'Access ) ); STORE_TABLE : constant ADO.Schemas.Class_Mapping_Access := STORE_DEF'Access; Null_Store : constant Store_Ref := Store_Ref'(ADO.Objects.Object_Ref with others => <>); type Store_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => STORE_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Parameter : Ada.Strings.Unbounded.Unbounded_String; Server : Ada.Strings.Unbounded.Unbounded_String; end record; type Store_Access is access all Store_Impl; overriding procedure Destroy (Object : access Store_Impl); overriding procedure Find (Object : in out Store_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Store_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Store_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Store_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Store_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Store_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Store_Ref'Class; Impl : out Store_Access); BACKUP_NAME : aliased constant String := "babel_backup"; COL_0_2_NAME : aliased constant String := "id"; COL_1_2_NAME : aliased constant String := "create_date"; COL_2_2_NAME : aliased constant String := "store_id"; BACKUP_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 3, Table => BACKUP_NAME'Access, Members => ( 1 => COL_0_2_NAME'Access, 2 => COL_1_2_NAME'Access, 3 => COL_2_2_NAME'Access ) ); BACKUP_TABLE : constant ADO.Schemas.Class_Mapping_Access := BACKUP_DEF'Access; Null_Backup : constant Backup_Ref := Backup_Ref'(ADO.Objects.Object_Ref with others => <>); type Backup_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => BACKUP_DEF'Access) with record Create_Date : Ada.Calendar.Time; Store : Babel.Base.Models.Store_Ref; end record; type Backup_Access is access all Backup_Impl; overriding procedure Destroy (Object : access Backup_Impl); overriding procedure Find (Object : in out Backup_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Backup_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Backup_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Backup_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Backup_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Backup_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Backup_Ref'Class; Impl : out Backup_Access); FILESET_NAME : aliased constant String := "babel_fileset"; COL_0_3_NAME : aliased constant String := "id"; COL_1_3_NAME : aliased constant String := "first_id"; COL_2_3_NAME : aliased constant String := "last_id"; COL_3_3_NAME : aliased constant String := "backup_id"; FILESET_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 4, Table => FILESET_NAME'Access, Members => ( 1 => COL_0_3_NAME'Access, 2 => COL_1_3_NAME'Access, 3 => COL_2_3_NAME'Access, 4 => COL_3_3_NAME'Access ) ); FILESET_TABLE : constant ADO.Schemas.Class_Mapping_Access := FILESET_DEF'Access; Null_FileSet : constant FileSet_Ref := FileSet_Ref'(ADO.Objects.Object_Ref with others => <>); type Fileset_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => FILESET_DEF'Access) with record First_Id : ADO.Identifier; Last_Id : ADO.Identifier; Backup : Babel.Base.Models.Backup_Ref; end record; type Fileset_Access is access all Fileset_Impl; overriding procedure Destroy (Object : access Fileset_Impl); overriding procedure Find (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Fileset_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Fileset_Ref'Class; Impl : out Fileset_Access); PATH_NAME : aliased constant String := "babel_path"; COL_0_4_NAME : aliased constant String := "id"; COL_1_4_NAME : aliased constant String := "name"; COL_2_4_NAME : aliased constant String := "store_id"; PATH_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 3, Table => PATH_NAME'Access, Members => ( 1 => COL_0_4_NAME'Access, 2 => COL_1_4_NAME'Access, 3 => COL_2_4_NAME'Access ) ); PATH_TABLE : constant ADO.Schemas.Class_Mapping_Access := PATH_DEF'Access; Null_Path : constant Path_Ref := Path_Ref'(ADO.Objects.Object_Ref with others => <>); type Path_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => PATH_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Store : Babel.Base.Models.Store_Ref; end record; type Path_Access is access all Path_Impl; overriding procedure Destroy (Object : access Path_Impl); overriding procedure Find (Object : in out Path_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Path_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Path_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Path_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Path_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Path_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Path_Ref'Class; Impl : out Path_Access); FILE_NAME : aliased constant String := "babel_file"; COL_0_5_NAME : aliased constant String := "id"; COL_1_5_NAME : aliased constant String := "size"; COL_2_5_NAME : aliased constant String := "date"; COL_3_5_NAME : aliased constant String := "sha1"; COL_4_5_NAME : aliased constant String := "directory_id"; COL_5_5_NAME : aliased constant String := "name_id"; FILE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 6, Table => FILE_NAME'Access, Members => ( 1 => COL_0_5_NAME'Access, 2 => COL_1_5_NAME'Access, 3 => COL_2_5_NAME'Access, 4 => COL_3_5_NAME'Access, 5 => COL_4_5_NAME'Access, 6 => COL_5_5_NAME'Access ) ); FILE_TABLE : constant ADO.Schemas.Class_Mapping_Access := FILE_DEF'Access; Null_File : constant File_Ref := File_Ref'(ADO.Objects.Object_Ref with others => <>); type File_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => FILE_DEF'Access) with record Size : Integer; Date : Ada.Calendar.Time; Sha1 : ADO.Blob_Ref; Directory : Babel.Base.Models.Path_Ref; Name : Babel.Base.Models.Path_Ref; end record; type File_Access is access all File_Impl; overriding procedure Destroy (Object : access File_Impl); overriding procedure Find (Object : in out File_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out File_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out File_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out File_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out File_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out File_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out File_Ref'Class; Impl : out File_Access); end Babel.Base.Models;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with League.Text_Codecs; with Slim.Message_Visiters; package body Slim.Messages.vers is ---------- -- Read -- ---------- overriding function Read (Data : not null access League.Stream_Element_Vectors.Stream_Element_Vector) return Vers_Message is begin return Result : Vers_Message do Result.Version := League.Text_Codecs.Codec_For_Application_Locale.Decode (Data.all); end return; end Read; ----------------- -- Set_Version -- ----------------- not overriding procedure Set_Version (Self : in out Vers_Message; Value : League.Strings.Universal_String) is begin Self.Version := Value; end Set_Version; ----------- -- Visit -- ----------- overriding procedure Visit (Self : not null access Vers_Message; Visiter : in out Slim.Message_Visiters.Visiter'Class) is begin Visiter.vers (Self); end Visit; ----------- -- Write -- ----------- overriding procedure Write (Self : Vers_Message; Tag : out Message_Tag; Data : out League.Stream_Element_Vectors.Stream_Element_Vector) is begin Tag := "vers"; Data := League.Text_Codecs.Codec_For_Application_Locale.Encode (Self.Version); end Write; end Slim.Messages.vers;
----------------------------------------------------------------------- -- net-protos -- Network protocols -- Copyright (C) 2016, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Net.Buffers; with Net.Interfaces; package Net.Protos is pragma Preelaborate; ETHERTYPE_ARP : constant Uint16 := 16#0806#; ETHERTYPE_IP : constant Uint16 := 16#0800#; ETHERTYPE_IPv6 : constant Uint16 := 16#86DD#; type Receive_Handler is access not null procedure (Ifnet : in out Net.Interfaces.Ifnet_Type'Class; Packet : in out Net.Buffers.Buffer_Type); end Net.Protos;
-- This spec has been automatically generated from STM32F7x9.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.I2C is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR1_DNF_Field is HAL.UInt4; -- Control register 1 type CR1_Register is record -- Peripheral enable PE : Boolean := False; -- TX Interrupt enable TXIE : Boolean := False; -- RX Interrupt enable RXIE : Boolean := False; -- Address match interrupt enable (slave only) ADDRIE : Boolean := False; -- Not acknowledge received interrupt enable NACKIE : Boolean := False; -- STOP detection Interrupt enable STOPIE : Boolean := False; -- Transfer Complete interrupt enable TCIE : Boolean := False; -- Error interrupts enable ERRIE : Boolean := False; -- Digital noise filter DNF : CR1_DNF_Field := 16#0#; -- Analog noise filter OFF ANFOFF : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- DMA transmission requests enable TXDMAEN : Boolean := False; -- DMA reception requests enable RXDMAEN : Boolean := False; -- Slave byte control SBC : Boolean := False; -- Clock stretching disable NOSTRETCH : Boolean := False; -- Wakeup from STOP enable WUPEN : Boolean := False; -- General call enable GCEN : Boolean := False; -- SMBus Host address enable SMBHEN : Boolean := False; -- SMBus Device Default address enable SMBDEN : Boolean := False; -- SMBUS alert enable ALERTEN : Boolean := False; -- PEC enable PECEN : Boolean := False; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record PE at 0 range 0 .. 0; TXIE at 0 range 1 .. 1; RXIE at 0 range 2 .. 2; ADDRIE at 0 range 3 .. 3; NACKIE at 0 range 4 .. 4; STOPIE at 0 range 5 .. 5; TCIE at 0 range 6 .. 6; ERRIE at 0 range 7 .. 7; DNF at 0 range 8 .. 11; ANFOFF at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; TXDMAEN at 0 range 14 .. 14; RXDMAEN at 0 range 15 .. 15; SBC at 0 range 16 .. 16; NOSTRETCH at 0 range 17 .. 17; WUPEN at 0 range 18 .. 18; GCEN at 0 range 19 .. 19; SMBHEN at 0 range 20 .. 20; SMBDEN at 0 range 21 .. 21; ALERTEN at 0 range 22 .. 22; PECEN at 0 range 23 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype CR2_SADD_Field is HAL.UInt10; subtype CR2_NBYTES_Field is HAL.UInt8; -- Control register 2 type CR2_Register is record -- Slave address bit (master mode) SADD : CR2_SADD_Field := 16#0#; -- Transfer direction (master mode) RD_WRN : Boolean := False; -- 10-bit addressing mode (master mode) ADD10 : Boolean := False; -- 10-bit address header only read direction (master receiver mode) HEAD10R : Boolean := False; -- Start generation START : Boolean := False; -- Stop generation (master mode) STOP : Boolean := False; -- NACK generation (slave mode) NACK : Boolean := False; -- Number of bytes NBYTES : CR2_NBYTES_Field := 16#0#; -- NBYTES reload mode RELOAD : Boolean := False; -- Automatic end mode (master mode) AUTOEND : Boolean := False; -- Packet error checking byte PECBYTE : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record SADD at 0 range 0 .. 9; RD_WRN at 0 range 10 .. 10; ADD10 at 0 range 11 .. 11; HEAD10R at 0 range 12 .. 12; START at 0 range 13 .. 13; STOP at 0 range 14 .. 14; NACK at 0 range 15 .. 15; NBYTES at 0 range 16 .. 23; RELOAD at 0 range 24 .. 24; AUTOEND at 0 range 25 .. 25; PECBYTE at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; subtype OAR1_OA1_Field is HAL.UInt10; -- Own address register 1 type OAR1_Register is record -- Interface address OA1 : OAR1_OA1_Field := 16#0#; -- Own Address 1 10-bit mode OA1MODE : Boolean := False; -- unspecified Reserved_11_14 : HAL.UInt4 := 16#0#; -- Own Address 1 enable OA1EN : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OAR1_Register use record OA1 at 0 range 0 .. 9; OA1MODE at 0 range 10 .. 10; Reserved_11_14 at 0 range 11 .. 14; OA1EN at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype OAR2_OA2_Field is HAL.UInt7; subtype OAR2_OA2MSK_Field is HAL.UInt3; -- Own address register 2 type OAR2_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Interface address OA2 : OAR2_OA2_Field := 16#0#; -- Own Address 2 masks OA2MSK : OAR2_OA2MSK_Field := 16#0#; -- unspecified Reserved_11_14 : HAL.UInt4 := 16#0#; -- Own Address 2 enable OA2EN : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OAR2_Register use record Reserved_0_0 at 0 range 0 .. 0; OA2 at 0 range 1 .. 7; OA2MSK at 0 range 8 .. 10; Reserved_11_14 at 0 range 11 .. 14; OA2EN at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype TIMINGR_SCLL_Field is HAL.UInt8; subtype TIMINGR_SCLH_Field is HAL.UInt8; subtype TIMINGR_SDADEL_Field is HAL.UInt4; subtype TIMINGR_SCLDEL_Field is HAL.UInt4; subtype TIMINGR_PRESC_Field is HAL.UInt4; -- Timing register type TIMINGR_Register is record -- SCL low period (master mode) SCLL : TIMINGR_SCLL_Field := 16#0#; -- SCL high period (master mode) SCLH : TIMINGR_SCLH_Field := 16#0#; -- Data hold time SDADEL : TIMINGR_SDADEL_Field := 16#0#; -- Data setup time SCLDEL : TIMINGR_SCLDEL_Field := 16#0#; -- unspecified Reserved_24_27 : HAL.UInt4 := 16#0#; -- Timing prescaler PRESC : TIMINGR_PRESC_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TIMINGR_Register use record SCLL at 0 range 0 .. 7; SCLH at 0 range 8 .. 15; SDADEL at 0 range 16 .. 19; SCLDEL at 0 range 20 .. 23; Reserved_24_27 at 0 range 24 .. 27; PRESC at 0 range 28 .. 31; end record; subtype TIMEOUTR_TIMEOUTA_Field is HAL.UInt12; subtype TIMEOUTR_TIMEOUTB_Field is HAL.UInt12; -- Status register 1 type TIMEOUTR_Register is record -- Bus timeout A TIMEOUTA : TIMEOUTR_TIMEOUTA_Field := 16#0#; -- Idle clock timeout detection TIDLE : Boolean := False; -- unspecified Reserved_13_14 : HAL.UInt2 := 16#0#; -- Clock timeout enable TIMOUTEN : Boolean := False; -- Bus timeout B TIMEOUTB : TIMEOUTR_TIMEOUTB_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Extended clock timeout enable TEXTEN : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TIMEOUTR_Register use record TIMEOUTA at 0 range 0 .. 11; TIDLE at 0 range 12 .. 12; Reserved_13_14 at 0 range 13 .. 14; TIMOUTEN at 0 range 15 .. 15; TIMEOUTB at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; TEXTEN at 0 range 31 .. 31; end record; subtype ISR_ADDCODE_Field is HAL.UInt7; -- Interrupt and Status register type ISR_Register is record -- Transmit data register empty (transmitters) TXE : Boolean := True; -- Transmit interrupt status (transmitters) TXIS : Boolean := False; -- Read-only. Receive data register not empty (receivers) RXNE : Boolean := False; -- Read-only. Address matched (slave mode) ADDR : Boolean := False; -- Read-only. Not acknowledge received flag NACKF : Boolean := False; -- Read-only. Stop detection flag STOPF : Boolean := False; -- Read-only. Transfer Complete (master mode) TC : Boolean := False; -- Read-only. Transfer Complete Reload TCR : Boolean := False; -- Read-only. Bus error BERR : Boolean := False; -- Read-only. Arbitration lost ARLO : Boolean := False; -- Read-only. Overrun/Underrun (slave mode) OVR : Boolean := False; -- Read-only. PEC Error in reception PECERR : Boolean := False; -- Read-only. Timeout or t_low detection flag TIMEOUT : Boolean := False; -- Read-only. SMBus alert ALERT : Boolean := False; -- unspecified Reserved_14_14 : HAL.Bit := 16#0#; -- Read-only. Bus busy BUSY : Boolean := False; -- Read-only. Transfer direction (Slave mode) DIR : Boolean := False; -- Read-only. Address match code (Slave mode) ADDCODE : ISR_ADDCODE_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record TXE at 0 range 0 .. 0; TXIS at 0 range 1 .. 1; RXNE at 0 range 2 .. 2; ADDR at 0 range 3 .. 3; NACKF at 0 range 4 .. 4; STOPF at 0 range 5 .. 5; TC at 0 range 6 .. 6; TCR at 0 range 7 .. 7; BERR at 0 range 8 .. 8; ARLO at 0 range 9 .. 9; OVR at 0 range 10 .. 10; PECERR at 0 range 11 .. 11; TIMEOUT at 0 range 12 .. 12; ALERT at 0 range 13 .. 13; Reserved_14_14 at 0 range 14 .. 14; BUSY at 0 range 15 .. 15; DIR at 0 range 16 .. 16; ADDCODE at 0 range 17 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Interrupt clear register type ICR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Write-only. Address Matched flag clear ADDRCF : Boolean := False; -- Write-only. Not Acknowledge flag clear NACKCF : Boolean := False; -- Write-only. Stop detection flag clear STOPCF : Boolean := False; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Write-only. Bus error flag clear BERRCF : Boolean := False; -- Write-only. Arbitration lost flag clear ARLOCF : Boolean := False; -- Write-only. Overrun/Underrun flag clear OVRCF : Boolean := False; -- Write-only. PEC Error flag clear PECCF : Boolean := False; -- Write-only. Timeout detection flag clear TIMOUTCF : Boolean := False; -- Write-only. Alert flag clear ALERTCF : Boolean := False; -- unspecified Reserved_14_31 : HAL.UInt18 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ICR_Register use record Reserved_0_2 at 0 range 0 .. 2; ADDRCF at 0 range 3 .. 3; NACKCF at 0 range 4 .. 4; STOPCF at 0 range 5 .. 5; Reserved_6_7 at 0 range 6 .. 7; BERRCF at 0 range 8 .. 8; ARLOCF at 0 range 9 .. 9; OVRCF at 0 range 10 .. 10; PECCF at 0 range 11 .. 11; TIMOUTCF at 0 range 12 .. 12; ALERTCF at 0 range 13 .. 13; Reserved_14_31 at 0 range 14 .. 31; end record; subtype PECR_PEC_Field is HAL.UInt8; -- PEC register type PECR_Register is record -- Read-only. Packet error checking register PEC : PECR_PEC_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PECR_Register use record PEC at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype RXDR_RXDATA_Field is HAL.UInt8; -- Receive data register type RXDR_Register is record -- Read-only. 8-bit receive data RXDATA : RXDR_RXDATA_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for RXDR_Register use record RXDATA at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype TXDR_TXDATA_Field is HAL.UInt8; -- Transmit data register type TXDR_Register is record -- 8-bit transmit data TXDATA : TXDR_TXDATA_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TXDR_Register use record TXDATA at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Inter-integrated circuit type I2C_Peripheral is record -- Control register 1 CR1 : aliased CR1_Register; -- Control register 2 CR2 : aliased CR2_Register; -- Own address register 1 OAR1 : aliased OAR1_Register; -- Own address register 2 OAR2 : aliased OAR2_Register; -- Timing register TIMINGR : aliased TIMINGR_Register; -- Status register 1 TIMEOUTR : aliased TIMEOUTR_Register; -- Interrupt and Status register ISR : aliased ISR_Register; -- Interrupt clear register ICR : aliased ICR_Register; -- PEC register PECR : aliased PECR_Register; -- Receive data register RXDR : aliased RXDR_Register; -- Transmit data register TXDR : aliased TXDR_Register; end record with Volatile; for I2C_Peripheral use record CR1 at 16#0# range 0 .. 31; CR2 at 16#4# range 0 .. 31; OAR1 at 16#8# range 0 .. 31; OAR2 at 16#C# range 0 .. 31; TIMINGR at 16#10# range 0 .. 31; TIMEOUTR at 16#14# range 0 .. 31; ISR at 16#18# range 0 .. 31; ICR at 16#1C# range 0 .. 31; PECR at 16#20# range 0 .. 31; RXDR at 16#24# range 0 .. 31; TXDR at 16#28# range 0 .. 31; end record; -- Inter-integrated circuit I2C1_Periph : aliased I2C_Peripheral with Import, Address => System'To_Address (16#40005400#); -- Inter-integrated circuit I2C2_Periph : aliased I2C_Peripheral with Import, Address => System'To_Address (16#40005800#); -- Inter-integrated circuit I2C3_Periph : aliased I2C_Peripheral with Import, Address => System'To_Address (16#40005C00#); -- Inter-integrated circuit I2C4_Periph : aliased I2C_Peripheral with Import, Address => System'To_Address (16#40006000#); end STM32_SVD.I2C;
----------------------------------------------------------------------- -- security-random-tests - Tests for random package -- Copyright (C) 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Util.Test_Caller; package body Security.Random.Tests is package Caller is new Util.Test_Caller (Test, "Security.Random"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Security.Random.Generate", Test_Generate'Access); end Add_Tests; -- ------------------------------ -- Test Yadis discovery using static files -- ------------------------------ procedure Test_Generate (T : in out Test) is use Ada.Strings.Unbounded; G : Generator; Max : constant Ada.Streams.Stream_Element_Offset := 10; begin for I in 1 .. Max loop declare use type Ada.Streams.Stream_Element; S : Ada.Streams.Stream_Element_Array (1 .. I) := (others => 0); Rand : Ada.Strings.Unbounded.Unbounded_String; begin -- Try 5 times to fill the array with random patterns and make sure -- we don't get any 0. for Retry in 1 .. 5 loop G.Generate (S); exit when (for all R of S => R /= 0); end loop; T.Assert ((for all R of S => R /= 0), "Generator failed to initialize all bytes"); G.Generate (Positive (I), Rand); T.Assert (Length (Rand) > 0, "Generator failed to produce a base64url sequence"); end; end loop; end Test_Generate; end Security.Random.Tests;
with Ada.Text_IO, Ada.Integer_Text_IO; package body Knights_Tour is type Pair is array(1..2) of Integer; type Pair_Array is array (Positive range <>) of Pair; Pairs: constant Pair_Array (1..8) := ((-2,1),(-1,2),(1,2),(2,1),(2,-1),(1,-2),(-1,-2),(-2,-1)); -- places for the night to go (relative to the current position) function Count_Moves(Board: Tour) return Natural is N: Natural := 0; begin for I in Index loop for J in Index loop if Board(I,J) < Natural'Last then N := N + 1; end if; end loop; end loop; return N; end Count_Moves; function Get_Tour(Start_X, Start_Y: Index; Scene: Tour := Empty) return Tour is Done: Boolean; Move_Count: Natural := Count_Moves(Scene); Visited: Tour; -- Visited(I, J) = 0: not yet visited -- Visited(I, J) = K: visited at the k-th move -- Visited(I, J) = Integer'Last: never visit procedure Visit(X, Y: Index; Move_Number: Positive; Found: out Boolean) is XX, YY: Integer; begin Found := False; Visited(X, Y) := Move_Number; if Move_Number = Move_Count then Found := True; else for P in Pairs'Range loop XX := X + Pairs(P)(1); YY := Y + Pairs(P)(2); if (XX in Index) and then (YY in Index) and then Visited(XX, YY) = 0 then Visit(XX, YY, Move_Number+1, Found); -- recursion if Found then return; -- no need to search further end if; end if; end loop; Visited(X, Y) := 0; -- undo previous mark end if; end Visit; begin Visited := Scene; Visit(Start_X, Start_Y, 1, Done); if not Done then Visited := Scene; end if; return Visited; end Get_Tour; procedure Tour_IO(The_Tour: Tour; Width: Natural := 4) is begin for I in Index loop for J in Index loop if The_Tour(I, J) < Integer'Last then Ada.Integer_Text_IO.Put(The_Tour(I, J), Width); else for W in 1 .. Width-1 loop Ada.Text_IO.Put(" "); end loop; Ada.Text_IO.Put("-"); -- deliberately not visited end if; end loop; Ada.Text_IO.New_Line; end loop; end Tour_IO; end Knights_Tour;
package Giza.Hershey_Fonts.Scripts is Font : constant Giza.Font.Ref_Const; private Glyph_0 : aliased constant Glyph := (Number_Of_Vectors => 0, Width => 16, Height => 0, Y_Offset => 0, X_Offset => -8, Vects => (others => (Raise_Pen))); Glyph_1 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 11, Height => 21, Y_Offset => -12, X_Offset => -5, Vects => (Raise_Pen, (3, -12), (2, -11), (0, 1), Raise_Pen, (3, -11), (0, 1), Raise_Pen, (3, -12), (4, -11), (0, 1), Raise_Pen, (-2, 7), (-3, 8), (-2, 9), (-1, 8), (-2, 7))); Glyph_2 : aliased constant Glyph := (Number_Of_Vectors => 12, Width => 18, Height => 7, Y_Offset => -12, X_Offset => -9, Vects => (Raise_Pen, (-2, -12), (-4, -5), Raise_Pen, (-1, -12), (-4, -5), Raise_Pen, (7, -12), (5, -5), Raise_Pen, (8, -12), (5, -5))); Glyph_3 : aliased constant Glyph := (Number_Of_Vectors => 12, Width => 21, Height => 32, Y_Offset => -16, X_Offset => -10, Vects => (Raise_Pen, (1, -16), (-6, 16), Raise_Pen, (7, -16), (0, 16), Raise_Pen, (-6, -3), (8, -3), Raise_Pen, (-7, 3), (7, 3))); Glyph_4 : aliased constant Glyph := (Number_Of_Vectors => 41, Width => 21, Height => 29, Y_Offset => -16, X_Offset => -10, Vects => (Raise_Pen, (2, -16), (-6, 13), Raise_Pen, (7, -16), (-1, 13), Raise_Pen, (8, -8), (7, -7), (8, -6), (9, -7), (9, -8), (8, -10), (7, -11), (4, -12), (0, -12), (-3, -11), (-5, -9), (-5, -7), (-4, -5), (-3, -4), (4, 0), (6, 2), Raise_Pen, (-5, -7), (-3, -5), (4, -1), (5, 0), (6, 2), (6, 5), (5, 7), (4, 8), (1, 9), (-3, 9), (-6, 8), (-7, 7), (-8, 5), (-8, 4), (-7, 3), (-6, 4), (-7, 5))); Glyph_5 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 24, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (9, -12), (-9, 9), Raise_Pen, (-4, -12), (-2, -10), (-2, -8), (-3, -6), (-5, -5), (-7, -5), (-9, -7), (-9, -9), (-8, -11), (-6, -12), (-4, -12), (-2, -11), (1, -10), (4, -10), (7, -11), (9, -12), Raise_Pen, (5, 2), (3, 3), (2, 5), (2, 7), (4, 9), (6, 9), (8, 8), (9, 6), (9, 4), (7, 2), (5, 2))); Glyph_6 : aliased constant Glyph := (Number_Of_Vectors => 55, Width => 26, Height => 21, Y_Offset => -12, X_Offset => -13, Vects => (Raise_Pen, (10, -4), (9, -3), (10, -2), (11, -3), (11, -4), (10, -5), (9, -5), (7, -4), (5, -2), (0, 6), (-2, 8), (-4, 9), (-7, 9), (-10, 8), (-11, 6), (-11, 4), (-10, 2), (-9, 1), (-7, 0), (-2, -2), (0, -3), (2, -5), (3, -7), (3, -9), (2, -11), (0, -12), (-2, -11), (-3, -9), (-3, -6), (-2, 0), (-1, 3), (1, 6), (3, 8), (5, 9), (7, 9), (8, 7), (8, 6), Raise_Pen, (-7, 9), (-9, 8), (-10, 6), (-10, 4), (-9, 2), (-8, 1), (-2, -2), Raise_Pen, (-3, -6), (-2, -1), (-1, 2), (1, 5), (3, 7), (5, 8), (7, 8), (8, 7))); Glyph_7 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 6, Y_Offset => -12, X_Offset => -5, Vects => (Raise_Pen, (3, -10), (2, -11), (3, -12), (4, -11), (4, -10), (3, -8), (1, -6))); Glyph_8 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 15, Height => 32, Y_Offset => -16, X_Offset => -7, Vects => (Raise_Pen, (8, -16), (4, -13), (1, -10), (-1, -7), (-3, -3), (-4, 2), (-4, 6), (-3, 11), (-2, 14), (-1, 16), Raise_Pen, (4, -13), (1, -9), (-1, -5), (-2, -2), (-3, 3), (-3, 8), (-2, 13), (-1, 16))); Glyph_9 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 15, Height => 32, Y_Offset => -16, X_Offset => -8, Vects => (Raise_Pen, (1, -16), (2, -14), (3, -11), (4, -6), (4, -2), (3, 3), (1, 7), (-1, 10), (-4, 13), (-8, 16), Raise_Pen, (1, -16), (2, -13), (3, -8), (3, -3), (2, 2), (1, 5), (-1, 9), (-4, 13))); Glyph_10 : aliased constant Glyph := (Number_Of_Vectors => 9, Width => 17, Height => 12, Y_Offset => -12, X_Offset => -8, Vects => (Raise_Pen, (2, -12), (2, 0), Raise_Pen, (-3, -9), (7, -3), Raise_Pen, (7, -9), (-3, -3))); Glyph_11 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 26, Height => 18, Y_Offset => -9, X_Offset => -13, Vects => (Raise_Pen, (0, -9), (0, 9), Raise_Pen, (-9, 0), (9, 0))); Glyph_12 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 6, Y_Offset => 7, X_Offset => -5, Vects => (Raise_Pen, (-2, 9), (-3, 8), (-2, 7), (-1, 8), (-1, 9), (-2, 11), (-4, 13))); Glyph_13 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 26, Height => 0, Y_Offset => 0, X_Offset => -13, Vects => (Raise_Pen, (-9, 0), (9, 0))); Glyph_14 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 10, Height => 2, Y_Offset => 7, X_Offset => -5, Vects => (Raise_Pen, (0, 7), (-1, 8), (0, 9), (1, 8), (0, 7))); Glyph_15 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 22, Height => 32, Y_Offset => -16, X_Offset => -11, Vects => (Raise_Pen, (13, -16), (-13, 16))); Glyph_16 : aliased constant Glyph := (Number_Of_Vectors => 42, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (2, -12), (-1, -11), (-3, -9), (-5, -6), (-6, -3), (-7, 1), (-7, 4), (-6, 7), (-5, 8), (-3, 9), (-1, 9), (2, 8), (4, 6), (6, 3), (7, 0), (8, -4), (8, -7), (7, -10), (6, -11), (4, -12), (2, -12), Raise_Pen, (2, -12), (0, -11), (-2, -9), (-4, -6), (-5, -3), (-6, 1), (-6, 4), (-5, 7), (-3, 9), Raise_Pen, (-1, 9), (1, 8), (3, 6), (5, 3), (6, 0), (7, -4), (7, -7), (6, -10), (4, -12))); Glyph_17 : aliased constant Glyph := (Number_Of_Vectors => 15, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (2, -8), (-3, 9), Raise_Pen, (4, -12), (-2, 9), Raise_Pen, (4, -12), (1, -9), (-2, -7), (-4, -6), Raise_Pen, (3, -9), (-1, -7), (-4, -6))); Glyph_18 : aliased constant Glyph := (Number_Of_Vectors => 42, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (-3, -8), (-2, -7), (-3, -6), (-4, -7), (-4, -8), (-3, -10), (-2, -11), (1, -12), (4, -12), (7, -11), (8, -9), (8, -7), (7, -5), (5, -3), (2, -1), (-2, 1), (-5, 3), (-7, 5), (-9, 9), Raise_Pen, (4, -12), (6, -11), (7, -9), (7, -7), (6, -5), (4, -3), (-2, 1), Raise_Pen, (-8, 7), (-7, 6), (-5, 6), (0, 8), (3, 8), (5, 7), (6, 5), Raise_Pen, (-5, 6), (0, 9), (3, 9), (5, 8), (6, 5))); Glyph_19 : aliased constant Glyph := (Number_Of_Vectors => 50, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (-3, -8), (-2, -7), (-3, -6), (-4, -7), (-4, -8), (-3, -10), (-2, -11), (1, -12), (4, -12), (7, -11), (8, -9), (8, -7), (7, -5), (4, -3), (1, -2), Raise_Pen, (4, -12), (6, -11), (7, -9), (7, -7), (6, -5), (4, -3), Raise_Pen, (-1, -2), (1, -2), (4, -1), (5, 0), (6, 2), (6, 5), (5, 7), (4, 8), (1, 9), (-3, 9), (-6, 8), (-7, 7), (-8, 5), (-8, 4), (-7, 3), (-6, 4), (-7, 5), Raise_Pen, (1, -2), (3, -1), (4, 0), (5, 2), (5, 5), (4, 7), (3, 8), (1, 9))); Glyph_20 : aliased constant Glyph := (Number_Of_Vectors => 10, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (6, -11), (0, 9), Raise_Pen, (7, -12), (1, 9), Raise_Pen, (7, -12), (-8, 3), (8, 3))); Glyph_21 : aliased constant Glyph := (Number_Of_Vectors => 39, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (-1, -12), (-6, -2), Raise_Pen, (-1, -12), (9, -12), Raise_Pen, (-1, -11), (4, -11), (9, -12), Raise_Pen, (-6, -2), (-5, -3), (-2, -4), (1, -4), (4, -3), (5, -2), (6, 0), (6, 3), (5, 6), (3, 8), (0, 9), (-3, 9), (-6, 8), (-7, 7), (-8, 5), (-8, 4), (-7, 3), (-6, 4), (-7, 5), Raise_Pen, (1, -4), (3, -3), (4, -2), (5, 0), (5, 3), (4, 6), (2, 8), (0, 9))); Glyph_22 : aliased constant Glyph := (Number_Of_Vectors => 46, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (7, -9), (6, -8), (7, -7), (8, -8), (8, -9), (7, -11), (5, -12), (2, -12), (-1, -11), (-3, -9), (-5, -6), (-6, -3), (-7, 1), (-7, 5), (-6, 7), (-5, 8), (-3, 9), (0, 9), (3, 8), (5, 6), (6, 4), (6, 1), (5, -1), (4, -2), (2, -3), (-1, -3), (-3, -2), (-5, 0), (-6, 2), Raise_Pen, (2, -12), (0, -11), (-2, -9), (-4, -6), (-5, -3), (-6, 1), (-6, 6), (-5, 8), Raise_Pen, (0, 9), (2, 8), (4, 6), (5, 4), (5, 0), (4, -2))); Glyph_23 : aliased constant Glyph := (Number_Of_Vectors => 30, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (-4, -12), (-6, -6), Raise_Pen, (9, -12), (8, -9), (6, -6), (1, 0), (-1, 3), (-2, 5), (-3, 9), Raise_Pen, (6, -6), (0, 0), (-2, 3), (-3, 5), (-4, 9), Raise_Pen, (-5, -9), (-2, -12), (0, -12), (5, -9), Raise_Pen, (-4, -10), (-2, -11), (0, -11), (5, -9), (7, -9), (8, -10), (9, -12))); Glyph_24 : aliased constant Glyph := (Number_Of_Vectors => 63, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (1, -12), (-2, -11), (-3, -10), (-4, -8), (-4, -5), (-3, -3), (-1, -2), (2, -2), (6, -3), (7, -4), (8, -6), (8, -9), (7, -11), (4, -12), (1, -12), Raise_Pen, (1, -12), (-1, -11), (-2, -10), (-3, -8), (-3, -5), (-2, -3), (-1, -2), Raise_Pen, (2, -2), (5, -3), (6, -4), (7, -6), (7, -9), (6, -11), (4, -12), Raise_Pen, (-1, -2), (-5, -1), (-7, 1), (-8, 3), (-8, 6), (-7, 8), (-4, 9), (0, 9), (4, 8), (5, 7), (6, 5), (6, 2), (5, 0), (4, -1), (2, -2), Raise_Pen, (-1, -2), (-4, -1), (-6, 1), (-7, 3), (-7, 6), (-6, 8), (-4, 9), Raise_Pen, (0, 9), (3, 8), (4, 7), (5, 5), (5, 1), (4, -1))); Glyph_25 : aliased constant Glyph := (Number_Of_Vectors => 46, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (7, -5), (6, -3), (4, -1), (2, 0), (-1, 0), (-3, -1), (-4, -2), (-5, -4), (-5, -7), (-4, -9), (-2, -11), (1, -12), (4, -12), (6, -11), (7, -10), (8, -8), (8, -4), (7, 0), (6, 3), (4, 6), (2, 8), (-1, 9), (-4, 9), (-6, 8), (-7, 6), (-7, 5), (-6, 4), (-5, 5), (-6, 6), Raise_Pen, (-3, -1), (-4, -3), (-4, -7), (-3, -9), (-1, -11), (1, -12), Raise_Pen, (6, -11), (7, -9), (7, -4), (6, 0), (5, 3), (3, 6), (1, 8), (-1, 9))); Glyph_26 : aliased constant Glyph := (Number_Of_Vectors => 11, Width => 11, Height => 14, Y_Offset => -5, X_Offset => -5, Vects => (Raise_Pen, (1, -5), (0, -4), (1, -3), (2, -4), (1, -5), Raise_Pen, (-2, 7), (-3, 8), (-2, 9), (-1, 8))); Glyph_27 : aliased constant Glyph := (Number_Of_Vectors => 14, Width => 11, Height => 18, Y_Offset => -5, X_Offset => -5, Vects => (Raise_Pen, (1, -5), (0, -4), (1, -3), (2, -4), (1, -5), Raise_Pen, (-2, 9), (-3, 8), (-2, 7), (-1, 8), (-1, 9), (-2, 11), (-4, 13))); Glyph_28 : aliased constant Glyph := (Number_Of_Vectors => 4, Width => 24, Height => 18, Y_Offset => -9, X_Offset => -12, Vects => (Raise_Pen, (8, -9), (-8, 0), (8, 9))); Glyph_29 : aliased constant Glyph := (Number_Of_Vectors => 6, Width => 26, Height => 6, Y_Offset => -3, X_Offset => -13, Vects => (Raise_Pen, (-9, -3), (9, -3), Raise_Pen, (-9, 3), (9, 3))); Glyph_30 : aliased constant Glyph := (Number_Of_Vectors => 4, Width => 24, Height => 18, Y_Offset => -9, X_Offset => -12, Vects => (Raise_Pen, (-8, -9), (8, 0), (-8, 9))); Glyph_31 : aliased constant Glyph := (Number_Of_Vectors => 34, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (-3, -8), (-2, -7), (-3, -6), (-4, -7), (-4, -8), (-3, -10), (-2, -11), (1, -12), (5, -12), (8, -11), (9, -9), (9, -7), (8, -5), (7, -4), (1, -2), (-1, -1), (-1, 1), (0, 2), (2, 2), Raise_Pen, (5, -12), (7, -11), (8, -9), (8, -7), (7, -5), (6, -4), (4, -3), Raise_Pen, (-2, 7), (-3, 8), (-2, 9), (-1, 8), (-2, 7))); Glyph_32 : aliased constant Glyph := (Number_Of_Vectors => 56, Width => 27, Height => 21, Y_Offset => -12, X_Offset => -13, Vects => (Raise_Pen, (5, -4), (4, -6), (2, -7), (-1, -7), (-3, -6), (-4, -5), (-5, -2), (-5, 1), (-4, 3), (-2, 4), (1, 4), (3, 3), (4, 1), Raise_Pen, (-1, -7), (-3, -5), (-4, -2), (-4, 1), (-3, 3), (-2, 4), Raise_Pen, (5, -7), (4, 1), (4, 3), (6, 4), (8, 4), (10, 2), (11, -1), (11, -3), (10, -6), (9, -8), (7, -10), (5, -11), (2, -12), (-1, -12), (-4, -11), (-6, -10), (-8, -8), (-9, -6), (-10, -3), (-10, 0), (-9, 3), (-8, 5), (-6, 7), (-4, 8), (-1, 9), (2, 9), (5, 8), (7, 7), (8, 6), Raise_Pen, (6, -7), (5, 1), (5, 3), (6, 4))); Glyph_33 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 20, Height => 21, Y_Offset => -12, X_Offset => -11, Vects => (Raise_Pen, (-11, 9), (-9, 8), (-6, 5), (-3, 1), (1, -6), (4, -12), (4, 9), (3, 6), (1, 3), (-1, 1), (-4, -1), (-6, -1), (-7, 0), (-7, 2), (-6, 4), (-4, 6), (-1, 8), (2, 9), (7, 9))); Glyph_34 : aliased constant Glyph := (Number_Of_Vectors => 41, Width => 23, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (1, -10), (2, -9), (2, -6), (1, -2), (0, 1), (-1, 3), (-3, 6), (-5, 8), (-7, 9), (-8, 9), (-9, 8), (-9, 5), (-8, 0), (-7, -3), (-6, -5), (-4, -8), (-2, -10), (0, -11), (3, -12), (6, -12), (8, -11), (9, -9), (9, -7), (8, -5), (7, -4), (5, -3), (2, -2), Raise_Pen, (1, -2), (2, -2), (5, -1), (6, 0), (7, 2), (7, 5), (6, 7), (5, 8), (3, 9), (0, 9), (-2, 8), (-3, 6))); Glyph_35 : aliased constant Glyph := (Number_Of_Vectors => 24, Width => 20, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (2, -6), (2, -5), (3, -4), (5, -4), (7, -5), (8, -7), (8, -9), (7, -11), (5, -12), (2, -12), (-1, -11), (-3, -9), (-5, -6), (-6, -4), (-7, 0), (-7, 4), (-6, 7), (-5, 8), (-3, 9), (-1, 9), (2, 8), (4, 6), (5, 4))); Glyph_36 : aliased constant Glyph := (Number_Of_Vectors => 35, Width => 23, Height => 21, Y_Offset => -12, X_Offset => -11, Vects => (Raise_Pen, (2, -12), (0, -11), (-1, -9), (-2, -5), (-3, 1), (-4, 4), (-5, 6), (-7, 8), (-9, 9), (-11, 9), (-12, 8), (-12, 6), (-11, 5), (-9, 5), (-7, 6), (-5, 8), (-2, 9), (1, 9), (4, 8), (6, 6), (8, 2), (9, -3), (9, -7), (8, -10), (7, -11), (5, -12), (2, -12), (0, -10), (0, -8), (1, -5), (3, -2), (5, 0), (8, 2), (10, 3))); Glyph_37 : aliased constant Glyph := (Number_Of_Vectors => 28, Width => 20, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (4, -8), (4, -7), (5, -6), (7, -6), (8, -7), (8, -9), (7, -11), (4, -12), (0, -12), (-3, -11), (-4, -9), (-4, -6), (-3, -4), (-2, -3), (1, -2), (-2, -2), (-5, -1), (-6, 0), (-7, 2), (-7, 5), (-6, 7), (-5, 8), (-2, 9), (1, 9), (4, 8), (6, 6), (7, 4))); Glyph_38 : aliased constant Glyph := (Number_Of_Vectors => 28, Width => 20, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (0, -6), (-2, -6), (-4, -7), (-5, -9), (-4, -11), (-1, -12), (2, -12), (6, -11), (9, -11), (11, -12), Raise_Pen, (6, -11), (4, -4), (2, 2), (0, 6), (-2, 8), (-4, 9), (-6, 9), (-8, 8), (-9, 6), (-9, 4), (-8, 3), (-6, 3), (-4, 4), Raise_Pen, (-1, -2), (8, -2))); Glyph_39 : aliased constant Glyph := (Number_Of_Vectors => 29, Width => 23, Height => 21, Y_Offset => -12, X_Offset => -11, Vects => (Raise_Pen, (-11, 9), (-9, 8), (-5, 4), (-2, -1), (-1, -4), (0, -8), (0, -11), (-1, -12), (-2, -12), (-3, -11), (-4, -9), (-4, -6), (-3, -4), (-1, -3), (3, -3), (6, -4), (7, -5), (8, -7), (8, -1), (7, 4), (6, 6), (4, 8), (1, 9), (-3, 9), (-6, 8), (-8, 6), (-9, 4), (-9, 2))); Glyph_40 : aliased constant Glyph := (Number_Of_Vectors => 38, Width => 24, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (-5, -5), (-7, -6), (-8, -8), (-8, -9), (-7, -11), (-5, -12), (-4, -12), (-2, -11), (-1, -9), (-1, -7), (-2, -3), (-4, 3), (-6, 7), (-8, 9), (-10, 9), (-11, 8), (-11, 6), Raise_Pen, (-5, 0), (4, -3), (6, -4), (9, -6), (11, -8), (12, -10), (12, -11), (11, -12), (10, -12), (8, -10), (6, -6), (4, 0), (3, 5), (3, 8), (4, 9), (5, 9), (7, 8), (8, 7), (10, 4))); Glyph_41 : aliased constant Glyph := (Number_Of_Vectors => 25, Width => 17, Height => 21, Y_Offset => -12, X_Offset => -9, Vects => (Raise_Pen, (5, 4), (3, 2), (1, -1), (0, -3), (-1, -6), (-1, -9), (0, -11), (1, -12), (3, -12), (4, -11), (5, -9), (5, -6), (4, -1), (2, 4), (1, 6), (-1, 8), (-3, 9), (-5, 9), (-7, 8), (-8, 6), (-8, 4), (-7, 3), (-5, 3), (-3, 4))); Glyph_42 : aliased constant Glyph := (Number_Of_Vectors => 25, Width => 15, Height => 33, Y_Offset => -12, X_Offset => -8, Vects => (Raise_Pen, (2, 12), (0, 9), (-2, 4), (-3, -2), (-3, -8), (-2, -11), (0, -12), (2, -12), (3, -11), (4, -8), (4, -5), (3, 0), (0, 9), (-2, 15), (-3, 18), (-4, 20), (-6, 21), (-7, 20), (-7, 18), (-6, 15), (-4, 12), (-2, 10), (1, 8), (5, 6))); Glyph_43 : aliased constant Glyph := (Number_Of_Vectors => 39, Width => 24, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (-5, -5), (-7, -6), (-8, -8), (-8, -9), (-7, -11), (-5, -12), (-4, -12), (-2, -11), (-1, -9), (-1, -7), (-2, -3), (-4, 3), (-6, 7), (-8, 9), (-10, 9), (-11, 8), (-11, 6), Raise_Pen, (12, -9), (12, -11), (11, -12), (10, -12), (8, -11), (6, -9), (4, -6), (2, -4), (0, -3), (-2, -3), Raise_Pen, (0, -3), (1, -1), (1, 6), (2, 8), (3, 9), (4, 9), (6, 8), (7, 7), (9, 4))); Glyph_44 : aliased constant Glyph := (Number_Of_Vectors => 29, Width => 19, Height => 21, Y_Offset => -12, X_Offset => -9, Vects => (Raise_Pen, (-5, 0), (-3, 0), (1, -1), (4, -3), (6, -5), (7, -7), (7, -10), (6, -12), (4, -12), (3, -11), (2, -9), (1, -4), (0, 1), (-1, 4), (-2, 6), (-4, 8), (-6, 9), (-8, 9), (-9, 8), (-9, 6), (-8, 5), (-6, 5), (-4, 6), (-1, 8), (2, 9), (4, 9), (7, 8), (9, 6))); Glyph_45 : aliased constant Glyph := (Number_Of_Vectors => 45, Width => 33, Height => 21, Y_Offset => -12, X_Offset => -18, Vects => (Raise_Pen, (-13, -5), (-15, -6), (-16, -8), (-16, -9), (-15, -11), (-13, -12), (-12, -12), (-10, -11), (-9, -9), (-9, -7), (-10, -2), (-11, 2), (-13, 9), Raise_Pen, (-11, 2), (-8, -6), (-6, -10), (-5, -11), (-3, -12), (-2, -12), (0, -11), (1, -9), (1, -7), (0, -2), (-1, 2), (-3, 9), Raise_Pen, (-1, 2), (2, -6), (4, -10), (5, -11), (7, -12), (8, -12), (10, -11), (11, -9), (11, -7), (10, -2), (8, 5), (8, 8), (9, 9), (10, 9), (12, 8), (13, 7), (15, 4))); Glyph_46 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 24, Height => 21, Y_Offset => -12, X_Offset => -13, Vects => (Raise_Pen, (-8, -5), (-10, -6), (-11, -8), (-11, -9), (-10, -11), (-8, -12), (-7, -12), (-5, -11), (-4, -9), (-4, -7), (-5, -2), (-6, 2), (-8, 9), Raise_Pen, (-6, 2), (-3, -6), (-1, -10), (0, -11), (2, -12), (4, -12), (6, -11), (7, -9), (7, -7), (6, -2), (4, 5), (4, 8), (5, 9), (6, 9), (8, 8), (9, 7), (11, 4))); Glyph_47 : aliased constant Glyph := (Number_Of_Vectors => 29, Width => 21, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (2, -12), (-1, -11), (-3, -9), (-5, -6), (-6, -4), (-7, 0), (-7, 4), (-6, 7), (-5, 8), (-3, 9), (-1, 9), (2, 8), (4, 6), (6, 3), (7, 1), (8, -3), (8, -7), (7, -10), (6, -11), (4, -12), (2, -12), (0, -10), (0, -7), (1, -4), (3, -1), (5, 1), (8, 3), (10, 4))); Glyph_48 : aliased constant Glyph := (Number_Of_Vectors => 31, Width => 25, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (1, -10), (2, -9), (2, -6), (1, -2), (0, 1), (-1, 3), (-3, 6), (-5, 8), (-7, 9), (-8, 9), (-9, 8), (-9, 5), (-8, 0), (-7, -3), (-6, -5), (-4, -8), (-2, -10), (0, -11), (3, -12), (8, -12), (10, -11), (11, -10), (12, -8), (12, -5), (11, -3), (10, -2), (8, -1), (5, -1), (3, -2), (2, -3))); Glyph_49 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 22, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (3, -6), (2, -4), (1, -3), (-1, -2), (-3, -2), (-4, -4), (-4, -6), (-3, -9), (-1, -11), (2, -12), (5, -12), (7, -11), (8, -9), (8, -5), (7, -2), (5, 1), (1, 5), (-2, 7), (-4, 8), (-7, 9), (-9, 9), (-10, 8), (-10, 6), (-9, 5), (-7, 5), (-5, 6), (-2, 8), (1, 9), (4, 9), (7, 8), (9, 6))); Glyph_50 : aliased constant Glyph := (Number_Of_Vectors => 38, Width => 25, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (1, -10), (2, -9), (2, -6), (1, -2), (0, 1), (-1, 3), (-3, 6), (-5, 8), (-7, 9), (-8, 9), (-9, 8), (-9, 5), (-8, 0), (-7, -3), (-6, -5), (-4, -8), (-2, -10), (0, -11), (3, -12), (7, -12), (9, -11), (10, -10), (11, -8), (11, -5), (10, -3), (9, -2), (7, -1), (4, -1), (1, -2), (2, -1), (3, 1), (3, 6), (4, 8), (6, 9), (8, 8), (9, 7), (11, 4))); Glyph_51 : aliased constant Glyph := (Number_Of_Vectors => 28, Width => 20, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (-10, 9), (-8, 8), (-6, 6), (-3, 2), (-1, -1), (1, -5), (2, -8), (2, -11), (1, -12), (0, -12), (-1, -11), (-2, -9), (-2, -7), (-1, -5), (1, -3), (4, -1), (6, 1), (7, 3), (7, 5), (6, 7), (5, 8), (2, 9), (-2, 9), (-5, 8), (-7, 6), (-8, 4), (-8, 2))); Glyph_52 : aliased constant Glyph := (Number_Of_Vectors => 25, Width => 19, Height => 21, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (0, -6), (-2, -6), (-4, -7), (-5, -9), (-4, -11), (-1, -12), (2, -12), (6, -11), (9, -11), (11, -12), Raise_Pen, (6, -11), (4, -4), (2, 2), (0, 6), (-2, 8), (-4, 9), (-6, 9), (-8, 8), (-9, 6), (-9, 4), (-8, 3), (-6, 3), (-4, 4))); Glyph_53 : aliased constant Glyph := (Number_Of_Vectors => 33, Width => 24, Height => 21, Y_Offset => -12, X_Offset => -13, Vects => (Raise_Pen, (-8, -5), (-10, -6), (-11, -8), (-11, -9), (-10, -11), (-8, -12), (-7, -12), (-5, -11), (-4, -9), (-4, -7), (-5, -3), (-6, 0), (-7, 4), (-7, 6), (-6, 8), (-4, 9), (-2, 9), (0, 8), (1, 7), (3, 3), (6, -5), (8, -12), Raise_Pen, (6, -5), (5, -1), (4, 5), (4, 8), (5, 9), (6, 9), (8, 8), (9, 7), (11, 4))); Glyph_54 : aliased constant Glyph := (Number_Of_Vectors => 32, Width => 23, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (-7, -5), (-9, -6), (-10, -8), (-10, -9), (-9, -11), (-7, -12), (-6, -12), (-4, -11), (-3, -9), (-3, -7), (-4, -3), (-5, 0), (-6, 4), (-6, 7), (-5, 9), (-3, 9), (-1, 8), (2, 5), (4, 2), (6, -2), (7, -5), (8, -9), (8, -11), (7, -12), (6, -12), (5, -11), (4, -9), (4, -7), (5, -4), (7, -2), (9, -1))); Glyph_55 : aliased constant Glyph := (Number_Of_Vectors => 25, Width => 28, Height => 21, Y_Offset => -12, X_Offset => -15, Vects => (Raise_Pen, (-10, -5), (-12, -6), (-13, -8), (-13, -9), (-12, -11), (-10, -12), (-9, -12), (-7, -11), (-6, -9), (-6, -6), (-7, 9), Raise_Pen, (3, -12), (-7, 9), Raise_Pen, (3, -12), (1, 9), Raise_Pen, (15, -12), (13, -11), (10, -8), (7, -4), (4, 2), (1, 9))); Glyph_56 : aliased constant Glyph := (Number_Of_Vectors => 36, Width => 24, Height => 21, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (-4, -6), (-6, -6), (-7, -7), (-7, -9), (-6, -11), (-4, -12), (-2, -12), (0, -11), (1, -9), (1, -6), (-1, 3), (-1, 6), (0, 8), (2, 9), (4, 9), (6, 8), (7, 6), (7, 4), (6, 3), (4, 3), Raise_Pen, (11, -9), (11, -11), (10, -12), (8, -12), (6, -11), (4, -9), (2, -6), (-2, 3), (-4, 6), (-6, 8), (-8, 9), (-10, 9), (-11, 8), (-11, 6))); Glyph_57 : aliased constant Glyph := (Number_Of_Vectors => 38, Width => 23, Height => 33, Y_Offset => -12, X_Offset => -12, Vects => (Raise_Pen, (-7, -5), (-9, -6), (-10, -8), (-10, -9), (-9, -11), (-7, -12), (-6, -12), (-4, -11), (-3, -9), (-3, -7), (-4, -3), (-5, 0), (-6, 4), (-6, 6), (-5, 8), (-4, 9), (-2, 9), (0, 8), (2, 6), (4, 3), (5, 1), (7, -5), Raise_Pen, (9, -12), (7, -5), (4, 5), (2, 11), (0, 16), (-2, 20), (-4, 21), (-5, 20), (-5, 18), (-4, 15), (-2, 12), (1, 9), (4, 7), (9, 4))); Glyph_58 : aliased constant Glyph := (Number_Of_Vectors => 40, Width => 21, Height => 33, Y_Offset => -12, X_Offset => -10, Vects => (Raise_Pen, (3, -6), (2, -4), (1, -3), (-1, -2), (-3, -2), (-4, -4), (-4, -6), (-3, -9), (-1, -11), (2, -12), (5, -12), (7, -11), (8, -9), (8, -5), (7, -2), (5, 2), (2, 5), (-2, 8), (-4, 9), (-7, 9), (-8, 8), (-8, 6), (-7, 5), (-4, 5), (-2, 6), (-1, 7), (0, 9), (0, 12), (-1, 15), (-2, 17), (-4, 20), (-6, 21), (-7, 20), (-7, 18), (-6, 15), (-4, 12), (-1, 9), (2, 7), (8, 4))); Glyph_59 : aliased constant Glyph := (Number_Of_Vectors => 12, Width => 14, Height => 32, Y_Offset => -16, X_Offset => -7, Vects => (Raise_Pen, (-3, -16), (-3, 16), Raise_Pen, (-2, -16), (-2, 16), Raise_Pen, (-3, -16), (4, -16), Raise_Pen, (-3, 16), (4, 16))); Glyph_60 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 14, Height => 24, Y_Offset => -12, X_Offset => -7, Vects => (Raise_Pen, (-7, -12), (7, 12))); Glyph_61 : aliased constant Glyph := (Number_Of_Vectors => 12, Width => 14, Height => 32, Y_Offset => -16, X_Offset => -7, Vects => (Raise_Pen, (2, -16), (2, 16), Raise_Pen, (3, -16), (3, 16), Raise_Pen, (-4, -16), (3, -16), Raise_Pen, (-4, 16), (3, 16))); Glyph_62 : aliased constant Glyph := (Number_Of_Vectors => 11, Width => 16, Height => 18, Y_Offset => -9, X_Offset => -8, Vects => (Raise_Pen, (-2, -6), (0, -9), (2, -6), Raise_Pen, (-5, -3), (0, -8), (5, -3), Raise_Pen, (0, -8), (0, 9))); Glyph_63 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 16, Height => 0, Y_Offset => 11, X_Offset => -8, Vects => (Raise_Pen, (-8, 11), (8, 11))); Glyph_64 : aliased constant Glyph := (Number_Of_Vectors => 8, Width => 11, Height => 6, Y_Offset => -12, X_Offset => -5, Vects => (Raise_Pen, (4, -12), (2, -10), (1, -8), (1, -7), (2, -6), (3, -7), (2, -8))); Glyph_65 : aliased constant Glyph := (Number_Of_Vectors => 22, Width => 16, Height => 9, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (3, 3), (2, 1), (0, 0), (-2, 0), (-4, 1), (-5, 2), (-6, 4), (-6, 6), (-5, 8), (-3, 9), (-1, 9), (1, 8), (2, 6), (4, 0), (3, 5), (3, 8), (4, 9), (5, 9), (7, 8), (8, 7), (10, 4))); Glyph_66 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 14, Height => 21, Y_Offset => -12, X_Offset => -5, Vects => (Raise_Pen, (-5, 4), (-3, 1), (0, -4), (1, -6), (2, -9), (2, -11), (1, -12), (-1, -11), (-2, -9), (-3, -5), (-4, 2), (-4, 8), (-3, 9), (-2, 9), (0, 8), (2, 6), (3, 3), (3, 0), (4, 4), (5, 5), (7, 5), (9, 4))); Glyph_67 : aliased constant Glyph := (Number_Of_Vectors => 14, Width => 11, Height => 9, Y_Offset => 0, X_Offset => -5, Vects => (Raise_Pen, (2, 2), (2, 1), (1, 0), (-1, 0), (-3, 1), (-4, 2), (-5, 4), (-5, 6), (-4, 8), (-2, 9), (1, 9), (4, 7), (6, 4))); Glyph_68 : aliased constant Glyph := (Number_Of_Vectors => 24, Width => 16, Height => 21, Y_Offset => -12, X_Offset => -6, Vects => (Raise_Pen, (3, 3), (2, 1), (0, 0), (-2, 0), (-4, 1), (-5, 2), (-6, 4), (-6, 6), (-5, 8), (-3, 9), (-1, 9), (1, 8), (2, 6), (8, -12), Raise_Pen, (4, 0), (3, 5), (3, 8), (4, 9), (5, 9), (7, 8), (8, 7), (10, 4))); Glyph_69 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 10, Height => 9, Y_Offset => 0, X_Offset => -4, Vects => (Raise_Pen, (-3, 7), (-1, 6), (0, 5), (1, 3), (1, 1), (0, 0), (-1, 0), (-3, 1), (-4, 3), (-4, 6), (-3, 8), (-1, 9), (1, 9), (3, 8), (4, 7), (6, 4))); Glyph_70 : aliased constant Glyph := (Number_Of_Vectors => 24, Width => 8, Height => 33, Y_Offset => -12, X_Offset => -3, Vects => (Raise_Pen, (-3, 4), (1, -1), (3, -4), (4, -6), (5, -9), (5, -11), (4, -12), (2, -11), (1, -9), (-1, -1), (-4, 8), (-7, 15), (-8, 18), (-8, 20), (-7, 21), (-5, 20), (-4, 17), (-3, 8), (-2, 9), (0, 9), (2, 8), (3, 7), (5, 4))); Glyph_71 : aliased constant Glyph := (Number_Of_Vectors => 28, Width => 15, Height => 21, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (3, 3), (2, 1), (0, 0), (-2, 0), (-4, 1), (-5, 2), (-6, 4), (-6, 6), (-5, 8), (-3, 9), (-1, 9), (1, 8), (2, 7), Raise_Pen, (4, 0), (2, 7), (-2, 18), (-3, 20), (-5, 21), (-6, 20), (-6, 18), (-5, 15), (-2, 12), (1, 10), (3, 9), (6, 7), (9, 4))); Glyph_72 : aliased constant Glyph := (Number_Of_Vectors => 29, Width => 15, Height => 21, Y_Offset => -12, X_Offset => -5, Vects => (Raise_Pen, (-5, 4), (-3, 1), (0, -4), (1, -6), (2, -9), (2, -11), (1, -12), (-1, -11), (-2, -9), (-3, -5), (-4, 1), (-5, 9), Raise_Pen, (-5, 9), (-4, 6), (-3, 4), (-1, 1), (1, 0), (3, 0), (4, 1), (4, 3), (3, 6), (3, 8), (4, 9), (5, 9), (7, 8), (8, 7), (10, 4))); Glyph_73 : aliased constant Glyph := (Number_Of_Vectors => 16, Width => 7, Height => 14, Y_Offset => -5, X_Offset => -2, Vects => (Raise_Pen, (1, -5), (1, -4), (2, -4), (2, -5), (1, -5), Raise_Pen, (-2, 4), (0, 0), (-2, 6), (-2, 8), (-1, 9), (0, 9), (2, 8), (3, 7), (5, 4))); Glyph_74 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 7, Height => 26, Y_Offset => -5, X_Offset => -2, Vects => (Raise_Pen, (1, -5), (1, -4), (2, -4), (2, -5), (1, -5), Raise_Pen, (-2, 4), (0, 0), (-6, 18), (-7, 20), (-9, 21), (-10, 20), (-10, 18), (-9, 15), (-6, 12), (-3, 10), (-1, 9), (2, 7), (5, 4))); Glyph_75 : aliased constant Glyph := (Number_Of_Vectors => 33, Width => 14, Height => 21, Y_Offset => -12, X_Offset => -5, Vects => (Raise_Pen, (-5, 4), (-3, 1), (0, -4), (1, -6), (2, -9), (2, -11), (1, -12), (-1, -11), (-2, -9), (-3, -5), (-4, 1), (-5, 9), Raise_Pen, (-5, 9), (-4, 6), (-3, 4), (-1, 1), (1, 0), (3, 0), (4, 1), (4, 3), (2, 4), (-1, 4), Raise_Pen, (-1, 4), (1, 5), (2, 8), (3, 9), (4, 9), (6, 8), (7, 7), (9, 4))); Glyph_76 : aliased constant Glyph := (Number_Of_Vectors => 18, Width => 8, Height => 21, Y_Offset => -12, X_Offset => -3, Vects => (Raise_Pen, (-3, 4), (-1, 1), (2, -4), (3, -6), (4, -9), (4, -11), (3, -12), (1, -11), (0, -9), (-1, -5), (-2, 2), (-2, 8), (-1, 9), (0, 9), (2, 8), (3, 7), (5, 4))); Glyph_77 : aliased constant Glyph := (Number_Of_Vectors => 33, Width => 25, Height => 9, Y_Offset => 0, X_Offset => -13, Vects => (Raise_Pen, (-13, 4), (-11, 1), (-9, 0), (-8, 1), (-8, 2), (-9, 6), (-10, 9), Raise_Pen, (-9, 6), (-8, 4), (-6, 1), (-4, 0), (-2, 0), (-1, 1), (-1, 2), (-2, 6), (-3, 9), Raise_Pen, (-2, 6), (-1, 4), (1, 1), (3, 0), (5, 0), (6, 1), (6, 3), (5, 6), (5, 8), (6, 9), (7, 9), (9, 8), (10, 7), (12, 4))); Glyph_78 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 18, Height => 9, Y_Offset => 0, X_Offset => -8, Vects => (Raise_Pen, (-8, 4), (-6, 1), (-4, 0), (-3, 1), (-3, 2), (-4, 6), (-5, 9), Raise_Pen, (-4, 6), (-3, 4), (-1, 1), (1, 0), (3, 0), (4, 1), (4, 3), (3, 6), (3, 8), (4, 9), (5, 9), (7, 8), (8, 7), (10, 4))); Glyph_79 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 14, Height => 9, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (0, 0), (-2, 0), (-4, 1), (-5, 2), (-6, 4), (-6, 6), (-5, 8), (-3, 9), (-1, 9), (1, 8), (2, 7), (3, 5), (3, 3), (2, 1), (0, 0), (-1, 1), (-1, 3), (0, 5), (2, 6), (5, 6), (7, 5), (8, 4))); Glyph_80 : aliased constant Glyph := (Number_Of_Vectors => 24, Width => 15, Height => 22, Y_Offset => -1, X_Offset => -7, Vects => (Raise_Pen, (-7, 4), (-5, 1), (-4, -1), (-5, 3), (-11, 21), Raise_Pen, (-5, 3), (-4, 1), (-2, 0), (0, 0), (2, 1), (3, 3), (3, 5), (2, 7), (1, 8), (-1, 9), Raise_Pen, (-5, 8), (-3, 9), (0, 9), (3, 8), (5, 7), (8, 4))); Glyph_81 : aliased constant Glyph := (Number_Of_Vectors => 27, Width => 15, Height => 21, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (3, 3), (2, 1), (0, 0), (-2, 0), (-4, 1), (-5, 2), (-6, 4), (-6, 6), (-5, 8), (-3, 9), (-1, 9), (1, 8), Raise_Pen, (4, 0), (3, 3), (1, 8), (-2, 15), (-3, 18), (-3, 20), (-2, 21), (0, 20), (1, 17), (1, 10), (3, 9), (6, 7), (9, 4))); Glyph_82 : aliased constant Glyph := (Number_Of_Vectors => 15, Width => 13, Height => 10, Y_Offset => -1, X_Offset => -5, Vects => (Raise_Pen, (-5, 4), (-3, 1), (-2, -1), (-2, 1), (1, 1), (2, 2), (2, 4), (1, 7), (1, 8), (2, 9), (3, 9), (5, 8), (6, 7), (8, 4))); Glyph_83 : aliased constant Glyph := (Number_Of_Vectors => 16, Width => 11, Height => 10, Y_Offset => -1, X_Offset => -4, Vects => (Raise_Pen, (-4, 4), (-2, 1), (-1, -1), (-1, 1), (1, 4), (2, 6), (2, 8), (0, 9), Raise_Pen, (-4, 8), (-2, 9), (2, 9), (4, 8), (5, 7), (7, 4))); Glyph_84 : aliased constant Glyph := (Number_Of_Vectors => 16, Width => 9, Height => 21, Y_Offset => -12, X_Offset => -3, Vects => (Raise_Pen, (-3, 4), (-1, 1), (1, -3), Raise_Pen, (4, -12), (-2, 6), (-2, 8), (-1, 9), (1, 9), (3, 8), (4, 7), (6, 4), Raise_Pen, (-2, -4), (5, -4))); Glyph_85 : aliased constant Glyph := (Number_Of_Vectors => 19, Width => 15, Height => 9, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (-6, 4), (-4, 0), (-6, 6), (-6, 8), (-5, 9), (-3, 9), (-1, 8), (1, 6), (3, 3), Raise_Pen, (4, 0), (2, 6), (2, 8), (3, 9), (4, 9), (6, 8), (7, 7), (9, 4))); Glyph_86 : aliased constant Glyph := (Number_Of_Vectors => 17, Width => 15, Height => 9, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (-6, 4), (-4, 0), (-5, 5), (-5, 8), (-4, 9), (-3, 9), (0, 8), (2, 6), (3, 3), (3, 0), Raise_Pen, (3, 0), (4, 4), (5, 5), (7, 5), (9, 4))); Glyph_87 : aliased constant Glyph := (Number_Of_Vectors => 25, Width => 21, Height => 9, Y_Offset => 0, X_Offset => -9, Vects => (Raise_Pen, (-6, 0), (-8, 2), (-9, 5), (-9, 7), (-8, 9), (-6, 9), (-4, 8), (-2, 6), Raise_Pen, (0, 0), (-2, 6), (-2, 8), (-1, 9), (1, 9), (3, 8), (5, 6), (6, 3), (6, 0), Raise_Pen, (6, 0), (7, 4), (8, 5), (10, 5), (12, 4))); Glyph_88 : aliased constant Glyph := (Number_Of_Vectors => 20, Width => 16, Height => 9, Y_Offset => 0, X_Offset => -8, Vects => (Raise_Pen, (-8, 4), (-6, 1), (-4, 0), (-2, 0), (-1, 1), (-1, 8), (0, 9), (3, 9), (6, 7), (8, 4), Raise_Pen, (5, 1), (4, 0), (2, 0), (1, 1), (-3, 8), (-4, 9), (-6, 9), (-7, 8))); Glyph_89 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 15, Height => 21, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (-6, 4), (-4, 0), (-6, 6), (-6, 8), (-5, 9), (-3, 9), (-1, 8), (1, 6), (3, 3), Raise_Pen, (4, 0), (-2, 18), (-3, 20), (-5, 21), (-6, 20), (-6, 18), (-5, 15), (-2, 12), (1, 10), (3, 9), (6, 7), (9, 4))); Glyph_90 : aliased constant Glyph := (Number_Of_Vectors => 23, Width => 14, Height => 21, Y_Offset => 0, X_Offset => -6, Vects => (Raise_Pen, (-6, 4), (-4, 1), (-2, 0), (0, 0), (2, 2), (2, 4), (1, 6), (-1, 8), (-4, 9), (-2, 10), (-1, 12), (-1, 15), (-2, 18), (-3, 20), (-5, 21), (-6, 20), (-6, 18), (-5, 15), (-2, 12), (1, 10), (5, 7), (8, 4))); Glyph_91 : aliased constant Glyph := (Number_Of_Vectors => 40, Width => 14, Height => 32, Y_Offset => -16, X_Offset => -7, Vects => (Raise_Pen, (2, -16), (0, -15), (-1, -14), (-2, -12), (-2, -10), (-1, -8), (0, -7), (1, -5), (1, -3), (-1, -1), Raise_Pen, (0, -15), (-1, -13), (-1, -11), (0, -9), (1, -8), (2, -6), (2, -4), (1, -2), (-3, 0), (1, 2), (2, 4), (2, 6), (1, 8), (0, 9), (-1, 11), (-1, 13), (0, 15), Raise_Pen, (-1, 1), (1, 3), (1, 5), (0, 7), (-1, 8), (-2, 10), (-2, 12), (-1, 14), (0, 15), (2, 16))); Glyph_92 : aliased constant Glyph := (Number_Of_Vectors => 3, Width => 8, Height => 32, Y_Offset => -16, X_Offset => -4, Vects => (Raise_Pen, (0, -16), (0, 16))); Glyph_93 : aliased constant Glyph := (Number_Of_Vectors => 40, Width => 14, Height => 32, Y_Offset => -16, X_Offset => -7, Vects => (Raise_Pen, (-2, -16), (0, -15), (1, -14), (2, -12), (2, -10), (1, -8), (0, -7), (-1, -5), (-1, -3), (1, -1), Raise_Pen, (0, -15), (1, -13), (1, -11), (0, -9), (-1, -8), (-2, -6), (-2, -4), (-1, -2), (3, 0), (-1, 2), (-2, 4), (-2, 6), (-1, 8), (0, 9), (1, 11), (1, 13), (0, 15), Raise_Pen, (1, 1), (-1, 3), (-1, 5), (0, 7), (1, 8), (2, 10), (2, 12), (1, 14), (0, 15), (-2, 16))); Glyph_94 : aliased constant Glyph := (Number_Of_Vectors => 24, Width => 24, Height => 6, Y_Offset => -3, X_Offset => -12, Vects => (Raise_Pen, (-9, 3), (-9, 1), (-8, -2), (-6, -3), (-4, -3), (-2, -2), (2, 1), (4, 2), (6, 2), (8, 1), (9, -1), Raise_Pen, (-9, 1), (-8, -1), (-6, -2), (-4, -2), (-2, -1), (2, 2), (4, 3), (6, 3), (8, 2), (9, -1), (9, -3))); Glyph_95 : aliased constant Glyph := (Number_Of_Vectors => 14, Width => 14, Height => 8, Y_Offset => -12, X_Offset => -7, Vects => (Raise_Pen, (-1, -12), (-3, -11), (-4, -9), (-4, -7), (-3, -5), (-1, -4), (1, -4), (3, -5), (4, -7), (4, -9), (3, -11), (1, -12), (-1, -12))); Font_D : aliased constant Hershey_Font := (Number_Of_Glyphs => 96, Glyphs => ( Glyph_0'Access, Glyph_1'Access, Glyph_2'Access, Glyph_3'Access, Glyph_4'Access, Glyph_5'Access, Glyph_6'Access, Glyph_7'Access, Glyph_8'Access, Glyph_9'Access, Glyph_10'Access, Glyph_11'Access, Glyph_12'Access, Glyph_13'Access, Glyph_14'Access, Glyph_15'Access, Glyph_16'Access, Glyph_17'Access, Glyph_18'Access, Glyph_19'Access, Glyph_20'Access, Glyph_21'Access, Glyph_22'Access, Glyph_23'Access, Glyph_24'Access, Glyph_25'Access, Glyph_26'Access, Glyph_27'Access, Glyph_28'Access, Glyph_29'Access, Glyph_30'Access, Glyph_31'Access, Glyph_32'Access, Glyph_33'Access, Glyph_34'Access, Glyph_35'Access, Glyph_36'Access, Glyph_37'Access, Glyph_38'Access, Glyph_39'Access, Glyph_40'Access, Glyph_41'Access, Glyph_42'Access, Glyph_43'Access, Glyph_44'Access, Glyph_45'Access, Glyph_46'Access, Glyph_47'Access, Glyph_48'Access, Glyph_49'Access, Glyph_50'Access, Glyph_51'Access, Glyph_52'Access, Glyph_53'Access, Glyph_54'Access, Glyph_55'Access, Glyph_56'Access, Glyph_57'Access, Glyph_58'Access, Glyph_59'Access, Glyph_60'Access, Glyph_61'Access, Glyph_62'Access, Glyph_63'Access, Glyph_64'Access, Glyph_65'Access, Glyph_66'Access, Glyph_67'Access, Glyph_68'Access, Glyph_69'Access, Glyph_70'Access, Glyph_71'Access, Glyph_72'Access, Glyph_73'Access, Glyph_74'Access, Glyph_75'Access, Glyph_76'Access, Glyph_77'Access, Glyph_78'Access, Glyph_79'Access, Glyph_80'Access, Glyph_81'Access, Glyph_82'Access, Glyph_83'Access, Glyph_84'Access, Glyph_85'Access, Glyph_86'Access, Glyph_87'Access, Glyph_88'Access, Glyph_89'Access, Glyph_90'Access, Glyph_91'Access, Glyph_92'Access, Glyph_93'Access, Glyph_94'Access, Glyph_95'Access ), Y_Advance => 33); Font : constant Giza.Font.Ref_Const := Font_D'Access; end Giza.Hershey_Fonts.Scripts;
package Vulkan.Low_Level is end Vulkan.Low_Level;
-------------------------------------------------------- -- E n c o d i n g s -- -- -- -- Tools for convertion strings between Unicode and -- -- national/vendor character sets. -- -- - - - - - - - - - -- -- Read copyright and license at the end of this file -- -------------------------------------------------------- with Encodings.Read; package body Encodings.Maps.Runtime is type Mapping_Access is access all Read.Mapping; Mapping_List : array (Encoding) of Mapping_Access; ------------ -- Decode -- ------------ procedure Decode (Text : in Raw_String; Text_Last : out Natural; Result : out Wide_String; Result_Last : out Natural; Map : in Encoding) is begin if Mapping_List (Map) = null then Mapping_List (Map) := new Read.Mapping'(Read.Table (File (Map))); end if; Decode (Text, Text_Last, Result, Result_Last, Forward => Mapping_List (Map).Forward); end Decode; ------------ -- Encode -- ------------ procedure Encode (Text : in Wide_String; Text_Last : out Natural; Result : out Raw_String; Result_Last : out Natural; Map : in Encoding) is begin if Mapping_List (Map) = null then Mapping_List (Map) := new Read.Mapping'(Read.Table (File (Map))); end if; Encode (Text, Text_Last, Result, Result_Last, Ranges => Mapping_List (Map).Ranges, Backward => Mapping_List (Map).Backward); end Encode; ---------- -- File -- ---------- function File (Map : Encoding) return String is -- Prefix is mirror of http://www.unicode.org/Public/MAPPINGS/ Prefix : constant String := "data/"; begin case Map is when ISO_8859_1 => return Prefix & "ISO8859/8859-1.TXT"; when ISO_8859_2 => return Prefix & "ISO8859/8859-2.TXT"; when ISO_8859_3 => return Prefix & "ISO8859/8859-3.TXT"; when ISO_8859_4 => return Prefix & "ISO8859/8859-4.TXT"; when ISO_8859_5 => return Prefix & "ISO8859/8859-5.TXT"; when ISO_8859_6 => return Prefix & "ISO8859/8859-6.TXT"; when ISO_8859_7 => return Prefix & "ISO8859/8859-7.TXT"; when ISO_8859_8 => return Prefix & "ISO8859/8859-8.TXT"; when ISO_8859_9 => return Prefix & "ISO8859/8859-9.TXT"; when ISO_8859_10 => return Prefix & "ISO8859/8859-10.TXT"; when ISO_8859_11 => return Prefix & "ISO8859/8859-11.TXT"; when ISO_8859_13 => return Prefix & "ISO8859/8859-13.TXT"; when ISO_8859_14 => return Prefix & "ISO8859/8859-14.TXT"; when ISO_8859_15 => return Prefix & "ISO8859/8859-15.TXT"; when ISO_8859_16 => return Prefix & "ISO8859/8859-16.TXT"; when CP_037 => return Prefix & "VENDORS/MICSFT/EBCDIC/CP037.TXT"; when CP_500 => return Prefix & "VENDORS/MICSFT/EBCDIC/CP500.TXT"; when CP_875 => return Prefix & "VENDORS/MICSFT/EBCDIC/CP875.TXT"; when CP_1026 => return Prefix & "VENDORS/MICSFT/EBCDIC/CP1026.TXT"; when CP_874 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP874.TXT"; when CP_1250 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1250.TXT"; when CP_1251 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1251.TXT"; when CP_1252 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1252.TXT"; when CP_1253 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1253.TXT"; when CP_1254 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1254.TXT"; when CP_1255 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1255.TXT"; when CP_1256 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1256.TXT"; when CP_1257 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1257.TXT"; when CP_1258 => return Prefix & "VENDORS/MICSFT/WINDOWS/CP1258.TXT"; when CP_437 => return Prefix & "VENDORS/MICSFT/PC/CP437.TXT"; when CP_737 => return Prefix & "VENDORS/MICSFT/PC/CP737.TXT"; when CP_775 => return Prefix & "VENDORS/MICSFT/PC/CP775.TXT"; when CP_850 => return Prefix & "VENDORS/MICSFT/PC/CP850.TXT"; when CP_852 => return Prefix & "VENDORS/MICSFT/PC/CP852.TXT"; when CP_855 => return Prefix & "VENDORS/MICSFT/PC/CP855.TXT"; when CP_857 => return Prefix & "VENDORS/MICSFT/PC/CP857.TXT"; when CP_860 => return Prefix & "VENDORS/MICSFT/PC/CP860.TXT"; when CP_861 => return Prefix & "VENDORS/MICSFT/PC/CP861.TXT"; when CP_862 => return Prefix & "VENDORS/MICSFT/PC/CP862.TXT"; when CP_863 => return Prefix & "VENDORS/MICSFT/PC/CP863.TXT"; when CP_864 => return Prefix & "VENDORS/MICSFT/PC/CP864.TXT"; when CP_865 => return Prefix & "VENDORS/MICSFT/PC/CP865.TXT"; when CP_866 => return Prefix & "VENDORS/MICSFT/PC/CP866.TXT"; when CP_869 => return Prefix & "VENDORS/MICSFT/PC/CP869.TXT"; when AtariST => return Prefix & "VENDORS/MISC/ATARIST.TXT"; when CP_1006 => return Prefix & "VENDORS/MISC/CP1006.TXT"; when CP_424 => return Prefix & "VENDORS/MISC/CP424.TXT"; when CP_856 => return Prefix & "VENDORS/MISC/CP856.TXT"; when KOI8_R => return Prefix & "VENDORS/MISC/KOI8-R.TXT"; when Unknown | UTF_8 => return ""; end case; end File; begin Encoder_List (Unknown) := Encode'Access; Decoder_List (Unknown) := Decode'Access; end Encodings.Maps.Runtime; ------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------
package Problem_07 is procedure Solve; end Problem_07;
package body Lists.dynamic is overriding function List_Constant_Reference (Container : aliased in List; Index : Index_Type) return Constant_Reference_Type is CVR : ACV.Constant_Reference_Type := Container.vec.Constant_Reference(Index); R : Constant_Reference_Type(CVR.Element); begin return R; end; overriding function List_Constant_Reference (Container : aliased in List; Position : Cursor) return Constant_Reference_Type is begin return List_Constant_Reference(Container, Position.Index); end; overriding function List_Reference (Container : aliased in out List; Index : Index_Type) return Reference_Type is VR : ACV.Reference_Type := Container.vec.Reference(Index); R : Reference_Type(VR.Element); begin return R; end; overriding function List_Reference (Container : aliased in out List; Position : Cursor) return Reference_Type is begin return List_Reference(Container, Position.Index); end; function To_Vector (Length : Index_Type) return List is L : List := (vec => ACV.To_Vector(Ada.Containers.Count_Type(Length))); begin return L; end; overriding function Iterate (Container : in List) return Iterator_Interface'Class is It : Iterator := (Container'Unrestricted_Access, Index_Base'First); begin return It; end; function Has_Element (L : List; Position : Index_Base) return Boolean is begin return ACV.Has_Element(L.vec.To_Cursor(Position)); end; overriding function First (Object : Iterator) return Cursor is C : Cursor := (Object.Container, Index_Type'First); begin return C; end; overriding function Last (Object : Iterator) return Cursor is C : Cursor := (Object.Container, List(Object.Container.all).vec.Last_Index); begin return C; end; overriding function Next (Object : Iterator; Position : Cursor) return Cursor is C : Cursor := (Object.Container, Position.Index + 1); begin return C; end; overriding function Previous (Object : Iterator; Position : Cursor) return Cursor is C : Cursor := (Object.Container, Position.Index - 1); begin return C; end; end Lists.dynamic;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada -- -- -- -- 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, 1996 -- Version Control: -- $Revision: 1.10 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ generic type T is (<>); package Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada); function Create (Set : Type_Set := Mixed_Case; Case_Sensitive : Boolean := False; Must_Be_Unique : Boolean := False) return Enumeration_Field; function Value (Fld : Field; Buf : Buffer_Number := Buffer_Number'First) return T; -- Translate the content of the fields buffer - indicated by the -- buffer number - into an enumeration value. If the buffer is empty -- or the content is invalid, a Constraint_Error is raises. end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada;
-- The Beer-Ware License (revision 42) -- -- Jacob Sparre Andersen <jacob@jacob-sparre.dk> wrote this. As long as you -- retain this notice you can do whatever you want with this stuff. If we meet -- some day, and you think this stuff is worth it, you can buy me a beer in -- return. -- -- Jacob Sparre Andersen package body Sound.ALSA is function Signed_16_Bit return snd_pcm_format_t is begin case Sound.Constants.Format_Signed_16_Bit is when Sound.Constants.Format_Signed_16_Bit_Little_Endian => return Signed_16_Bit_Little_Endian; when Sound.Constants.Format_Signed_16_Bit_Big_Endian => return Signed_16_Bit_Big_Endian; when others => raise Program_Error; end case; end Signed_16_Bit; function Unsigned_16_Bit return snd_pcm_format_t is begin case Sound.Constants.Format_Unsigned_16_Bit is when Sound.Constants.Format_Unsigned_16_Bit_Little_Endian => return Unsigned_16_Bit_Little_Endian; when Sound.Constants.Format_Unsigned_16_Bit_Big_Endian => return Unsigned_16_Bit_Big_Endian; when others => raise Program_Error; end case; end Unsigned_16_Bit; end Sound.ALSA;
------------------------------------------------------------------------------ -- -- -- 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$ ------------------------------------------------------------------------------ -- Internal table based implementation of collections of elements. ------------------------------------------------------------------------------ with AMF.Internals.Collections.Elements; package AMF.Internals.Element_Collections is function Length (Self : AMF_Collection_Of_Element) return Natural; function Element (Self : AMF_Collection_Of_Element; Index : Positive) return AMF_Element; procedure Add (Self : AMF_Collection_Of_Element; Item : AMF_Element); procedure Internal_Append (Collection : AMF_Collection_Of_Element; Element : AMF_Element; Link : AMF_Link); -- Appends element to collection. This subprogram doesn't construct link. function Wrap (Collection : AMF_Collection_Of_Element) return AMF.Internals.Collections.Elements.Shared_Element_Collection_Access; function Allocate_Collections (Count : Natural) return AMF.Internals.AMF_Collection_Of_Element; -- Allocates specified number of collections and initialize first -- allocated collection (this collection is used to handle non-owned link -- ends by convention). procedure Initialize_Ordered_Set_Collection (Element : AMF_Element; Property : CMOF_Element; Collection : AMF.Internals.AMF_Collection_Of_Element); -- Initialize specified collection as ordered set. procedure Initialize_Set_Collection (Element : AMF_Element; Property : CMOF_Element; Collection : AMF.Internals.AMF_Collection_Of_Element); -- Initialize specified collection as set. end AMF.Internals.Element_Collections;
with Ada.Text_IO; use Ada.Text_IO; procedure Saying_Hello is begin Put ("What is your name? "); declare Name : String := Get_Line; begin Put ("Hello, "); Put (Name); Put (", nice to meet you!"); end; end Saying_Hello;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ADA.NUMERICS.LONG_LONG_COMPLEX_ARRAYS -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Complex_Arrays; with Ada.Numerics.Long_Long_Real_Arrays; with Ada.Numerics.Long_Long_Complex_Types; package Ada.Numerics.Long_Long_Complex_Arrays is new Ada.Numerics.Generic_Complex_Arrays (Long_Long_Real_Arrays, Long_Long_Complex_Types); pragma Pure (Long_Long_Complex_Arrays);
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P A R . C H 5 -- -- -- -- 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. 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. -- -- -- ------------------------------------------------------------------------------ pragma Style_Checks (All_Checks); -- Turn off subprogram body ordering check. Subprograms are in order by RM -- section rather than alphabetical. with Sinfo.CN; use Sinfo.CN; separate (Par) package body Ch5 is -- Local functions, used only in this chapter function P_Case_Statement return Node_Id; function P_Case_Statement_Alternative return Node_Id; function P_Exit_Statement return Node_Id; function P_Goto_Statement return Node_Id; function P_If_Statement return Node_Id; function P_Label return Node_Id; function P_Null_Statement return Node_Id; function P_Assignment_Statement (LHS : Node_Id) return Node_Id; -- Parse assignment statement. On entry, the caller has scanned the left -- hand side (passed in as Lhs), and the colon-equal (or some symbol -- taken to be an error equivalent such as equal). function P_Begin_Statement (Block_Name : Node_Id := Empty) return Node_Id; -- Parse begin-end statement. If Block_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the block. If Block_Name is -- Empty on entry (the default), then the block statement is unlabeled. function P_Declare_Statement (Block_Name : Node_Id := Empty) return Node_Id; -- Parse declare block. If Block_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the block. If Block_Name is -- Empty on entry (the default), then the block statement is unlabeled. function P_For_Statement (Loop_Name : Node_Id := Empty) return Node_Id; -- Parse for statement. If Loop_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the loop. If Loop_Name is -- Empty on entry (the default), then the for statement is unlabeled. function P_Loop_Statement (Loop_Name : Node_Id := Empty) return Node_Id; -- Parse loop statement. If Loop_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the loop. If Loop_Name is -- Empty on entry (the default), then the loop statement is unlabeled. function P_While_Statement (Loop_Name : Node_Id := Empty) return Node_Id; -- Parse while statement. If Loop_Name is non-Empty on entry, it is -- the N_Identifier node for the label on the loop. If Loop_Name is -- Empty on entry (the default), then the while statement is unlabeled. function Set_Loop_Block_Name (L : Character) return Name_Id; -- Given a letter 'L' for a loop or 'B' for a block, returns a name -- of the form L_nn or B_nn where nn is a serial number obtained by -- incrementing the variable Loop_Block_Count. procedure Then_Scan; -- Scan past THEN token, testing for illegal junk after it --------------------------------- -- 5.1 Sequence of Statements -- --------------------------------- -- SEQUENCE_OF_STATEMENTS ::= STATEMENT {STATEMENT} {LABEL} -- Note: the final label is an Ada 2012 addition. -- STATEMENT ::= -- {LABEL} SIMPLE_STATEMENT | {LABEL} COMPOUND_STATEMENT -- SIMPLE_STATEMENT ::= NULL_STATEMENT -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT -- | REQUEUE_STATEMENT | DELAY_STATEMENT -- | ABORT_STATEMENT | RAISE_STATEMENT -- | CODE_STATEMENT -- COMPOUND_STATEMENT ::= -- IF_STATEMENT | CASE_STATEMENT -- | LOOP_STATEMENT | BLOCK_STATEMENT -- | ACCEPT_STATEMENT | SELECT_STATEMENT -- This procedure scans a sequence of statements. The caller sets SS_Flags -- to indicate acceptable termination conditions for the sequence: -- SS_Flags.Eftm Terminate on ELSIF -- SS_Flags.Eltm Terminate on ELSE -- SS_Flags.Extm Terminate on EXCEPTION -- SS_Flags.Ortm Terminate on OR -- SS_Flags.Tatm Terminate on THEN ABORT (Token = ABORT on return) -- SS_Flags.Whtm Terminate on WHEN -- SS_Flags.Unco Unconditional terminate after scanning one statement -- In addition, the scan is always terminated by encountering END or the -- end of file (EOF) condition. If one of the six above terminators is -- encountered with the corresponding SS_Flags flag not set, then the -- action taken is as follows: -- If the keyword occurs to the left of the expected column of the end -- for the current sequence (as recorded in the current end context), -- then it is assumed to belong to an outer context, and is considered -- to terminate the sequence of statements. -- If the keyword occurs to the right of, or in the expected column of -- the end for the current sequence, then an error message is output, -- the keyword together with its associated context is skipped, and -- the statement scan continues until another terminator is found. -- Note that the first action means that control can return to the caller -- with Token set to a terminator other than one of those specified by the -- SS parameter. The caller should treat such a case as equivalent to END. -- In addition, the flag SS_Flags.Sreq is set to True to indicate that at -- least one real statement (other than a pragma) is required in the -- statement sequence. During the processing of the sequence, this -- flag is manipulated to indicate the current status of the requirement -- for a statement. For example, it is turned off by the occurrence of a -- statement, and back on by a label (which requires a following statement) -- Error recovery: cannot raise Error_Resync. If an error occurs during -- parsing a statement, then the scan pointer is advanced past the next -- semicolon and the parse continues. function P_Sequence_Of_Statements (SS_Flags : SS_Rec) return List_Id is Statement_Required : Boolean; -- This flag indicates if a subsequent statement (other than a pragma) -- is required. It is initialized from the Sreq flag, and modified as -- statements are scanned (a statement turns it off, and a label turns -- it back on again since a statement must follow a label). -- Note : this final requirement is lifted in Ada 2012. Statement_Seen : Boolean; -- In Ada 2012, a label can end a sequence of statements, but the -- sequence cannot contain only labels. This flag is set whenever a -- label is encountered, to enforce this rule at the end of a sequence. Declaration_Found : Boolean := False; -- This flag is set True if a declaration is encountered, so that the -- error message about declarations in the statement part is only -- given once for a given sequence of statements. Scan_State_Label : Saved_Scan_State; Scan_State : Saved_Scan_State; Statement_List : List_Id; Block_Label : Name_Id; Id_Node : Node_Id; Name_Node : Node_Id; procedure Junk_Declaration; -- Procedure called to handle error of declaration encountered in -- statement sequence. procedure Test_Statement_Required; -- Flag error if Statement_Required flag set ---------------------- -- Junk_Declaration -- ---------------------- procedure Junk_Declaration is begin if (not Declaration_Found) or All_Errors_Mode then Error_Msg_SC -- CODEFIX ("declarations must come before BEGIN"); Declaration_Found := True; end if; Skip_Declaration (Statement_List); end Junk_Declaration; ----------------------------- -- Test_Statement_Required -- ----------------------------- procedure Test_Statement_Required is function All_Pragmas return Boolean; -- Return True if statement list is all pragmas ----------------- -- All_Pragmas -- ----------------- function All_Pragmas return Boolean is S : Node_Id; begin S := First (Statement_List); while Present (S) loop if Nkind (S) /= N_Pragma then return False; else Next (S); end if; end loop; return True; end All_Pragmas; -- Start of processing for Test_Statement_Required begin if Statement_Required then -- Check no statement required after label in Ada 2012, and that -- it is OK to have nothing but pragmas in a statement sequence. if Ada_Version >= Ada_2012 and then not Is_Empty_List (Statement_List) and then ((Nkind (Last (Statement_List)) = N_Label and then Statement_Seen) or else All_Pragmas) then -- This Ada 2012 construct not allowed in a compiler unit Check_Compiler_Unit ("null statement list", Token_Ptr); declare Null_Stm : constant Node_Id := Make_Null_Statement (Token_Ptr); begin Set_Comes_From_Source (Null_Stm, False); Append_To (Statement_List, Null_Stm); end; -- If not Ada 2012, or not special case above, give error message else Error_Msg_BC -- CODEFIX ("statement expected"); end if; end if; end Test_Statement_Required; -- Start of processing for P_Sequence_Of_Statements begin Statement_List := New_List; Statement_Required := SS_Flags.Sreq; Statement_Seen := False; loop Ignore (Tok_Semicolon); begin if Style_Check then Style.Check_Indentation; end if; -- Deal with reserved identifier (in assignment or call) if Is_Reserved_Identifier then Save_Scan_State (Scan_State); -- at possible bad identifier Scan; -- and scan past it -- We have an reserved word which is spelled in identifier -- style, so the question is whether it really is intended -- to be an identifier. if -- If followed by a semicolon, then it is an identifier, -- with the exception of the cases tested for below. (Token = Tok_Semicolon and then Prev_Token /= Tok_Return and then Prev_Token /= Tok_Null and then Prev_Token /= Tok_Raise and then Prev_Token /= Tok_End and then Prev_Token /= Tok_Exit) -- If followed by colon, colon-equal, or dot, then we -- definitely have an identifier (could not be reserved) or else Token = Tok_Colon or else Token = Tok_Colon_Equal or else Token = Tok_Dot -- Left paren means we have an identifier except for those -- reserved words that can legitimately be followed by a -- left paren. or else (Token = Tok_Left_Paren and then Prev_Token /= Tok_Case and then Prev_Token /= Tok_Delay and then Prev_Token /= Tok_If and then Prev_Token /= Tok_Elsif and then Prev_Token /= Tok_Return and then Prev_Token /= Tok_When and then Prev_Token /= Tok_While and then Prev_Token /= Tok_Separate) then -- Here we have an apparent reserved identifier and the -- token past it is appropriate to this usage (and would -- be a definite error if this is not an identifier). What -- we do is to use P_Identifier to fix up the identifier, -- and then fall into the normal processing. Restore_Scan_State (Scan_State); -- back to the ID Scan_Reserved_Identifier (Force_Msg => False); -- Not a reserved identifier after all (or at least we can't -- be sure that it is), so reset the scan and continue. else Restore_Scan_State (Scan_State); -- back to the reserved word end if; end if; -- Now look to see what kind of statement we have case Token is -- Case of end or EOF when Tok_End | Tok_EOF => -- These tokens always terminate the statement sequence Test_Statement_Required; exit; -- Case of ELSIF when Tok_Elsif => -- Terminate if Eftm set or if the ELSIF is to the left -- of the expected column of the end for this sequence if SS_Flags.Eftm or else Start_Column < Scopes (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip past ELSIF Condition then else Error_Msg_SC ("ELSIF not allowed here"); Scan; -- past ELSIF Discard_Junk_Node (P_Expression_No_Right_Paren); Then_Scan; Statement_Required := False; end if; -- Case of ELSE when Tok_Else => -- Terminate if Eltm set or if the else is to the left -- of the expected column of the end for this sequence if SS_Flags.Eltm or else Start_Column < Scopes (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip past else else Error_Msg_SC ("ELSE not allowed here"); Scan; -- past ELSE Statement_Required := False; end if; -- Case of exception when Tok_Exception => Test_Statement_Required; -- If Extm not set and the exception is not to the left of -- the expected column of the end for this sequence, then we -- assume it belongs to the current sequence, even though it -- is not permitted. if not SS_Flags.Extm and then Start_Column >= Scopes (Scope.Last).Ecol then Error_Msg_SC ("exception handler not permitted here"); Scan; -- past EXCEPTION Discard_Junk_List (Parse_Exception_Handlers); end if; -- Always return, in the case where we scanned out handlers -- that we did not expect, Parse_Exception_Handlers returned -- with Token being either end or EOF, so we are OK. exit; -- Case of OR when Tok_Or => -- Terminate if Ortm set or if the or is to the left of the -- expected column of the end for this sequence. if SS_Flags.Ortm or else Start_Column < Scopes (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip past or else Error_Msg_SC ("OR not allowed here"); Scan; -- past or Statement_Required := False; end if; -- Case of THEN (deal also with THEN ABORT) when Tok_Then => Save_Scan_State (Scan_State); -- at THEN Scan; -- past THEN -- Terminate if THEN ABORT allowed (ATC case) exit when SS_Flags.Tatm and then Token = Tok_Abort; -- Otherwise we treat THEN as some kind of mess where we did -- not see the associated IF, but we pick up assuming it had -- been there. Restore_Scan_State (Scan_State); -- to THEN Append_To (Statement_List, P_If_Statement); Statement_Required := False; -- Case of WHEN (error because we are not in a case) when Tok_Others | Tok_When => -- Terminate if Whtm set or if the WHEN is to the left of -- the expected column of the end for this sequence. if SS_Flags.Whtm or else Start_Column < Scopes (Scope.Last).Ecol then Test_Statement_Required; exit; -- Otherwise complain and skip when Choice {| Choice} => else Error_Msg_SC ("WHEN not allowed here"); Scan; -- past when Discard_Junk_List (P_Discrete_Choice_List); TF_Arrow; Statement_Required := False; end if; -- Cases of statements starting with an identifier when Tok_Identifier => Check_Bad_Layout; -- Save scan pointers and line number in case block label Id_Node := Token_Node; Block_Label := Token_Name; Save_Scan_State (Scan_State_Label); -- at possible label Scan; -- past Id -- Check for common case of assignment, since it occurs -- frequently, and we want to process it efficiently. if Token = Tok_Colon_Equal then Scan; -- past the colon-equal Append_To (Statement_List, P_Assignment_Statement (Id_Node)); Statement_Required := False; -- Check common case of procedure call, another case that -- we want to speed up as much as possible. elsif Token = Tok_Semicolon then Change_Name_To_Procedure_Call_Statement (Id_Node); Append_To (Statement_List, Id_Node); Scan; -- past semicolon Statement_Required := False; -- Here is the special test for a suspicious label, more -- accurately a suspicious name, which we think perhaps -- should have been a label. If next token is one of -- LOOP, FOR, WHILE, DECLARE, BEGIN, then make an entry -- in the suspicious label table. if Token = Tok_Loop or else Token = Tok_For or else Token = Tok_While or else Token = Tok_Declare or else Token = Tok_Begin then Suspicious_Labels.Append ((Proc_Call => Id_Node, Semicolon_Loc => Prev_Token_Ptr, Start_Token => Token_Ptr)); end if; -- Check for case of "go to" in place of "goto" elsif Token = Tok_Identifier and then Block_Label = Name_Go and then Token_Name = Name_To then Error_Msg_SP -- CODEFIX ("goto is one word"); Append_To (Statement_List, P_Goto_Statement); Statement_Required := False; -- Check common case of = used instead of :=, just so we -- give a better error message for this special misuse. elsif Token = Tok_Equal then T_Colon_Equal; -- give := expected message Append_To (Statement_List, P_Assignment_Statement (Id_Node)); Statement_Required := False; -- Check case of loop label or block label elsif Token = Tok_Colon or else (Token in Token_Class_Labeled_Stmt and then not Token_Is_At_Start_Of_Line) then T_Colon; -- past colon (if there, or msg for missing one) -- Test for more than one label loop exit when Token /= Tok_Identifier; Save_Scan_State (Scan_State); -- at second Id Scan; -- past Id if Token = Tok_Colon then Error_Msg_SP ("only one label allowed on block or loop"); Scan; -- past colon on extra label -- Use the second label as the "real" label Scan_State_Label := Scan_State; -- We will set Error_name as the Block_Label since -- we really don't know which of the labels might -- be used at the end of the loop or block. Block_Label := Error_Name; -- If Id with no colon, then backup to point to the -- Id and we will issue the message below when we try -- to scan out the statement as some other form. else Restore_Scan_State (Scan_State); -- to second Id exit; end if; end loop; -- Loop_Statement (labeled Loop_Statement) if Token = Tok_Loop then Append_To (Statement_List, P_Loop_Statement (Id_Node)); -- While statement (labeled loop statement with WHILE) elsif Token = Tok_While then Append_To (Statement_List, P_While_Statement (Id_Node)); -- Declare statement (labeled block statement with -- DECLARE part) elsif Token = Tok_Declare then Append_To (Statement_List, P_Declare_Statement (Id_Node)); -- Begin statement (labeled block statement with no -- DECLARE part) elsif Token = Tok_Begin then Append_To (Statement_List, P_Begin_Statement (Id_Node)); -- For statement (labeled loop statement with FOR) elsif Token = Tok_For then Append_To (Statement_List, P_For_Statement (Id_Node)); -- Improper statement follows label. If we have an -- expression token, then assume the colon was part -- of a misplaced declaration. elsif Token not in Token_Class_Eterm then Restore_Scan_State (Scan_State_Label); Junk_Declaration; -- Otherwise complain we have inappropriate statement else Error_Msg_AP ("loop or block statement must follow label"); end if; Statement_Required := False; -- Here we have an identifier followed by something -- other than a colon, semicolon or assignment symbol. -- The only valid possibility is a name extension symbol elsif Token in Token_Class_Namext then Restore_Scan_State (Scan_State_Label); -- to Id Name_Node := P_Name; -- Skip junk right parens in this context Ignore (Tok_Right_Paren); -- Check context following call if Token = Tok_Colon_Equal then Scan; -- past colon equal Append_To (Statement_List, P_Assignment_Statement (Name_Node)); Statement_Required := False; -- Check common case of = used instead of := elsif Token = Tok_Equal then T_Colon_Equal; -- give := expected message Append_To (Statement_List, P_Assignment_Statement (Name_Node)); Statement_Required := False; -- Check apostrophe cases elsif Token = Tok_Apostrophe then Append_To (Statement_List, P_Code_Statement (Name_Node)); Statement_Required := False; -- The only other valid item after a name is ; which -- means that the item we just scanned was a call. elsif Token = Tok_Semicolon then Change_Name_To_Procedure_Call_Statement (Name_Node); Append_To (Statement_List, Name_Node); Scan; -- past semicolon Statement_Required := False; -- A slash following an identifier or a selected -- component in this situation is most likely a period -- (see location of keys on keyboard). elsif Token = Tok_Slash and then (Nkind (Name_Node) = N_Identifier or else Nkind (Name_Node) = N_Selected_Component) then Error_Msg_SC -- CODEFIX ("""/"" should be ""."""); Statement_Required := False; raise Error_Resync; -- Else we have a missing semicolon else TF_Semicolon; -- Normal processing as though semicolon were present Change_Name_To_Procedure_Call_Statement (Name_Node); Append_To (Statement_List, Name_Node); Statement_Required := False; end if; -- If junk after identifier, check if identifier is an -- instance of an incorrectly spelled keyword. If so, we -- do nothing. The Bad_Spelling_Of will have reset Token -- to the appropriate keyword, so the next time round the -- loop we will process the modified token. Note that we -- check for ELSIF before ELSE here. That's not accidental. -- We don't want to identify a misspelling of ELSE as -- ELSIF, and in particular we do not want to treat ELSEIF -- as ELSE IF. else Restore_Scan_State (Scan_State_Label); -- to identifier if Bad_Spelling_Of (Tok_Abort) or else Bad_Spelling_Of (Tok_Accept) or else Bad_Spelling_Of (Tok_Case) or else Bad_Spelling_Of (Tok_Declare) or else Bad_Spelling_Of (Tok_Delay) or else Bad_Spelling_Of (Tok_Elsif) or else Bad_Spelling_Of (Tok_Else) or else Bad_Spelling_Of (Tok_End) or else Bad_Spelling_Of (Tok_Exception) or else Bad_Spelling_Of (Tok_Exit) or else Bad_Spelling_Of (Tok_For) or else Bad_Spelling_Of (Tok_Goto) or else Bad_Spelling_Of (Tok_If) or else Bad_Spelling_Of (Tok_Loop) or else Bad_Spelling_Of (Tok_Or) or else Bad_Spelling_Of (Tok_Pragma) or else Bad_Spelling_Of (Tok_Raise) or else Bad_Spelling_Of (Tok_Requeue) or else Bad_Spelling_Of (Tok_Return) or else Bad_Spelling_Of (Tok_Select) or else Bad_Spelling_Of (Tok_When) or else Bad_Spelling_Of (Tok_While) then null; -- If not a bad spelling, then we really have junk else Scan; -- past identifier again -- If next token is first token on line, then we -- consider that we were missing a semicolon after -- the identifier, and process it as a procedure -- call with no parameters. if Token_Is_At_Start_Of_Line then Change_Name_To_Procedure_Call_Statement (Id_Node); Append_To (Statement_List, Id_Node); T_Semicolon; -- to give error message Statement_Required := False; -- Otherwise we give a missing := message and -- simply abandon the junk that is there now. else T_Colon_Equal; -- give := expected message raise Error_Resync; end if; end if; end if; -- Statement starting with operator symbol. This could be -- a call, a name starting an assignment, or a qualified -- expression. when Tok_Operator_Symbol => Check_Bad_Layout; Name_Node := P_Name; -- An attempt at a range attribute or a qualified expression -- must be illegal here (a code statement cannot possibly -- allow qualification by a function name). if Token = Tok_Apostrophe then Error_Msg_SC ("apostrophe illegal here"); raise Error_Resync; end if; -- Scan possible assignment if we have a name if Expr_Form = EF_Name and then Token = Tok_Colon_Equal then Scan; -- past colon equal Append_To (Statement_List, P_Assignment_Statement (Name_Node)); else Change_Name_To_Procedure_Call_Statement (Name_Node); Append_To (Statement_List, Name_Node); end if; TF_Semicolon; Statement_Required := False; -- Label starting with << which must precede real statement -- Note: in Ada 2012, the label may end the sequence. when Tok_Less_Less => if Present (Last (Statement_List)) and then Nkind (Last (Statement_List)) /= N_Label then Statement_Seen := True; end if; Append_To (Statement_List, P_Label); Statement_Required := True; -- Pragma appearing as a statement in a statement sequence when Tok_Pragma => Check_Bad_Layout; Append_To (Statement_List, P_Pragma); -- Abort_Statement when Tok_Abort => Check_Bad_Layout; Append_To (Statement_List, P_Abort_Statement); Statement_Required := False; -- Accept_Statement when Tok_Accept => Check_Bad_Layout; Append_To (Statement_List, P_Accept_Statement); Statement_Required := False; -- Begin_Statement (Block_Statement with no declare, no label) when Tok_Begin => Check_Bad_Layout; Append_To (Statement_List, P_Begin_Statement); Statement_Required := False; -- Case_Statement when Tok_Case => Check_Bad_Layout; Append_To (Statement_List, P_Case_Statement); Statement_Required := False; -- Block_Statement with DECLARE and no label when Tok_Declare => Check_Bad_Layout; Append_To (Statement_List, P_Declare_Statement); Statement_Required := False; -- Delay_Statement when Tok_Delay => Check_Bad_Layout; Append_To (Statement_List, P_Delay_Statement); Statement_Required := False; -- Exit_Statement when Tok_Exit => Check_Bad_Layout; Append_To (Statement_List, P_Exit_Statement); Statement_Required := False; -- Loop_Statement with FOR and no label when Tok_For => Check_Bad_Layout; Append_To (Statement_List, P_For_Statement); Statement_Required := False; -- Goto_Statement when Tok_Goto => Check_Bad_Layout; Append_To (Statement_List, P_Goto_Statement); Statement_Required := False; -- If_Statement when Tok_If => Check_Bad_Layout; Append_To (Statement_List, P_If_Statement); Statement_Required := False; -- Loop_Statement when Tok_Loop => Check_Bad_Layout; Append_To (Statement_List, P_Loop_Statement); Statement_Required := False; -- Null_Statement when Tok_Null => Check_Bad_Layout; Append_To (Statement_List, P_Null_Statement); Statement_Required := False; -- Raise_Statement when Tok_Raise => Check_Bad_Layout; Append_To (Statement_List, P_Raise_Statement); Statement_Required := False; -- Requeue_Statement when Tok_Requeue => Check_Bad_Layout; Append_To (Statement_List, P_Requeue_Statement); Statement_Required := False; -- Return_Statement when Tok_Return => Check_Bad_Layout; Append_To (Statement_List, P_Return_Statement); Statement_Required := False; -- Select_Statement when Tok_Select => Check_Bad_Layout; Append_To (Statement_List, P_Select_Statement); Statement_Required := False; -- While_Statement (Block_Statement with while and no loop) when Tok_While => Check_Bad_Layout; Append_To (Statement_List, P_While_Statement); Statement_Required := False; -- Anything else is some kind of junk, signal an error message -- and then raise Error_Resync, to merge with the normal -- handling of a bad statement. when others => if Token in Token_Class_Declk then Junk_Declaration; else Error_Msg_BC -- CODEFIX ("statement expected"); raise Error_Resync; end if; end case; -- On error resynchronization, skip past next semicolon, and, since -- we are still in the statement loop, look for next statement. We -- set Statement_Required False to avoid an unnecessary error message -- complaining that no statement was found (i.e. we consider the -- junk to satisfy the requirement for a statement being present). exception when Error_Resync => Resync_Past_Semicolon_Or_To_Loop_Or_Then; Statement_Required := False; end; exit when SS_Flags.Unco; end loop; return Statement_List; end P_Sequence_Of_Statements; -------------------- -- 5.1 Statement -- -------------------- --------------------------- -- 5.1 Simple Statement -- --------------------------- -- Parsed by P_Sequence_Of_Statements (5.1) ----------------------------- -- 5.1 Compound Statement -- ----------------------------- -- Parsed by P_Sequence_Of_Statements (5.1) ------------------------- -- 5.1 Null Statement -- ------------------------- -- NULL_STATEMENT ::= null; -- The caller has already checked that the current token is null -- Error recovery: cannot raise Error_Resync function P_Null_Statement return Node_Id is Null_Stmt_Node : Node_Id; begin Null_Stmt_Node := New_Node (N_Null_Statement, Token_Ptr); Scan; -- past NULL TF_Semicolon; return Null_Stmt_Node; end P_Null_Statement; ---------------- -- 5.1 Label -- ---------------- -- LABEL ::= <<label_STATEMENT_IDENTIFIER>> -- STATEMENT_IDENTIFIER ::= DIRECT_NAME -- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier -- (not an OPERATOR_SYMBOL) -- The caller has already checked that the current token is << -- Error recovery: can raise Error_Resync function P_Label return Node_Id is Label_Node : Node_Id; begin Label_Node := New_Node (N_Label, Token_Ptr); Scan; -- past << Set_Identifier (Label_Node, P_Identifier (C_Greater_Greater)); T_Greater_Greater; Append_Elmt (Label_Node, Label_List); return Label_Node; end P_Label; ------------------------------- -- 5.1 Statement Identifier -- ------------------------------- -- Statement label is parsed by P_Label (5.1) -- Loop label is parsed by P_Loop_Statement (5.5), P_For_Statement (5.5) -- or P_While_Statement (5.5) -- Block label is parsed by P_Begin_Statement (5.6) or -- P_Declare_Statement (5.6) ------------------------------- -- 5.2 Assignment Statement -- ------------------------------- -- ASSIGNMENT_STATEMENT ::= -- variable_NAME := EXPRESSION; -- Error recovery: can raise Error_Resync function P_Assignment_Statement (LHS : Node_Id) return Node_Id is Assign_Node : Node_Id; begin Assign_Node := New_Node (N_Assignment_Statement, Prev_Token_Ptr); Current_Assign_Node := Assign_Node; Set_Name (Assign_Node, LHS); Set_Expression (Assign_Node, P_Expression_No_Right_Paren); TF_Semicolon; Current_Assign_Node := Empty; return Assign_Node; end P_Assignment_Statement; ----------------------- -- 5.3 If Statement -- ----------------------- -- IF_STATEMENT ::= -- if CONDITION then -- SEQUENCE_OF_STATEMENTS -- {elsif CONDITION then -- SEQUENCE_OF_STATEMENTS} -- [else -- SEQUENCE_OF_STATEMENTS] -- end if; -- The caller has checked that the initial token is IF (or in the error -- case of a mysterious THEN, the initial token may simply be THEN, in -- which case, no condition (or IF) was scanned). -- Error recovery: can raise Error_Resync function P_If_Statement return Node_Id is If_Node : Node_Id; Elsif_Node : Node_Id; Loc : Source_Ptr; procedure Add_Elsif_Part; -- An internal procedure used to scan out a single ELSIF part. On entry -- the ELSIF (or an ELSE which has been determined should be ELSIF) is -- scanned out and is in Prev_Token. procedure Check_If_Column; -- An internal procedure used to check that THEN, ELSE, or ELSIF -- appear in the right place if column checking is enabled (i.e. if -- they are the first token on the line, then they must appear in -- the same column as the opening IF). procedure Check_Then_Column; -- This procedure carries out the style checks for a THEN token -- Note that the caller has set Loc to the Source_Ptr value for -- the previous IF or ELSIF token. function Else_Should_Be_Elsif return Boolean; -- An internal routine used to do a special error recovery check when -- an ELSE is encountered. It determines if the ELSE should be treated -- as an ELSIF. A positive decision (TRUE returned, is made if the ELSE -- is followed by a sequence of tokens, starting on the same line as -- the ELSE, which are not expression terminators, followed by a THEN. -- On entry, the ELSE has been scanned out. procedure Add_Elsif_Part is begin if No (Elsif_Parts (If_Node)) then Set_Elsif_Parts (If_Node, New_List); end if; Elsif_Node := New_Node (N_Elsif_Part, Prev_Token_Ptr); Loc := Prev_Token_Ptr; Set_Condition (Elsif_Node, P_Condition); Check_Then_Column; Then_Scan; Set_Then_Statements (Elsif_Node, P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq)); Append (Elsif_Node, Elsif_Parts (If_Node)); end Add_Elsif_Part; procedure Check_If_Column is begin if RM_Column_Check and then Token_Is_At_Start_Of_Line and then Start_Column /= Scopes (Scope.Last).Ecol then Error_Msg_Col := Scopes (Scope.Last).Ecol; Error_Msg_SC ("(style) this token should be@"); end if; end Check_If_Column; procedure Check_Then_Column is begin if Token = Tok_Then then Check_If_Column; if Style_Check then Style.Check_Then (Loc); end if; end if; end Check_Then_Column; function Else_Should_Be_Elsif return Boolean is Scan_State : Saved_Scan_State; begin if Token_Is_At_Start_Of_Line then return False; else Save_Scan_State (Scan_State); loop if Token in Token_Class_Eterm then Restore_Scan_State (Scan_State); return False; else Scan; -- past non-expression terminating token if Token = Tok_Then then Restore_Scan_State (Scan_State); return True; end if; end if; end loop; end if; end Else_Should_Be_Elsif; -- Start of processing for P_If_Statement begin If_Node := New_Node (N_If_Statement, Token_Ptr); Push_Scope_Stack; Scopes (Scope.Last).Etyp := E_If; Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Sloc := Token_Ptr; Scopes (Scope.Last).Labl := Error; Scopes (Scope.Last).Node := If_Node; if Token = Tok_If then Loc := Token_Ptr; Scan; -- past IF Set_Condition (If_Node, P_Condition); -- Deal with misuse of IF expression => used instead -- of WHEN expression => if Token = Tok_Arrow then Error_Msg_SC -- CODEFIX ("THEN expected"); Scan; -- past the arrow Pop_Scope_Stack; -- remove unneeded entry raise Error_Resync; end if; Check_Then_Column; else Error_Msg_SC ("no IF for this THEN"); Set_Condition (If_Node, Error); end if; Then_Scan; Set_Then_Statements (If_Node, P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq)); -- This loop scans out else and elsif parts loop if Token = Tok_Elsif then Check_If_Column; if Present (Else_Statements (If_Node)) then Error_Msg_SP ("ELSIF cannot appear after ELSE"); end if; Scan; -- past ELSIF Add_Elsif_Part; elsif Token = Tok_Else then Check_If_Column; Scan; -- past ELSE if Else_Should_Be_Elsif then Error_Msg_SP -- CODEFIX ("ELSE should be ELSIF"); Add_Elsif_Part; else -- Here we have an else that really is an else if Present (Else_Statements (If_Node)) then Error_Msg_SP ("only one ELSE part allowed"); Append_List (P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq), Else_Statements (If_Node)); else Set_Else_Statements (If_Node, P_Sequence_Of_Statements (SS_Eftm_Eltm_Sreq)); end if; end if; -- If anything other than ELSE or ELSIF, exit the loop. The token -- had better be END (and in fact it had better be END IF), but -- we will let End_Statements take care of checking that. else exit; end if; end loop; End_Statements; return If_Node; end P_If_Statement; -------------------- -- 5.3 Condition -- -------------------- -- CONDITION ::= boolean_EXPRESSION function P_Condition return Node_Id is begin return P_Condition (P_Expression_No_Right_Paren); end P_Condition; function P_Condition (Cond : Node_Id) return Node_Id is begin -- It is never possible for := to follow a condition, so if we get -- a := we assume it is a mistyped equality. Note that we do not try -- to reconstruct the tree correctly in this case, but we do at least -- give an accurate error message. if Token = Tok_Colon_Equal then while Token = Tok_Colon_Equal loop Error_Msg_SC -- CODEFIX (""":="" should be ""="""); Scan; -- past junk := Discard_Junk_Node (P_Expression_No_Right_Paren); end loop; return Cond; -- Otherwise check for redundant parentheses -- If the condition is a conditional or a quantified expression, it is -- parenthesized in the context of a condition, because of a separate -- syntax rule. else if Style_Check and then Paren_Count (Cond) > 0 then if Nkind (Cond) not in N_If_Expression | N_Case_Expression | N_Quantified_Expression or else Paren_Count (Cond) > 1 then Style.Check_Xtra_Parens (First_Sloc (Cond)); end if; end if; -- And return the result return Cond; end if; end P_Condition; ------------------------- -- 5.4 Case Statement -- ------------------------- -- CASE_STATEMENT ::= -- case EXPRESSION is -- CASE_STATEMENT_ALTERNATIVE -- {CASE_STATEMENT_ALTERNATIVE} -- end case; -- The caller has checked that the first token is CASE -- Can raise Error_Resync function P_Case_Statement return Node_Id is Case_Node : Node_Id; Alternatives_List : List_Id; First_When_Loc : Source_Ptr; begin Case_Node := New_Node (N_Case_Statement, Token_Ptr); Push_Scope_Stack; Scopes (Scope.Last).Etyp := E_Case; Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Sloc := Token_Ptr; Scopes (Scope.Last).Labl := Error; Scopes (Scope.Last).Node := Case_Node; Scan; -- past CASE Set_Expression (Case_Node, P_Expression_No_Right_Paren); TF_Is; -- Prepare to parse case statement alternatives Alternatives_List := New_List; P_Pragmas_Opt (Alternatives_List); First_When_Loc := Token_Ptr; -- Loop through case statement alternatives loop -- If we have a WHEN or OTHERS, then that's fine keep going. Note -- that it is a semantic check to ensure the proper use of OTHERS if Token = Tok_When or else Token = Tok_Others then Append (P_Case_Statement_Alternative, Alternatives_List); -- If we have an END, then probably we are at the end of the case -- but we only exit if Check_End thinks the END was reasonable. elsif Token = Tok_End then exit when Check_End; -- Here if token is other than WHEN, OTHERS or END. We definitely -- have an error, but the question is whether or not to get out of -- the case statement. We don't want to get out early, or we will -- get a slew of junk error messages for subsequent when tokens. -- If the token is not at the start of the line, or if it is indented -- with respect to the current case statement, then the best guess is -- that we are still supposed to be inside the case statement. We -- complain about the missing WHEN, and discard the junk statements. elsif not Token_Is_At_Start_Of_Line or else Start_Column > Scopes (Scope.Last).Ecol then Error_Msg_BC ("WHEN (case statement alternative) expected"); -- Here is a possibility for infinite looping if we don't make -- progress. So try to process statements, otherwise exit declare Error_Ptr : constant Source_Ptr := Scan_Ptr; begin Discard_Junk_List (P_Sequence_Of_Statements (SS_Whtm)); exit when Scan_Ptr = Error_Ptr and then Check_End; end; -- Here we have a junk token at the start of the line and it is -- not indented. If Check_End thinks there is a missing END, then -- we will get out of the case, otherwise we keep going. else exit when Check_End; end if; end loop; -- Make sure we have at least one alternative if No (First_Non_Pragma (Alternatives_List)) then Error_Msg ("WHEN expected, must have at least one alternative in case", First_When_Loc); return Error; else Set_Alternatives (Case_Node, Alternatives_List); return Case_Node; end if; end P_Case_Statement; ------------------------------------- -- 5.4 Case Statement Alternative -- ------------------------------------- -- CASE_STATEMENT_ALTERNATIVE ::= -- when DISCRETE_CHOICE_LIST => -- SEQUENCE_OF_STATEMENTS -- The caller has checked that the initial token is WHEN or OTHERS -- Error recovery: can raise Error_Resync function P_Case_Statement_Alternative return Node_Id is Case_Alt_Node : Node_Id; begin if Style_Check then Style.Check_Indentation; end if; Case_Alt_Node := New_Node (N_Case_Statement_Alternative, Token_Ptr); T_When; -- past WHEN (or give error in OTHERS case) Set_Discrete_Choices (Case_Alt_Node, P_Discrete_Choice_List); TF_Arrow; Set_Statements (Case_Alt_Node, P_Sequence_Of_Statements (SS_Sreq_Whtm)); return Case_Alt_Node; end P_Case_Statement_Alternative; ------------------------- -- 5.5 Loop Statement -- ------------------------- -- LOOP_STATEMENT ::= -- [LOOP_STATEMENT_IDENTIFIER:] -- [ITERATION_SCHEME] loop -- SEQUENCE_OF_STATEMENTS -- end loop [loop_IDENTIFIER]; -- ITERATION_SCHEME ::= -- while CONDITION -- | for LOOP_PARAMETER_SPECIFICATION -- The parsing of loop statements is handled by one of three functions -- P_Loop_Statement, P_For_Statement or P_While_Statement depending -- on the initial keyword in the construct (excluding the identifier) -- P_Loop_Statement -- This function parses the case where no iteration scheme is present -- The caller has checked that the initial token is LOOP. The parameter -- is the node identifiers for the loop label if any (or is set to Empty -- if there is no loop label). -- Error recovery : cannot raise Error_Resync function P_Loop_Statement (Loop_Name : Node_Id := Empty) return Node_Id is Loop_Node : Node_Id; Created_Name : Node_Id; begin Push_Scope_Stack; Scopes (Scope.Last).Labl := Loop_Name; Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Sloc := Token_Ptr; Scopes (Scope.Last).Etyp := E_Loop; Loop_Node := New_Node (N_Loop_Statement, Token_Ptr); TF_Loop; if No (Loop_Name) then Created_Name := Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Loop_Node, True); Set_Identifier (Loop_Node, Created_Name); Scopes (Scope.Last).Labl := Created_Name; else Set_Identifier (Loop_Node, Loop_Name); end if; Append_Elmt (Loop_Node, Label_List); Set_Statements (Loop_Node, P_Sequence_Of_Statements (SS_Sreq)); End_Statements (Loop_Node); return Loop_Node; end P_Loop_Statement; -- P_For_Statement -- This function parses a loop statement with a FOR iteration scheme -- The caller has checked that the initial token is FOR. The parameter -- is the node identifier for the block label if any (or is set to Empty -- if there is no block label). -- Note: the caller fills in the Identifier field if a label was present -- Error recovery: can raise Error_Resync function P_For_Statement (Loop_Name : Node_Id := Empty) return Node_Id is Loop_Node : Node_Id; Iter_Scheme_Node : Node_Id; Loop_For_Flag : Boolean; Created_Name : Node_Id; Spec : Node_Id; begin Push_Scope_Stack; Scopes (Scope.Last).Labl := Loop_Name; Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Sloc := Token_Ptr; Scopes (Scope.Last).Etyp := E_Loop; Loop_For_Flag := (Prev_Token = Tok_Loop); Scan; -- past FOR Iter_Scheme_Node := New_Node (N_Iteration_Scheme, Token_Ptr); Spec := P_Loop_Parameter_Specification; if Nkind (Spec) = N_Loop_Parameter_Specification then Set_Loop_Parameter_Specification (Iter_Scheme_Node, Spec); else Set_Iterator_Specification (Iter_Scheme_Node, Spec); end if; -- The following is a special test so that a miswritten for loop such -- as "loop for I in 1..10;" is handled nicely, without making an extra -- entry in the scope stack. We don't bother to actually fix up the -- tree in this case since it's not worth the effort. Instead we just -- eat up the loop junk, leaving the entry for what now looks like an -- unmodified loop intact. if Loop_For_Flag and then Token = Tok_Semicolon then Error_Msg_SC ("LOOP belongs here, not before FOR"); Pop_Scope_Stack; return Error; -- Normal case else Loop_Node := New_Node (N_Loop_Statement, Token_Ptr); if No (Loop_Name) then Created_Name := Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Loop_Node, True); Set_Identifier (Loop_Node, Created_Name); Scopes (Scope.Last).Labl := Created_Name; else Set_Identifier (Loop_Node, Loop_Name); end if; TF_Loop; Set_Statements (Loop_Node, P_Sequence_Of_Statements (SS_Sreq)); End_Statements (Loop_Node); Set_Iteration_Scheme (Loop_Node, Iter_Scheme_Node); Append_Elmt (Loop_Node, Label_List); return Loop_Node; end if; end P_For_Statement; -- P_While_Statement -- This procedure scans a loop statement with a WHILE iteration scheme -- The caller has checked that the initial token is WHILE. The parameter -- is the node identifier for the block label if any (or is set to Empty -- if there is no block label). -- Error recovery: cannot raise Error_Resync function P_While_Statement (Loop_Name : Node_Id := Empty) return Node_Id is Loop_Node : Node_Id; Iter_Scheme_Node : Node_Id; Loop_While_Flag : Boolean; Created_Name : Node_Id; begin Push_Scope_Stack; Scopes (Scope.Last).Labl := Loop_Name; Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Sloc := Token_Ptr; Scopes (Scope.Last).Etyp := E_Loop; Loop_While_Flag := (Prev_Token = Tok_Loop); Iter_Scheme_Node := New_Node (N_Iteration_Scheme, Token_Ptr); Scan; -- past WHILE Set_Condition (Iter_Scheme_Node, P_Condition); -- The following is a special test so that a miswritten for loop such -- as "loop while I > 10;" is handled nicely, without making an extra -- entry in the scope stack. We don't bother to actually fix up the -- tree in this case since it's not worth the effort. Instead we just -- eat up the loop junk, leaving the entry for what now looks like an -- unmodified loop intact. if Loop_While_Flag and then Token = Tok_Semicolon then Error_Msg_SC ("LOOP belongs here, not before WHILE"); Pop_Scope_Stack; return Error; -- Normal case else Loop_Node := New_Node (N_Loop_Statement, Token_Ptr); TF_Loop; if No (Loop_Name) then Created_Name := Make_Identifier (Sloc (Loop_Node), Set_Loop_Block_Name ('L')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Loop_Node, True); Set_Identifier (Loop_Node, Created_Name); Scopes (Scope.Last).Labl := Created_Name; else Set_Identifier (Loop_Node, Loop_Name); end if; Set_Statements (Loop_Node, P_Sequence_Of_Statements (SS_Sreq)); End_Statements (Loop_Node); Set_Iteration_Scheme (Loop_Node, Iter_Scheme_Node); Append_Elmt (Loop_Node, Label_List); return Loop_Node; end if; end P_While_Statement; --------------------------------------- -- 5.5 Loop Parameter Specification -- --------------------------------------- -- LOOP_PARAMETER_SPECIFICATION ::= -- DEFINING_IDENTIFIER in [reverse] DISCRETE_SUBTYPE_DEFINITION -- [Iterator_Filter] -- Error recovery: cannot raise Error_Resync function P_Loop_Parameter_Specification return Node_Id is Loop_Param_Specification_Node : Node_Id; ID_Node : Node_Id; Scan_State : Saved_Scan_State; begin Save_Scan_State (Scan_State); ID_Node := P_Defining_Identifier (C_In); -- If the next token is OF, it indicates an Ada 2012 iterator. If the -- next token is a colon, this is also an Ada 2012 iterator, including -- a subtype indication for the loop parameter. Otherwise we parse the -- construct as a loop parameter specification. Note that the form -- "for A in B" is ambiguous, and must be resolved semantically: if B -- is a discrete subtype this is a loop specification, but if it is an -- expression it is an iterator specification. Ambiguity is resolved -- during analysis of the loop parameter specification. if Token = Tok_Of or else Token = Tok_Colon then Error_Msg_Ada_2012_Feature ("iterator", Token_Ptr); return P_Iterator_Specification (ID_Node); end if; -- The span of the Loop_Parameter_Specification starts at the -- defining identifier. Loop_Param_Specification_Node := New_Node (N_Loop_Parameter_Specification, Sloc (ID_Node)); Set_Defining_Identifier (Loop_Param_Specification_Node, ID_Node); if Token = Tok_Left_Paren then Error_Msg_SC ("subscripted loop parameter not allowed"); Restore_Scan_State (Scan_State); Discard_Junk_Node (P_Name); elsif Token = Tok_Dot then Error_Msg_SC ("selected loop parameter not allowed"); Restore_Scan_State (Scan_State); Discard_Junk_Node (P_Name); end if; T_In; if Token = Tok_Reverse then Scan; -- past REVERSE Set_Reverse_Present (Loop_Param_Specification_Node, True); end if; Set_Discrete_Subtype_Definition (Loop_Param_Specification_Node, P_Discrete_Subtype_Definition); if Ada_Version >= Ada_2020 and then Token = Tok_When then Scan; -- past WHEN Set_Iterator_Filter (Loop_Param_Specification_Node, P_Condition); end if; return Loop_Param_Specification_Node; exception when Error_Resync => return Error; end P_Loop_Parameter_Specification; ---------------------------------- -- 5.5.1 Iterator_Specification -- ---------------------------------- function P_Iterator_Specification (Def_Id : Node_Id) return Node_Id is Node1 : Node_Id; begin Node1 := New_Node (N_Iterator_Specification, Sloc (Def_Id)); Set_Defining_Identifier (Node1, Def_Id); if Token = Tok_Colon then Scan; -- past : Set_Subtype_Indication (Node1, P_Subtype_Indication); end if; if Token = Tok_Of then Set_Of_Present (Node1); Scan; -- past OF elsif Token = Tok_In then Scan; -- past IN elsif Prev_Token = Tok_In and then Present (Subtype_Indication (Node1)) then -- Simplest recovery is to transform it into an element iterator. -- Error message on 'in" has already been emitted when parsing the -- optional constraint. Set_Of_Present (Node1); Error_Msg_N ("subtype indication is only legal on an element iterator", Subtype_Indication (Node1)); else return Error; end if; if Token = Tok_Reverse then Scan; -- past REVERSE Set_Reverse_Present (Node1, True); end if; Set_Name (Node1, P_Name); if Ada_Version >= Ada_2020 and then Token = Tok_When then Scan; -- past WHEN Set_Iterator_Filter (Node1, P_Condition); end if; return Node1; end P_Iterator_Specification; -------------------------- -- 5.6 Block Statement -- -------------------------- -- BLOCK_STATEMENT ::= -- [block_STATEMENT_IDENTIFIER:] -- [declare -- DECLARATIVE_PART] -- begin -- HANDLED_SEQUENCE_OF_STATEMENTS -- end [block_IDENTIFIER]; -- The parsing of block statements is handled by one of the two functions -- P_Declare_Statement or P_Begin_Statement depending on whether or not -- a declare section is present -- P_Declare_Statement -- This function parses a block statement with DECLARE present -- The caller has checked that the initial token is DECLARE -- Error recovery: cannot raise Error_Resync function P_Declare_Statement (Block_Name : Node_Id := Empty) return Node_Id is Block_Node : Node_Id; Created_Name : Node_Id; begin Block_Node := New_Node (N_Block_Statement, Token_Ptr); Push_Scope_Stack; Scopes (Scope.Last).Etyp := E_Name; Scopes (Scope.Last).Lreq := Present (Block_Name); Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Labl := Block_Name; Scopes (Scope.Last).Sloc := Token_Ptr; Scan; -- past DECLARE if No (Block_Name) then Created_Name := Make_Identifier (Sloc (Block_Node), Set_Loop_Block_Name ('B')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Block_Node, True); Set_Identifier (Block_Node, Created_Name); Scopes (Scope.Last).Labl := Created_Name; else Set_Identifier (Block_Node, Block_Name); end if; Append_Elmt (Block_Node, Label_List); Parse_Decls_Begin_End (Block_Node); return Block_Node; end P_Declare_Statement; -- P_Begin_Statement -- This function parses a block statement with no DECLARE present -- The caller has checked that the initial token is BEGIN -- Error recovery: cannot raise Error_Resync function P_Begin_Statement (Block_Name : Node_Id := Empty) return Node_Id is Block_Node : Node_Id; Created_Name : Node_Id; begin Block_Node := New_Node (N_Block_Statement, Token_Ptr); Push_Scope_Stack; Scopes (Scope.Last).Etyp := E_Name; Scopes (Scope.Last).Lreq := Present (Block_Name); Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Labl := Block_Name; Scopes (Scope.Last).Sloc := Token_Ptr; if No (Block_Name) then Created_Name := Make_Identifier (Sloc (Block_Node), Set_Loop_Block_Name ('B')); Set_Comes_From_Source (Created_Name, False); Set_Has_Created_Identifier (Block_Node, True); Set_Identifier (Block_Node, Created_Name); Scopes (Scope.Last).Labl := Created_Name; else Set_Identifier (Block_Node, Block_Name); end if; Append_Elmt (Block_Node, Label_List); Scopes (Scope.Last).Ecol := Start_Column; Scopes (Scope.Last).Sloc := Token_Ptr; Scan; -- past BEGIN Set_Handled_Statement_Sequence (Block_Node, P_Handled_Sequence_Of_Statements); End_Statements (Handled_Statement_Sequence (Block_Node)); return Block_Node; end P_Begin_Statement; ------------------------- -- 5.7 Exit Statement -- ------------------------- -- EXIT_STATEMENT ::= -- exit [loop_NAME] [when CONDITION]; -- The caller has checked that the initial token is EXIT -- Error recovery: can raise Error_Resync function P_Exit_Statement return Node_Id is Exit_Node : Node_Id; function Missing_Semicolon_On_Exit return Boolean; -- This function deals with the following specialized situation -- -- when 'x' => -- exit [identifier] -- when 'y' => -- -- This looks like a messed up EXIT WHEN, when in fact the problem -- is a missing semicolon. It is called with Token pointing to the -- WHEN token, and returns True if a semicolon is missing before -- the WHEN as in the above example. ------------------------------- -- Missing_Semicolon_On_Exit -- ------------------------------- function Missing_Semicolon_On_Exit return Boolean is State : Saved_Scan_State; begin if not Token_Is_At_Start_Of_Line then return False; elsif Scopes (Scope.Last).Etyp /= E_Case then return False; else Save_Scan_State (State); Scan; -- past WHEN Scan; -- past token after WHEN if Token = Tok_Arrow then Restore_Scan_State (State); return True; else Restore_Scan_State (State); return False; end if; end if; end Missing_Semicolon_On_Exit; -- Start of processing for P_Exit_Statement begin Exit_Node := New_Node (N_Exit_Statement, Token_Ptr); Scan; -- past EXIT if Token = Tok_Identifier then Set_Name (Exit_Node, P_Qualified_Simple_Name); elsif Style_Check then -- This EXIT has no name, so check that -- the innermost loop is unnamed too. Check_No_Exit_Name : for J in reverse 1 .. Scope.Last loop if Scopes (J).Etyp = E_Loop then if Present (Scopes (J).Labl) and then Comes_From_Source (Scopes (J).Labl) then -- Innermost loop in fact had a name, style check fails Style.No_Exit_Name (Scopes (J).Labl); end if; exit Check_No_Exit_Name; end if; end loop Check_No_Exit_Name; end if; if Token = Tok_When and then not Missing_Semicolon_On_Exit then Scan; -- past WHEN Set_Condition (Exit_Node, P_Condition); -- Allow IF instead of WHEN, giving error message elsif Token = Tok_If then T_When; Scan; -- past IF used in place of WHEN Set_Condition (Exit_Node, P_Expression_No_Right_Paren); end if; TF_Semicolon; return Exit_Node; end P_Exit_Statement; ------------------------- -- 5.8 Goto Statement -- ------------------------- -- GOTO_STATEMENT ::= goto label_NAME; -- The caller has checked that the initial token is GOTO (or TO in the -- error case where GO and TO were incorrectly separated). -- Error recovery: can raise Error_Resync function P_Goto_Statement return Node_Id is Goto_Node : Node_Id; begin Goto_Node := New_Node (N_Goto_Statement, Token_Ptr); Scan; -- past GOTO (or TO) Set_Name (Goto_Node, P_Qualified_Simple_Name_Resync); Append_Elmt (Goto_Node, Goto_List); No_Constraint; TF_Semicolon; return Goto_Node; end P_Goto_Statement; --------------------------- -- Parse_Decls_Begin_End -- --------------------------- -- This function parses the construct: -- DECLARATIVE_PART -- begin -- HANDLED_SEQUENCE_OF_STATEMENTS -- end [NAME]; -- The caller has built the scope stack entry, and created the node to -- whose Declarations and Handled_Statement_Sequence fields are to be -- set. On return these fields are filled in (except in the case of a -- task body, where the handled statement sequence is optional, and may -- thus be Empty), and the scan is positioned past the End sequence. -- If the BEGIN is missing, then the parent node is used to help construct -- an appropriate missing BEGIN message. Possibilities for the parent are: -- N_Block_Statement declare block -- N_Entry_Body entry body -- N_Package_Body package body (begin part optional) -- N_Subprogram_Body procedure or function body -- N_Task_Body task body -- Note: in the case of a block statement, there is definitely a DECLARE -- present (because a Begin statement without a DECLARE is handled by the -- P_Begin_Statement procedure, which does not call Parse_Decls_Begin_End. -- Error recovery: cannot raise Error_Resync procedure Parse_Decls_Begin_End (Parent : Node_Id) is Body_Decl : Node_Id; Decls : List_Id; Parent_Nkind : Node_Kind; Spec_Node : Node_Id; HSS : Node_Id; procedure Missing_Begin (Msg : String); -- Called to post a missing begin message. In the normal case this is -- posted at the start of the current token. A special case arises when -- P_Declarative_Items has previously found a missing begin, in which -- case we replace the original error message. procedure Set_Null_HSS (Parent : Node_Id); -- Construct an empty handled statement sequence and install in Parent -- Leaves HSS set to reference the newly constructed statement sequence. ------------------- -- Missing_Begin -- ------------------- procedure Missing_Begin (Msg : String) is begin if Missing_Begin_Msg = No_Error_Msg then Error_Msg_BC (Msg); else Change_Error_Text (Missing_Begin_Msg, Msg); -- Purge any messages issued after than, since a missing begin -- can cause a lot of havoc, and it is better not to dump these -- cascaded messages on the user. Purge_Messages (Get_Location (Missing_Begin_Msg), Prev_Token_Ptr); end if; end Missing_Begin; ------------------ -- Set_Null_HSS -- ------------------ procedure Set_Null_HSS (Parent : Node_Id) is Null_Stm : Node_Id; begin Null_Stm := Make_Null_Statement (Token_Ptr); Set_Comes_From_Source (Null_Stm, False); HSS := Make_Handled_Sequence_Of_Statements (Token_Ptr, Statements => New_List (Null_Stm)); Set_Comes_From_Source (HSS, False); Set_Handled_Statement_Sequence (Parent, HSS); end Set_Null_HSS; -- Start of processing for Parse_Decls_Begin_End begin Decls := P_Declarative_Part; if Ada_Version = Ada_83 then Check_Later_Vs_Basic_Declarations (Decls, During_Parsing => True); end if; -- Here is where we deal with the case of IS used instead of semicolon. -- Specifically, if the last declaration in the declarative part is a -- subprogram body still marked as having a bad IS, then this is where -- we decide that the IS should really have been a semicolon and that -- the body should have been a declaration. Note that if the bad IS -- had turned out to be OK (i.e. a decent begin/end was found for it), -- then the Bad_Is_Detected flag would have been reset by now. Body_Decl := Last (Decls); if Present (Body_Decl) and then Nkind (Body_Decl) = N_Subprogram_Body and then Bad_Is_Detected (Body_Decl) then -- OK, we have the case of a bad IS, so we need to fix up the tree. -- What we have now is a subprogram body with attached declarations -- and a possible statement sequence. -- First step is to take the declarations that were part of the bogus -- subprogram body and append them to the outer declaration chain. -- In other words we append them past the body (which we will later -- convert into a declaration). Append_List (Declarations (Body_Decl), Decls); -- Now take the handled statement sequence of the bogus body and -- set it as the statement sequence for the outer construct. Note -- that it may be empty (we specially allowed a missing BEGIN for -- a subprogram body marked as having a bad IS -- see below). Set_Handled_Statement_Sequence (Parent, Handled_Statement_Sequence (Body_Decl)); -- Next step is to convert the old body node to a declaration node Spec_Node := Specification (Body_Decl); Change_Node (Body_Decl, N_Subprogram_Declaration); Set_Specification (Body_Decl, Spec_Node); -- Final step is to put the declarations for the parent where -- they belong, and then fall through the IF to scan out the -- END statements. Set_Declarations (Parent, Decls); -- This is the normal case (i.e. any case except the bad IS case) -- If we have a BEGIN, then scan out the sequence of statements, and -- also reset the expected column for the END to match the BEGIN. else Set_Declarations (Parent, Decls); if Token = Tok_Begin then if Style_Check then Style.Check_Indentation; end if; Error_Msg_Col := Scopes (Scope.Last).Ecol; if RM_Column_Check and then Token_Is_At_Start_Of_Line and then Start_Column /= Error_Msg_Col then Error_Msg_SC ("(style) BEGIN in wrong column, should be@"); else Scopes (Scope.Last).Ecol := Start_Column; end if; Scopes (Scope.Last).Sloc := Token_Ptr; Scan; -- past BEGIN Set_Handled_Statement_Sequence (Parent, P_Handled_Sequence_Of_Statements); -- No BEGIN present else Parent_Nkind := Nkind (Parent); -- A special check for the missing IS case. If we have a -- subprogram body that was marked as having a suspicious -- IS, and the current token is END, then we simply confirm -- the suspicion, and do not require a BEGIN to be present if Parent_Nkind = N_Subprogram_Body and then Token = Tok_End and then Scopes (Scope.Last).Etyp = E_Suspicious_Is then Scopes (Scope.Last).Etyp := E_Bad_Is; -- Otherwise BEGIN is not required for a package body, so we -- don't mind if it is missing, but we do construct a dummy -- one (so that we have somewhere to set End_Label). -- However if we have something other than a BEGIN which -- looks like it might be statements, then we signal a missing -- BEGIN for these cases as well. We define "something which -- looks like it might be statements" as a token other than -- END, EOF, or a token which starts declarations. elsif Parent_Nkind = N_Package_Body and then (Token = Tok_End or else Token = Tok_EOF or else Token in Token_Class_Declk) then Set_Null_HSS (Parent); -- These are cases in which a BEGIN is required and not present else Set_Null_HSS (Parent); -- Prepare to issue error message Error_Msg_Sloc := Scopes (Scope.Last).Sloc; Error_Msg_Node_1 := Scopes (Scope.Last).Labl; -- Now issue appropriate message if Parent_Nkind = N_Block_Statement then Missing_Begin ("missing BEGIN for DECLARE#!"); elsif Parent_Nkind = N_Entry_Body then Missing_Begin ("missing BEGIN for ENTRY#!"); elsif Parent_Nkind = N_Subprogram_Body then if Nkind (Specification (Parent)) = N_Function_Specification then Missing_Begin ("missing BEGIN for function&#!"); else Missing_Begin ("missing BEGIN for procedure&#!"); end if; -- The case for package body arises only when -- we have possible statement junk present. elsif Parent_Nkind = N_Package_Body then Missing_Begin ("missing BEGIN for package body&#!"); else pragma Assert (Parent_Nkind = N_Task_Body); Missing_Begin ("missing BEGIN for task body&#!"); end if; -- Here we pick up the statements after the BEGIN that -- should have been present but was not. We don't insist -- on statements being present if P_Declarative_Part had -- already found a missing BEGIN, since it might have -- swallowed a lone statement into the declarative part. if Missing_Begin_Msg /= No_Error_Msg and then Token = Tok_End then null; else Set_Handled_Statement_Sequence (Parent, P_Handled_Sequence_Of_Statements); end if; end if; end if; end if; -- Here with declarations and handled statement sequence scanned if Present (Handled_Statement_Sequence (Parent)) then End_Statements (Handled_Statement_Sequence (Parent)); else End_Statements; end if; -- We know that End_Statements removed an entry from the scope stack -- (because it is required to do so under all circumstances). We can -- therefore reference the entry it removed one past the stack top. -- What we are interested in is whether it was a case of a bad IS. -- We can't call Scopes here. if Scope.Table (Scope.Last + 1).Etyp = E_Bad_Is then Error_Msg -- CODEFIX ("|IS should be "";""", Scope.Table (Scope.Last + 1).S_Is); Set_Bad_Is_Detected (Parent, True); end if; end Parse_Decls_Begin_End; ------------------------- -- Set_Loop_Block_Name -- ------------------------- function Set_Loop_Block_Name (L : Character) return Name_Id is begin Name_Buffer (1) := L; Name_Buffer (2) := '_'; Name_Len := 2; Loop_Block_Count := Loop_Block_Count + 1; Add_Nat_To_Name_Buffer (Loop_Block_Count); return Name_Find; end Set_Loop_Block_Name; --------------- -- Then_Scan -- --------------- procedure Then_Scan is begin TF_Then; while Token = Tok_Then loop Error_Msg_SC -- CODEFIX ("redundant THEN"); TF_Then; end loop; if Token = Tok_And or else Token = Tok_Or then Error_Msg_SC ("unexpected logical operator"); Scan; -- past logical operator if (Prev_Token = Tok_And and then Token = Tok_Then) or else (Prev_Token = Tok_Or and then Token = Tok_Else) then Scan; end if; Discard_Junk_Node (P_Expression); end if; if Token = Tok_Then then Scan; end if; end Then_Scan; end Ch5;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.Internals.Strings.Configuration; with Matreshka.Internals.Unicode.Characters.Latin; with Matreshka.Internals.Utf16; package body Matreshka.Internals.Text_Codecs.Windows1250 is use Matreshka.Internals.Strings.Configuration; use Matreshka.Internals.Unicode.Characters.Latin; use type Matreshka.Internals.Unicode.Code_Unit_32; use type Matreshka.Internals.Utf16.Utf16_String_Index; Decode_Table : constant array (Ada.Streams.Stream_Element range 16#80# .. 16#FF#) of Matreshka.Internals.Unicode.Code_Point := (16#80# => 16#20AC#, -- EURO SIGN 16#81# => Question_Mark, 16#82# => 16#201A#, -- SINGLE LOW-9 QUOTATION MARK 16#83# => Question_Mark, 16#84# => 16#201E#, -- DOUBLE LOW-9 QUOTATION MARK 16#85# => 16#2026#, -- HORIZONTAL ELLIPSIS 16#86# => 16#2020#, -- DAGGER 16#87# => 16#2021#, -- DOUBLE DAGGER 16#88# => Question_Mark, 16#89# => 16#2030#, -- PER MILLE SIGN 16#8A# => 16#0160#, -- LATIN CAPITAL LETTER S WITH CARON 16#8B# => 16#2039#, -- SINGLE LEFT-POINTING ANGLE QUOTATION MARK 16#8C# => 16#015A#, -- LATIN CAPITAL LETTER S WITH ACUTE 16#8D# => 16#0164#, -- LATIN CAPITAL LETTER T WITH CARON 16#8E# => 16#017D#, -- LATIN CAPITAL LETTER Z WITH CARON 16#8F# => 16#0179#, -- LATIN CAPITAL LETTER Z WITH ACUTE 16#90# => Question_Mark, 16#91# => 16#2018#, -- LEFT SINGLE QUOTATION MARK 16#92# => 16#2019#, -- RIGHT SINGLE QUOTATION MARK 16#93# => 16#201C#, -- LEFT DOUBLE QUOTATION MARK 16#94# => 16#201D#, -- RIGHT DOUBLE QUOTATION MARK 16#95# => 16#2022#, -- BULLET 16#96# => 16#2013#, -- EN DASH 16#97# => 16#2014#, -- EM DASH 16#98# => Question_Mark, 16#99# => 16#2122#, -- TRADE MARK SIGN 16#9A# => 16#0161#, -- LATIN SMALL LETTER S WITH CARON 16#9B# => 16#203A#, -- SINGLE RIGHT-POINTING ANGLE QUOTATION -- MARK 16#9C# => 16#015B#, -- LATIN SMALL LETTER S WITH ACUTE 16#9D# => 16#0165#, -- LATIN SMALL LETTER T WITH CARON 16#9E# => 16#017E#, -- LATIN SMALL LETTER Z WITH CARON 16#9F# => 16#017A#, -- LATIN SMALL LETTER Z WITH ACUTE 16#A0# => 16#00A0#, -- NO-BREAK SPACE 16#A1# => 16#02C7#, -- CARON 16#A2# => 16#02D8#, -- BREVE 16#A3# => 16#0141#, -- LATIN CAPITAL LETTER L WITH STROKE 16#A4# => 16#00A4#, -- CURRENCY SIGN 16#A5# => 16#0104#, -- LATIN CAPITAL LETTER A WITH OGONEK 16#A6# => 16#00A6#, -- BROKEN BAR 16#A7# => 16#00A7#, -- SECTION SIGN 16#A8# => 16#00A8#, -- DIAERESIS 16#A9# => 16#00A9#, -- COPYRIGHT SIGN 16#AA# => 16#015E#, -- LATIN CAPITAL LETTER S WITH CEDILLA 16#AB# => 16#00AB#, -- LEFT-POINTING DOUBLE ANGLE QUOTATION -- MARK 16#AC# => 16#00AC#, -- NOT SIGN 16#AD# => 16#00AD#, -- SOFT HYPHEN 16#AE# => 16#00AE#, -- REGISTERED SIGN 16#AF# => 16#017B#, -- LATIN CAPITAL LETTER Z WITH DOT ABOVE 16#B0# => 16#00B0#, -- DEGREE SIGN 16#B1# => 16#00B1#, -- PLUS-MINUS SIGN 16#B2# => 16#02DB#, -- OGONEK 16#B3# => 16#0142#, -- LATIN SMALL LETTER L WITH STROKE 16#B4# => 16#00B4#, -- ACUTE ACCENT 16#B5# => 16#00B5#, -- MICRO SIGN 16#B6# => 16#00B6#, -- PILCROW SIGN 16#B7# => 16#00B7#, -- MIDDLE DOT 16#B8# => 16#00B8#, -- CEDILLA 16#B9# => 16#0105#, -- LATIN SMALL LETTER A WITH OGONEK 16#BA# => 16#015F#, -- LATIN SMALL LETTER S WITH CEDILLA 16#BB# => 16#00BB#, -- RIGHT-POINTING DOUBLE ANGLE QUOTATION -- MARK 16#BC# => 16#013D#, -- LATIN CAPITAL LETTER L WITH CARON 16#BD# => 16#02DD#, -- DOUBLE ACUTE ACCENT 16#BE# => 16#013E#, -- LATIN SMALL LETTER L WITH CARON 16#BF# => 16#017C#, -- LATIN SMALL LETTER Z WITH DOT ABOVE 16#C0# => 16#0154#, -- LATIN CAPITAL LETTER R WITH ACUTE 16#C1# => 16#00C1#, -- LATIN CAPITAL LETTER A WITH ACUTE 16#C2# => 16#00C2#, -- LATIN CAPITAL LETTER A WITH CIRCUMFLEX 16#C3# => 16#0102#, -- LATIN CAPITAL LETTER A WITH BREVE 16#C4# => 16#00C4#, -- LATIN CAPITAL LETTER A WITH DIAERESIS 16#C5# => 16#0139#, -- LATIN CAPITAL LETTER L WITH ACUTE 16#C6# => 16#0106#, -- LATIN CAPITAL LETTER C WITH ACUTE 16#C7# => 16#00C7#, -- LATIN CAPITAL LETTER C WITH CEDILLA 16#C8# => 16#010C#, -- LATIN CAPITAL LETTER C WITH CARON 16#C9# => 16#00C9#, -- LATIN CAPITAL LETTER E WITH ACUTE 16#CA# => 16#0118#, -- LATIN CAPITAL LETTER E WITH OGONEK 16#CB# => 16#00CB#, -- LATIN CAPITAL LETTER E WITH DIAERESIS 16#CC# => 16#011A#, -- LATIN CAPITAL LETTER E WITH CARON 16#CD# => 16#00CD#, -- LATIN CAPITAL LETTER I WITH ACUTE 16#CE# => 16#00CE#, -- LATIN CAPITAL LETTER I WITH CIRCUMFLEX 16#CF# => 16#010E#, -- LATIN CAPITAL LETTER D WITH CARON 16#D0# => 16#0110#, -- LATIN CAPITAL LETTER D WITH STROKE 16#D1# => 16#0143#, -- LATIN CAPITAL LETTER N WITH ACUTE 16#D2# => 16#0147#, -- LATIN CAPITAL LETTER N WITH CARON 16#D3# => 16#00D3#, -- LATIN CAPITAL LETTER O WITH ACUTE 16#D4# => 16#00D4#, -- LATIN CAPITAL LETTER O WITH CIRCUMFLEX 16#D5# => 16#0150#, -- LATIN CAPITAL LETTER O WITH DOUBLE ACUTE 16#D6# => 16#00D6#, -- LATIN CAPITAL LETTER O WITH DIAERESIS 16#D7# => 16#00D7#, -- MULTIPLICATION SIGN 16#D8# => 16#0158#, -- LATIN CAPITAL LETTER R WITH CARON 16#D9# => 16#016E#, -- LATIN CAPITAL LETTER U WITH RING ABOVE 16#DA# => 16#00DA#, -- LATIN CAPITAL LETTER U WITH ACUTE 16#DB# => 16#0170#, -- LATIN CAPITAL LETTER U WITH DOUBLE ACUTE 16#DC# => 16#00DC#, -- LATIN CAPITAL LETTER U WITH DIAERESIS 16#DD# => 16#00DD#, -- LATIN CAPITAL LETTER Y WITH ACUTE 16#DE# => 16#0162#, -- LATIN CAPITAL LETTER T WITH CEDILLA 16#DF# => 16#00DF#, -- LATIN SMALL LETTER SHARP S 16#E0# => 16#0155#, -- LATIN SMALL LETTER R WITH ACUTE 16#E1# => 16#00E1#, -- LATIN SMALL LETTER A WITH ACUTE 16#E2# => 16#00E2#, -- LATIN SMALL LETTER A WITH CIRCUMFLEX 16#E3# => 16#0103#, -- LATIN SMALL LETTER A WITH BREVE 16#E4# => 16#00E4#, -- LATIN SMALL LETTER A WITH DIAERESIS 16#E5# => 16#013A#, -- LATIN SMALL LETTER L WITH ACUTE 16#E6# => 16#0107#, -- LATIN SMALL LETTER C WITH ACUTE 16#E7# => 16#00E7#, -- LATIN SMALL LETTER C WITH CEDILLA 16#E8# => 16#010D#, -- LATIN SMALL LETTER C WITH CARON 16#E9# => 16#00E9#, -- LATIN SMALL LETTER E WITH ACUTE 16#EA# => 16#0119#, -- LATIN SMALL LETTER E WITH OGONEK 16#EB# => 16#00EB#, -- LATIN SMALL LETTER E WITH DIAERESIS 16#EC# => 16#011B#, -- LATIN SMALL LETTER E WITH CARON 16#ED# => 16#00ED#, -- LATIN SMALL LETTER I WITH ACUTE 16#EE# => 16#00EE#, -- LATIN SMALL LETTER I WITH CIRCUMFLEX 16#EF# => 16#010F#, -- LATIN SMALL LETTER D WITH CARON 16#F0# => 16#0111#, -- LATIN SMALL LETTER D WITH STROKE 16#F1# => 16#0144#, -- LATIN SMALL LETTER N WITH ACUTE 16#F2# => 16#0148#, -- LATIN SMALL LETTER N WITH CARON 16#F3# => 16#00F3#, -- LATIN SMALL LETTER O WITH ACUTE 16#F4# => 16#00F4#, -- LATIN SMALL LETTER O WITH CIRCUMFLEX 16#F5# => 16#0151#, -- LATIN SMALL LETTER O WITH DOUBLE ACUTE 16#F6# => 16#00F6#, -- LATIN SMALL LETTER O WITH DIAERESIS 16#F7# => 16#00F7#, -- DIVISION SIGN 16#F8# => 16#0159#, -- LATIN SMALL LETTER R WITH CARON 16#F9# => 16#016F#, -- LATIN SMALL LETTER U WITH RING ABOVE 16#FA# => 16#00FA#, -- LATIN SMALL LETTER U WITH ACUTE 16#FB# => 16#0171#, -- LATIN SMALL LETTER U WITH DOUBLE ACUTE 16#FC# => 16#00FC#, -- LATIN SMALL LETTER U WITH DIAERESIS 16#FD# => 16#00FD#, -- LATIN SMALL LETTER Y WITH ACUTE 16#FE# => 16#0163#, -- LATIN SMALL LETTER T WITH CEDILLA 16#FF# => 16#02D9#); -- DOT ABOVE Encode_Table_00 : constant array (Matreshka.Internals.Unicode.Code_Point range 16#00A0# .. 16#00FD#) of Ada.Streams.Stream_Element := (16#00A0# => 16#A0#, -- NO-BREAK SPACE 16#00A4# => 16#A4#, -- CURRENCY SIGN 16#00A6# => 16#A6#, -- BROKEN BAR 16#00A7# => 16#A7#, -- SECTION SIGN 16#00A8# => 16#A8#, -- DIAERESIS 16#00A9# => 16#A9#, -- COPYRIGHT SIGN 16#00AB# => 16#AB#, -- LEFT-POINTING DOUBLE ANGLE QUOTATION -- MARK 16#00AC# => 16#AC#, -- NOT SIGN 16#00AD# => 16#AD#, -- SOFT HYPHEN 16#00AE# => 16#AE#, -- REGISTERED SIGN 16#00B0# => 16#B0#, -- DEGREE SIGN 16#00B1# => 16#B1#, -- PLUS-MINUS SIGN 16#00B4# => 16#B4#, -- ACUTE ACCENT 16#00B5# => 16#B5#, -- MICRO SIGN 16#00B6# => 16#B6#, -- PILCROW SIGN 16#00B7# => 16#B7#, -- MIDDLE DOT 16#00B8# => 16#B8#, -- CEDILLA 16#00BB# => 16#BB#, -- RIGHT-POINTING DOUBLE ANGLE QUOTATION -- MARK 16#00C1# => 16#C1#, -- LATIN CAPITAL LETTER A WITH ACUTE 16#00C2# => 16#C2#, -- LATIN CAPITAL LETTER A WITH CIRCUMFLEX 16#00C4# => 16#C4#, -- LATIN CAPITAL LETTER A WITH DIAERESIS 16#00C7# => 16#C7#, -- LATIN CAPITAL LETTER C WITH CEDILLA 16#00C9# => 16#C9#, -- LATIN CAPITAL LETTER E WITH ACUTE 16#00CB# => 16#CB#, -- LATIN CAPITAL LETTER E WITH DIAERESIS 16#00CD# => 16#CD#, -- LATIN CAPITAL LETTER I WITH ACUTE 16#00CE# => 16#CE#, -- LATIN CAPITAL LETTER I WITH CIRCUMFLEX 16#00D3# => 16#D3#, -- LATIN CAPITAL LETTER O WITH ACUTE 16#00D4# => 16#D4#, -- LATIN CAPITAL LETTER O WITH CIRCUMFLEX 16#00D6# => 16#D6#, -- LATIN CAPITAL LETTER O WITH DIAERESIS 16#00D7# => 16#D7#, -- MULTIPLICATION SIGN 16#00DA# => 16#DA#, -- LATIN CAPITAL LETTER U WITH ACUTE 16#00DC# => 16#DC#, -- LATIN CAPITAL LETTER U WITH DIAERESIS 16#00DD# => 16#DD#, -- LATIN CAPITAL LETTER Y WITH ACUTE 16#00DF# => 16#DF#, -- LATIN SMALL LETTER SHARP S 16#00E1# => 16#E1#, -- LATIN SMALL LETTER A WITH ACUTE 16#00E2# => 16#E2#, -- LATIN SMALL LETTER A WITH CIRCUMFLEX 16#00E4# => 16#E4#, -- LATIN SMALL LETTER A WITH DIAERESIS 16#00E7# => 16#E7#, -- LATIN SMALL LETTER C WITH CEDILLA 16#00E9# => 16#E9#, -- LATIN SMALL LETTER E WITH ACUTE 16#00EB# => 16#EB#, -- LATIN SMALL LETTER E WITH DIAERESIS 16#00ED# => 16#ED#, -- LATIN SMALL LETTER I WITH ACUTE 16#00EE# => 16#EE#, -- LATIN SMALL LETTER I WITH CIRCUMFLEX 16#00F3# => 16#F3#, -- LATIN SMALL LETTER O WITH ACUTE 16#00F4# => 16#F4#, -- LATIN SMALL LETTER O WITH CIRCUMFLEX 16#00F6# => 16#F6#, -- LATIN SMALL LETTER O WITH DIAERESIS 16#00F7# => 16#F7#, -- DIVISION SIGN 16#00FA# => 16#FA#, -- LATIN SMALL LETTER U WITH ACUTE 16#00FC# => 16#FC#, -- LATIN SMALL LETTER U WITH DIAERESIS 16#00FD# => 16#FD#, -- LATIN SMALL LETTER Y WITH ACUTE others => Question_Mark); Encode_Table_01 : constant array (Matreshka.Internals.Unicode.Code_Point range 16#0102# .. 16#017E#) of Ada.Streams.Stream_Element := (16#0102# => 16#C3#, -- LATIN CAPITAL LETTER A WITH BREVE 16#0103# => 16#E3#, -- LATIN SMALL LETTER A WITH BREVE 16#0104# => 16#A5#, -- LATIN CAPITAL LETTER A WITH OGONEK 16#0105# => 16#B9#, -- LATIN SMALL LETTER A WITH OGONEK 16#0106# => 16#C6#, -- LATIN CAPITAL LETTER C WITH ACUTE 16#0107# => 16#E6#, -- LATIN SMALL LETTER C WITH ACUTE 16#010C# => 16#C8#, -- LATIN CAPITAL LETTER C WITH CARON 16#010D# => 16#E8#, -- LATIN SMALL LETTER C WITH CARON 16#010E# => 16#CF#, -- LATIN CAPITAL LETTER D WITH CARON 16#010F# => 16#EF#, -- LATIN SMALL LETTER D WITH CARON 16#0110# => 16#D0#, -- LATIN CAPITAL LETTER D WITH STROKE 16#0111# => 16#F0#, -- LATIN SMALL LETTER D WITH STROKE 16#0118# => 16#CA#, -- LATIN CAPITAL LETTER E WITH OGONEK 16#0119# => 16#EA#, -- LATIN SMALL LETTER E WITH OGONEK 16#011A# => 16#CC#, -- LATIN CAPITAL LETTER E WITH CARON 16#011B# => 16#EC#, -- LATIN SMALL LETTER E WITH CARON 16#0139# => 16#C5#, -- LATIN CAPITAL LETTER L WITH ACUTE 16#013A# => 16#E5#, -- LATIN SMALL LETTER L WITH ACUTE 16#013D# => 16#BC#, -- LATIN CAPITAL LETTER L WITH CARON 16#013E# => 16#BE#, -- LATIN SMALL LETTER L WITH CARON 16#0141# => 16#A3#, -- LATIN CAPITAL LETTER L WITH STROKE 16#0142# => 16#B3#, -- LATIN SMALL LETTER L WITH STROKE 16#0143# => 16#D1#, -- LATIN CAPITAL LETTER N WITH ACUTE 16#0144# => 16#F1#, -- LATIN SMALL LETTER N WITH ACUTE 16#0147# => 16#D2#, -- LATIN CAPITAL LETTER N WITH CARON 16#0148# => 16#F2#, -- LATIN SMALL LETTER N WITH CARON 16#0150# => 16#D5#, -- LATIN CAPITAL LETTER O WITH DOUBLE ACUTE 16#0151# => 16#F5#, -- LATIN SMALL LETTER O WITH DOUBLE ACUTE 16#0154# => 16#C0#, -- LATIN CAPITAL LETTER R WITH ACUTE 16#0155# => 16#E0#, -- LATIN SMALL LETTER R WITH ACUTE 16#0158# => 16#D8#, -- LATIN CAPITAL LETTER R WITH CARON 16#0159# => 16#F8#, -- LATIN SMALL LETTER R WITH CARON 16#015A# => 16#8C#, -- LATIN CAPITAL LETTER S WITH ACUTE 16#015B# => 16#9C#, -- LATIN SMALL LETTER S WITH ACUTE 16#015E# => 16#AA#, -- LATIN CAPITAL LETTER S WITH CEDILLA 16#015F# => 16#BA#, -- LATIN SMALL LETTER S WITH CEDILLA 16#0160# => 16#8A#, -- LATIN CAPITAL LETTER S WITH CARON 16#0161# => 16#9A#, -- LATIN SMALL LETTER S WITH CARON 16#0162# => 16#DE#, -- LATIN CAPITAL LETTER T WITH CEDILLA 16#0163# => 16#FE#, -- LATIN SMALL LETTER T WITH CEDILLA 16#0164# => 16#8D#, -- LATIN CAPITAL LETTER T WITH CARON 16#0165# => 16#9D#, -- LATIN SMALL LETTER T WITH CARON 16#016E# => 16#D9#, -- LATIN CAPITAL LETTER U WITH RING ABOVE 16#016F# => 16#F9#, -- LATIN SMALL LETTER U WITH RING ABOVE 16#0170# => 16#DB#, -- LATIN CAPITAL LETTER U WITH DOUBLE ACUTE 16#0171# => 16#FB#, -- LATIN SMALL LETTER U WITH DOUBLE ACUTE 16#0179# => 16#8F#, -- LATIN CAPITAL LETTER Z WITH ACUTE 16#017A# => 16#9F#, -- LATIN SMALL LETTER Z WITH ACUTE 16#017B# => 16#AF#, -- LATIN CAPITAL LETTER Z WITH DOT ABOVE 16#017C# => 16#BF#, -- LATIN SMALL LETTER Z WITH DOT ABOVE 16#017D# => 16#8E#, -- LATIN CAPITAL LETTER Z WITH CARON 16#017E# => 16#9E#, -- LATIN SMALL LETTER Z WITH CARON others => Question_Mark); Encode_Table_02 : constant array (Matreshka.Internals.Unicode.Code_Point range 16#02C7# .. 16#02DD#) of Ada.Streams.Stream_Element := (16#02C7# => 16#A1#, -- CARON 16#02D8# => 16#A2#, -- BREVE 16#02D9# => 16#FF#, -- DOT ABOVE 16#02DB# => 16#B2#, -- OGONEK 16#02DD# => 16#BD#, -- DOUBLE ACUTE ACCENT others => Question_Mark); Encode_Table_20 : constant array (Matreshka.Internals.Unicode.Code_Point range 16#2013# .. 16#203A#) of Ada.Streams.Stream_Element := (16#2013# => 16#96#, -- EN DASH 16#2014# => 16#97#, -- EM DASH 16#2018# => 16#91#, -- LEFT SINGLE QUOTATION MARK 16#2019# => 16#92#, -- RIGHT SINGLE QUOTATION MARK 16#201A# => 16#82#, -- SINGLE LOW-9 QUOTATION MARK 16#201C# => 16#93#, -- LEFT DOUBLE QUOTATION MARK 16#201D# => 16#94#, -- RIGHT DOUBLE QUOTATION MARK 16#201E# => 16#84#, -- DOUBLE LOW-9 QUOTATION MARK 16#2020# => 16#86#, -- DAGGER 16#2021# => 16#87#, -- DOUBLE DAGGER 16#2022# => 16#95#, -- BULLET 16#2026# => 16#85#, -- HORIZONTAL ELLIPSIS 16#2030# => 16#89#, -- PER MILLE SIGN 16#2039# => 16#8B#, -- SINGLE LEFT-POINTING ANGLE QUOTATION MARK 16#203A# => 16#9B#, -- SINGLE RIGHT-POINTING ANGLE QUOTATION -- MARK others => Question_Mark); ------------------- -- Decode_Append -- ------------------- overriding procedure Decode_Append (Self : in out Windows1250_Decoder; Data : Ada.Streams.Stream_Element_Array; String : in out Matreshka.Internals.Strings.Shared_String_Access) is begin Matreshka.Internals.Strings.Mutate (String, String.Unused + Data'Length); for J in Data'Range loop case Data (J) is when 16#00# .. 16#7F# => -- Directly mapped. Self.Unchecked_Append (Self, String, Matreshka.Internals.Unicode.Code_Point (Data (J))); when 16#80# .. 16#FF# => -- Table translated. Self.Unchecked_Append (Self, String, Decode_Table (Data (J))); end case; end loop; String_Handler.Fill_Null_Terminator (String); end Decode_Append; ------------- -- Decoder -- ------------- function Decoder (Mode : Decoder_Mode) return Abstract_Decoder'Class is begin case Mode is when Raw => return Windows1250_Decoder' (Skip_LF => False, Unchecked_Append => Unchecked_Append_Raw'Access); when XML_1_0 => return Windows1250_Decoder' (Skip_LF => False, Unchecked_Append => Unchecked_Append_XML10'Access); when XML_1_1 => return Windows1250_Decoder' (Skip_LF => False, Unchecked_Append => Unchecked_Append_XML11'Access); end case; end Decoder; ------------ -- Encode -- ------------ overriding procedure Encode (Self : in out Windows1250_Encoder; String : not null Matreshka.Internals.Strings.Shared_String_Access; Buffer : out MISEV.Shared_Stream_Element_Vector_Access) is pragma Unreferenced (Self); use Matreshka.Internals.Stream_Element_Vectors; use Ada.Streams; Code : Matreshka.Internals.Unicode.Code_Point; Position : Matreshka.Internals.Utf16.Utf16_String_Index := 0; Element : Ada.Streams.Stream_Element; begin if String.Unused = 0 then Buffer := Empty_Shared_Stream_Element_Vector'Access; else Buffer := Allocate (Ada.Streams.Stream_Element_Offset (String.Unused)); while Position < String.Unused loop Matreshka.Internals.Utf16.Unchecked_Next (String.Value, Position, Code); if Code in 16#0000# .. 16#007F# then -- Direct mapping. Element := Stream_Element (Code); elsif Code in Encode_Table_00'Range then -- Table translation, range 00A0 .. 00FD Element := Encode_Table_00 (Code); elsif Code in Encode_Table_01'Range then -- Table translation, range 0102 .. 017E Element := Encode_Table_01 (Code); elsif Code in Encode_Table_02'Range then -- Table translation, range 02C7 .. 02DD Element := Encode_Table_02 (Code); elsif Code in Encode_Table_20'Range then -- Table translation, range 2013 .. 203A Element := Encode_Table_20 (Code); elsif Code = 16#20AC# then -- 16#20AC# => 16#80# -- EURO SIGN Element := 16#80#; elsif Code = 16#2122# then -- 16#2122# => 16#99# -- TRADE MARK SIGN Element := 16#99#; else Element := Question_Mark; end if; Buffer.Value (Buffer.Length) := Element; Buffer.Length := Buffer.Length + 1; end loop; end if; end Encode; ------------- -- Encoder -- ------------- function Encoder return Abstract_Encoder'Class is begin return Windows1250_Encoder'(null record); end Encoder; -------------- -- Is_Error -- -------------- overriding function Is_Error (Self : Windows1250_Decoder) return Boolean is pragma Unreferenced (Self); begin return False; end Is_Error; ------------------- -- Is_Mailformed -- ------------------- overriding function Is_Mailformed (Self : Windows1250_Decoder) return Boolean is pragma Unreferenced (Self); begin return False; end Is_Mailformed; end Matreshka.Internals.Text_Codecs.Windows1250;
with Ahven, float_Math.Geometry.d2; with Ada.Text_IO; use Ada.Text_IO; package body math_Tests.Geometry_2d is use Ahven, float_Math; function almost_Equal (Left, Right : in Real) return Boolean is Tolerance : constant := 0.000_001; begin return abs (Left - Right) <= Tolerance; end almost_Equal; procedure Polygon_is_convex_Test is use float_Math, float_Math.Geometry.d2; the_Poly : Polygon := (vertex_Count => 4, vertices => ((-1.0, -1.0), ( 1.0, -1.0), ( 1.0, 1.0), (-1.0, 1.0))); begin assert (is_Convex (the_Poly), "T1 => " & Image (the_Poly) & " should be convex ... failed !"); the_Poly.Vertices (3) := (0.0, 0.0); assert (is_Convex (the_Poly), "T2 => " & Image (the_Poly) & " should be convex ... failed !"); the_Poly.Vertices (3) := (0.0, 0.1); assert (is_Convex (the_Poly), "T3 => " & Image (the_Poly) & " should be convex ... failed !"); the_Poly.Vertices (3) := (0.0, -0.1); assert (not is_Convex (the_Poly), "T4 => " & Image (the_Poly) & " should not be convex ... failed !"); end Polygon_is_convex_Test; procedure triangle_Area_Test is use float_Math, float_Math.Geometry.d2; the_Tri : Triangle := (vertices => (( 0.0, 0.0), ( 1.0, 0.0), ( 1.0, 1.0))); begin assert (almost_Equal (Area (the_Tri), 0.5), "T1 => & Image (the_Tri) & area should be 0.5 ... failed ! " & Image (Area (the_Tri), 12)); the_Tri := (vertices => ((-0.11073643, -0.179634809), (-0.0276841074, 0.705091298), (-0.0553682148, 0.410182595))); assert (Area (the_Tri) >= 0.0, "T4 => & Image (the_Tri) & area should be positive ... failed !"); -- the_Tri := (vertices => ((-0.11073643, -0.179634809), -- (-0.0553682148, 0.410182595), -- (-0.0276841074, 0.705091298))); -- assert (Area (the_Tri) > 0.0, -- "T2 => & Image (the_Tri) & area should be positive ... failed !"); the_Tri := (vertices => ((-1.0, -1.0), ( 1.0, -1.0), ( 1.0, -0.999999))); assert (Area (the_Tri) > 0.0, "T3 => & Image (the_Tri) & area should be positive ... failed !"); -- tbd: Add tests for degenerate triangles. end triangle_Area_Test; procedure Initialize (T : in out Test) is begin T.set_Name ("Geometry (2D) Tests"); Framework.add_test_Routine (T, Polygon_is_convex_Test'Access, "Polygon is convex Test"); Framework.add_test_Routine (T, triangle_Area_Test 'Access, "Triangle area Test"); end Initialize; end math_Tests.Geometry_2d;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010, 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.Vectors; package body Matreshka.Internals.Regexps.Compiler.Generator is use Matreshka.Internals.Regexps.Engine; package Integer_Vectors is new Ada.Containers.Vectors (Positive, Integer); -------------- -- Generate -- -------------- function Generate (Pattern : not null Shared_Pattern_Access) return Engine.Program is use Integer_Vectors; Program : Instruction_Array (1 .. Pattern.Last * 9); Last : Natural := 0; procedure Compile (Expression : Positive; Instruction : out Positive; Tails : out Vector); procedure Connect_Tails (Tails : Vector; Instruction : Positive); ------------- -- Compile -- ------------- procedure Compile (Expression : Positive; Instruction : out Positive; Tails : out Vector) is procedure Compile_Next; ------------------ -- Compile_Next -- ------------------ procedure Compile_Next is begin if Pattern.AST (Expression).Next /= 0 then declare Next_Instruction : Positive; Previous_Tails : constant Vector := Tails; begin Compile (Pattern.AST (Expression).Next, Next_Instruction, Tails); Connect_Tails (Previous_Tails, Next_Instruction); end; end if; end Compile_Next; begin case Pattern.AST (Expression).Kind is when N_Alternation => Last := Last + 1; Instruction := Last; Tails.Clear; declare Ins_1 : Positive; Ins_2 : Positive; Tails_1 : Vector; Tails_2 : Vector; begin Compile (Get_Preferred (Pattern, Expression), Ins_1, Tails_1); Compile (Get_Fallback (Pattern, Expression), Ins_2, Tails_2); Program (Instruction) := (Split, Ins_1, Ins_2); Tails := Tails_1 & Tails_2; end; when N_Match_Any => Last := Last + 1; Instruction := Last; Tails.Clear; Program (Instruction) := (Any_Code_Point, 0); Tails.Append (Instruction); Compile_Next; when N_Match_Code => Last := Last + 1; Instruction := Last; Tails.Clear; Program (Instruction) := (Code_Point, 0, Pattern.AST (Expression).Code); Tails.Append (Instruction); Compile_Next; when N_Match_Property => Last := Last + 1; Instruction := Last; Tails.Clear; Program (Instruction) := (I_Property, 0, Pattern.AST (Expression).Value, Pattern.AST (Expression).Negative); Tails.Append (Instruction); Compile_Next; when N_Member_Code => Last := Last + 1; Instruction := Last; if Pattern.AST (Expression).Next = 0 then Program (Instruction) := (Code_Point, 0, Pattern.AST (Expression).Code); Tails.Clear; Tails.Append (Instruction); else declare Ins_1 : Integer; Ins_2 : Integer; begin Last := Last + 1; Ins_1 := Last; Compile (Pattern.AST (Expression).Next, Ins_2, Tails); Program (Ins_1) := (Code_Point, 0, Pattern.AST (Expression).Code); Tails.Append (Ins_1); Program (Instruction) := (Split, Ins_1, Ins_2); end; end if; when N_Member_Range => Last := Last + 1; Instruction := Last; if Pattern.AST (Expression).Next = 0 then Program (Instruction) := (Code_Range, 0, False, Pattern.AST (Expression).Low, Pattern.AST (Expression).High); Tails.Clear; Tails.Append (Instruction); else declare Ins_1 : Integer; Ins_2 : Integer; begin Last := Last + 1; Ins_1 := Last; Compile (Pattern.AST (Expression).Next, Ins_2, Tails); Program (Ins_1) := (Code_Range, 0, False, Pattern.AST (Expression).Low, Pattern.AST (Expression).High); Tails.Append (Ins_1); Program (Instruction) := (Split, Ins_1, Ins_2); end; end if; when N_Member_Property => Last := Last + 1; Instruction := Last; if Pattern.AST (Expression).Next = 0 then Program (Instruction) := (I_Property, 0, Pattern.AST (Expression).Value, Pattern.AST (Expression).Negative); Tails.Clear; Tails.Append (Instruction); else declare Ins_1 : Integer; Ins_2 : Integer; begin Last := Last + 1; Ins_1 := Last; Compile (Pattern.AST (Expression).Next, Ins_2, Tails); Program (Ins_1) := (I_Property, 0, Pattern.AST (Expression).Value, Pattern.AST (Expression).Negative); Tails.Append (Ins_1); Program (Instruction) := (Split, Ins_1, Ins_2); end; end if; when N_Character_Class => if not Pattern.AST (Expression).Negated then Compile (Get_Members (Pattern, Expression), Instruction, Tails); else declare Ins_1 : Integer; Ins_Terminate : Integer; Ins_Any : Integer; begin Last := Last + 1; Instruction := Last; Tails.Clear; Compile (Get_Members (Pattern, Expression), Ins_1, Tails); Last := Last + 1; Ins_Terminate := Last; Last := Last + 1; Ins_Any := Last; Program (Instruction) := (Split, Ins_1, Ins_Any); Connect_Tails (Tails, Ins_Terminate); Program (Ins_Terminate) := (I_Terminate, Ins_Any); Program (Ins_Any) := (Any_Code_Point, 0); Tails.Clear; Tails.Append (Ins_Any); end; end if; Compile_Next; when N_Multiplicity => if Pattern.AST (Expression).Lower = 0 then if Pattern.AST (Expression).Upper = Natural'Last then -- Zero or more Last := Last + 1; Instruction := Last; declare Ins_1 : Positive; begin Compile (Get_Expression (Pattern, Expression), Ins_1, Tails); Connect_Tails (Tails, Instruction); if Pattern.AST (Expression).Greedy then Program (Instruction) := (Split, Ins_1, 0); else Program (Instruction) := (Split, 0, Ins_1); end if; Tails.Clear; Tails.Append (Instruction); Compile_Next; end; elsif Pattern.AST (Expression).Upper >= 1 then -- N optional elements declare Ins_1 : Positive; Ins_2 : Positive; Tails_L : Vector; begin Instruction := Last + 1; Tails.Clear; for J in Pattern.AST (Expression).Lower + 1 .. Pattern.AST (Expression).Upper loop Last := Last + 1; Ins_1 := Last; Connect_Tails (Tails_L, Ins_1); Tails.Append (Ins_1); Compile (Get_Expression (Pattern, Expression), Ins_2, Tails_L); if Pattern.AST (Expression).Greedy then Program (Ins_1) := (Split, Ins_2, 0); else Program (Ins_1) := (Split, 0, Ins_2); end if; end loop; Tails.Append (Tails_L); Compile_Next; end; end if; else declare Ins_1 : Positive; Ins_2 : Positive; Tails_L : Vector; begin Tails.Clear; for J in 1 .. Pattern.AST (Expression).Lower loop Compile (Get_Expression (Pattern, Expression), Ins_1, Tails); Connect_Tails (Tails_L, Ins_1); Tails_L := Tails; if J = 1 then Instruction := Ins_1; end if; end loop; if Pattern.AST (Expression).Upper = Natural'Last then Last := Last + 1; Ins_2 := Last; Connect_Tails (Tails_L, Ins_2); if Pattern.AST (Expression).Greedy then Program (Ins_2) := (Split, Ins_1, 0); else Program (Ins_2) := (Split, 0, Ins_1); end if; Tails.Clear; Tails.Append (Ins_2); else Tails.Clear; for J in Pattern.AST (Expression).Lower + 1 .. Pattern.AST (Expression).Upper loop Last := Last + 1; Ins_1 := Last; Connect_Tails (Tails_L, Ins_1); Tails.Append (Ins_1); Compile (Get_Expression (Pattern, Expression), Ins_2, Tails_L); if Pattern.AST (Expression).Greedy then Program (Ins_1) := (Split, Ins_2, 0); else Program (Ins_1) := (Split, 0, Ins_2); end if; end loop; Tails.Append (Tails_L); end if; Compile_Next; end; end if; when N_Subexpression => if Pattern.AST (Expression).Capture then declare Ins_1 : Positive; begin Last := Last + 1; Instruction := Last; Compile (Get_Expression (Pattern, Expression), Ins_1, Tails); Program (Instruction) := (Save, Ins_1, Pattern.AST (Expression).Index, True); Last := Last + 1; Ins_1 := Last; Program (Ins_1) := (Save, 0, Pattern.AST (Expression).Index, False); Connect_Tails (Tails, Ins_1); Tails.Clear; Tails.Append (Ins_1); Compile_Next; end; else Compile (Get_Expression (Pattern, Expression), Instruction, Tails); end if; when N_Anchor => Last := Last + 1; Instruction := Last; Program (Instruction) := (I_Anchor, 0, Pattern.AST (Expression).Start_Of_Line, Pattern.AST (Expression).End_Of_Line); Tails.Clear; Tails.Append (Instruction); Compile_Next; when others => raise Program_Error; end case; end Compile; ------------------- -- Connect_Tails -- ------------------- procedure Connect_Tails (Tails : Vector; Instruction : Positive) is Position : Cursor := Tails.First; begin while Has_Element (Position) loop if Program (Element (Position)).Kind = Split then if Program (Element (Position)).Next = 0 then Program (Element (Position)).Next := Instruction; else Program (Element (Position)).Another := Instruction; end if; else Program (Element (Position)).Next := Instruction; end if; Next (Position); end loop; end Connect_Tails; Ins_Split : Positive; Ins_Any : Positive; Ins_Save : Positive; Ins_1 : Positive; Tails_1 : Vector; begin Last := Last + 1; Ins_Split := Last; Last := Last + 1; Ins_Any := Last; Last := Last + 1; Ins_Save := Last; Program (Ins_Split) := (Split, Ins_Save, Ins_Any); Program (Ins_Any) := (Any_Code_Point, Ins_Split); Compile (Pattern.List (Pattern.Start).Head, Ins_1, Tails_1); Program (Ins_Save) := (Save, Ins_1, 0, True); Last := Last + 1; Program (Last) := (Save, Last + 1, 0, False); Connect_Tails (Tails_1, Last); Last := Last + 1; Program (Last) := (Kind => Match); return (Last, Program (1 .. Last), Pattern.Captures); end Generate; end Matreshka.Internals.Regexps.Compiler.Generator;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>honeybee</name> <ret_bitwidth>64</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>edge_p1_x</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>edge_y.p1.x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>edge_p1_y</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>edge_y.p1.z</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>edge_p1_z</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>edge_y.p1.y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>edge_p2_x</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>edge_y.p2.x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>edge_p2_y</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>edge_y.p2.z</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>edge_p2_z</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>edge_y.p2.y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_7"> <Value> <Obj> <type>0</type> <id>15</id> <name>edge_p2_z_read</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>29</item> <item>30</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>16</id> <name>edge_p2_y_read</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>31</item> <item>32</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>17</id> <name>edge_p2_x_read</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>33</item> <item>34</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>18</id> <name>edge_p1_z_read</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>35</item> <item>36</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>19</id> <name>edge_p1_y_read</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>37</item> <item>38</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>20</id> <name>edge_p1_x_read</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>39</item> <item>40</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>21</id> <name>collisions_z</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName>collisions_z</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>8.58</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>22</id> <name>collisions_y</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>154</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>154</second> </item> </second> </item> </inlineStackInfo> <originalName>collisions_y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>8.58</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>23</id> <name>collisions_x</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>156</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>156</second> </item> </second> </item> </inlineStackInfo> <originalName>collisions_x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>58</item> <item>59</item> <item>60</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>8.58</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>24</id> <name>or_ln159</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>159</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>159</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>65</item> <item>66</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>25</id> <name>collisions</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>159</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>159</second> </item> </second> </item> </inlineStackInfo> <originalName>collisions</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>67</item> <item>68</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>26</id> <name>_ln160</name> <fileName>src/honeybee.c</fileName> <fileDirectory>/mnt/hgfs/Thesis/HoneyBee</fileDirectory> <lineNumber>160</lineNumber> <contextFuncName>honeybee</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/mnt/hgfs/Thesis/HoneyBee</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>src/honeybee.c</first> <second>honeybee</second> </first> <second>160</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>69</item> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_19"> <Value> <Obj> <type>2</type> <id>41</id> <name>checkAxis_2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:checkAxis.2&gt;</content> </item> <item class_id_reference="16" object_id="_20"> <Value> <Obj> <type>2</type> <id>49</id> <name>checkAxis_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:checkAxis.0&gt;</content> </item> <item class_id_reference="16" object_id="_21"> <Value> <Obj> <type>2</type> <id>57</id> <name>checkAxis_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:checkAxis.1&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_22"> <Obj> <type>3</type> <id>27</id> <name>honeybee</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>12</count> <item_version>0</item_version> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>32</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_23"> <id>30</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_24"> <id>32</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_25"> <id>34</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_26"> <id>36</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_27"> <id>38</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_28"> <id>40</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_29"> <id>42</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_30"> <id>43</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_31"> <id>44</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_32"> <id>45</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_33"> <id>46</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_34"> <id>47</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_35"> <id>48</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_36"> <id>50</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_37"> <id>51</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_38"> <id>52</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_39"> <id>53</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_40"> <id>54</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_41"> <id>55</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_42"> <id>56</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_43"> <id>58</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_44"> <id>59</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_45"> <id>60</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_46"> <id>61</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_47"> <id>62</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_48"> <id>63</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_49"> <id>64</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_50"> <id>65</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_51"> <id>66</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_52"> <id>67</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_53"> <id>68</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_54"> <id>69</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_55"> <mId>1</mId> <mTag>honeybee</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>27</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>213</mMinLatency> <mMaxLatency>213</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="-1"></res> <node_label_latency class_id="26" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="27" tracking_level="0" version="0"> <first>15</first> <second class_id="28" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>22</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>23</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>24</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="29" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="30" tracking_level="0" version="0"> <first>27</first> <second class_id="31" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="32" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="34" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="35" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="36" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core class_id="37" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
pragma License (Unrestricted); -- implementation unit required by compiler package System.Wid_WChar is pragma Pure; -- required for Wide_Character'Width by compiler (s-widwch.ads) function Width_Wide_Character (Lo, Hi : Wide_Character) return Natural; -- required for Wide_Wide_Character'Width by compiler (s-widwch.ads) function Width_Wide_Wide_Character (Lo, Hi : Wide_Wide_Character) return Natural; end System.Wid_WChar;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- S Y S T E M . E X P _ L F L T -- -- -- -- S p e c -- -- -- -- $Revision: 2 $ -- -- -- -- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved -- -- -- -- The GNAT library is free software; you can redistribute it and/or modify -- -- it under terms of the GNU Library General Public License as published by -- -- the Free Software Foundation; either version 2, or (at your option) any -- -- later version. The GNAT library is distributed in the hope that it will -- -- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -- -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- Library General Public License for more details. You should have -- -- received a copy of the GNU Library General Public License along with -- -- the GNAT library; see the file COPYING.LIB. If not, write to the Free -- -- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ -- Long_Float exponentiation (checks on) with System.Exp_Gen; package System.Exp_LFlt is pragma Pure (Exp_LFlt); function Exp_Long_Float is new System.Exp_Gen.Exp_Float_Type (Long_Float); end System.Exp_LFlt;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ package AMF.Internals.Tables.Primitive_Types_Metamodel.Links is procedure Initialize; private procedure Initialize_1; procedure Initialize_2; procedure Initialize_3; procedure Initialize_4; procedure Initialize_5; procedure Initialize_6; procedure Initialize_7; procedure Initialize_8; procedure Initialize_9; procedure Initialize_10; procedure Initialize_11; procedure Initialize_12; procedure Initialize_13; procedure Initialize_14; procedure Initialize_15; end AMF.Internals.Tables.Primitive_Types_Metamodel.Links;
package body impact.d2.Joint.mouse is procedure dummy is begin null; end dummy; -- #include <Box2D/Dynamics/Joints/b2MouseJoint.h> -- #include <Box2D/Dynamics/b2Body.h> -- #include <Box2D/Dynamics/b2TimeStep.h> -- -- // p = attached point, m = mouse point -- // C = p - m -- // Cdot = v -- // = v + cross(w, r) -- // J = [I r_skew] -- // Identity used: -- // w k % (rx i + ry j) = w * (-ry i + rx j) -- -- b2MouseJoint::b2MouseJoint(const b2MouseJointDef* def) -- : b2Joint(def) -- { -- b2Assert(def->target.IsValid()); -- b2Assert(b2IsValid(def->maxForce) && def->maxForce >= 0.0f); -- b2Assert(b2IsValid(def->frequencyHz) && def->frequencyHz >= 0.0f); -- b2Assert(b2IsValid(def->dampingRatio) && def->dampingRatio >= 0.0f); -- -- m_target = def->target; -- m_localAnchor = b2MulT(m_bodyB->GetTransform(), m_target); -- -- m_maxForce = def->maxForce; -- m_impulse.SetZero(); -- -- m_frequencyHz = def->frequencyHz; -- m_dampingRatio = def->dampingRatio; -- -- m_beta = 0.0f; -- m_gamma = 0.0f; -- } -- -- void b2MouseJoint::SetTarget(const b2Vec2& target) -- { -- if (m_bodyB->IsAwake() == false) -- { -- m_bodyB->SetAwake(true); -- } -- m_target = target; -- } -- -- const b2Vec2& b2MouseJoint::GetTarget() const -- { -- return m_target; -- } -- -- void b2MouseJoint::SetMaxForce(float32 force) -- { -- m_maxForce = force; -- } -- -- float32 b2MouseJoint::GetMaxForce() const -- { -- return m_maxForce; -- } -- -- void b2MouseJoint::SetFrequency(float32 hz) -- { -- m_frequencyHz = hz; -- } -- -- float32 b2MouseJoint::GetFrequency() const -- { -- return m_frequencyHz; -- } -- -- void b2MouseJoint::SetDampingRatio(float32 ratio) -- { -- m_dampingRatio = ratio; -- } -- -- float32 b2MouseJoint::GetDampingRatio() const -- { -- return m_dampingRatio; -- } -- -- void b2MouseJoint::InitVelocityConstraints(const b2TimeStep& step) -- { -- b2Body* b = m_bodyB; -- -- float32 mass = b->GetMass(); -- -- // Frequency -- float32 omega = 2.0f * b2_pi * m_frequencyHz; -- -- // Damping coefficient -- float32 d = 2.0f * mass * m_dampingRatio * omega; -- -- // Spring stiffness -- float32 k = mass * (omega * omega); -- -- // magic formulas -- // gamma has units of inverse mass. -- // beta has units of inverse time. -- b2Assert(d + step.dt * k > b2_epsilon); -- m_gamma = step.dt * (d + step.dt * k); -- if (m_gamma != 0.0f) -- { -- m_gamma = 1.0f / m_gamma; -- } -- m_beta = step.dt * k * m_gamma; -- -- // Compute the effective mass matrix. -- b2Vec2 r = b2Mul(b->GetTransform().R, m_localAnchor - b->GetLocalCenter()); -- -- // K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)] -- // = [1/m1+1/m2 0 ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y] -- // [ 0 1/m1+1/m2] [-r1.x*r1.y r1.x*r1.x] [-r1.x*r1.y r1.x*r1.x] -- float32 invMass = b->m_invMass; -- float32 invI = b->m_invI; -- -- b2Mat22 K1; -- K1.col1.x = invMass; K1.col2.x = 0.0f; -- K1.col1.y = 0.0f; K1.col2.y = invMass; -- -- b2Mat22 K2; -- K2.col1.x = invI * r.y * r.y; K2.col2.x = -invI * r.x * r.y; -- K2.col1.y = -invI * r.x * r.y; K2.col2.y = invI * r.x * r.x; -- -- b2Mat22 K = K1 + K2; -- K.col1.x += m_gamma; -- K.col2.y += m_gamma; -- -- m_mass = K.GetInverse(); -- -- m_C = b->m_sweep.c + r - m_target; -- -- // Cheat with some damping -- b->m_angularVelocity *= 0.98f; -- -- // Warm starting. -- m_impulse *= step.dtRatio; -- b->m_linearVelocity += invMass * m_impulse; -- b->m_angularVelocity += invI * b2Cross(r, m_impulse); -- } -- -- void b2MouseJoint::SolveVelocityConstraints(const b2TimeStep& step) -- { -- b2Body* b = m_bodyB; -- -- b2Vec2 r = b2Mul(b->GetTransform().R, m_localAnchor - b->GetLocalCenter()); -- -- // Cdot = v + cross(w, r) -- b2Vec2 Cdot = b->m_linearVelocity + b2Cross(b->m_angularVelocity, r); -- b2Vec2 impulse = b2Mul(m_mass, -(Cdot + m_beta * m_C + m_gamma * m_impulse)); -- -- b2Vec2 oldImpulse = m_impulse; -- m_impulse += impulse; -- float32 maxImpulse = step.dt * m_maxForce; -- if (m_impulse.LengthSquared() > maxImpulse * maxImpulse) -- { -- m_impulse *= maxImpulse / m_impulse.Length(); -- } -- impulse = m_impulse - oldImpulse; -- -- b->m_linearVelocity += b->m_invMass * impulse; -- b->m_angularVelocity += b->m_invI * b2Cross(r, impulse); -- } -- -- b2Vec2 b2MouseJoint::GetAnchorA() const -- { -- return m_target; -- } -- -- b2Vec2 b2MouseJoint::GetAnchorB() const -- { -- return m_bodyB->GetWorldPoint(m_localAnchor); -- } -- -- b2Vec2 b2MouseJoint::GetReactionForce(float32 inv_dt) const -- { -- return inv_dt * m_impulse; -- } -- -- float32 b2MouseJoint::GetReactionTorque(float32 inv_dt) const -- { -- return inv_dt * 0.0f; -- } end impact.d2.Joint.mouse;
-- { dg-do compile } -- { dg-options "-fdump-tree-gimple" } with Atomic6_Pkg; use Atomic6_Pkg; procedure Atomic6_3 is function F (I : Integer) return Integer is begin return I; end; function F2 return Integer is begin return Integer(Counter1); end; function F3 return Integer is begin return Timer1; end; Temp : Integer; begin Counter1 := Int(F(Integer(Counter2))); Timer1 := F(Timer2); Counter1 := Int(F(Timer1)); Timer1 := F(Integer(Counter1)); Temp := F(Integer(Counter1)); Counter1 := Int(F(Temp)); Temp := F(Timer1); Timer1 := F(Temp); Temp := F2; Temp := F3; end; -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&atomic6_pkg__counter1" 3 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&atomic6_pkg__counter2" 1 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&atomic6_pkg__timer1" 3 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&atomic6_pkg__timer2" 1 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&temp" 0 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*ptr" 0 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&atomic6_pkg__counter1" 3 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&atomic6_pkg__counter2" 0 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&atomic6_pkg__timer1" 3 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&atomic6_pkg__timer2" 0 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&temp" 0 "gimple"} } -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*ptr" 0 "gimple"} }
with Ada.Text_IO.Text_Streams; use Ada.Text_IO.Text_Streams; with Ada.Strings.Maps; use Ada.Strings.Maps; with Ada.Command_Line; use Ada.Command_Line; procedure Rot_13 is From_Sequence : Character_Sequence := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; Result_Sequence : Character_Sequence := "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM"; Rot_13_Mapping : Character_Mapping := To_Mapping(From_Sequence, Result_Sequence); In_Char : Character; Stdio : Stream_Access := Stream(Ada.Text_IO.Standard_Input); Stdout : Stream_Access := Stream(Ada.Text_Io.Standard_Output); Input : Ada.Text_Io.File_Type; begin if Argument_Count > 0 then for I in 1..Argument_Count loop begin Ada.Text_Io.Open(File => Input, Mode => Ada.Text_Io.In_File, Name => Argument(I)); Stdio := Stream(Input); while not Ada.Text_Io.End_Of_File(Input) loop In_Char :=Character'Input(Stdio); Character'Output(Stdout, Value(Rot_13_Mapping, In_Char)); end loop; Ada.Text_IO.Close(Input); exception when Ada.Text_IO.Name_Error => Ada.Text_Io.Put_Line(File => Ada.Text_Io.Standard_Error, Item => "File " & Argument(I) & " is not a file."); when Ada.Text_Io.Status_Error => Ada.Text_Io.Put_Line(File => Ada.Text_Io.Standard_Error, Item => "File " & Argument(I) & " is already opened."); end; end loop; else while not Ada.Text_Io.End_Of_File loop In_Char :=Character'Input(Stdio); Character'Output(Stdout, Value(Rot_13_Mapping, In_Char)); end loop; end if; end Rot_13;
-- Auto generated file. Don't edit -- Read copyright and license at the end of this file package body Encodings.Maps.CP_1256 is Forward : Forward_Map (Character'Val(16#80#) .. Character'Last) := (Wide_Character'Val(16#20AC#), Wide_Character'Val( 16#67E#), Wide_Character'Val(16#201A#), Wide_Character'Val( 16#192#), Wide_Character'Val(16#201E#), Wide_Character'Val(16#2026#), Wide_Character'Val(16#2020#), Wide_Character'Val(16#2021#), Wide_Character'Val( 16#2C6#), Wide_Character'Val(16#2030#), Wide_Character'Val( 16#679#), Wide_Character'Val(16#2039#), Wide_Character'Val( 16#152#), Wide_Character'Val( 16#686#), Wide_Character'Val( 16#698#), Wide_Character'Val( 16#688#), Wide_Character'Val( 16#6AF#), Wide_Character'Val(16#2018#), Wide_Character'Val(16#2019#), Wide_Character'Val(16#201C#), Wide_Character'Val(16#201D#), Wide_Character'Val(16#2022#), Wide_Character'Val(16#2013#), Wide_Character'Val(16#2014#), Wide_Character'Val( 16#6A9#), Wide_Character'Val(16#2122#), Wide_Character'Val( 16#691#), Wide_Character'Val(16#203A#), Wide_Character'Val( 16#153#), Wide_Character'Val(16#200C#), Wide_Character'Val(16#200D#), Wide_Character'Val( 16#6BA#), Wide_Character'Val( 16#A0#), Wide_Character'Val( 16#60C#), Wide_Character'Val( 16#A2#), Wide_Character'Val( 16#A3#), Wide_Character'Val( 16#A4#), Wide_Character'Val( 16#A5#), Wide_Character'Val( 16#A6#), Wide_Character'Val( 16#A7#), Wide_Character'Val( 16#A8#), Wide_Character'Val( 16#A9#), Wide_Character'Val( 16#6BE#), Wide_Character'Val( 16#AB#), Wide_Character'Val( 16#AC#), Wide_Character'Val( 16#AD#), Wide_Character'Val( 16#AE#), Wide_Character'Val( 16#AF#), Wide_Character'Val( 16#B0#), Wide_Character'Val( 16#B1#), Wide_Character'Val( 16#B2#), Wide_Character'Val( 16#B3#), Wide_Character'Val( 16#B4#), Wide_Character'Val( 16#B5#), Wide_Character'Val( 16#B6#), Wide_Character'Val( 16#B7#), Wide_Character'Val( 16#B8#), Wide_Character'Val( 16#B9#), Wide_Character'Val( 16#61B#), Wide_Character'Val( 16#BB#), Wide_Character'Val( 16#BC#), Wide_Character'Val( 16#BD#), Wide_Character'Val( 16#BE#), Wide_Character'Val( 16#61F#), Wide_Character'Val( 16#6C1#), Wide_Character'Val( 16#621#), Wide_Character'Val( 16#622#), Wide_Character'Val( 16#623#), Wide_Character'Val( 16#624#), Wide_Character'Val( 16#625#), Wide_Character'Val( 16#626#), Wide_Character'Val( 16#627#), Wide_Character'Val( 16#628#), Wide_Character'Val( 16#629#), Wide_Character'Val( 16#62A#), Wide_Character'Val( 16#62B#), Wide_Character'Val( 16#62C#), Wide_Character'Val( 16#62D#), Wide_Character'Val( 16#62E#), Wide_Character'Val( 16#62F#), Wide_Character'Val( 16#630#), Wide_Character'Val( 16#631#), Wide_Character'Val( 16#632#), Wide_Character'Val( 16#633#), Wide_Character'Val( 16#634#), Wide_Character'Val( 16#635#), Wide_Character'Val( 16#636#), Wide_Character'Val( 16#D7#), Wide_Character'Val( 16#637#), Wide_Character'Val( 16#638#), Wide_Character'Val( 16#639#), Wide_Character'Val( 16#63A#), Wide_Character'Val( 16#640#), Wide_Character'Val( 16#641#), Wide_Character'Val( 16#642#), Wide_Character'Val( 16#643#), Wide_Character'Val( 16#E0#), Wide_Character'Val( 16#644#), Wide_Character'Val( 16#E2#), Wide_Character'Val( 16#645#), Wide_Character'Val( 16#646#), Wide_Character'Val( 16#647#), Wide_Character'Val( 16#648#), Wide_Character'Val( 16#E7#), Wide_Character'Val( 16#E8#), Wide_Character'Val( 16#E9#), Wide_Character'Val( 16#EA#), Wide_Character'Val( 16#EB#), Wide_Character'Val( 16#649#), Wide_Character'Val( 16#64A#), Wide_Character'Val( 16#EE#), Wide_Character'Val( 16#EF#), Wide_Character'Val( 16#64B#), Wide_Character'Val( 16#64C#), Wide_Character'Val( 16#64D#), Wide_Character'Val( 16#64E#), Wide_Character'Val( 16#F4#), Wide_Character'Val( 16#64F#), Wide_Character'Val( 16#650#), Wide_Character'Val( 16#F7#), Wide_Character'Val( 16#651#), Wide_Character'Val( 16#F9#), Wide_Character'Val( 16#652#), Wide_Character'Val( 16#FB#), Wide_Character'Val( 16#FC#), Wide_Character'Val(16#200E#), Wide_Character'Val(16#200F#), Wide_Character'Val( 16#6D2#)); Ranges : Maps.Wide_Ranges (1 .. 44) := ((Wide_Character'Val( 16#0#),Wide_Character'Val( 16#7F#), 1), (Wide_Character'Val( 16#A0#),Wide_Character'Val( 16#A0#), 129), (Wide_Character'Val( 16#A2#),Wide_Character'Val( 16#A9#), 130), (Wide_Character'Val( 16#AB#),Wide_Character'Val( 16#B9#), 138), (Wide_Character'Val( 16#BB#),Wide_Character'Val( 16#BE#), 153), (Wide_Character'Val( 16#D7#),Wide_Character'Val( 16#D7#), 157), (Wide_Character'Val( 16#E0#),Wide_Character'Val( 16#E0#), 158), (Wide_Character'Val( 16#E2#),Wide_Character'Val( 16#E2#), 159), (Wide_Character'Val( 16#E7#),Wide_Character'Val( 16#EB#), 160), (Wide_Character'Val( 16#EE#),Wide_Character'Val( 16#EF#), 165), (Wide_Character'Val( 16#F4#),Wide_Character'Val( 16#F4#), 167), (Wide_Character'Val( 16#F7#),Wide_Character'Val( 16#F7#), 168), (Wide_Character'Val( 16#F9#),Wide_Character'Val( 16#F9#), 169), (Wide_Character'Val( 16#FB#),Wide_Character'Val( 16#FC#), 170), (Wide_Character'Val( 16#152#),Wide_Character'Val( 16#153#), 172), (Wide_Character'Val( 16#192#),Wide_Character'Val( 16#192#), 174), (Wide_Character'Val( 16#2C6#),Wide_Character'Val( 16#2C6#), 175), (Wide_Character'Val( 16#60C#),Wide_Character'Val( 16#60C#), 176), (Wide_Character'Val( 16#61B#),Wide_Character'Val( 16#61B#), 177), (Wide_Character'Val( 16#61F#),Wide_Character'Val( 16#61F#), 178), (Wide_Character'Val( 16#621#),Wide_Character'Val( 16#63A#), 179), (Wide_Character'Val( 16#640#),Wide_Character'Val( 16#652#), 205), (Wide_Character'Val( 16#679#),Wide_Character'Val( 16#679#), 224), (Wide_Character'Val( 16#67E#),Wide_Character'Val( 16#67E#), 225), (Wide_Character'Val( 16#686#),Wide_Character'Val( 16#686#), 226), (Wide_Character'Val( 16#688#),Wide_Character'Val( 16#688#), 227), (Wide_Character'Val( 16#691#),Wide_Character'Val( 16#691#), 228), (Wide_Character'Val( 16#698#),Wide_Character'Val( 16#698#), 229), (Wide_Character'Val( 16#6A9#),Wide_Character'Val( 16#6A9#), 230), (Wide_Character'Val( 16#6AF#),Wide_Character'Val( 16#6AF#), 231), (Wide_Character'Val( 16#6BA#),Wide_Character'Val( 16#6BA#), 232), (Wide_Character'Val( 16#6BE#),Wide_Character'Val( 16#6BE#), 233), (Wide_Character'Val( 16#6C1#),Wide_Character'Val( 16#6C1#), 234), (Wide_Character'Val( 16#6D2#),Wide_Character'Val( 16#6D2#), 235), (Wide_Character'Val(16#200C#),Wide_Character'Val(16#200F#), 236), (Wide_Character'Val(16#2013#),Wide_Character'Val(16#2014#), 240), (Wide_Character'Val(16#2018#),Wide_Character'Val(16#201A#), 242), (Wide_Character'Val(16#201C#),Wide_Character'Val(16#201E#), 245), (Wide_Character'Val(16#2020#),Wide_Character'Val(16#2022#), 248), (Wide_Character'Val(16#2026#),Wide_Character'Val(16#2026#), 251), (Wide_Character'Val(16#2030#),Wide_Character'Val(16#2030#), 252), (Wide_Character'Val(16#2039#),Wide_Character'Val(16#203A#), 253), (Wide_Character'Val(16#20AC#),Wide_Character'Val(16#20AC#), 255), (Wide_Character'Val(16#2122#),Wide_Character'Val(16#2122#), 256)); Backward : Maps.Backward_Map (1 .. 256) := (Character'Val( 16#0#), Character'Val( 16#1#), Character'Val( 16#2#), Character'Val( 16#3#), Character'Val( 16#4#), Character'Val( 16#5#), Character'Val( 16#6#), Character'Val( 16#7#), Character'Val( 16#8#), Character'Val( 16#9#), Character'Val( 16#A#), Character'Val( 16#B#), Character'Val( 16#C#), Character'Val( 16#D#), Character'Val( 16#E#), Character'Val( 16#F#), Character'Val(16#10#), Character'Val(16#11#), Character'Val(16#12#), Character'Val(16#13#), Character'Val(16#14#), Character'Val(16#15#), Character'Val(16#16#), Character'Val(16#17#), Character'Val(16#18#), Character'Val(16#19#), Character'Val(16#1A#), Character'Val(16#1B#), Character'Val(16#1C#), Character'Val(16#1D#), Character'Val(16#1E#), Character'Val(16#1F#), Character'Val(16#20#), Character'Val(16#21#), Character'Val(16#22#), Character'Val(16#23#), Character'Val(16#24#), Character'Val(16#25#), Character'Val(16#26#), Character'Val(16#27#), Character'Val(16#28#), Character'Val(16#29#), Character'Val(16#2A#), Character'Val(16#2B#), Character'Val(16#2C#), Character'Val(16#2D#), Character'Val(16#2E#), Character'Val(16#2F#), Character'Val(16#30#), Character'Val(16#31#), Character'Val(16#32#), Character'Val(16#33#), Character'Val(16#34#), Character'Val(16#35#), Character'Val(16#36#), Character'Val(16#37#), Character'Val(16#38#), Character'Val(16#39#), Character'Val(16#3A#), Character'Val(16#3B#), Character'Val(16#3C#), Character'Val(16#3D#), Character'Val(16#3E#), Character'Val(16#3F#), Character'Val(16#40#), Character'Val(16#41#), Character'Val(16#42#), Character'Val(16#43#), Character'Val(16#44#), Character'Val(16#45#), Character'Val(16#46#), Character'Val(16#47#), Character'Val(16#48#), Character'Val(16#49#), Character'Val(16#4A#), Character'Val(16#4B#), Character'Val(16#4C#), Character'Val(16#4D#), Character'Val(16#4E#), Character'Val(16#4F#), Character'Val(16#50#), Character'Val(16#51#), Character'Val(16#52#), Character'Val(16#53#), Character'Val(16#54#), Character'Val(16#55#), Character'Val(16#56#), Character'Val(16#57#), Character'Val(16#58#), Character'Val(16#59#), Character'Val(16#5A#), Character'Val(16#5B#), Character'Val(16#5C#), Character'Val(16#5D#), Character'Val(16#5E#), Character'Val(16#5F#), Character'Val(16#60#), Character'Val(16#61#), Character'Val(16#62#), Character'Val(16#63#), Character'Val(16#64#), Character'Val(16#65#), Character'Val(16#66#), Character'Val(16#67#), Character'Val(16#68#), Character'Val(16#69#), Character'Val(16#6A#), Character'Val(16#6B#), Character'Val(16#6C#), Character'Val(16#6D#), Character'Val(16#6E#), Character'Val(16#6F#), Character'Val(16#70#), Character'Val(16#71#), Character'Val(16#72#), Character'Val(16#73#), Character'Val(16#74#), Character'Val(16#75#), Character'Val(16#76#), Character'Val(16#77#), Character'Val(16#78#), Character'Val(16#79#), Character'Val(16#7A#), Character'Val(16#7B#), Character'Val(16#7C#), Character'Val(16#7D#), Character'Val(16#7E#), Character'Val(16#7F#), Character'Val(16#A0#), Character'Val(16#A2#), Character'Val(16#A3#), Character'Val(16#A4#), Character'Val(16#A5#), Character'Val(16#A6#), Character'Val(16#A7#), Character'Val(16#A8#), Character'Val(16#A9#), Character'Val(16#AB#), Character'Val(16#AC#), Character'Val(16#AD#), Character'Val(16#AE#), Character'Val(16#AF#), Character'Val(16#B0#), Character'Val(16#B1#), Character'Val(16#B2#), Character'Val(16#B3#), Character'Val(16#B4#), Character'Val(16#B5#), Character'Val(16#B6#), Character'Val(16#B7#), Character'Val(16#B8#), Character'Val(16#B9#), Character'Val(16#BB#), Character'Val(16#BC#), Character'Val(16#BD#), Character'Val(16#BE#), Character'Val(16#D7#), Character'Val(16#E0#), Character'Val(16#E2#), Character'Val(16#E7#), Character'Val(16#E8#), Character'Val(16#E9#), Character'Val(16#EA#), Character'Val(16#EB#), Character'Val(16#EE#), Character'Val(16#EF#), Character'Val(16#F4#), Character'Val(16#F7#), Character'Val(16#F9#), Character'Val(16#FB#), Character'Val(16#FC#), Character'Val(16#8C#), Character'Val(16#9C#), Character'Val(16#83#), Character'Val(16#88#), Character'Val(16#A1#), Character'Val(16#BA#), Character'Val(16#BF#), Character'Val(16#C1#), Character'Val(16#C2#), Character'Val(16#C3#), Character'Val(16#C4#), Character'Val(16#C5#), Character'Val(16#C6#), Character'Val(16#C7#), Character'Val(16#C8#), Character'Val(16#C9#), Character'Val(16#CA#), Character'Val(16#CB#), Character'Val(16#CC#), Character'Val(16#CD#), Character'Val(16#CE#), Character'Val(16#CF#), Character'Val(16#D0#), Character'Val(16#D1#), Character'Val(16#D2#), Character'Val(16#D3#), Character'Val(16#D4#), Character'Val(16#D5#), Character'Val(16#D6#), Character'Val(16#D8#), Character'Val(16#D9#), Character'Val(16#DA#), Character'Val(16#DB#), Character'Val(16#DC#), Character'Val(16#DD#), Character'Val(16#DE#), Character'Val(16#DF#), Character'Val(16#E1#), Character'Val(16#E3#), Character'Val(16#E4#), Character'Val(16#E5#), Character'Val(16#E6#), Character'Val(16#EC#), Character'Val(16#ED#), Character'Val(16#F0#), Character'Val(16#F1#), Character'Val(16#F2#), Character'Val(16#F3#), Character'Val(16#F5#), Character'Val(16#F6#), Character'Val(16#F8#), Character'Val(16#FA#), Character'Val(16#8A#), Character'Val(16#81#), Character'Val(16#8D#), Character'Val(16#8F#), Character'Val(16#9A#), Character'Val(16#8E#), Character'Val(16#98#), Character'Val(16#90#), Character'Val(16#9F#), Character'Val(16#AA#), Character'Val(16#C0#), Character'Val(16#FF#), Character'Val(16#9D#), Character'Val(16#9E#), Character'Val(16#FD#), Character'Val(16#FE#), Character'Val(16#96#), Character'Val(16#97#), Character'Val(16#91#), Character'Val(16#92#), Character'Val(16#82#), Character'Val(16#93#), Character'Val(16#94#), Character'Val(16#84#), Character'Val(16#86#), Character'Val(16#87#), Character'Val(16#95#), Character'Val(16#85#), Character'Val(16#89#), Character'Val(16#8B#), Character'Val(16#9B#), Character'Val(16#80#), Character'Val(16#99#)); function Decode (Char : Character) return Wide_Character is begin return Decode (Char, Forward); end Decode; procedure Decode (Text : in Raw_String; Text_Last : out Natural; Result : out Wide_String; Result_Last : out Natural; Map : in Encoding := Encodings.CP_1256) is begin Decode (Text, Text_Last, Result, Result_Last, Forward); end Decode; procedure Encode (Text : in Wide_String; Text_Last : out Natural; Result : out Raw_String; Result_Last : out Natural; Map : in Encoding := Encodings.CP_1256) is begin Encode (Text, Text_Last, Result, Result_Last, Ranges, Backward); end Encode; begin Encoder_List (Encodings.CP_1256) := Encode'Access; Decoder_List (Encodings.CP_1256) := Decode'Access; end Encodings.Maps.CP_1256; ------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S P A R K _ X R E F S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2011-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. -- -- -- ------------------------------------------------------------------------------ with Lib.Xref; with Output; use Output; with Sem_Util; use Sem_Util; package body SPARK_Xrefs is ------------ -- dspark -- ------------ procedure dspark is procedure Dump (Index : Nat; AXR : SPARK_Xref_Record); procedure Dump_SPARK_Xrefs is new Lib.Xref.SPARK_Specific.Iterate_SPARK_Xrefs (Dump); ---------- -- Dump -- ---------- procedure Dump (Index : Nat; AXR : SPARK_Xref_Record) is begin Write_Str (" "); Write_Int (Index); Write_Char ('.'); Write_Str (" Entity = " & Unique_Name (AXR.Entity)); Write_Str (" ("); Write_Int (Nat (AXR.Entity)); Write_Str (")"); Write_Str (" Scope = " & Unique_Name (AXR.Ref_Scope)); Write_Str (" ("); Write_Int (Nat (AXR.Ref_Scope)); Write_Str (")"); Write_Str (" Ref_Type = '" & AXR.Rtype & "'"); Write_Eol; end Dump; -- Start of processing for dspark begin -- Dump SPARK cross-reference table Write_Eol; Write_Line ("SPARK Xref Table"); Write_Line ("----------------"); Dump_SPARK_Xrefs; end dspark; end SPARK_Xrefs;
with Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with TOML; procedure Main is Table1 : constant TOML.TOML_Value := TOML.Create_Table; Table2 : constant TOML.TOML_Value := TOML.Create_Table; Table3 : constant TOML.TOML_Value := TOML.Create_Table; Arr : constant TOML.TOML_Value := TOML.Create_Array; begin -- Populate tables Table1.Set ("a", TOML.Create_Integer (1)); Arr.Append (TOML.Create_Integer (1)); Table2.Set ("b", Arr); Table3.Set ("a", TOML.Create_Integer (3)); -- With the resolver-less Merge overload, expect a constraint error on -- duplicate keys. declare Dummy : TOML.TOML_Value; begin Dummy := TOML.Merge (Table1, Table3); Ada.Text_IO.Put_Line ("No exception..."); exception when Constraint_Error => Ada.Text_IO.Put_Line ("Merging two tables with duplicate keys raises an exception"); end; Ada.Text_IO.New_Line; -- With the resolver overload, check that conflicts are resolved as -- expected Ada.Text_IO.Put_Line ("Merging with conflict resolution..."); declare function Merge_Entries (Key : TOML.Unbounded_UTF8_String; L, R : TOML.TOML_Value) return TOML.TOML_Value is (TOML.Create_String (Key & ": " & L.As_String & " | " & R.As_String)); L : constant TOML.TOML_Value := TOML.Create_Table; R : constant TOML.TOML_Value := TOML.Create_Table; Merged : TOML.TOML_Value; begin L.Set ("a", TOML.Create_String ("good")); L.Set ("b", TOML.Create_String ("hello")); R.Set ("b", TOML.Create_String ("world")); R.Set ("c", TOML.Create_String ("bye")); Merged := TOML.Merge (L, R, Merge_Entries'Access); Ada.Text_IO.Put_Line (Merged.Dump_As_String); end; declare Merged : constant TOML.TOML_Value := TOML.Merge (Table1, Table2); begin -- Change array value to see the shallow copy modified Arr.Append (TOML.Create_Integer (2)); Ada.Text_IO.Put_Line ("Merged table:"); Ada.Text_IO.Put_Line (Merged.Dump_As_String); end; end Main;
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired) -- -- Copyright William A. Whitaker (1936–2010) -- -- This is a free program, which means it is proper to copy it and pass -- it on to your friends. Consider it a developmental item for which -- there is no charge. However, just for form, it is Copyrighted -- (c). Permission is hereby freely given for any and all use of program -- and data. You can sell it as your own, but at least tell me. -- -- This version is distributed without obligation, but the developer -- would appreciate comments and suggestions. -- -- All parts of the WORDS system, source code and data files, are made freely -- available to anyone who wishes to use them, for whatever purpose. with Ada.Text_IO; package Support_Utils.Word_Parameters is -- This package defines a number of parameters that are used in the program -- The default values are set in the body, so that they may be changed -- easily Change_Parameters_Character : Character := '#'; Change_Language_Character : Character := '~'; Help_Character : Character := '?'; -- These files are used by the program if requested, but not necessary -- They are all text files and human readable -- MODE_FILE is used by the program to remember MODE values between runs Mode_File : Ada.Text_IO.File_Type; -- OUTPUT is used to Write out and save the results of a run Output : aliased Ada.Text_IO.File_Type; Input : Ada.Text_IO.File_Type; -- UNKNOWNS is used to record the words that the program fails to find Unknowns : Ada.Text_IO.File_Type; -- This is a flag to tell if there has been Trim ming for this word -- FIXME : this obviously should not exist Trimmed : Boolean := False; type Mode_Type is ( Trim_Output, Have_Output_File, Write_Output_To_File, Do_Unknowns_Only, Write_Unknowns_To_File, Ignore_Unknown_Names, Ignore_Unknown_Caps, Do_Compounds, Do_Fixes, Do_Tricks, Do_Dictionary_Forms, Show_Age, Show_Frequency, Do_Examples, Do_Only_Meanings, Do_Stems_For_Unknown ); package Mode_Type_Io is new Ada.Text_IO.Enumeration_IO (Mode_Type); type Mode_Array is array (Mode_Type) of Boolean; Words_Mode : Mode_Array; -- Initialized in body procedure Change_Parameters; procedure Initialize_Word_Parameters; end Support_Utils.Word_Parameters;
------------------------------------------------------------------------------ -- -- -- P G A D A . U T I L S -- -- -- -- S p e c -- -- -- -- Copyright (c) coreland 2009 -- -- Copyright (c) Samuel Tardieu 2000 -- -- All rights reserved. -- -- -- -- 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 Samuel Tardieu 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 SAMUEL TARDIEU 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 SAMUEL -- -- TARDIEU 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 PGAda.Database; package PGAda.Utils is pragma Preelaborate; -- Return the next value in a sequence function Next_Value (DB : in PGAda.Database.Connection_t'Class; Sequence_Name : in String) return Integer; -- Begin, commit or rollback a transaction. procedure Begin_Transaction (DB : in PGAda.Database.Connection_t'Class); procedure Commit (DB : in PGAda.Database.Connection_t'Class); procedure Rollback (DB : in PGAda.Database.Connection_t'Class); end PGAda.Utils;
package Memory.RAM is type RAM_Type is new Memory_Type with private; type RAM_Pointer is access all RAM_Type'Class; function Create_RAM(latency : Time_Type := 1; burst : Time_Type := 0; word_size : Positive := 8; word_count : Natural := 65536) return RAM_Pointer; overriding function Clone(mem : RAM_Type) return Memory_Pointer; overriding procedure Reset(mem : in out RAM_Type; context : in Natural); overriding procedure Read(mem : in out RAM_Type; address : in Address_Type; size : in Positive); overriding procedure Write(mem : in out RAM_Type; address : in Address_Type; size : in Positive); overriding function To_String(mem : RAM_Type) return Unbounded_String; overriding function Get_Cost(mem : RAM_Type) return Cost_Type; overriding function Get_Writes(mem : RAM_Type) return Long_Integer; overriding function Get_Word_Size(mem : RAM_Type) return Positive; overriding function Get_Ports(mem : RAM_Type) return Port_Vector_Type; overriding procedure Generate(mem : in RAM_Type; sigs : in out Unbounded_String; code : in out Unbounded_String); private type RAM_Type is new Memory_Type with record latency : Time_Type := 1; burst : Time_Type := 0; word_size : Positive := 8; word_count : Natural := 65536; writes : Long_Integer := 0; end record; end Memory.RAM;
with PragmARC.Matching.Character_Regular_Expression; separate (Lined.Program.Process) procedure Substitute (Command : in String; Current : in out Natural; Last : out Natural; Printing : out Boolean) is procedure Replace (Replacement : in String; Multi : in Boolean; Start : in Natural; Stop : in Natural; Current : in out Natural) with Pre => Start <= Stop and Stop <= Buffer.Last; -- Searches lines Start .. Stop for the current pattern -- If the pattern is found in a line, replaces it with Replacement, with any non-escaped instances of '@' replaced by the -- matched part of the line; if Multi, then repeats this for any other matches on the line -- Raises Invalid_Input if no match is found procedure Replace (Replacement : in String; Multi : in Boolean; Start : in Natural; Stop : in Natural; Current : in out Natural) is use PragmARC; function Expanded_Replacment (Line : in String; First : in Positive := Replacement'First) return String; -- Returns Replacement (First .. Replacement'Last), dealing with escaped characters and replacing '@' with Line procedure Replace_Rest (Head : in String; Line : in String; Number : in Positive) with Pre => Number in 1 .. Buffer.Last; -- Replaces buffer line Number with Head followed by Line with matches replaced by Replacement function Expanded_Replacment (Line : in String; First : in Positive := Replacement'First) return String is -- Empty begin -- Expanded_Replacment if First > Replacement'Last then return ""; end if; case Replacement (First) is when Matching.Character_Regular_Expression.Escape_Item => if First = Replacement'Last then return Replacement (First .. First); end if; return Replacement (First + 1) & Expanded_Replacment (Line, First + 2); when '@' => return Line & Expanded_Replacment (Line, First + 1); when others => return Replacement (First) & Expanded_Replacment (Line, First + 1); end case; end Expanded_Replacment; procedure Replace_Rest (Head : in String; Line : in String; Number : in Positive) is Result : constant Matching.Character_Regular_Expression.Result := Searching.Search (Line); begin -- Replace_Rest if not Result.Found then Buffer.Replace (Number => Number, Line => Head & Line); return; end if; Replace_Rest (Head => Head & Line (Line'First .. Result.Start - 1) & Expanded_Replacment (Line (Result.Start .. Result.Start + Result.Length - 1) ), Line => Line (Result.Start + Result.Length .. Line'Last), Number => Number); end Replace_Rest; Matched : Boolean := False; begin -- Replace All_Lines : for L in Start .. Stop loop One_Line : declare Line : constant String := Buffer.Line (L); First : constant Natural := Line'First; Result : constant Matching.Character_Regular_Expression.Result := Searching.Search (Line); begin -- One_Line if Result.Found then Matched := True; if Multi then Replace_Rest (Head => Line (First .. Result.Start - 1) & Expanded_Replacment (Line => Line (Result.Start .. Result.Start + Result.Length - 1) ), Line => Line (Result.Start + Result.Length .. Line'Last), Number => L); else Buffer.Replace (Number => L, Line => Line (First .. Result.Start - 1) & Expanded_Replacment (Line => Line (Result.Start .. Result.Start + Result.Length - 1) ) & Line (Result.Start + Result.Length .. Line'Last) ); end if; end if; end One_Line; end loop All_Lines; if not Matched and not Global then raise Invalid_Input; end if; Current := Stop; end Replace; First : Natural := Ada.Strings.Fixed.Index_Non_Blank (Command); Index : Natural; Multi : Boolean := False; Start : Natural := Line_Numbers.Start; Stop : Natural := Line_Numbers.Stop; begin -- Substitute Last := 0; Printing := False; if First = 0 then raise Invalid_Input; end if; Last := Searching.Terminator (Command (First + 1 .. Command'Last), Command (First) ); if Last > First + 1 then -- New pattern Searching.Process (Pattern => Command (First + 1 .. Last - 1) ); end if; First := Last; Last := Searching.Terminator (Command (First + 1 .. Command'Last), Command (First), False); Index := Ada.Strings.Fixed.Index_Non_Blank (Command (Last + 1 .. Command'Last) ); if Index /= 0 then Multi := Command (Index) = Global_Indicator; Printing := Printing_Requested (Command (Index + (if Multi then 1 else 0) .. Command'Last) ); end if; Set_Lines (Default_Start => Current, Default_Stop => Current, Start => Start, Stop => Stop); Replace (Replacement => Command (First + 1 .. Last - 1), Multi => Multi, Start => Start, Stop => Stop, Current => Current); end Substitute;
-- SipHash -- an Ada implementation of the algorithm described in -- "SipHash: a fast short-input PRF" -- by Jean-Philippe Aumasson and Daniel J. Bernstein -- Copyright (c) 2015, James Humphry - see LICENSE file for details with System; package body SipHash with SPARK_Mode, Refined_State => (Initial_Hash_State => Initial_State) is -- Short names for fundamental machine types subtype Storage_Offset is System.Storage_Elements.Storage_Offset; -- The initial state from the key passed as generic formal parameters is -- stored here, so that static elaboration followed by a call of SetKey -- can be used in situations where dynamic elaboration might be a problem. -- This could really be in the private part of the package, but SPARK GPL -- 2015 doesn't seem to like Part_Of in the private part of a package, -- regardless of what the SPARK RM says... Initial_State : SipHash_State := (k0 xor 16#736f6d6570736575#, k1 xor 16#646f72616e646f6d#, k0 xor 16#6c7967656e657261#, k1 xor 16#7465646279746573#); ----------------------- -- Get_Initial_State -- ----------------------- function Get_Initial_State return SipHash_State is (Initial_State); ----------------------- -- SArray8_to_U64_LE -- ----------------------- function SArray8_to_U64_LE (S : in SArray_8) return U64 is (U64(S(0)) or Shift_Left(U64(S(1)), 8) or Shift_Left(U64(S(2)), 16) or Shift_Left(U64(S(3)), 24) or Shift_Left(U64(S(4)), 32) or Shift_Left(U64(S(5)), 40) or Shift_Left(U64(S(6)), 48) or Shift_Left(U64(S(7)), 56)); --------------------------- -- SArray_Tail_to_U64_LE -- --------------------------- function SArray_Tail_to_U64_LE (S : in SArray) return U64 is R : U64 := 0; Shift : Natural := 0; begin for I in 0..(S'Length-1) loop pragma Loop_Invariant (Shift = I * 8); R := R or Shift_Left(U64(S(S'First + Storage_Offset(I))), Shift); Shift := Shift + 8; end loop; return R; end SArray_Tail_to_U64_LE; --------------- -- Sip_Round -- --------------- procedure Sip_Round (v : in out SipHash_State) is begin v(0) := v(0) + v(1); v(2) := v(2) + v(3); v(1) := Rotate_Left(v(1), 13); v(3) := Rotate_Left(v(3), 16); v(1) := v(1) xor v(0); v(3) := v(3) xor v(2); v(0) := Rotate_Left(v(0), 32); v(2) := v(2) + v(1); v(0) := v(0) + v(3); v(1) := Rotate_Left(v(1), 17); v(3) := Rotate_Left(v(3), 21); v(1) := v(1) xor v(2); v(3) := v(3) xor v(0); v(2) := Rotate_Left(v(2), 32); end Sip_Round; ---------------------- -- Sip_Finalization -- ---------------------- function Sip_Finalization (v : in SipHash_State) return U64 is vv : SipHash_State := v; begin vv(2) := vv(2) xor 16#ff#; for I in 1..d_rounds loop Sip_Round(vv); end loop; return (vv(0) xor vv(1) xor vv(2) xor vv(3)); end Sip_Finalization; ------------- -- Set_Key -- ------------- procedure Set_Key (k0, k1 : U64) is begin Initial_State := (k0 xor 16#736f6d6570736575#, k1 xor 16#646f72616e646f6d#, k0 xor 16#6c7967656e657261#, k1 xor 16#7465646279746573#); end Set_Key; procedure Set_Key (k : SipHash_Key) is k0, k1 : U64; begin k0 := SArray8_to_U64_LE(k(k'First..k'First+7)); k1 := SArray8_to_U64_LE(k(k'First+8..k'Last)); Set_Key(k0, k1); end Set_Key; ------------- -- SipHash -- ------------- function SipHash (m : System.Storage_Elements.Storage_Array) return U64 is m_pos : Storage_Offset := 0; m_i : U64; v : SipHash_State := Initial_State; w : constant Storage_Offset := (m'Length / 8) + 1; 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 (System.Storage_Elements.Storage_Element'Size /= 8, "This implementation of SipHash cannot work " & "with Storage_Element'Size /= 8."); pragma Warnings (GNATprove, On, "Compile_Time_Error"); for I in 1..w-1 loop pragma Loop_Invariant (m_pos = (I - 1) * 8); m_i := SArray8_to_U64_LE(m(m'First + m_pos..m'First + 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; if m_pos < m'Length then m_i := SArray_Tail_to_U64_LE(m(m'First + m_pos .. m'Last)); else m_i := 0; end if; m_i := m_i or Shift_Left(U64(m'Length mod 256), 56); 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; return Sip_Finalization(v); end SipHash; end SipHash;
-- Ada regular expression library -- (c) Kristian Klomsten Skordal 2020 <kristian.skordal@wafflemail.net> -- Report bugs and issues on <https://github.com/skordal/ada-regex> with AUnit.Run; with AUnit.Reporter.Text; with Regex_Test_Suite; with Utilities_Test_Suite; procedure Regex_Test is procedure Regex_Test_Runner is new AUnit.Run.Test_Runner (Regex_Test_Suite.Test_Suite); procedure Utilities_Test_Runner is new AUnit.Run.Test_Runner (Utilities_Test_Suite.Test_Suite); Test_Reporter : AUnit.Reporter.Text.Text_Reporter; begin Regex_Test_Runner (Test_Reporter); Utilities_Test_Runner (Test_Reporter); end Regex_Test;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2022, 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. -- -- -- ------------------------------------------------------------------------------ -- driver for text based LCDs connected via I2C port expander PCF8574 pragma Restrictions (No_Allocators); pragma Restrictions (No_Implicit_Heap_Allocations); package body LCD_HD44780.PCF8574 is type Shadow_Bits is array (Bit_Number) of Boolean with Pack, Size => 8; I2C_Shadow : Shadow_Bits; procedure Write_Shadow (This : LCD_PCF8574) with Inline; ------------ -- Create -- ------------ function Create (Display_Width : Char_Position; Display_Height : Line_Position; Time : not null HAL.Time.Any_Delays; Expander : Standard.PCF8574.Any_PCF8574_Module; Mapping : Bit_Mapping := Standard_Mapping) return LCD_PCF8574 is begin I2C_Shadow := (others => False); return L : LCD_PCF8574 (Display_Width, Display_Height, Time) do L.I2C_Driver := Expander; L.Pins := Mapping; end return; end Create; ------------------ -- Write_Shadow -- ------------------ procedure Write_Shadow (This : LCD_PCF8574) is Shadow_As_Byte : UInt8 with Address => I2C_Shadow'Address; begin This.I2C_Driver.Set (Shadow_As_Byte); end Write_Shadow; ------------------- -- Set_Backlight -- ------------------- overriding procedure Set_Backlight (This : in out LCD_PCF8574; Is_On : Boolean := True) is Bl : Boolean renames I2C_Shadow (This.Pins (Backlight)); begin Bl := Is_On; This.Write_Shadow; end Set_Backlight; ------------------- -- Toggle_Enable -- ------------------- overriding procedure Toggle_Enable (This : LCD_PCF8574) is Bit : constant Bit_Number := This.Pins (Enable); En : Boolean renames I2C_Shadow (Bit); begin En := True; This.Write_Shadow; En := False; This.Write_Shadow; This.Time.Delay_Microseconds (280); end Toggle_Enable; ------------ -- Output -- ------------ overriding procedure Output (This : LCD_PCF8574; Cmd : UInt8; Is_Data : Boolean := False) is RW_Bit : constant Bit_Number := This.Pins (ReadWrite); RS_Bit : constant Bit_Number := This.Pins (RegSel); B0_Bit : constant Bit_Number := This.Pins (D0); B1_Bit : constant Bit_Number := This.Pins (D1); B2_Bit : constant Bit_Number := This.Pins (D2); B3_Bit : constant Bit_Number := This.Pins (D3); RW : Boolean renames I2C_Shadow (RW_Bit); RS : Boolean renames I2C_Shadow (RS_Bit); P0 : Boolean renames I2C_Shadow (B0_Bit); P1 : Boolean renames I2C_Shadow (B1_Bit); P2 : Boolean renames I2C_Shadow (B2_Bit); P3 : Boolean renames I2C_Shadow (B3_Bit); begin -- control pins RW := False; RS := Is_Data; -- write data -- high nibble first P0 := (Cmd and 16#10#) /= 0; P1 := (Cmd and 16#20#) /= 0; P2 := (Cmd and 16#40#) /= 0; P3 := (Cmd and 16#80#) /= 0; This.Toggle_Enable; P0 := (Cmd and 16#01#) /= 0; P1 := (Cmd and 16#02#) /= 0; P2 := (Cmd and 16#04#) /= 0; P3 := (Cmd and 16#08#) /= 0; This.Toggle_Enable; This.Time.Delay_Microseconds (50); end Output; -------------------- -- Init_4bit_Mode -- -------------------- overriding procedure Init_4bit_Mode (This : LCD_PCF8574) is RW_Bit : constant Bit_Number := This.Pins (ReadWrite); RS_Bit : constant Bit_Number := This.Pins (RegSel); En_Bit : constant Bit_Number := This.Pins (Enable); B0_Bit : constant Bit_Number := This.Pins (D0); B1_Bit : constant Bit_Number := This.Pins (D1); B2_Bit : constant Bit_Number := This.Pins (D2); B3_Bit : constant Bit_Number := This.Pins (D3); RW : Boolean renames I2C_Shadow (RW_Bit); RS : Boolean renames I2C_Shadow (RS_Bit); En : Boolean renames I2C_Shadow (En_Bit); P0 : Boolean renames I2C_Shadow (B0_Bit); P1 : Boolean renames I2C_Shadow (B1_Bit); P2 : Boolean renames I2C_Shadow (B2_Bit); P3 : Boolean renames I2C_Shadow (B3_Bit); begin I2C_Shadow := (others => False); -- all control lines low RS := False; En := False; RW := False; -- write 1 into pins 0 and 1 P0 := True; P1 := True; P2 := False; P3 := False; This.Write_Shadow; This.Toggle_Enable; This.Time.Delay_Milliseconds (5); -- send last command again (is still in register, just toggle E) This.Toggle_Enable; This.Time.Delay_Milliseconds (5); -- send last command a third time This.Toggle_Enable; This.Time.Delay_Microseconds (150); -- set 4 bit mode, clear data bit 0 P0 := False; This.Toggle_Enable; end Init_4bit_Mode; end LCD_HD44780.PCF8574;
package body GL.Text.UTF8 is type Byte is mod 2**8; subtype Surrogate_Halves is UTF8_Code_Point range 16#D800# .. 16#DFFF#; procedure Read (Buffer : String; Position : in out Positive; Result : out UTF8_Code_Point) is Cur : Byte := Character'Pos (Buffer (Position)); Additional_Bytes : Positive; begin if (Cur and 2#10000000#) = 0 then Result := UTF8_Code_Point (Cur); Position := Position + 1; return; elsif (Cur and 2#01000000#) = 0 then raise Rendering_Error with "Encoding error at code point starting byte" & Position'Img; elsif (Cur and 2#00100000#) = 0 then Additional_Bytes := 1; Result := UTF8_Code_Point (Cur and 2#00011111#) * 2**6; elsif (Cur and 2#00010000#) = 0 then Additional_Bytes := 2; Result := UTF8_Code_Point (Cur and 2#00001111#) * 2**12; elsif (Cur and 2#00001000#) = 0 then Additional_Bytes := 3; Result := UTF8_Code_Point (Cur and 2#00000111#) * 2**18; else raise Rendering_Error with "Encoding error at code point starting byte" & Position'Img; end if; for Index in 1 .. Additional_Bytes loop Cur := Character'Pos (Buffer (Position + Index)); if (Cur and 2#11000000#) /= 2#10000000# then raise Rendering_Error with "Encoding error at code point continuation byte" & Positive'Image (Position + Index); end if; Result := Result + UTF8_Code_Point (Cur and 2#00111111#) * 2**(6 * (Additional_Bytes - Index)); end loop; if Result in Surrogate_Halves then raise Rendering_Error with "Surrogate half not valid in UTF-8 at position" & Position'Img; end if; Position := Position + Additional_Bytes + 1; end Read; end GL.Text.UTF8;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . D E B U G _ U T I L I T I E S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1997-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. -- -- -- ------------------------------------------------------------------------------ with System; use System; with System.Storage_Elements; use System.Storage_Elements; package body GNAT.Debug_Utilities is H : constant array (0 .. 15) of Character := "0123456789ABCDEF"; -- Table of hex digits ----------- -- Image -- ----------- -- Address case function Image (A : Address) return Image_String is S : Image_String; P : Natural; N : Integer_Address; U : Natural := 0; begin S (S'Last) := '#'; P := Address_Image_Length - 1; N := To_Integer (A); while P > 3 loop if U = 4 then S (P) := '_'; P := P - 1; U := 1; else U := U + 1; end if; S (P) := H (Integer (N mod 16)); P := P - 1; N := N / 16; end loop; S (1 .. 3) := "16#"; return S; end Image; ----------- -- Image -- ----------- -- String case function Image (S : String) return String is W : String (1 .. 2 * S'Length + 2); P : Positive := 1; begin W (1) := '"'; for J in S'Range loop if S (J) = '"' then P := P + 1; W (P) := '"'; end if; P := P + 1; W (P) := S (J); end loop; P := P + 1; W (P) := '"'; return W (1 .. P); end Image; ------------- -- Image_C -- ------------- function Image_C (A : Address) return Image_C_String is S : Image_C_String; N : Integer_Address := To_Integer (A); begin for P in reverse 3 .. S'Last loop S (P) := H (Integer (N mod 16)); N := N / 16; end loop; S (1 .. 2) := "0x"; return S; end Image_C; ----------- -- Value -- ----------- function Value (S : String) return System.Address is Base : Integer_Address := 10; Res : Integer_Address := 0; Last : Natural := S'Last; C : Character; N : Integer_Address; begin -- Skip final Ada 95 base character if S (Last) = '#' or else S (Last) = ':' then Last := Last - 1; end if; -- Loop through characters for J in S'First .. Last loop C := S (J); -- C format hex constant if C = 'x' then if Res /= 0 then raise Constraint_Error; end if; Base := 16; -- Ada form based literal elsif C = '#' or else C = ':' then Base := Res; Res := 0; -- Ignore all underlines elsif C = '_' then null; -- Otherwise must have digit else if C in '0' .. '9' then N := Character'Pos (C) - Character'Pos ('0'); elsif C in 'A' .. 'F' then N := Character'Pos (C) - (Character'Pos ('A') - 10); elsif C in 'a' .. 'f' then N := Character'Pos (C) - (Character'Pos ('a') - 10); else raise Constraint_Error; end if; if N >= Base then raise Constraint_Error; else Res := Res * Base + N; end if; end if; end loop; return To_Address (Res); end Value; end GNAT.Debug_Utilities;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.User.Choice -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-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: Juergen Pfeifer, 1996 -- Version Control: -- $Revision: 1.14 $ -- $Date: 2011/03/19 12:27:47 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; package Terminal_Interface.Curses.Forms.Field_Types.User.Choice is pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.User.Choice); subtype C_Int is Interfaces.C.int; type User_Defined_Field_Type_With_Choice is abstract new User_Defined_Field_Type with null record; -- This is the root of the mechanism we use to create field types in -- Ada95 that allow the prev/next mechanism. You should your own type -- derive from this one and implement the Field_Check, Character_Check -- Next and Previous functions for your own type. type User_Defined_Field_Type_With_Choice_Access is access all User_Defined_Field_Type_With_Choice'Class; function Next (Fld : Field; Typ : User_Defined_Field_Type_With_Choice) return Boolean is abstract; -- If True is returned, the function successfully generated a next -- value into the fields buffer. function Previous (Fld : Field; Typ : User_Defined_Field_Type_With_Choice) return Boolean is abstract; -- If True is returned, the function successfully generated a previous -- value into the fields buffer. -- +---------------------------------------------------------------------- -- | Private Part. -- | private function C_Generic_Choice return C_Field_Type; function Generic_Next (Fld : Field; Usr : System.Address) return Curses_Bool; pragma Convention (C, Generic_Next); -- This is the generic next Choice_Function for the low-level fieldtype -- representing all the User_Defined_Field_Type derivatives. It routes -- the call to the Next implementation for the type. function Generic_Prev (Fld : Field; Usr : System.Address) return Curses_Bool; pragma Convention (C, Generic_Prev); -- This is the generic prev Choice_Function for the low-level fieldtype -- representing all the User_Defined_Field_Type derivatives. It routes -- the call to the Previous implementation for the type. end Terminal_Interface.Curses.Forms.Field_Types.User.Choice;
------------------------------------------------------------------------------ -- 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: -- Ada library manipulation interface package Asis.Gela.Library is function Has_Declaration (Full_Name : Wide_String) return Boolean; -- Check is declaration for unit with given full name exists in the -- Ada library function Declaration_File (Full_Name : Wide_String) return Wide_String; -- Return file name of a declaration for given unit. function Body_File (Full_Name : Wide_String) return Wide_String; -- Return file name of a bofy for given unit. function File_Exists (File_Name : Wide_String) return Boolean; -- Check if given file exists function Find_File (File_Name : Wide_String) return Wide_String; -- Find file in include directories procedure Clear_Search_Path; -- Reset list of directories where look for source files procedure Add_To_Search_Path (Path : Wide_String); -- Add Path to list of directories where look for source files function Is_Predefined_Unit (File_Name : Wide_String) return Boolean; -- Check if this file reserved for predefined units end Asis.Gela.Library; ------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------
package body agar.gui.widget.fixed is package cbinds is procedure put (fixed : fixed_access_t; child : child_access_t; x : c.int; y : c.int); pragma import (c, put, "AG_FixedPut"); procedure size (fixed : fixed_access_t; child : child_access_t; width : c.int; height : c.int); pragma import (c, size, "AG_FixedSize"); procedure move (fixed : fixed_access_t; child : child_access_t; x : c.int; y : c.int); pragma import (c, move, "AG_FixedMove"); end cbinds; procedure put (fixed : fixed_access_t; child : child_access_t; x : natural; y : natural) is begin cbinds.put (fixed => fixed, child => child, x => c.int (x), y => c.int (y)); end put; procedure size (fixed : fixed_access_t; child : child_access_t; width : positive; height : positive) is begin cbinds.size (fixed => fixed, child => child, width => c.int (width), height => c.int (height)); end size; procedure move (fixed : fixed_access_t; child : child_access_t; x : natural; y : natural) is begin cbinds.move (fixed => fixed, child => child, x => c.int (x), y => c.int (y)); end move; function widget (fixed : fixed_access_t) return widget_access_t is begin return fixed.widget'unchecked_access; end widget; end agar.gui.widget.fixed;
procedure Entry_Point is X : constant Integer := 11; begin -- Failure pragma Assert (X < 10); -- Success pragma Assert (X > 0); end Entry_Point;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- A send signal action is an action that creates a signal instance from its -- inputs, and transmits it to the target object, where it may cause the -- firing of a state machine transition or the execution of an activity. The -- argument values are available to the execution of associated behaviors. -- The requestor continues execution immediately. Any reply message is -- ignored and is not transmitted to the requestor. If the input is already a -- signal instance, use a send object action. ------------------------------------------------------------------------------ limited with AMF.UML.Input_Pins; with AMF.UML.Invocation_Actions; limited with AMF.UML.Signals; package AMF.UML.Send_Signal_Actions is pragma Preelaborate; type UML_Send_Signal_Action is limited interface and AMF.UML.Invocation_Actions.UML_Invocation_Action; type UML_Send_Signal_Action_Access is access all UML_Send_Signal_Action'Class; for UML_Send_Signal_Action_Access'Storage_Size use 0; not overriding function Get_Signal (Self : not null access constant UML_Send_Signal_Action) return AMF.UML.Signals.UML_Signal_Access is abstract; -- Getter of SendSignalAction::signal. -- -- The type of signal transmitted to the target object. not overriding procedure Set_Signal (Self : not null access UML_Send_Signal_Action; To : AMF.UML.Signals.UML_Signal_Access) is abstract; -- Setter of SendSignalAction::signal. -- -- The type of signal transmitted to the target object. not overriding function Get_Target (Self : not null access constant UML_Send_Signal_Action) return AMF.UML.Input_Pins.UML_Input_Pin_Access is abstract; -- Getter of SendSignalAction::target. -- -- The target object to which the signal is sent. not overriding procedure Set_Target (Self : not null access UML_Send_Signal_Action; To : AMF.UML.Input_Pins.UML_Input_Pin_Access) is abstract; -- Setter of SendSignalAction::target. -- -- The target object to which the signal is sent. end AMF.UML.Send_Signal_Actions;
-- This unit provides an abstract type to decode COBS byte per byte. It can -- stream data because the full input frame is not required to start decoding. -- -- To use this decoder, declare a tagged type that inherit from this one and -- implement a Flush procedure that will receive the encoded data from the -- encoder, and a End_Of_Frame procedure that will be call at the end of -- each COBS frames. -- -- The Flush procedure can, for instance, gather decoded data in a vector -- before processing it in the End_Of_Frame procedure. package COBS.Stream.Decoder with Preelaborate is type Instance is abstract tagged private; procedure Push (This : in out Instance; Data : Storage_Element); procedure Flush (This : in out Instance; Data : Storage_Array) is abstract; procedure End_Of_Frame (This : in out Instance) is abstract; private type Instance is abstract tagged record Buffer : Storage_Array (1 .. 255); Out_Index : Storage_Offset := 1; Start_Of_Frame : Boolean := True; Code : Storage_Element; Last_Code : Storage_Element := 0; end record; procedure Do_Flush (This : in out Instance); end COBS.Stream.Decoder;
-- Copyright 2012-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/>. package body Pck is procedure Do_Nothing (A : System.Address) is begin null; end Do_Nothing; end Pck;
-- This package is intended to set up and tear down the test environment. -- Once created by GNATtest, this package will never be overwritten -- automatically. Contents of this package can be modified in any way -- except for sections surrounded by a 'read only' marker. package body Tcl.Info.Test_Data is procedure Set_Up(Gnattest_T: in out Test) is pragma Unreferenced(Gnattest_T); begin null; end Set_Up; procedure Tear_Down(Gnattest_T: in out Test) is pragma Unreferenced(Gnattest_T); begin null; end Tear_Down; end Tcl.Info.Test_Data;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 5 2 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Handling of packed arrays with Component_Size = 52 package System.Pack_52 is pragma Preelaborate; Bits : constant := 52; type Bits_52 is mod 2 ** Bits; for Bits_52'Size use Bits; function Get_52 (Arr : System.Address; N : Natural) return Bits_52; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. procedure Set_52 (Arr : System.Address; N : Natural; E : Bits_52); -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. function GetU_52 (Arr : System.Address; N : Natural) return Bits_52; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. This version -- is used when Arr may represent an unaligned address. procedure SetU_52 (Arr : System.Address; N : Natural; E : Bits_52); -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. This version -- is used when Arr may represent an unaligned address end System.Pack_52;
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2020 Zane Myers -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. -------------------------------------------------------------------------------- with Vulkan.Math.GenDType; use Vulkan.Math.GenDType; -------------------------------------------------------------------------------- --< @group Vulkan Math Basic Types -------------------------------------------------------------------------------- --< @summary --< This package defines a double precision floating point vector type with 2 --< components. -------------------------------------------------------------------------------- package Vulkan.Math.Dvec2 is pragma Preelaborate; pragma Pure; --< A 2 component vector of double-precision floating point values. subtype Vkm_Dvec2 is Vkm_GenDType(Last_Index => 1); ---------------------------------------------------------------------------- -- Ada does not have the concept of constructors in the sense that they exist -- in C++. For this reason, we will instead define multiple methods for -- instantiating a vec2 here. ---------------------------------------------------------------------------- -- The following are explicit constructors for Vec2: ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Dvec2 type. --< --< @description --< Produce a default vector with all components set to 0.0. --< --< @return --< A Vec2 with all components set to 0.0. ---------------------------------------------------------------------------- function Make_Dvec2 return Vkm_Dvec2 is (GDT.Make_GenType(Last_Index => 1, value => 0.0)) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Dvec2 type. --< --< @description --< Produce a vector with all components set to the same value. --< --< @param scalar_value --< The value to set all components to. --< --< @returns A Vec2 with all components set to scalar_value. ---------------------------------------------------------------------------- function Make_Dvec2 (scalar_value : in Vkm_Double) return Vkm_Dvec2 is (GDT.Make_GenType(Last_Index => 1, value => scalar_value)) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Dvec2 type. --< --< @description --< Produce a vector by copying components from an existing vector. --< --< @param vec2_value --< The vec2 to copy components from. --< --< @return --< A vec2 with all of its components set equal to the corresponding --< components of vec2_value. ---------------------------------------------------------------------------- function Make_Dvec2 (vec2_value : in Vkm_Dvec2) return Vkm_Dvec2 is (GDT.Make_GenType(vec2_value.x,vec2_value.y)) with Inline; ---------------------------------------------------------------------------- --< @summary --< Constructor for Vkm_Dvec2 type. --< --< @description --< Produce a vector by specifying the values for each of its components. --< --< @param value1 --< Value for component 1. --< --< @param value2 --< Value for component 2. --< --< @return --< A Vec2 with all components set as specified. ---------------------------------------------------------------------------- function Make_Dvec2 (value1, value2 : in Vkm_Double) return Vkm_Dvec2 renames GDT.Make_GenType; end Vulkan.Math.Dvec2;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>hls_video_block</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>14</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>VIDEO_IN_V_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>VIDEO_IN_V_keep_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.keep.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>VIDEO_IN_V_strb_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.strb.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>VIDEO_IN_V_user_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.user.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>VIDEO_IN_V_last_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.last.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>VIDEO_IN_V_id_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.id.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_7"> <Value> <Obj> <type>1</type> <id>7</id> <name>VIDEO_IN_V_dest_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>INPUT_STREAM.V.dest.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_8"> <Value> <Obj> <type>1</type> <id>8</id> <name>VIDEO_OUT_V_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_9"> <Value> <Obj> <type>1</type> <id>9</id> <name>VIDEO_OUT_V_keep_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.keep.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_10"> <Value> <Obj> <type>1</type> <id>10</id> <name>VIDEO_OUT_V_strb_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.strb.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_11"> <Value> <Obj> <type>1</type> <id>11</id> <name>VIDEO_OUT_V_user_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.user.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_12"> <Value> <Obj> <type>1</type> <id>12</id> <name>VIDEO_OUT_V_last_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.last.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_13"> <Value> <Obj> <type>1</type> <id>13</id> <name>VIDEO_OUT_V_id_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.id.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_14"> <Value> <Obj> <type>1</type> <id>14</id> <name>VIDEO_OUT_V_dest_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUTPUT_STREAM.V.dest.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_15"> <Value> <Obj> <type>0</type> <id>31</id> <name>in_tmp_data_V</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>178</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>178</second> </item> </second> </item> </inlineStackInfo> <originalName>in_tmp.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>62</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>34</id> <name>im_1_data_V</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>179</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>179</second> </item> </second> </item> </inlineStackInfo> <originalName>im_1.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>63</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>37</id> <name>im_2_data_V</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>180</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>180</second> </item> </second> </item> </inlineStackInfo> <originalName>im_2.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>64</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>40</id> <name>out_tmp_data_V</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>181</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>181</second> </item> </second> </item> </inlineStackInfo> <originalName>out_tmp.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>17</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>65</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>46</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>189</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>189</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>10</count> <item_version>0</item_version> <item>67</item> <item>68</item> <item>69</item> <item>70</item> <item>71</item> <item>72</item> <item>73</item> <item>74</item> <item>76</item> <item>77</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>49</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>192</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>192</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>79</item> <item>80</item> <item>81</item> <item>438</item> <item>439</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>52</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>193</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>193</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>83</item> <item>84</item> <item>85</item> <item>437</item> <item>440</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>55</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>194</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>194</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>87</item> <item>88</item> <item>89</item> <item>436</item> <item>441</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>58</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>197</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>197</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>12</count> <item_version>0</item_version> <item>91</item> <item>92</item> <item>93</item> <item>94</item> <item>95</item> <item>96</item> <item>97</item> <item>98</item> <item>99</item> <item>100</item> <item>435</item> <item>442</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>59</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>199</lineNumber> <contextFuncName>hls_video_block</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>hls_video_block</second> </first> <second>199</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_25"> <Value> <Obj> <type>2</type> <id>61</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_26"> <Value> <Obj> <type>2</type> <id>66</id> <name>strm2mat</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:strm2mat&gt;</content> </item> <item class_id_reference="16" object_id="_27"> <Value> <Obj> <type>2</type> <id>75</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>21</bitwidth> </Value> <const_type>0</const_type> <content>921600</content> </item> <item class_id_reference="16" object_id="_28"> <Value> <Obj> <type>2</type> <id>78</id> <name>rgb2gry</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:rgb2gry&gt;</content> </item> <item class_id_reference="16" object_id="_29"> <Value> <Obj> <type>2</type> <id>82</id> <name>hls_2DFilter</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:hls_2DFilter&gt;</content> </item> <item class_id_reference="16" object_id="_30"> <Value> <Obj> <type>2</type> <id>86</id> <name>gry2rgb</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:gry2rgb&gt;</content> </item> <item class_id_reference="16" object_id="_31"> <Value> <Obj> <type>2</type> <id>90</id> <name>mat2strm</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:mat2strm&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_32"> <Obj> <type>3</type> <id>60</id> <name>hls_video_block</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>10</count> <item_version>0</item_version> <item>31</item> <item>34</item> <item>37</item> <item>40</item> <item>46</item> <item>49</item> <item>52</item> <item>55</item> <item>58</item> <item>59</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>41</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_33"> <id>62</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_34"> <id>63</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_35"> <id>64</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_36"> <id>65</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_37"> <id>67</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_38"> <id>68</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_39"> <id>69</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_40"> <id>70</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_41"> <id>71</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_42"> <id>72</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_43"> <id>73</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_44"> <id>74</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_45"> <id>76</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_46"> <id>77</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_47"> <id>79</id> <edge_type>1</edge_type> <source_obj>78</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_48"> <id>80</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_49"> <id>81</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_50"> <id>83</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_51"> <id>84</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_52"> <id>85</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_53"> <id>87</id> <edge_type>1</edge_type> <source_obj>86</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_54"> <id>88</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_55"> <id>89</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_56"> <id>91</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_57"> <id>92</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_58"> <id>93</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_59"> <id>94</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_60"> <id>95</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_61"> <id>96</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_62"> <id>97</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_63"> <id>98</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_64"> <id>99</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_65"> <id>100</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_66"> <id>435</id> <edge_type>4</edge_type> <source_obj>55</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_67"> <id>436</id> <edge_type>4</edge_type> <source_obj>52</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_68"> <id>437</id> <edge_type>4</edge_type> <source_obj>49</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_69"> <id>438</id> <edge_type>4</edge_type> <source_obj>46</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_70"> <id>439</id> <edge_type>4</edge_type> <source_obj>46</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_71"> <id>440</id> <edge_type>4</edge_type> <source_obj>49</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_72"> <id>441</id> <edge_type>4</edge_type> <source_obj>52</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_73"> <id>442</id> <edge_type>4</edge_type> <source_obj>55</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_74"> <mId>1</mId> <mTag>hls_video_block</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>60</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>2772814</mMinLatency> <mMaxLatency>2772814</mMaxLatency> <mIsDfPipe>1</mIsDfPipe> <mDfPipe class_id="23" tracking_level="1" version="0" object_id="_75"> <port_list class_id="24" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port_list> <process_list class_id="25" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_76"> <type>0</type> <name>strm2mat_U0</name> <ssdmobj_id>46</ssdmobj_id> <pins class_id="27" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_77"> <port class_id="29" tracking_level="1" version="0" object_id="_78"> <name>IN_V_data_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id="30" tracking_level="1" version="0" object_id="_79"> <type>0</type> <name>strm2mat_U0</name> <ssdmobj_id>46</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_80"> <port class_id_reference="29" object_id="_81"> <name>IN_V_keep_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_82"> <port class_id_reference="29" object_id="_83"> <name>IN_V_strb_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_84"> <port class_id_reference="29" object_id="_85"> <name>IN_V_user_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_86"> <port class_id_reference="29" object_id="_87"> <name>IN_V_last_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_88"> <port class_id_reference="29" object_id="_89"> <name>IN_V_id_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_90"> <port class_id_reference="29" object_id="_91"> <name>IN_V_dest_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_92"> <port class_id_reference="29" object_id="_93"> <name>OUT_size_read</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> <item class_id_reference="28" object_id="_94"> <port class_id_reference="29" object_id="_95"> <name>OUT_data_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_96"> <type>0</type> <name>rgb2gry_U0</name> <ssdmobj_id>49</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_97"> <port class_id_reference="29" object_id="_98"> <name>input_mat_data_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_99"> <type>0</type> <name>rgb2gry_U0</name> <ssdmobj_id>49</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_100"> <port class_id_reference="29" object_id="_101"> <name>output_mat_data_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_99"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_102"> <type>0</type> <name>hls_2DFilter_U0</name> <ssdmobj_id>52</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_103"> <port class_id_reference="29" object_id="_104"> <name>input_mat_data_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_105"> <type>0</type> <name>hls_2DFilter_U0</name> <ssdmobj_id>52</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_106"> <port class_id_reference="29" object_id="_107"> <name>output_mat_data_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_105"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_108"> <type>0</type> <name>gry2rgb_U0</name> <ssdmobj_id>55</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_109"> <port class_id_reference="29" object_id="_110"> <name>input_mat_data_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_111"> <type>0</type> <name>gry2rgb_U0</name> <ssdmobj_id>55</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_112"> <port class_id_reference="29" object_id="_113"> <name>output_mat_data_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_111"></inst> </item> </pins> </item> <item class_id_reference="26" object_id="_114"> <type>0</type> <name>mat2strm_U0</name> <ssdmobj_id>58</ssdmobj_id> <pins> <count>9</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_115"> <port class_id_reference="29" object_id="_116"> <name>IN_size_read</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_117"> <type>0</type> <name>mat2strm_U0</name> <ssdmobj_id>58</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_118"> <port class_id_reference="29" object_id="_119"> <name>IN_data_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_120"> <port class_id_reference="29" object_id="_121"> <name>OUT_V_data_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_122"> <port class_id_reference="29" object_id="_123"> <name>OUT_V_keep_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_124"> <port class_id_reference="29" object_id="_125"> <name>OUT_V_strb_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_126"> <port class_id_reference="29" object_id="_127"> <name>OUT_V_user_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_128"> <port class_id_reference="29" object_id="_129"> <name>OUT_V_last_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_130"> <port class_id_reference="29" object_id="_131"> <name>OUT_V_id_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> <item class_id_reference="28" object_id="_132"> <port class_id_reference="29" object_id="_133"> <name>OUT_V_dest_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </item> </pins> </item> </process_list> <channel_list class_id="31" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="32" tracking_level="1" version="0" object_id="_134"> <type>1</type> <name>in_tmp_data_V</name> <ssdmobj_id>31</ssdmobj_id> <ctype>0</ctype> <depth>100</depth> <bitwidth>24</bitwidth> <source class_id_reference="28" object_id="_135"> <port class_id_reference="29" object_id="_136"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_79"></inst> </source> <sink class_id_reference="28" object_id="_137"> <port class_id_reference="29" object_id="_138"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_99"></inst> </sink> </item> <item class_id_reference="32" object_id="_139"> <type>1</type> <name>im_1_data_V</name> <ssdmobj_id>34</ssdmobj_id> <ctype>0</ctype> <depth>100</depth> <bitwidth>7</bitwidth> <source class_id_reference="28" object_id="_140"> <port class_id_reference="29" object_id="_141"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_99"></inst> </source> <sink class_id_reference="28" object_id="_142"> <port class_id_reference="29" object_id="_143"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_105"></inst> </sink> </item> <item class_id_reference="32" object_id="_144"> <type>1</type> <name>im_2_data_V</name> <ssdmobj_id>37</ssdmobj_id> <ctype>0</ctype> <depth>100</depth> <bitwidth>1</bitwidth> <source class_id_reference="28" object_id="_145"> <port class_id_reference="29" object_id="_146"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_105"></inst> </source> <sink class_id_reference="28" object_id="_147"> <port class_id_reference="29" object_id="_148"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_111"></inst> </sink> </item> <item class_id_reference="32" object_id="_149"> <type>1</type> <name>out_tmp_data_V</name> <ssdmobj_id>40</ssdmobj_id> <ctype>0</ctype> <depth>100</depth> <bitwidth>17</bitwidth> <source class_id_reference="28" object_id="_150"> <port class_id_reference="29" object_id="_151"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_111"></inst> </source> <sink class_id_reference="28" object_id="_152"> <port class_id_reference="29" object_id="_153"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_117"></inst> </sink> </item> </channel_list> <net_list class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </net_list> </mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="-1"></res> <node_label_latency class_id="36" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="37" tracking_level="0" version="0"> <first>31</first> <second class_id="38" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>49</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>52</first> <second> <first>5</first> <second>1</second> </second> </item> <item> <first>55</first> <second> <first>7</first> <second>1</second> </second> </item> <item> <first>58</first> <second> <first>9</first> <second>1</second> </second> </item> <item> <first>59</first> <second> <first>11</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="39" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="40" tracking_level="0" version="0"> <first>60</first> <second class_id="41" tracking_level="0" version="0"> <first>0</first> <second>11</second> </second> </item> </bblk_ent_exit> <regions class_id="42" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="43" tracking_level="1" version="0" object_id="_154"> <region_name>hls_video_block</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>60</item> </basic_blocks> <nodes> <count>45</count> <item_version>0</item_version> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>38</item> <item>39</item> <item>40</item> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> <item>49</item> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>57</item> <item>58</item> <item>59</item> </nodes> <anchor_node>-1</anchor_node> <region_type>16</region_type> <interval>0</interval> <pipe_depth>0</pipe_depth> </item> </regions> <dp_fu_nodes class_id="44" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="45" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="46" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="47" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core class_id="48" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with swig; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_get_pixel_mapfv_reply_t is -- Item -- type Item is record response_type : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; sequence : aliased Interfaces.Unsigned_16; length : aliased Interfaces.Unsigned_32; pad1 : aliased swig.int8_t_Array (0 .. 3); n : aliased Interfaces.Unsigned_32; datum : aliased xcb.xcb_glx_float32_t; pad2 : aliased swig.int8_t_Array (0 .. 11); end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_glx_get_pixel_mapfv_reply_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_pixel_mapfv_reply_t.Item, Element_Array => xcb.xcb_glx_get_pixel_mapfv_reply_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_pixel_mapfv_reply_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_pixel_mapfv_reply_t.Pointer, Element_Array => xcb.xcb_glx_get_pixel_mapfv_reply_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_get_pixel_mapfv_reply_t;